Lager-v3/resources/views/models/index.blade.php

51 lines
1.7 KiB
PHP

@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
@include('Partials.Pages.index_top')
<table class="table table-striped">
<thead>
<th>@lang('brand')</th>
<th>@lang('name')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $model)
<tr>
<td class="align-middle">
@can('brands_view')
<a href="{{route('brands.show',['brand' => $model->brand])}}" class="btn btn-success">
{{$model->brand->name}}
</a>
@else
{{$model->brand->name}}
@endcan
</td>
<td class="align-middle">
@can('models_view')
<a href="{{route('models.show',['model' => $model])}}" class="btn btn-success">
{{$model->name}}
</a>
@else
{{$model->name}}
@endcan
</td>
<td>
@can('models_edit')
<a href="{{route('models.edit',['model' => $model])}}" class="btn btn-outline-success">
@lang('edit')
</a>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection