jeudi 26 novembre 2015

Laravel 5 - Helper on Blade not working

I have this error when I used {{ Helper::test(); }} on a blade

enter image description here

and on my config/app.php, I already have enter image description here

and this is inside of my Helper.php

<?php namespace App;

class Helper {
    public static function test() {
        return "wa";
    }
}

and I already done the composer.json then run the composer dump-autoload

...
"autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        },
        "files": [
            "app/Helper.php"
        ]
    },
...

I don't know what I missed, is there any suggestion to be able to use the helper on a blade on a laravel 5?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire