I use version laravel 5.4
In Helpers/Helper.php
public function test()
{
return 'success';
}
In controller
use App\Helpers\Helper;
public function index()
{
$val = Helper::test();
dd($val);
}
Error : Helper::test() should not be called statically
I called the function inside helper
to use it. But got the error as above. Please show me how to get the function in helper
. Thank you
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire