@if (Session::get('user') == NULL)
{!!Redirect::to('login')!!}
@endif
or
@if (Session::get('user') == NULL)
<script>
window.location = 'login';
</script>
@endif
 
或者
@unless (Auth::check())
    <script>
    window.location = 'login';
    </script>
@endunless
posted on 2017-07-26 11:22  袁晓平  阅读(512)  评论(0编辑  收藏  举报