Category: Laravel

  • Using CSS and Images

    Using CSS and Images

    We put all the css and images in public folder. We will create separate folder for each and put images and css inside it. Create new folder for css inside the public folder after that create a new file main.css inside the css folder and copy all the css inside this main.css and use link…

  • Generic layout for header and footer

    Generic layout for header and footer

    For creating a generic layout in Laravel, first of all we need to create a new folder inside the views with the name layouts and create a new file layout.blade.php inside this folder and perform the following steps: Copy all the header and footer content that is same in all the view files from beginning…

  • Blade Array

    Blade Array

    Array syntax is Laravel is same as in another, here we pass array as a second argument in view and create that array outside Like below and call this array either using any loop but we use foreach loop that do the work simple for an array. There are couple of things that we can…

  • Blade Loops

    Blade Loops

    All the basic syntax of loop is same as in another programming language, but we have to start with @ symbol. For example: <html>     <head>         <title>Laravel Practice</title>     </head>     <body class=”container”>         <div class=”row”>             <div class=”card col-md-8 mt-5 mx-auto”>             @for ($i=0; $i<=5; $i++)                 <p> Value of is {{$i}} </p>…