<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>
<button type="button" class="btn btn-link">Link</button>btn-primarybtn-secondarybtn-successbtn-dangerbtn-warningbtn-infobtn-lightbtn-dark100%540px720px960px1140pxxs<576pxsm≥576pxmd≥768pxlg≥992pxxl≥1200pxdeleteedit@if (!Auth::guest())
    @if (Auth::user()->id == $post->user_id)
        <!-- delete and edit links -->
    @endif
@endifpublic function __construct() {
    $this->middleware('auth', ['except'=>['index', 'show']]);
}public function destroy($id)
{
    $post = POST::find($id);
    // Check for correct user
    if (auth()->user()->id !== $post->user_id) {
        return redirect('/posts')->with('error', 'Unauthorized page');
    }
    $post->delete();
    return view('posts')->with('success', 'Post Removed');
}public function edit($id)
{
    $post = POST::find($id);
    // Check for correct user
    if (auth()->user()->id !== $post->user_id) {
        return redirect('/posts')->with('error', 'Unauthorized page');
    }
    return view('posts.edit')->with('post', $post);
}$user_id = auth()->user()->id;
$user = User::find($user_id);
return view('dashboard')->with('posts', $user->posts);Postpublic function user() {
    return $this->belongsTo('App\User');
}Userpublic function posts() {
    return $this->hasMany('App\Post');
}