Skip to content
Advertisement

Tag: laravel-blade

Laravel Blade compileString gives me a Blank Page

I tried to create a new blade directive in my AppServiceProvider: And then call this directive in my view: @test() But it’s not work and gives me a blank page. Answer i try several things but finally i fix this by copy and paste blade directive code from BladeCompiler.php to my custom directive instead of using compileString

laravel 5.2 How to get route parameter in blade?

this is my url http://project.dev/blogs/image-with-article so, here I need the parameter image-with-article in my blade to display which is a parameter named slug here is in my routes file I need the slug paramter in blade. Answer I’m not sure what you mean. If you’re trying to construct the route in a Blade template, use If you’re trying to access

Load Blade assets with https in Laravel

I am loading my css using this format: <link href=”{{ asset(‘assets/mdi/css/materialdesignicons.min.css’) }}” media=”all” rel=”stylesheet” type=”text/css” /> and it loads fine for all http requests But when I load my login page with SSL (https), I get a …page… was loaded over HTTPS, but requested an insecure stylesheet ‘http… Can someone please tell me how do I make blade load assets

How to Set Variables in a Laravel Blade Template

I’m reading the Laravel Blade documentation and I can’t figure out how to assign variables inside a template for use later. I can’t do {{ $old_section = “whatever” }} because that will echo “whatever” and I don’t want that. I understand that I can do <?php $old_section = “whatever”; ?>, but that’s not elegant. Is there a better, elegant way

Advertisement