Support the ongoing development of Laravel.io →
posted 8 years ago
Views
Last updated 2 years ago.
0

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.

0

There is a useful package for creating view;

https://github.com/svenluijten/artisan-view

0

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

realpath(base_path('resources/views'))

in config/view.php file.

To load view in controller just add

view(‘viewname’)

to your controller method.

Source: Create View in Laravel 5.5

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

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

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.