I am new to Laravel and after many searches online, i can't figure out how to display curent login user to a page.
here what i try
my controller
use Illuminate\Support\Facades\Auth;
public function show($alias)
{
$alias = Node::where('alias', $alias)->first();
$session = Auth::id();
//$alias = Node::findOrFail($id);
return view('front.blog.showblog', compact('alias', 'session'));
}
in my page i call it like this
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire