| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use Illuminate\Auth\Console\AuthMakeCommand; |
|
| 6 | ||
| 7 | class AdminLteMakeCommand extends AuthMakeCommand |
|
| 8 | { |
|
| 9 | protected $signature = 'make:adminlte {--views : Only scaffold the authentication views}{--force : Overwrite existing views by default}'; |
|
| 10 | ||
| 11 | protected $description = 'Scaffold basic AdminLTE login and registration views and routes'; |
|
| 12 | ||
| 13 | protected $adminLteViews = [ |
|
| 14 | 'auth/login.stub' => 'auth/login.blade.php', |
|
| 15 | 'auth/register.stub' => 'auth/register.blade.php', |
|
| 16 | 'auth/passwords/email.stub' => 'auth/passwords/email.blade.php', |
|
| 17 | 'auth/passwords/reset.stub' => 'auth/passwords/reset.blade.php', |
|
| 18 | 'home.stub' => 'home.blade.php', |
|
| 19 | ]; |
|
| 20 | ||
| 21 | protected function exportViews() |
|
| 22 | { |
|
| 23 | parent::exportViews(); |
|
| 24 | ||
| 25 | foreach ($this->adminLteViews as $key => $value) { |
|
| 26 | copy(__DIR__.'/stubs/make/views/'.$key, |
|
| 27 | base_path('resources/views/'.$value)); |
|
| 28 | } |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 7-30 (lines=24) @@ | ||
| 4 | ||
| 5 | use Illuminate\Auth\Console\MakeAuthCommand; |
|
| 6 | ||
| 7 | class MakeAdminLteCommand extends MakeAuthCommand |
|
| 8 | { |
|
| 9 | protected $signature = 'make:adminlte {--views : Only scaffold the authentication views}{--force : Overwrite existing views by default}'; |
|
| 10 | ||
| 11 | protected $description = 'Scaffold basic AdminLTE login and registration views and routes'; |
|
| 12 | ||
| 13 | protected $adminLteViews = [ |
|
| 14 | 'auth/login.stub' => 'auth/login.blade.php', |
|
| 15 | 'auth/register.stub' => 'auth/register.blade.php', |
|
| 16 | 'auth/passwords/email.stub' => 'auth/passwords/email.blade.php', |
|
| 17 | 'auth/passwords/reset.stub' => 'auth/passwords/reset.blade.php', |
|
| 18 | 'home.stub' => 'home.blade.php', |
|
| 19 | ]; |
|
| 20 | ||
| 21 | protected function exportViews() |
|
| 22 | { |
|
| 23 | parent::exportViews(); |
|
| 24 | ||
| 25 | foreach ($this->adminLteViews as $key => $value) { |
|
| 26 | copy(__DIR__.'/stubs/make/views/'.$key, |
|
| 27 | base_path('resources/views/'.$value)); |
|
| 28 | } |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||