How to create views using artisan command

gorakhwagh posted 2 years ago

Laravel not supports php artisan make:view command How to create views using artisan command. The views files created dont looks like good design.. I thing laravel doesent provide this feature like wise yii2

ausdev86 replied 2 years ago

There is no command for making a view out of the box.

As my knowledge is with Unix/Mac.

The command you want to create would have something along the lines of:

touch { $view } .blade.php

Also; when wishing to create within a directory such as Views\Shop\myview.blade.php

Remember to double escape so it'd be touch views\Shop\myview.blade.php

If you have a look around you can see how to make your own commands.

asifameer replied 1 year ago

There is a useful package for creating view;

larafeed replied 1 year ago

In Laravel 5.5, views are created in resources/views folder. You can change the base path for views by adding base path


in config/view.php file.

To load view in controller just add


to your controller method.

Source: Create View in Laravel 5.5

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us