heloufir / medium-laravel-angular-auth

Laravel & Angular authentication Medium article resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

medium-laravel-angular-auth

Laravel & Angular authentication Medium article resources

Steps to make it works

  1. Clone this repository
  2. Install laravel project dependencies
cd medium-laravel-angular-back
composer install
  1. Install angular project dependencies
cd medium-laravel-angular-front
npm install
  1. Create an .env file and configure your database access
  2. Migrate and configure laravel/passport
cd medium-laravel-angular-back
php artisan migrate
php artisan passport:install
  1. Configure laravel/passport on Angular
Get the password grant client token generated by the above command (php artisan passport:install) and update the file
laravel-angular-auth-front/src/app/services/auth.service.ts
by editing the login() method
  1. Add sample user
cd medium-laravel-angular-back
php artisan db:seed

This command will add a sample user with the following information to your database:

  1. Run application Run laravel application, by executing the following command:
cd medium-laravel-angular-back
php artisan serve

Run angular application, by executing the following command:

cd medium-laravel-angular-front
ng serve

PS. Use the sample user email and password in the authentication form.

About

Laravel & Angular authentication Medium article resources


Languages

Language:PHP 74.6%Language:TypeScript 17.0%Language:HTML 6.6%Language:JavaScript 1.7%Language:CSS 0.1%