/**
* App\Infrastructure\Providers\RepositoryServiceProvider.php
*/
public function boot(): void
{
Blade::componentNamespace('App\\Application\\Components\\', 'admin');
Blade::component('admin::navigation', Navigation::class);
/* ... */
}
/**
* App\Application\Components\Navigation.php
*/
public function render(): \Illuminate\View\View
{
return View::make('admin::components.navigation', [
'routes' => $this->registerRoutes()
]);
}
<x-admin::navigation />
$products = Product::query()->with('categories')->where('categories.id', $category->id)->get();
where(/*...*/)
и потом прописать алиас, типа: select('categories.id AS c.id')
, чтобы с ID товаров не пересекалось.public function edit($login, Account $account)
{
return view('profile.accounts.edit', [
'account' => $account
]);
}