Skip to content

Commit d3725c5

Browse files
Merge branch 'patch-ui-command-to-work-correctly-without-the-auth-option'
2 parents 64e82b0 + 5bdbb58 commit d3725c5

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A Laravel front-end scaffolding preset for [Tailwind CSS](https://tailwindcss.co
1515

1616
### b. For Presets with Authentication
1717

18-
1. Use `php artisan ui tailwindcss --auth` for the basic preset, auth route entry and Tailwind CSS auth views in one go. (NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in `routes/web.php`)
18+
1. Use `php artisan ui tailwindcss --auth` for the basic preset, auth route entry, and Tailwind CSS auth views in one go. (NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in `routes/web.php`)
1919
4. `npm install && npm run dev`
2020
5. Configure your favorite database (mysql, sqlite etc.)
2121
6. `php artisan migrate` to create basic user tables.

src/TailwindCssPreset.php

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public static function install()
2323

2424
public static function installAuth()
2525
{
26-
static::install();
2726
static::scaffoldController();
2827
static::scaffoldAuth();
2928
}

src/TailwindCssPresetServiceProvider.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ public function boot()
1515
TailwindCssPreset::install();
1616

1717
$command->info('Tailwind CSS scaffolding installed successfully.');
18-
$command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
19-
});
2018

21-
AuthCommand::macro('tailwindcss', function ($command) {
22-
TailwindCssPreset::installAuth();
19+
if ($command->option('auth')) {
20+
TailwindCssPreset::installAuth();
21+
22+
$command->info('Tailwind CSS auth scaffolding installed successfully.');
23+
}
2324

24-
$command->info('Tailwind CSS scaffolding with auth views installed successfully.');
2525
$command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
2626
});
2727

0 commit comments

Comments
 (0)