Lager-v3/resources/views/brands/show_data.blade.php

42 lines
1.4 KiB
PHP

<h2>@lang('models')</h2>
@if(count($data->models) >= 1)
<table>
@foreach($data->models as $model)
<tr>
<td>
@can('models_view')
<a href="{{route('models.show',['model' => $model])}}" class="btn btn-success" target="_blankd">{{$model->name}}</a>
@else
{{$model->name}}
@endcan
</td>
</tr>
@endforeach
</table>
@else
@lang('no_amount') @lang('models')
@endif
<hr>
<h2>@lang('products')</h2>
@if(count($data->products) >= 1)
<table>
@foreach($data->products as $product)
<tr>
<td>
<a href="{{route('products.show',['product' => $product])}}" class="btn btn-success" target="_blank">
@if(config('app.barcode_mode') == 'dynamic')
{{$product->category->name}}.@if(!empty($product->subcategory->name)){{$product->subcategory->name}}.@endif{{$product->brand->name}}.{{$product->model->name}}@if(!empty($product->name)).{{$product->name}}@endif
@endif
@if(config('app.barcode_mode') == 'static')
{{$product->barcode}}
@endif
</a> </td>
</tr>
@endforeach
</table>
@else
@lang('no_amount') @lang('products')
@endif