Skip to content

Commit

Permalink
update laravel sanctum version in gitpod
Browse files Browse the repository at this point in the history
  • Loading branch information
miftahurrahmi committed Jun 28, 2024
1 parent 1a9cdaf commit 5e0a72a
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 103 deletions.
164 changes: 81 additions & 83 deletions .gitpod/composer.json
Original file line number Diff line number Diff line change
@@ -1,86 +1,84 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^11.0",
"laravel/tinker": "^2.9",
"laravel-doctrine/orm": "2.1",
"psr/http-message": "1.1",
"arcanedev/log-viewer": "^11.0",
"darkaonline/l5-swagger": "^8.6",
"phpstan/phpstan": "^1.11",
"spatie/laravel-backup": "^8.8",
"unisharp/laravel-filemanager": "^2.9",
"spatie/laravel-activitylog": "^4.8",
"php-open-source-saver/jwt-auth": "^2.3",
"google/apiclient": "^2.16",
"spatie/flysystem-dropbox": "^3.0",
"masbug/flysystem-google-drive-ext": "^2.3",
"laravel/octane": "^2.3",
"laravel/sanctum": "^4.0",
"laravel/ui": "^4.5",
"webpatser/laravel-uuid": "^4.0",
"predis/predis": "^2.2",
"league/flysystem-aws-s3-v3": "^3.28",
"league/flysystem": "^3.28",
"doctrine/dbal": "^3.8"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^11.0.1",
"spatie/laravel-ignition": "^2.4"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"Uasoft\\Badaso\\": "packages/badaso/core/src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fruitcake/laravel-cors": "^2.0",
"laravel/framework": "^8.75",
"masbug/flysystem-google-drive-ext": "*",
"google/apiclient": "^2.12",
"arcanedev/log-viewer": "^8.1|^9.0",
"darkaonline/l5-swagger": "^8.0|^8.3",
"doctrine/dbal": "^2.5",
"guzzlehttp/guzzle": "^7.2",
"larapack/doctrine-support": "^0.1.9",
"laravel/octane": "^1.2",
"laravel/sanctum": "^2.14.1",
"laravel/tinker": "^2.7",
"laravel/ui": "^3.4",
"league/flysystem": "~1.1|~2.0|~3.0",
"league/flysystem-aws-s3-v3": "^1.0.28|^3.0",
"php-open-source-saver/jwt-auth": "^1.4",
"phpstan/phpstan": "^1.4",
"predis/predis": "^1.1",
"symfony/var-exporter": "^5.2.0|^6.0",
"spatie/flysystem-dropbox": "^1.2.2|^2.0",
"spatie/laravel-activitylog": "^3.17|^4.4",
"spatie/laravel-backup": "^6.16|^8.1.0",
"unisharp/laravel-filemanager": "^2.4",
"webpatser/laravel-uuid": "^4.0",
"zircote/swagger-php": "^3.2"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^5.10",
"phpunit/phpunit": "^9.5.10"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"Uasoft\\Badaso\\": "packages/badaso/core/src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
30 changes: 10 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Steps for registering and getting a license on Badaso Dashboard can be found on

After getting the license, you can proceed to Badaso installation.

1, Clone badaso into Laravel project. Sample:
1. Clone badaso into Laravel project. Sample:
- Root Laravel Project
- /packages // new folder
- /badaso // new folder
Expand All @@ -56,26 +56,16 @@ cd into badaso directory, then run
git clone https://github.com/uasoft-indonesia/badaso.git
```

2. Add the following Badaso provider and JWT provider to ```/config/app.php```.
2. Add the following Badaso provider ```/bootstrap/providers.php```.

```
'providers' => [
'return' => [
...,
Uasoft\Badaso\Providers\BadasoServiceProvider::class,
PHPOpenSourceSaver\JWTAuth\Providers\LaravelServiceProvider::class,
"Uasoft\\Badaso\\Providers\\BadasoServiceProvider"
]
```

3. Add the following aliases to ```config/app.php```.
```
'aliases' => [
...,
'JWTAuth' => PHPOpenSourceSaver\JWTAuth\Facades\JWTAuth::class,
'JWTFactory' => PHPOpenSourceSaver\JWTAuth\Facades\JWTFactory::class,
]
```

4. Add badaso providers to autoload
3. Add badaso providers to autoload

```
"autoload": {
Expand All @@ -87,21 +77,21 @@ git clone https://github.com/uasoft-indonesia/badaso.git
}
```

5. Copy required library from ```packages/badaso/core/composer.json``` to ```/composer.json``` then ```composer install```
4. Copy required library from ```packages/badaso/core/composer.json``` to ```/composer.json``` then ```composer install```

6. Run the following commands to update dependencies in package.json and webpack.
5. Run the following commands to update dependencies in package.json and webpack.
```
php artisan badaso:setup
```

7. Run the following commands in sequence.
6. Run the following commands in sequence.
```
composer dump-autoload
php artisan migrate
php artisan db:seed --class=BadasoSeeder
```

8. Open the ```env``` file then add the following lines.
7. Open the ```env``` file then add the following lines.
```
#Set a key as secret key for generating JWT token
JWT_SECRET=
Expand Down Expand Up @@ -131,7 +121,7 @@ MIX_LOG_VIEWER_ROUTE="log-viewer"
MIX_ADMIN_PANEL_ROUTE_PREFIX, MIX_API_ROUTE_PREFIX & MIX_LOG_VIEWER_ROUTE should be different
:::

9. Add the following Badaso guard and auth provider in ```config/auth.php```. Make sure to use Badaso guard as auth default in ```config/auth.php```.
8. Add the following Badaso guard and auth provider in ```config/auth.php```. Make sure to use Badaso guard as auth default in ```config/auth.php```.
<!--DOCUSAURUS_CODE_TABS-->
<!--PHP-->
```php
Expand Down

0 comments on commit 5e0a72a

Please sign in to comment.