public function boot() {
$this->geo();
}
public function geo() {
Session::flash('test', 'фцвфцв');
// Session::forget('test');
}
{{ session()->get('test') }}
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
$this->mapWhatRoutes();
}
protected function mapWhatRoutes()
{
Route::middleware('what')
->namespace($this->namespace)
->group(base_path('app/Http/routes.php'));
}
<?php
use Illuminate\Support\Facades\Redirect;
use Zizaco\Entrust\Entrust;
Entrust::routeNeedsRole('admin', 'admin', Redirect::to('/'));
"Non-static method Zizaco\Entrust\Entrust::routeNeedsRole() should not be called statically"
И как это сделать?