Heres the controller:

class HomeController extends BaseController {
    public function index() {
        return View::make('home', array('username' => 'Vaughan'));
    }
}

Here the home blade view:

{{ $username }}

Yet the view is outputting exactly this:

{{ $username }}

The variable is not being rendered. Could this be something to do with Apache or PHP?

有帮助吗?

解决方案

You need to name your view with blade extension:

home.blade.php

That's all.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top