mardi 31 juillet 2018

How to redirect a view if session exist? (Laravel)

I want to make view can't be loaded if session is exist and redirect it to other view. For example if user is logged in (session exist), the login page view should redirect to main page instead. Currently my code is like this. This code can detect the session but redirect is not working (blank page).

<?php if (Session::has('sessionId')){return redirect('/front')} ?>
<!DOCTYPE html>
<html>
</html>



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

Aucun commentaire:

Enregistrer un commentaire