Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function __construct()
- {
- $this->middleware(function ($request, $next) {
- //dd(session()->get('logged_in'));
- if(session()->get('logged_in') == NULL)
- {
- session()->flash('flash-danger', 'Please login with your username and password');
- return redirect('admin/login');
- }else{
- return $next($request);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement