I have followed this answer: http://ift.tt/23D8Ul1
My config/app.php:
'aliases' => [
....
'Helper' => App\Helpers\Helper::class,
],
My app/Helpers/Helper.php:
<?
namespace App\Helpers;
class Helper
{
public static function hello($name)
{
return 'Hello ' . $name;
}
}
?>
And yet, when I use in a view, I get this:
ErrorException in AliasLoader.php line 66:
Class 'App\Helpers\Helper' not found (View: [redacted]/machine/index.blade.php)
Why? This doesn't make any sense to me. I also ran composer dump-autoload
and nothing changes.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire