私がJohnとしてログインしている場合、Susanさんの代わりにJohnの赤いボタンのみを表示するにはどうすればよいですか?Laravelのログインユーザーのみ表示
テストシステム環境:Win10、Laravel5.4、Mysql5.7.19。私が理解から
<table class="table table-responsive" id="jobs-table">
...
@foreach($jobs as $job)
<tr>
<td>{!! $job->user_name !!}</td>
...
<td>{!! $job->created_at !!}</td>
<td>
{!! Form::open(['route' => ['jobs.destroy', $job->id], 'method' => 'delete']) !!}
<div class='btn-group'>
<a href="{!! route('jobs.show', [$job->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>
<a href="{!! route('jobs.edit', [$job->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
{!! Form::button('<i class="glyphicon glyphicon-stop"></i>', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure to Stop?')"]) !!}
</div>
{!! Form::close() !!}
</td>
</tr>
@endforeach
役割システムを追加することを検討? – urfusion
@urfusion、まだロールシステムを使用していません。ありがとう。 – Magnetic
こんにちは2つの違いは何ですか? – Maraboc