Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @extends('app')
- @section('content')
- {!! link_to('posts/create', 'Add Post', ['class' => 'btn btn-primary']) !!}
- @if ($posts)
- <hr/>
- <table class="table table-bordered table-striped table-hover">
- <tr>
- <th>Title</th>
- <th>Description</th>
- <th>Published on</th>
- <th>Action</th>
- </tr>
- @foreach ($posts as $post)
- <tr>
- <td>{!! link_to_action('PostsController@show', $post->title, $parameters = array($post->id)) !!}</td>
- <td>{!! $post->description !!}</td>
- <td>{!! $post->published_at !!}</td>
- <td>{!! link_to_action('PostsController@edit', 'Edit Post', $parameters = array($post->id), $attributes = ['class' => 'btn btn-warning']) !!} {!! link_to_action('PostsController@destroy', 'Delete', $parameters = array($post->id), $attributes = ['class' => 'btn btn-danger']) !!}</td>
- </tr>
- @endforeach
- </table>
- @endif
- @stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement