public function getIndex() { $title = "Типы материалов"; $desc = "обзор и управление типами материалов"; $types = ContentType::all(); return view('content_types::types')->withTitle($title)->withDesc($desc)->withTypes($types); }
/** * Boot the service provider. * @return void */ public function boot() { $this->loadViewsFrom(__DIR__ . '/../resources/views', 'content_types'); $this->mergeConfigFrom(realpath(__DIR__ . '/../config/config.php'), 'module'); $this->publishes([__DIR__ . '/../migrations/' => database_path('migrations')], 'migrations'); pusher('sidebar', 'content_types::sidebar', [], 1); pusher('sidebar', 'content_types::posts_menu', ['types' => ContentType::all()], 98); require __DIR__ . '/routes.php'; }