Skip to main content

Posts

Showing posts from December, 2022

Laravel Template blade concept

 All Laravel view files need to store at resources folder.  Blade Document: https://laravel.com/docs/9.x/blade Blade template always have blade extension For ex: Home.php as Home.blade.php {{}} ==> it will print variable data simply act like PHP echo statements. @directive it is used for template or nested template, loops and conditions statements By default, Blade  {{ }}  statements are automatically sent through PHP's  htmlspecialchars  function to prevent XSS attacks. If you do not want your data to be escaped, you may use the following syntax: {!! $title !!} As refer above image, you can simply create a layout.blade.php for common page. Let take sample example html template In Layout Yield second parameter will be a default value if you doesn't set any title value.