Code base with Api application and Web application
I use docker shincoder/homestead && mariadb
- Design pattern
- Use Mysql or mongodb
- Authenticate with passport
- Permission with policies
- Yajra/Datatables
- Dependencies with bower & npm
- Use Laravel mix compiling assets
You can sign in with account demo
account: [email protected]/secret
- Git
- Composer
- PHP v.7.x
- MySql v.5.7.x
- Node
- Npm
- bower
- webpack
Make sure you have the MongoDB PHP driver installed. You can find installation instructions at http://php.net/manual/en/mongodb.installation.php
$ git clone [email protected]:dung13890/code_base.git
$ cd project
$ composer install --no-scripts
$ cp .env.mongo .env
$ php artisan key:generate
$ php artisan db:seed --class=UsersMongoSeeder
In App\Providers\RepositoryServiceProvider
Change singleton Mongo instead of Mysql
$ git clone [email protected]:dung13890/code_base.git
$ cd project
$ composer install --ignore-platform-reqs --no-interaction
$ cp .env.example .env
$ php artisan key:generate
$ git clone [email protected]:dung13890/code_base.git
$ cd project
$ composer install --ignore-platform-reqs --no-interaction
$ npm install
$ bower install
$ cp .env.example .env
$ php artisan key:generate
$ mysql -u username -psecret
mysql> create database laravel_db;
mysql> exit;
$ vim .env
Change DB_DATABASE, DB_USERNAME and DB_PASSWORD
$ php artisan migrate:refresh --seed
# Setup passport run only once
$ php artisan passport:install
# Creating A Password Grant Client
$ php artisan passport:client --password
# Copy API_CLIENT_SECRET and API_CLIENT_id To .env
$ npm run production
$ npm run dev or $ npm run watch
$ ./vendor/bin/phpunit