A complete app based on Laravel for the backend:
- MongoDB (https://github.com/jenssegers/laravel-mongodb) & Eloquent
And for the frontend
- Vue (https://vuejs.org/) + Vuetify (https://vuetifyjs.com/en/)
The middleware auth is using:
Requirements:
- MongoDB PHP driver installed. (http:https://php.net/manual/en/mongodb.installation.php)
- PHP 7
Installing composer dependencies
composer install
Installing npm dependencies
npm install
Environment
cp .env.example .env
App Key
php artisan key:generate
JWT Token
php artisan jwt:secret
NOTE: Bear in mind to change your mongo DB credentials
Run the migrations to load all necessary tables to run the application:
php artisan migrate
And just load basic data seeding the application with
php artisan db:seed
The application comes with the API tests covering the CRUD operations to run it execute this command
./vendor/bin/phpunit // or your local phpunit installation
To run the vue (frontend) tests you can use two commands:
npm run test-vue
Or watching them
npm run test-vue:live
To run the application in local
php artisan serve
And
npm run watch