diff --git a/bin/sync b/bin/sync index b22315c..4d690f5 100755 --- a/bin/sync +++ b/bin/sync @@ -27,4 +27,20 @@ Illuminate\Support\Collection::make([ $files->copy($file, "{$workingPath}/src/Console/stubs".Illuminate\Support\Str::after($file, "{$workingPath}/skeleton")); }); +transform([ + 'Route::middleware(\'auth:sanctum\')->get(\'/user\', function (Request $request) { + return $request->user(); +});'.PHP_EOL => '// Route::middleware(\'auth:sanctum\')->get(\'/user\', function (Request $request) { +// return $request->user(); +// });'.PHP_EOL, +], fn ($changes) => $files->replaceInFile(array_keys($changes), array_values($changes), "{$workingPath}/src/Console/stubs/routes/api.php")); + +transform([ + 'Artisan::command(\'inspire\', function () { + $this->comment(Inspiring::quote()); +})->purpose(\'Display an inspiring quote\');'.PHP_EOL => '// Artisan::command(\'inspire\', function () { +// $this->comment(Inspiring::quote()); +// })->purpose(\'Display an inspiring quote\');'.PHP_EOL, +], fn ($changes) => $files->replaceInFile(array_keys($changes), array_values($changes), "{$workingPath}/src/Console/stubs/routes/console.php")); + $files->deleteDirectory("{$workingPath}/skeleton"); diff --git a/src/Console/stubs/routes/api.php b/src/Console/stubs/routes/api.php index 889937e..b95130d 100644 --- a/src/Console/stubs/routes/api.php +++ b/src/Console/stubs/routes/api.php @@ -14,6 +14,6 @@ | */ -Route::middleware('auth:sanctum')->get('/user', function (Request $request) { - return $request->user(); -}); +// Route::middleware('auth:sanctum')->get('/user', function (Request $request) { +// return $request->user(); +// }); diff --git a/src/Console/stubs/routes/console.php b/src/Console/stubs/routes/console.php index e05f4c9..3c0324c 100644 --- a/src/Console/stubs/routes/console.php +++ b/src/Console/stubs/routes/console.php @@ -14,6 +14,6 @@ | */ -Artisan::command('inspire', function () { - $this->comment(Inspiring::quote()); -})->purpose('Display an inspiring quote'); +// Artisan::command('inspire', function () { +// $this->comment(Inspiring::quote()); +// })->purpose('Display an inspiring quote');