How to setup Admin RestAPI


Step 1: Open terminal in your hosting platform.
Step 2: You will need to install Laravel Passport feature and generate the encryption keys. Run the following command in your terminal

php artisan passport:install
Step 4: Copy and save the generated Client ID and Client Secret values. You’ll need these for accessing the RestAPI
Step 3: Laravel Passport tables should already be included in your database as they come with the update package but you can migration command at any time if needed as it does not alter any of the existing tables.


php artisan migrate
Step 4: To generate RestAPI documentation using L5-Swagger, type the following command in your terminal:

php artisan l5-swagger:generate
Step 5: Congrats! You know have RestAPI and documentation properly installed in your script. To access RestAPI documentations visit following URL in your browser:

https://YOUR-DOMAIN-NAME/api/v1/documentation