A Laravel Auth and Router Management Rest API
- Laravel 8.0
- Vue 2.6
For each controller there's an already setup route in routes/api.php
file:
POST api/auth/login
, to do the login and get your access token;POST api/auth/refresh
, to refresh an existent access token by getting a new one;POST api/auth/register
, to create a new user into your application;POST api/auth/logout
, to log out the user by invalidating the passed token;GET api/auth/profile
, to get current user data;POST api/auth/profile
, to update current user data;
POST api/router/filter
, to get router data with multiple filter, pagination;GET api/router
, to get all router data;POST api/router
, to create a new router;PUT api/router/:id
, to update current user data;DELETE api/router/:id
, to update current user data;DELETE api/router/update/:id
, to update current user data;
You create a new project starting from this repository, the php artisan jwt:generate command will be executed.
git clone https://github.com/ashishnimrot/cisco_router_management.git
cd cisco_router_management/server
cp .env.example .env
composer install
- Edit
.env
and set your database connection details php artisan key:generate
php artisan jwt:secret
php artisan migrate:fresh --seed
php artisan generate-data:router 100
# serve on browser
php artisan serve
php artisan test
cd cisco_router_management/client
npm install
npm run serve
npm run build
This will create a new user that you can use to sign in :
email: ashish.nimrot@world.com
password: password