mercredi 15 novembre 2017

How to call helper function in laravel 5.5

I am using laravel 5.5. I have created a helper.php in app\Http. I am calling this helper in my blade file by using

{!! Helper::functionName() !!}

this is working fine. but i want to hold this helper result in a variable like

{!! $Result=Helper::functionName() !!}

But currently this is printing this result. How to solve this. please help. So that i can make any if condition on this $Result.

In my helpers.php

namespace App\Http\Helpers;

class Helper
{
    public static function functionName()
    {
       return "mydata";
    }
}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2z2DXTJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire