How to include sub-views in Laravel.
First of all, we make a new directory in the view folder in which our subviews files are stored. To make subviews we use below function. @include(address_of_subviews_file)…
Conditional (@if, @else, @elseif, @isset, @empty, and @unless) Statements in Laravel.
First of all, we make a condition.blade.php file in which we define our conditions. See the below image. After that, we make a function named condition in…
How to check variable is declared or not in Laravel to avoid an Error.
Suppose we have not declared a variable in the controller and calling it in views, then it shows undefined variable Error. See the below image. Suppose, we…
Master/fixed layout in Laravel.
@yield(“Parameter”) :- It is a section which requires to be filled in by your view which extends the layout. You could pass it a default value through the second…
How to pass data to views in Laravel.
There are 4 ways to send data to view:- 1. Using an array function : array()2. Using compact function : compact()3. Using with : with([]) 4. Using…
How to store and retrieve image from the database in Laravel.
# Creating Migration For Uploading Image We need to add three lines in our migration file which makes column in our Database .After adding, run Migration ….
How to login & Registration with Session in laravel.
After successfully install laravel Application, Go to your project .env file and set up database credential and move next step : Next, migrate the table into the…
