Skip to content

geohussain1989/AD-Pre-Employment-hussain

Repository files navigation

AD Pre Employment Test

Step 1: Install Laravel

laravel new project-name
or
composer create-project --prefer-dist laravel/laravel project-name

Step 2: Database Configuration

Create a database and configure the env file.

Step 3: Passport Installation

To get started, install Passport via the Composer package manager:

composer require laravel/passport

The Passport service provider registers its own database migration directory with the framework, so you should migrate your database after installing the package. The Passport migrations will create the tables your application needs to store clients and access tokens:

php artisan migrate

Next, you should run the passport:install command. This command will create the encryption keys needed to generate secure access tokens. In addition, the command will create "personal access" and "password grant" clients which will be used to generate access tokens:

php artisan passport:install

Step 4: Passport Configuration

After running the passport:install command, add the Laravel\Passport\HasApiTokens trait to your App\Models\User model. This trait will provide a few helper methods to your model which allow you to inspect the authenticated user's token and scopes:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published