Through this project, the Hero application and the passenger application can reach the end point with the backend
Clone the repository
git clone git@github.com:AtmoDrive/AtmoDrive-api.git
Switch to the repo folder
cd AtmoDrive-api
Install all the dependencies using composer
composer install
Copy the example env file and make the required configuration changes in the .env file
cp .env.example .env
Generate a new application key
php artisan key:generate
Generate a new JWT authentication secret key
php artisan jwt:generate
Start the local development server
php artisan serve
You can now access the server at http://localhost:8000
TL;DR command list
git clone git@github.com:AtmoDrive/AtmoDrive-api.git
cd AtmoDrive-api
composer install
cp .env.example .env
php artisan key:generate
php artisan jwt:generate
php artisan passport:client --personal
Make sure you set the correct database connection information before running the migrations Environment variables
php artisan serve
app
- Contains all the Eloquent modelsapp/Http/Controllers/Api
- Contains all the api controllersapp/Http/Middleware
- Contains the JWT auth middlewareapp/Http/Requests/Api
- Contains all the api form requestsconfig
- Contains all the application configuration filesroutes
- Contains all the api routes defined in api.php file
.env
- Environment variables can be set in this file
Note : You can quickly set the database information and other variables in this file and have the application fully working.
Run the laravel development server
php artisan serve
The api can now be accessed at
http://localhost:8000/api
Request headers
Required | Key | Value |
---|---|---|
Yes | Content-Type | application/json |
Yes | X-Requested-With | XMLHttpRequest |
Yes | Authorization | Token {JWT} |