Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Laravel Helper para redirecionar o usuário devolta para a última página ou para um lugar default.
<?php
function redirect_back_or_default($url = null){
try{
return Redirect::back();
}catch(Exception $e){
return Redirect::to($url);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment