Top "Laravel-blade" questions

Blade is the simple, yet powerful templating engine provided with Laravel.

laravel 5.2 blade template failing to parse

I have an issue with a laravel 5.2 site I'm working on. I have a master (main) layout that I'm using …

php laravel-5.2 blade laravel-blade
Laravel 5.1 @can, how use OR clause

I did not find how to use a clause (OR, AND) in view with @can, for checking multiple abilities ... I …

laravel laravel-5.1 blade laravel-blade
How to pass a custom function to a Laravel Blade template?

I have a custom function and I want to pass it in a blade template. Here is the function: function …

laravel laravel-blade
Is there any way to compile a blade template from a string?

How can I compile a blade template from a string rather than a view file, like the code below: <?…

php laravel laravel-blade
Laravel blade: Can you yield a default partial

If I have a layout called RightSideBar.blade.php in Laravel blade, one area yield('content') and the other yield(…

php laravel laravel-blade
Laravel Request::is() - is there a better way?

@if(Request::is('login') OR Request::is('tags') OR Request::is('categories') OR Request::is('posts') OR Request::is('tags/..…

php laravel laravel-blade laravel-request
How can I define variable array on the laravel blade view?

I try like this : <div class="media-body"> @foreach($categories as $category) @php $category[] = $category->name @endphp @endforeach {{ …

php laravel laravel-5.3 laravel-blade implode
Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF)

Hello dear i want to create a customer blade which provides users to import and export excel file. My customers_…

laravel exception blade laravel-blade laravel-excel
Laravel htmlspecialchars() expects parameter 1 to be string, object given in my project?

So i'm trying to code a simple website form. But it has this htmlspecialchars error. I've tried to make {{ $message }} …

php laravel web laravel-blade htmlspecialchars
Laravel Blade - Advantage of @slot/@component vs @include?

Laravel 5.4 Blade introduced the concept of components & slots - but I can't see what they add over the traditional @…

php laravel blade laravel-5.4 laravel-blade