Installation Core
- Install laravel 8
$ composer create-project laravel/laravel:^8.0 badaso-develop
- Pada directory
./badaso-develop
buat directory barupackages/badaso
sehingga
strukture directory
๐ฆ badaso-developโฃ ๐ packagesโฃ โฃ ๐ badaso /** Directory core dan kumpulan module **/
- Pada directory
./badaso-develop/packages/badaso
clone packages badaso
$ git clone https://github.com/uasoft-indonesia/badaso.git core
Berikut hasil strukture akhir directory setelah clone package badaso core
strukture directory
๐ฆ badaso-developโฃ ๐ packagesโฃ โฃ ๐ badasoโฃ โฃ โฃ ๐ coreโฃ โฃ โฃ โฃ ๐ ...โฃ โฃ โฃ โฃ ๐ ...
- Pada file
./badaso-develop/packages/badaso/core/composer.json
terdapat key require, autoload, dan extras.laravel.providers
./badaso-develop/packages/badaso/core/composer.json
{ ... "require": { "webpatser/laravel-uuid": "^4.0", "doctrine/dbal": "^2.12", "larapack/doctrine-support": "^0.1.9", "arcanedev/log-viewer": "^8.1", "spatie/laravel-activitylog": "^3.17", "spatie/laravel-backup": "^6.16", "spatie/flysystem-dropbox": "^1.2.2", "nao-pon/flysystem-google-drive": "^1.1.13", "league/flysystem-aws-s3-v3": "^1.0.28", "guzzlehttp/guzzle": "^7.0.1", "unisharp/laravel-filemanager": "^2.2", "darkaonline/l5-swagger": "^8.0", "zircote/swagger-php": "^3.2", "symfony/var-exporter": "^5.2.0", "google/apiclient": "^2.9", "laravel/ui": "^3.3", "laravel/sanctum": "^2.11", "laravel/octane": "^1.0", "predis/predis": "^1.1" }, ... "autoload": { "psr-4": { "Uasoft\\Badaso\\": "src/" } }, ... "extra": { "laravel": { "providers": [ "Uasoft\\Badaso\\Providers\\BadasoServiceProvider" ] } }}
Pindahkan isi require dan autoload, dan extras.laravel.providers file pada ./badaso-develop/packages/badaso/composer.json
ke ./badaso-develop/composer.json
./badaso-develop/composer.json
{ ... "require": { ... "webpatser/laravel-uuid": "^4.0", "doctrine/dbal": "^2.12", "larapack/doctrine-support": "^0.1.9", "arcanedev/log-viewer": "^8.1", "spatie/laravel-activitylog": "^3.17", "spatie/laravel-backup": "^6.16", "spatie/flysystem-dropbox": "^1.2.2", "nao-pon/flysystem-google-drive": "^1.1.13", "league/flysystem-aws-s3-v3": "^1.0.28", "guzzlehttp/guzzle": "^7.0.1", "unisharp/laravel-filemanager": "^2.2", "darkaonline/l5-swagger": "^8.0", "zircote/swagger-php": "^3.2", "symfony/var-exporter": "^5.2.0", "google/apiclient": "^2.9", "laravel/ui": "^3.3", "laravel/sanctum": "^2.11", "laravel/octane": "^1.0", "predis/predis": "^1.1" },}
Pindahkan value extras.laravel.providers ./badaso-develop/packages/badaso/core/composer.json
./badaso-develop/packages/badaso/core/composer.json
{ ... "extra": { "laravel": { "providers": [ "Uasoft\\Badaso\\Providers\\BadasoServiceProvider" ] } }}
salin ke ./badaso-develop/config/app.php
di key providers
./badaso-develop/config/app.php
<?php
return [ ... 'providers' => [ ... "Uasoft\\Badaso\\Providers\\BadasoServiceProvider", ... ], ...];
- Jalankan perintah untuk mengupdate composer
$ composer update
- Jalankan perintah untuk untuk setup badaso
$ php artisan badaso:setup
- Jalankan perintah untuk migrate dan seeder database
$ php artisan migrate$ php artisan db:seed --class="Database\Seeders\Badaso\BadasoSeeder"
- Install node module untuk kebutuhan badaso
$ npm install
or
$ yarn
- Ubah target lokasi path pada
./badaso-develop/webpack.mix.js
mix.js("vendor/badaso/core/src/resources/badaso/app.js", "public/js/badaso.js") .sass("vendor/badaso/core/src/resources/badaso/assets/scss/style.scss", "public/css/badaso.css") .vue()
ubah menjadi
mix.js("packages/badaso/core/src/resources/badaso/app.js", "public/js/badaso.js") .sass("packages/badaso/core/src/resources/badaso/assets/scss/style.scss", "public/css/badaso.css") .vue()
- Jalankan perintah untuk membuat akun admin
$ php artisan badaso:admin [email protected] --create