Blame view
app/Providers/ComposerServiceProvider.php
1.24 KB
242debab8 Первый коммит в п... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<?php namespace App\Providers; use App\Models\Area; use App\Models\Contact; use App\Models\format_area; use App\Models\Tag; use App\Models\type_area; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\View; class ComposerServiceProvider extends ServiceProvider { /** * Register services. * * @return void */ public function register() { |
f615f47db Страница каталога... |
22 |
$views = ['part.filter.main','part.filter.catalog', 'part.filter.category']; |
242debab8 Первый коммит в п... |
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
View::composer($views, function($view) { $items_type_area = type_area::all(); $items_format_area = format_area::all(); $items_area = Area::all(); $view->with([ 'items_area' => $items_area, 'items_type_area' => $items_type_area, 'items_format_area' => $items_format_area, ]); } ); $views = ['layout.site', 'index']; View::composer($views, function($view) { $view->with(['items_contact' => Contact::limit(1)->get()]); }); } /** * Bootstrap services. * * @return void */ public function boot() { // } } |