ekandreas / bladerunner

WordPress plugin for Laravel Blade templating DEPRECATED
http://bladerunner.elseif.se
12 stars 1 forks source link

Undefined variable #36

Closed bumTomica closed 8 years ago

bumTomica commented 8 years ago

Hello,

I'm trying to pass a variable like this, but I'm getting undefined variable notice. Can you please advise what am I doing wrong.

page-templates\page-home.php

<?php /* Template Name: Home */

$title = 'Test'

bladerunner('views.pages.home', [
  'title' => $title
]);

views\pages\home.blade.php

@extends('views.layouts.index')

@section('main')

  {{ $title }}

@endsection
ekandreas commented 8 years ago

Could you please provide me with the version # of Bladerunner?

bumTomica commented 8 years ago

1.4.3

It's loaded via Composer as Roots.io must-use plugin. When I remove passing variables everything works as expected.

ekandreas commented 8 years ago

Hmm, I have the exact example as you but can't reproduce the error. Are you sure the variable names are exact?

ekandreas commented 8 years ago

A semicolon missing at @title = 'Test', perhaps?

bumTomica commented 8 years ago

Quick Screenshot

ekandreas commented 8 years ago

Could you empty all files in the folder .cache and try again?

ekandreas commented 8 years ago

And it's ok to contact me via Skype. I have added you there in a try to reach you :-)

bumTomica commented 8 years ago

It's the same. :( Tried manually and with WP admin. And will do :)

ekandreas commented 8 years ago

Having a hard time to reproduce the error. Your example works just fine here, sorry for that.

bumTomica commented 8 years ago

Removed plugin, provisioned Trellis, added plugin again, now works as expected. Well that is also a way of fixing problems :D Thanks for help and sorry for inconvenience! :)

ekandreas commented 8 years ago

Ok, happy to know that you are moving forward. And a reminder, we release the v1.5 of Bladerunner now based on L5.3