#10 Layouts Laravel 5.6

#10 Layouts Laravel 5.6

Posted on

Create a directory called layouts inside projectname/resources/views dir and create a layout template file inside of it called app.blade.php and write below codes: The above template can be used in any view file using a syntax  The @section directive, defines a section of content meaning its used to inject content while the @yield directive is used to display the contents of a

Read More

#9 Blade Templates Laravel 5.6

#9 Blade Templates Laravel 5.6

Posted on

Blade is the simple, yet powerful templating engine provided with Laravel. Unlike other popular PHP templating engines, Blade does not restrict you from using plain PHP code in your views. In fact, all Blade views are compiled into plain PHP code and cached until they are modified, meaning Blade adds essentially zero overhead to your application. Blade view files use the .blade.php file extension and are typically stored in the resources/views directory.

#6 What are Views in Laravel 5.6

#6 What are Views in Laravel 5.6

Posted on

Creating a View file All view files should have an extension of .blade.phpLets create a view file called about.blade.php inside projectname/resources/views Now lets create a route for this file inside projectname/routes/web.php file by defining the below method Its preferebale to keep your view files into separate folders so if you create the folder called myviews

Read More