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();
Then in the view i used this variable:
and everythings works fine.