IMPORTANT: Make sure to set the correct .env vars
$ composer create-project laravel/laravel project-name
$ composer require blessingchitra/basepack
$ php artisan vendor:publish --provider="BasePack\BasePackServiceProvider" --tag="assets"
$ php artisan vendor:publish --provider="BasePack\BasePackServiceProvider" --tag="config"
$ php artisan vendor:publish --provider="BasePack\BasePackServiceProvider" --tag="seeders"
$ php artisan migrate --seed --seeder=Database\\Seeders\\BasePackTableSeeders
$ php artisan contexts:update
- Choose Preferred App Name
- Choose 'SPA' as App Type
- App code can be the same as App Name
- Redirect URL should be set to APP_URL/login
- If prompted for answers choose 'no'.
$ composer install
$ php artisan key:generate
$ npm install
- Database connection values
- set DB_CONNECTION=sqlite
- create file named database.sqlite under database folder
- IMPORTANT VARS to check
- APP_URL=app_url
- AUTH_SERVER=idservur/
- LIVEWIRE_ASSET_URL=
- CONTEXT_FILE_ENDPOINT=api_url/.well-known/context.json
- MIX_PKCE_CLIENT_ID=client_id
- MIX_APP_URL=app_url
- MIX_AUTH_SERVER=idserv_url/
- MIX_GRAPHQL_ENDPOINT=api_url
- CONTEXT_FILE_ENDPOINT=api_url/.well-known/context.json
- DEFAULT_THEME=default
APP_DEBUG=true
APP_URL=app_url
DB_CONNECTION=sqlite
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=laravel
#DB_USERNAME=root
#DB_PASSWORD=
DEFAULT_THEME=default
AUTH_SERVER=https://iddev.msbmicro.com/
LIVEWIRE_ASSET_URL=
CONTEXT_FILE_ENDPOINT=https://simapidev.msbmicro.com/.well-known/context.json
MIX_PKCE_CLIENT_ID=client_id
MIX_APP_URL=app_url
MIX_AUTH_SERVER=https://iddev.msbmicro.com/
MIX_GRAPHQL_ENDPOINT=https://simapidev.msbmicro.co/graphql
CONTEXT_FILE_ENDPOINT=https://simapidev.msbmicro.com/.well-known/context.json
$ npm run dev
- Create tables contexts and roles
$ php artisan migrate
- Updates Contexts.json file and local sqlite database
php artisan contexts:update
Publish Assets
$ php artisan vendor:publish --provider="BasePack\BasePackServiceProvider" --tag="assets"
Add the following line in the webpack.mix.js file
mix.js('resources/js/auth.js', 'public/js')
Publish Config Files
$ php artisan vendor:publish --provider="BasePack\BasePackServiceProvider" --tag="config"
- If your app is not deployed on a root url e.g https:example.com/your_app, then you should update the LIVEWIRE_ASSET_URL= e.g
LIVEWIRE_ASSET_URL=your_app
$ php artisan serve
- You can make changes to the sidebar nav menu by updating the adminlte.php config file.
- nav links
- logo, e.t.c...
Register and Run All database seeders on global app \
- Publish all database seeders
$ php artisan vendor:publish --provider="BasePack\BasePackServiceProvider" --tag="seeders"
- Import seeder classes (database/seeders/DatabaseSeeder.php) and register to laravel app's default database seeder. e.g
use Database\Seeders\SettingThemesTableSeeder; class DatabaseSeeder extends Seeder { public function run() { $this->call( [ SettingThemesTableSeeder::class ] ); } }
- Then run all database seeders
$ php artisan db:seed