Skip to content

Commit 034a220

Browse files
committed
chore: improve code and remove uneccessary code
1 parent dda11a7 commit 034a220

File tree

8 files changed

+24
-26
lines changed

8 files changed

+24
-26
lines changed

.claude/settings.local.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"enabledMcpjsonServers": [
3+
"laravel-boost"
4+
],
5+
"enableAllProjectMcpServers": true
6+
}

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
/node_modules
22
npm-debug.log
33
yarn-error.log
4-
yarn.lock
54
package-json.lock
6-
pnpm-lock.yml
75
/vendor
86
composer.phar
9-
/.junie
10-
/.claude
117
/.idea
128
/.vscode
139
.phpunit.cache

.mcp.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"mcpServers": {
33
"laravel-boost": {
44
"command": "./vendor/bin/sail",
5-
"args": ["php", "artisan", "boost:mcp"]
5+
"args": [
6+
"artisan",
7+
"boost:mcp"
8+
]
69
}
710
}
811
}

app/Http/Controllers/Api/Auth/RegisterController.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ public function googleAuthenticator(Request $request): JsonResponse
8585

8686
// TODO: Send new company registration notification on Slack
8787

88-
$user->last_login_at = Carbon::now();
89-
$user->last_login_ip = $request->ip();
90-
$user->save();
88+
$user->update([
89+
'last_login_at' => now(),
90+
'last_login_ip' => $request->getClientIp(),
91+
]);
9192

9293
return response()->json([
9394
'message' => __('Votre compte a été crée avec succès via Google.'),

app/Providers/AppServiceProvider.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use App\View\Composers\InactiveDiscussionsComposer;
1414
use App\View\Composers\ProfileUsersComposer;
1515
use App\View\Composers\TopContributorsComposer;
16+
use ArchTech\SEO\SEOManager;
1617
use Carbon\Carbon;
1718
use Filament\Actions;
1819
use Filament\Support\Colors\Color;
@@ -126,8 +127,10 @@ protected function registerLocaleDate(): void
126127

127128
protected function configureSeo(): void
128129
{
129-
// @phpstan-ignore-next-line
130-
seo()
130+
/** @var SEOManager $seoManager */
131+
$seoManager = seo();
132+
133+
$seoManager
131134
->title(
132135
default: __('pages/home.title'),
133136
modify: fn (string $title): string => $title.' | '.__('global.site_name')

app/Providers/Filament/AdminPanelProvider.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace App\Providers\Filament;
66

7-
use Backstage\FilamentMails\FilamentMails;
8-
use Backstage\FilamentMails\FilamentMailsPlugin;
97
use Filament\Http\Middleware\Authenticate;
108
use Filament\Http\Middleware\DisableBladeIconComponents;
119
use Filament\Http\Middleware\DispatchServingFilamentEvent;
@@ -39,7 +37,7 @@ public function panel(Panel $panel): Panel
3937
->viteTheme('resources/css/filament/admin/theme.css')
4038
->brandLogo(fn (): View => view('filament.brand'))
4139
->favicon(asset('images/favicons/favicon-32x32.png'))
42-
->spa()
40+
->spa(hasPrefetching: true)
4341
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
4442
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
4543
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
@@ -50,11 +48,8 @@ public function panel(Panel $panel): Panel
5048
//
5149
])
5250
->plugins([
53-
SpatieTranslatablePlugin::make()
54-
->defaultLocales(['fr', 'en']),
55-
FilamentMailsPlugin::make(),
51+
SpatieTranslatablePlugin::make()->defaultLocales(['fr', 'en']),
5652
])
57-
->routes(fn () => FilamentMails::routes())
5853
->middleware([
5954
EncryptCookies::class,
6055
AddQueuedCookiesToResponse::class,

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@
133133
"php-http/discovery": false
134134
}
135135
},
136-
"prefer-stable": true,
137-
"minimum-stability": "stable",
138136
"repositories": [
139137
{
140138
"type": "path",
@@ -143,5 +141,7 @@
143141
"symlink": true
144142
}
145143
}
146-
]
144+
],
145+
"prefer-stable": true,
146+
"minimum-stability": "stable"
147147
}

routes/console.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22

33
declare(strict_types=1);
44

5-
use Illuminate\Foundation\Inspiring;
6-
use Illuminate\Support\Facades\Artisan;
75
use Illuminate\Support\Facades\Schedule;
86

9-
Artisan::command('inspire', function (): void {
10-
$this->comment(Inspiring::quote());
11-
})->purpose('Display an inspiring quote')->hourly();
12-
137
if (app()->environment('production')) {
148
Schedule::command('lcm:post-article-to-twitter')->everyFourHours();
159
Schedule::command('lcm:post-article-to-telegram')->everyFourHours();

0 commit comments

Comments
 (0)