Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.
Merged
Changes from 1 commit
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
Next Next commit
fix: Automatic Installation doesn't work well on windows OS
  • Loading branch information
sidiqaqi committed Jul 28, 2022
commit 49e2a2314312c01b8083c46828d163d8b5a68088
8 changes: 4 additions & 4 deletions src/Commands/SpladeInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public function handle(): int

protected function installExceptionHandler()
{
$exceptionHandler = file_get_contents(app_path('Exceptions/Handler.php'));
$exceptionHandler = str_replace("\r\n", "\n", file_get_contents(app_path('Exceptions/Handler.php')));

$search = 'public function register()' . PHP_EOL . ' {';
$search = str_replace("\r\n", "\n", 'public function register()' . PHP_EOL . ' {');

$registerMethodAfter = Str::after($exceptionHandler, $search);

Expand All @@ -103,9 +103,9 @@ protected function installExceptionHandler()
*/
protected function installRouteMiddleware()
{
$httpKernel = file_get_contents(app_path('Http/Kernel.php'));
$httpKernel = str_replace("\r\n", "\n", file_get_contents(app_path('Http/Kernel.php')));

$search = 'protected $routeMiddleware = [' . PHP_EOL;
$search = str_replace("\r\n", "\n", 'protected $routeMiddleware = [' . PHP_EOL);

$routeMiddlewareAfter = Str::after($httpKernel, $search);

Expand Down