diff --git a/app/Http/Controllers/BrandController.php b/app/Http/Controllers/BrandController.php index d04586b..b957fcf 100644 --- a/app/Http/Controllers/BrandController.php +++ b/app/Http/Controllers/BrandController.php @@ -23,22 +23,22 @@ class BrandController extends Controller */ public function index(Request $request) { - /** @var \Illuminate\Database\Eloquent\Builder $brands */ - $brands = Brand::query(); + /** @var \Illuminate\Database\Eloquent\Builder $query */ + $query = Brand::query(); if ($request->search) { $this->searchQuery( - $brands, + $query, $request->search, null, 'name', ); } - $this->sortQuery($brands); + $this->sortQuery($query); $searchFields = trans('Nom'); - $brandModels = $brands->paginate(12); + $brandModels = $query->paginate(12); return view('brands.index', compact('brandModels', 'searchFields')); } diff --git a/app/Http/Controllers/QuestionController.php b/app/Http/Controllers/QuestionController.php index e2ec4dd..931b874 100644 --- a/app/Http/Controllers/QuestionController.php +++ b/app/Http/Controllers/QuestionController.php @@ -28,6 +28,7 @@ class QuestionController extends Controller */ public function index(Request $request) { + /** @var \Illuminate\Database\Eloquent\Builder $query */ $query = Question::query(); if ($request->brand) { diff --git a/resources/views/brands/index-list.blade.php b/resources/views/brands/index-list.blade.php index 53d732f..0f41bba 100644 --- a/resources/views/brands/index-list.blade.php +++ b/resources/views/brands/index-list.blade.php @@ -21,23 +21,6 @@ {{ $brandModel->name }} {{ count(\App\Models\CustomerInfo::where('brand_id', 'LIKE', $brandModel->id)->get()) }} {{ count(\App\Models\CustomerInfo::where('brand_id', 'LIKE', $brandModel->id)->where('opt_in', true)->get()) }} - @php $routeName = request()->route()->getName(); @endphp - @if(empty(request()->search) and empty($noOrder) and Session::get("$routeName.sort_col") === 'order') - - - - - @endif {{ $brandModel->updated_at->formatLocalized('%d/%m/%Y à %H:%M') }} diff --git a/resources/views/customers/index-list.blade.php b/resources/views/customers/index-list.blade.php index 4d7026b..5dfd080 100644 --- a/resources/views/customers/index-list.blade.php +++ b/resources/views/customers/index-list.blade.php @@ -19,17 +19,15 @@ {{ $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"> + class="btn btn-sm btn-warning"> - @endcan @endforeach diff --git a/resources/views/questions/index-list.blade.php b/resources/views/questions/index-list.blade.php index 4045a27..201bb3e 100644 --- a/resources/views/questions/index-list.blade.php +++ b/resources/views/questions/index-list.blade.php @@ -28,7 +28,7 @@ {{-- MODEL ACTIONS --}}
- -