Answers for "laravel blade include with variable"

PHP
2

laravel 5.4 forelse

@forelse ($users as $user)
    <li>{{ $user->name }}</li>
@empty
    <p>No users</p>
@endforelse
Posted by: Guest on September-29-2020
1

laravel include with variable

@include('layouts.article', ['mainTitle' => "404, page not found", 'mainContent' => "sorry, but the requested page does not exist :("])
Posted by: Guest on December-05-2019
0

using get in laravel blade

{{ request()->has('faq') ? request()->get('faq') : '' }}
Posted by: Guest on September-24-2020

Browse Popular Code Answers by Language