Blade in Laravel

Blade is the simple,yet powerful templating engine that is included with laravel. Blade does not restrict you from using plain php code in your templates.

Blade templates files use the .blade.php extension file extension and are typically stored in the resources/views directory.

Master page layout defines the common layout across all the web pages. All the web applications have the master page layout to define the common layout across all the web pages. The blade templating engine defines the master layout that can be extended by all the web pages. The master page layout is available in the /resources/views/layouts/ directory.

Displaying Data.
Display data – you may display data thar is passed to your blade views by wrapping the variable in curly braces.
ex -{{$name}}.

Displaying Function().

calling function – you may also echo the result of any php function by wrapping the function name in curly braces.
ex- {{time()}}

Blade Loops

The blade templating engine provides loops such as @for, @endfor, @foreach, @endforeach, @while, and @endwhile directives. These directives are used to create the php loop equivalent statements.

ex-

  1. value of i :  
  2. @for($i=1;$i<11;$i++)  
  3. {{$i}}  
  4. @endfor  

Thanku

Related Posts

CRUD USING QUIRY BUILDER IN LARAVEL.

We are performing crud opertion using quiry builder in laravel STEP : 1 Create Laravel project by running this command in terminal CMND :– Laravel new project_name…

Read More

Controller In Laravel

Controllers can group related request handling logic into a single class, Instead of defining all of your request handling logic as closure in route files ,you may…

Read More

LARAVEL ROUTING

All Laravel routes are define in route files , which are located in the route directory ,These file are automatically loaded by the framework. The most basic…

Read More

MVC (MODEL VIEW CONTROLLER)

MVC stands for Model–view–controller. The MVC is an architectural pattern model that seprates an applications into three logical components.(Model , View, Controller) MVC was first introduce in…

Read More

ReflectionException : Class BlogsTableSeeder does not exist

When i type php artisan db:seed command. It’s showing this type of errors. [ReflectionException]Class UserTableSeeder does not exist Here is my BlogsTableSeeder <?phpuse Illuminate\Database\Seeder;class BlogsTableSeeder extends Seeder{…

Read More

How to Creating a personal access token, Personal API tokens in Github | How to use GitHub personal access token

When i pushed code on GitHub its showing you don’t have Personal Access Token. When i try to push code on github its showing cURL method to…

Read More