diff --git a/app/Http/Controllers/CustomerController.php b/app/Http/Controllers/CustomerController.php index a705fe5..c4631b1 100644 --- a/app/Http/Controllers/CustomerController.php +++ b/app/Http/Controllers/CustomerController.php @@ -118,12 +118,12 @@ class CustomerController extends Controller } /** @var \Illuminate\Pagination\AbstractPaginator */ - $customers = $query->paginate(config('crud.paginate', 50)); + $customerModels = $query->paginate(50); - return view('customer.index', compact( + return view('customers.index', compact( 'modelClass', 'modelTable', - 'customers', + 'customerModels', 'brands' )); } @@ -142,7 +142,7 @@ class CustomerController extends Controller $customerLogin = CustomerLogin::where('customer_id', $customer->id) ->where('brand_id', $brand->id)->first(); - return view('customer.show', compact( + return view('customers.show', compact( 'customerInfos', 'customerLogin' )); @@ -208,7 +208,7 @@ class CustomerController extends Controller public function export() { $brands = Brand::all(); - return view('customer.export', compact( + return view('customers.export', compact( 'brands' )); } diff --git a/resources/views/customer/index-tableHeaders.blade.php b/resources/views/customer/index-tableHeaders.blade.php deleted file mode 100644 index 3885d08..0000000 --- a/resources/views/customer/index-tableHeaders.blade.php +++ /dev/null @@ -1,76 +0,0 @@ -
| - {{ $customerInfo->customer->email }} - | -- {{ $customerInfo->firstname }} - | -- {{ $customerInfo->lastname }} - | -- {{ $customerInfo->opt_in ? 'Oui' :'Non' }} - | -- {{ $customerInfo->brand->name }} - | -- {{ $customerInfo->status ? 'Oui' :'Non' }} - | -- {{ $customerInfo->last_connection }} - | - - {{-- MODEL ACTIONS --}} -
-
- @can('view', $customerInfo->customer)
- $customerInfo->customer_id,
- 'brand' => $customerInfo->brand_id
- ]) }}" class="btn btn-sm btn-primary">{{ __('crud-policies::crud.view') }}
- @endcan
-
- |
-
| - {{ __('crud-policies::crud.nothingtoshow') }} - | -|||||||
| {{ $customerInfo->customer->email }} | +{{ $customerInfo->firstname }} | +{{ $customerInfo->lastname }} | +{{ $customerInfo->opt_in ? 'Oui' :'Non' }} | +{{ $customerInfo->brand->name }} | +{{ $customerInfo->status ? 'Oui' :'Non' }} | +{{ $customerInfo->last_connection }} | + {{-- MODEL ACTIONS --}} ++ @can('view', $customerInfo->customer) + $customerInfo->customer_id, + 'brand' => $customerInfo->brand_id + ]) }}" + title="{{ __('Afficher ce :model', ['model' => Str::singular(__('models.classes.customers'))]) }}" + data-bs-toggle="tooltip" + class="btn btn-sm btn-primary"> + + + @endcan + | +
| + {{ __('Aucun résultat pour les :models', ['models' => __('models.classes.customers')]) }} + | +|||||||