This is how you can set up this project locally. To get a local copy up and running follow these simple example steps.
-
Clone the repo
git clone
-
Install all the packages of new application
composer install
-
Create the env file
cp .env.example .env
-
Generate a key
php artisan key:generate
-
Modify the env file with your database credentials
DB_DATABASE = example_db_name DB_USERNAME = example_user DB_PASSWORD = example_password
-
Modify the env file with your SMTP credentials (MailTrap recommended)
MAIL_MAILER = smtp MAIL_HOST = example_host MAIL_PORT = example_port MAIL_USERNAME = example_username MAIL_PASSWORD = example_password MAIL_ENCRYPTION = example_encryption MAIL_FROM_ADDRESS = "[email protected]" MAIL_FROM_NAME = "${APP_NAME}"
-
Modify the 'QUEUE_CONNECTION' in the env file
QUEUE_CONNECTION=database
-
Create the tables in the database
php artisan migrate
-
Fill the tables with the data
php artisan db:seed
-
Install package manager for the JavaScript
npm install & npm run dev
-
Add this code in your env file
L5_SWAGGER_CONST_HOST=http://localhost:8000/
then run
php artisan l5-swagger:generate
-
Serve the project
php artisan serve
or if there is some other project running at port 8000
php artisan serve --port=8001
-
Enable Queue work in the background
php artisan queue:work
so the jobs could be processed in the background
-
Access the project at http://localhost:8000/ or the custom port that you set up
-
Access the api documentation at http://localhost:8000/api/documentation