Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
fix: remove unneeded code from installer
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander committed Nov 8, 2024
1 parent 258d64a commit 3ad5a5b
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions src/Commands/HearthCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,50 +43,7 @@ public function handle()
});
$this->flushNodeModules();

// Name...
$this->replaceInFile('APP_NAME=Laravel', 'APP_NAME=Hearth', base_path('.env'));
$this->replaceInFile('APP_NAME=Laravel', 'APP_NAME=Hearth', base_path('.env.example'));

// AuthenticateSession Middleware...
$this->replaceInFile(
'// \Illuminate\Session\Middleware\AuthenticateSession::class,',
"\Illuminate\Session\Middleware\AuthenticateSession::class,",
app_path('bootstrap/app.php')
);

// DetectRequestLocale Middleware...
$this->installMiddlewareBefore(
'\Illuminate\Cookie\Middleware\EncryptCookies::class',
'\ChinLeung\MultilingualRoutes\DetectRequestLocale::class'
);

// RedirectToPreferredLocale Middleware...
if (! Str::contains(file_get_contents(app_path('Http/Kernel.php')), '\App\Http\Middleware\RedirectToPreferredLocale::class')) {
$this->replaceInFile(
"'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,",
"'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'localize' => \App\Http\Middleware\RedirectToPreferredLocale::class,",
app_path('Http/Kernel.php')
);
}

// RequirePassword Middleware...
$this->replaceInFile(
'\Illuminate\Auth\Middleware\RequirePassword::class',
'\App\Http\Middleware\RequirePassword::class',
app_path('Http/Kernel.php')
);

// Ensure folders are in place...
$this->filesystem->ensureDirectoryExists(app_path('Actions/Fortify'));
$this->filesystem->ensureDirectoryExists(app_path('Http/Requests'));
$this->filesystem->ensureDirectoryExists(app_path('Http/Livewire'));
$this->filesystem->ensureDirectoryExists(app_path('Http/Requests/Auth'));
$this->filesystem->ensureDirectoryExists(app_path('Http/Responses'));
$this->filesystem->ensureDirectoryExists(app_path('Mail'));
$this->filesystem->ensureDirectoryExists(app_path('Policies'));
$this->filesystem->ensureDirectoryExists(app_path('Rules'));
$this->filesystem->ensureDirectoryExists(app_path('View/Components'));
$this->filesystem->ensureDirectoryExists(lang_path('fr'));

// Language stubs...
Expand Down

0 comments on commit 3ad5a5b

Please sign in to comment.