diff --git a/README.md b/README.md index c17030b9..5dc6a442 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ A Laravel front-end scaffolding preset for [Tailwind CSS](https://tailwindcss.co ### b. For Presets with Authentication -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`) +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`) 4. `npm install && npm run dev` 5. Configure your favorite database (mysql, sqlite etc.) 6. `php artisan migrate` to create basic user tables. diff --git a/src/TailwindCssPreset.php b/src/TailwindCssPreset.php index b169316d..1b2c1d38 100644 --- a/src/TailwindCssPreset.php +++ b/src/TailwindCssPreset.php @@ -23,7 +23,6 @@ public static function install() public static function installAuth() { - static::install(); static::scaffoldController(); static::scaffoldAuth(); } diff --git a/src/TailwindCssPresetServiceProvider.php b/src/TailwindCssPresetServiceProvider.php index d6cf6f72..8e648e02 100644 --- a/src/TailwindCssPresetServiceProvider.php +++ b/src/TailwindCssPresetServiceProvider.php @@ -15,13 +15,13 @@ public function boot() TailwindCssPreset::install(); $command->info('Tailwind CSS scaffolding installed successfully.'); - $command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.'); - }); - AuthCommand::macro('tailwindcss', function ($command) { - TailwindCssPreset::installAuth(); + if ($command->option('auth')) { + TailwindCssPreset::installAuth(); + + $command->info('Tailwind CSS auth scaffolding installed successfully.'); + } - $command->info('Tailwind CSS scaffolding with auth views installed successfully.'); $command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.'); });