Created
August 31, 2016 10:04
-
-
Save tamkeen-tms/3790cb1f2669bd44cb53d55207ce1d2c to your computer and use it in GitHub Desktop.
[laravel] Create a new view file via artisan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Artisan::command('make:view {name}', function(){ | |
file_put_contents(base_path('resources/views/' . $this->argument('name') . '.blade.php'), ''); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put these lines in
routes/console.logo
Now, using artisan you can create a new view, simply type:
php artisan make:view [file name]