Laravel redirect issue from blade template

@if(your conditions)
    @php
        header("Location: " . URL::to('/'), true, 302);
        exit();
    @endphp
@endif

Use route path with Javascript redirect:

  @if(Auth::user()->role_id == 1)
      {{ 'Page' }}
   @else 
      <script>window.location = "{{ route('admin.list') }}";</script>
      <?php exit; ?>
   @endif

Use a JavaScript redirect instead:

@if(Auth::user()->role_id == 1)
  {{ 'Page' }}
@else 
  <script>window.location = "/dashboard";</script>
@endif

Your question is hard to understand, but I suppose you want to redirect the user on the view after check if he is login. I have bad news for you, logic goes on the Controller not on Views.

That means you need to check if the user is login on the Controller and after that you redirect to the proper view, on Laravel the most common way to do it is to create a Middleware that checks if the user is login and then apply the correct logic.

You have a lot of ways to do it, but at first you need to understand how it works, you can check it on the Laravel Authentication docs.