public function getIndex() { $users = BackUser::all(); $title = "Пользователи"; $desc = "обзор и управление пользователями"; return view('backend_auth::users.list')->withUsers($users)->withTitle($title)->withDesc($desc); }
/** * Boot the service provider. * @return void */ public function boot() { $this->app[Kernel::class]->pushMiddleware(Middleware::class); $this->loadViewsFrom(__DIR__ . '/../resources/views', 'backend_auth'); $this->mergeConfigFrom(realpath(__DIR__ . '/../config/config.php'), 'module'); $this->publishes([__DIR__ . '/../config/config.php' => config_path('module.php')], 'config'); $this->publishes([__DIR__ . '/../config/auth.php' => config_path('auth.php')], 'config'); $this->publishes([__DIR__ . '/../public' => public_path('backend_auth')], 'public'); $this->publishes([__DIR__ . '/../migrations/' => database_path('migrations')], 'migrations'); require __DIR__ . '/routes.php'; pusher('user_menu', 'backend_auth::user_menu'); pusher('sidebar', 'backend_auth::sidebar', [], 2); pusher('widgets', 'backend_auth::user_widget', ['users' => User::all()]); }