mardi 4 octobre 2016

Is there any way to pass variable in rememberForever callback?

I have following code,

\Cache::rememberForever('Roles', function() {
    return RoleModel
        ::where('ParentRoleID' >= $CurrenctUserRoleID)
        ->get();
});

Issue is: I am getting Error

Undefined variable: CurrenctUserRoleID

Question: Is there any way to pass variable in callback?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire