Skip to content

Commit

Permalink
change how auth guards are setup
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Sep 4, 2020
1 parent f3d64ea commit 6ac870f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected function installLivewireStack()

// Update Configuration...
$this->replaceInFile('inertia', 'livewire', config_path('jetstream.php'));
$this->replaceInFile("'guard' => 'web'", "'guard' => 'sanctum'", config_path('auth.php'));
// $this->replaceInFile("'guard' => 'web'", "'guard' => 'sanctum'", config_path('auth.php'));

// NPM Packages...
$this->updateNodePackages(function ($packages) {
Expand Down Expand Up @@ -231,7 +231,7 @@ protected function livewireRouteDefinition()
{
return <<<'EOF'
Route::middleware(['auth', 'verified'])->get('/dashboard', function () {
Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () {
return view('dashboard');
})->name('dashboard');

Expand Down Expand Up @@ -275,7 +275,7 @@ protected function installInertiaStack()
});

// Update Configuration...
$this->replaceInFile("'guard' => 'web'", "'guard' => 'sanctum'", config_path('auth.php'));
// $this->replaceInFile("'guard' => 'web'", "'guard' => 'sanctum'", config_path('auth.php'));

// Tailwind Configuration...
copy(__DIR__.'/../../stubs/inertia/tailwind.config.js', base_path('tailwind.config.js'));
Expand Down Expand Up @@ -377,7 +377,7 @@ protected function inertiaRouteDefinition()
{
return <<<EOF
Route::middleware(['auth', 'verified'])->get('/dashboard', function () {
Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () {
return Inertia\Inertia::render('Dashboard');
})->name('dashboard');
Expand Down

0 comments on commit 6ac870f

Please sign in to comment.