Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3. var isAuth = "<?php echo Auth::check(); ?>";
  4.  
  5. if (location.href === 'http://local.myapp.in/login/')
  6. {
  7. if (isAuth) location.href('/home');
  8. }
  9. else
  10. {
  11. if (!isAuth) location.href('/login');
  12. }
  13. });
  14. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement