This is an APIs and Admin panel-based project for the Nuxt.js front-end app.
Browse admin panel with this url /admin
and using admin user credentials to login. With dummy data:
Email: [email protected]
Password: password
Here is the postman APIs collection to interact with API.
Create Layers for Model; Repository, RepositoryInterface, Service, ServiceInterface.
php artisan make:layers Product
Create a new model Repository Interface
php artisan make:repository-interface Product
Create a new model Repository.
php artisan make:repository Product
Create a new model Service Interface.
php artisan make:service-interface Product
Create a new model Service.
php artisan make:service Product
This Laravel application you can include the packages with the following command:
composer install
Next make sure to create a new database and add your database credentials to your .env file:
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
You will also want to update your website URL inside of the APP_URL
variable inside the .env file:
APP_URL=http://localhost:8000
php artisan migrate
- SQL file location
database/sql/codertextapi.sql
- Import the sql file into your database to access dummy data.
- If you prefer seed dummy data then run
php artisan db:seed
with specific seed file using--class
flag.
php artisan storage:link
And we're all good to go!
Start up a local development server And, visit http://codertextapi.test/admin.
You may wish to assign admin privileges to an existing user. This can easily be done by running this command:
php artisan voyager:admin [email protected]
If you wish to create a new admin user you can pass the --create
flag, like so:
php artisan voyager:admin [email protected] --create
And you will be prompted for the user's name and password.