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>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire