I'm trying to extend different layouts inside if-else statement. Here is my code:
@if(Auth::check())
@extends('layouts.adminPanel')
@else
@extends('layouts.home')
@endif
But the view files extending both layouts. No matter user logged in or not!
How can I fix it?
Add Extends at the first line