How to get user id in module form view ?



  • Hi, need to know How to get user id in module form view in Asgard V1? Somebody have any idea?.



  • I found it! in this post. In the documentation the information is not clear.

    In the controller,inside the functions create & edit i wrote:
    $auth = app(Authentication::class);
    $userid = $auth->check();
    return(blabla....,compact('userid'))

    Then in the view i used this variable:
    $userid->id
    and everythings works fine.


Log in to reply
 

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.