Answers for "how to import auth in laravel"

PHP
2

install laravel auth

1 - composer create-project laravel/laravel laravel8 8.0
2 - composer require laravel/ui
3 - php artisan ui vue --auth
4 - npm install
5 - npm run dev
6 - php artisan ui:auth
  
7 = > url example.com/login
Posted by: Guest on June-18-2021
2

get user auth in laravel

Auth::user();
Posted by: Guest on July-06-2020
1

auth::login in laravel

public function manualLogin(){
    $user = User::find(1);
    Auth::login($user);
    return redirect('/');
}


or 
  
  
  Auth::logout();
Posted by: Guest on May-24-2021
4

laravel auth

//namespace
use Illuminate\Support\Facades\Auth;
Posted by: Guest on May-17-2020
2

laravel force login by id

Auth::login($user);
Posted by: Guest on April-21-2020

Browse Popular Code Answers by Language