Skip to content

Commit c52d790

Browse files
committed
Use new artisan dev command in API starter kit
Bumps laravel/framework to ^13.17 and excludes the vite dev process via `DevCommands::except()` since the API kit has no frontend.
1 parent 74ce4fd commit c52d790

2 files changed

Lines changed: 55 additions & 2 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
3+
namespace App\Providers;
4+
5+
use Carbon\CarbonImmutable;
6+
use Illuminate\Foundation\DevCommands;
7+
use Illuminate\Support\Facades\Date;
8+
use Illuminate\Support\Facades\DB;
9+
use Illuminate\Support\ServiceProvider;
10+
use Illuminate\Validation\Rules\Password;
11+
12+
class AppServiceProvider extends ServiceProvider
13+
{
14+
/**
15+
* Register any application services.
16+
*/
17+
public function register(): void
18+
{
19+
//
20+
}
21+
22+
/**
23+
* Bootstrap any application services.
24+
*/
25+
public function boot(): void
26+
{
27+
$this->configureDefaults();
28+
29+
DevCommands::except('vite');
30+
}
31+
32+
/**
33+
* Configure default behaviors for production-ready applications.
34+
*/
35+
protected function configureDefaults(): void
36+
{
37+
Date::use(CarbonImmutable::class);
38+
39+
DB::prohibitDestructiveCommands(
40+
app()->isProduction(),
41+
);
42+
43+
Password::defaults(fn (): ?Password => app()->isProduction()
44+
? Password::min(12)
45+
->mixedCase()
46+
->letters()
47+
->numbers()
48+
->symbols()
49+
->uncompromised()
50+
: null,
51+
);
52+
}
53+
}

kits/API/Base/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"require": {
1212
"php": "^8.3",
1313
"dedoc/scramble": "^0.13.35",
14-
"laravel/framework": "^13.6",
14+
"laravel/framework": "^13.17",
1515
"laravel/sanctum": "^4.3",
1616
"laravel/tinker": "^3.0"
1717
},
@@ -47,7 +47,7 @@
4747
],
4848
"dev": [
4949
"Composer\\Config::disableProcessTimeout",
50-
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185\" \"php artisan serve\" \"php artisan queue:listen --tries=1 --timeout=0\" \"php artisan pail --timeout=0\" --names=server,queue,logs --kill-others"
50+
"@php artisan dev"
5151
],
5252
"lint": [
5353
"pint --parallel"

0 commit comments

Comments
 (0)