Render articles using a template like notes
This commit is contained in:
parent
42a85845fe
commit
acbb958475
4 changed files with 16 additions and 37 deletions
|
@ -11,10 +11,10 @@
|
|||
@foreach ($items as $item)
|
||||
@switch($item)
|
||||
@case($item instanceof \App\Models\Note)
|
||||
<p>This is a note</p>
|
||||
@include('templates.note', ['note' => $item])
|
||||
@break
|
||||
@case($item instanceof \App\Models\Article)
|
||||
<p>This is an article</p>
|
||||
@include('templates.article', ['article' => $item])
|
||||
@break
|
||||
@case($item instanceof \App\Models\Like)
|
||||
<p>This is a like</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue