Post
modelpublic function user() {
return $this->belongsTo('App\User');
}
Inside User
modelpublic function posts() {
return $this->hasMany('App\Post');
}
delete
and edit
links@if (!Auth::guest())
@if (Auth::user()->id == $post->user_id)
<!-- delete and edit links -->
@endif
@endif
xs
Extra small <576px
sm
Small ≥576px
md
Medium ≥768px
lg
Large ≥992px
xl
Extra large ≥1200px
100%
Extra small <576px
540px
Small ≥576px
720px
Medium ≥768px
960px
Large ≥992px
1140px
Extra large ≥1200px<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-secondary">Secondary</button>
<button type="button" class="btn btn-outline-success">Success</button>
<button type="button" class="btn btn-outline-danger">Danger</button>
<button type="button" class="btn btn-outline-warning">Warning</button>
<button type="button" class="btn btn-outline-info">Info</button>
<button type="button" class="btn btn-outline-light">Light</button>
<button type="button" class="btn btn-outline-dark">Dark</button>
Outline button Classes:
btn-outline-primary
btn-outline-secondary
btn-outline-success
btn-outline-danger
btn-outline-warning
btn-outline-info
btn-outline-light
btn-outline-dark
btn-lg
<button type="button" class="btn btn-primary btn-lg">Large primary</button>
<button type="button" class="btn btn-secondary btn-lg">Large secondary</button>
Medium buttons with no special class because it's default<button type="button" class="btn btn-primary">Default primary</button>
<button type="button" class="btn btn-secondary">Default secondary</button>
Small buttons with class btn-sm
<button type="button" class="btn btn-primary">Small primary</button>
<button type="button" class="btn btn-secondary btn-sm">Small secondary</button>
<div class="container">
<div class="row">
<div class="col-sm">
One of three columns
</div>
<div class="col-sm">
One of three columns
</div>
<div class="col-sm">
One of three columns
</div>
</div>
</div>
12