Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cursor/rules/laravel-boost.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ This application is a Laravel application and its main Laravel ecosystems packag
- laravel/pint (PINT) - v1
- pestphp/pest (PEST) - v3
- phpunit/phpunit (PHPUNIT) - v11
- rector/rector (RECTOR) - v2
- @inertiajs/vue3 (INERTIA) - v2
- @laravel/vite-plugin-wayfinder (WAYFINDER) - v0
- tailwindcss (TAILWINDCSS) - v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
- name: Build Assets
run: composer assets:build

- name: Run Rector
run: composer rector --dry-run

- name: Run Linter
run: composer lint

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ public function store(RegisterStoreRequest $request)

event(new Registered($user));

return redirect()->route('home');
return to_route('home');
}
}
4 changes: 2 additions & 2 deletions app/Http/Controllers/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function store(ResetPasswordStoreRequest $request)

session()->flash('success', __('passwords.sent'));

return redirect()->route('login');
return to_route('login');
}

public function edit(Request $request, string $token)
Expand Down Expand Up @@ -60,6 +60,6 @@ public function update(ResetPasswordUpdateRequest $request)

session()->flash('success', __('passwords.reset'));

return redirect()->route('login');
return to_route('login');
}
}
3 changes: 2 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ protected function allPermissions(): Attribute
);
}

protected function scopeHasRoles(Builder $query, array $roles): void
#[\Illuminate\Database\Eloquent\Attributes\Scope]
protected function hasRoles(Builder $query, array $roles): void
{
$query->whereHas('roles', fn (Builder $query) => $query->whereIn('name', $roles));
}
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
URL::forceHttps(in_array(app()->environment(), [Environment::PRODUCTION, Environment::STAGING]));
URL::forceHttps(app()->environment([Environment::PRODUCTION->value, Environment::STAGING->value]));

RequestException::dontTruncate();

Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A starter project for Laravel apps using Inertia and Vue.",
"license": "MIT",
"require": {
"php": "^8.2",
"php": "^8.4",
"filament/filament": "^4.0",
"inertiajs/inertia-laravel": "^2.0",
"laravel/framework": "^12.0",
Expand All @@ -20,6 +20,7 @@
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.13",
"driftingly/rector-laravel": "^2.1",
"fakerphp/faker": "^1.23",
"laravel/boost": "^1.8",
"laravel/pint": "^1.17",
Expand All @@ -28,6 +29,7 @@
"pestphp/pest": "^3.0",
"pestphp/pest-plugin-faker": "^3.0",
"pestphp/pest-plugin-laravel": "^3.0",
"rector/rector": "^2.2",
"spatie/laravel-ray": "^1.37"
},
"autoload": {
Expand Down Expand Up @@ -58,6 +60,9 @@
"build:test": [
"composer install --no-interaction"
],
"rector": [
"./vendor/bin/rector"
],
"lint": [
"./vendor/bin/pint --test"
],
Expand Down
Loading