@extends('layouts.production') @section('addCss') @endsection @section('content')

{{Trans("brands.menu")}} {{Trans("dashboard.crud.add")}} {{Trans("dashboard.crud.new")}}

@include('layouts.includes.message')

{{ $brand->exists ? trans('brands.edit_form') : trans('brands.create_form') }}

{{ Form::model($brand, [ 'method' => $brand->exists ? "PUT" : "POST", 'route' => $brand->exists ? ["brands.update", $brand->id] : "brands.store", 'files' => true ]) }}
{{ Form::label('name', trans('brands.name')) }} {{ Form::text('name', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('brands.name') ]) }}
{{ Form::label('logo', trans('brands.logo')) }} {{ Form::file('logo', ['class' => "form-control" ]) }}

{{ trans('dashboard.others.show_all') }}

@if (count($brands) > 0) @foreach ($brands as $brand) @endforeach @endif
{{ trans('brands.id') }} {{ trans('brands.logo') }} {{ trans('brands.name')}} {{ trans('dashboard.crud.actions') }}
{{ $brand->id }} {{ HTML::image($brand->logo, $brand->name, ['class' => 'img-thumbnail', 'width' => "35%"]) }} {{ $brand->name }} {{ count_product_in_brand($brand->id)}} {{ trans('dashboard.crud.edit') }} {{Trans("dashboard.crud.remove")}} @include('layouts.includes.modals.danger', ['model' => $brand,'toRoute'=>'brands','attribute'=>'name'])
@endsection @section('addJs') @endsection