@tykus this is good, I think I will use that instead of what I was thinking about.
I just wonder if what was on my mind is the correct way to extend a layout to a second layout:
Let's say I have the main layout:
<html>
<head>
<meta ...>
<meta ...>
<meta ...>
<title> some title </title>
<link href=" ... " rel="stylesheet">
<link href=" ... " rel="stylesheet">
<link href=" ... " rel="stylesheet">
<link href=" ... " rel="stylesheet">
</head>
<body>
<main>
@yield('content')
</main>
<script src=" ... "></script>
<script src=" ... " ></script>
<script src=" ... " ></script>
<script src=" ... "></script>
@stack('scripts')
</body>
</html>
Will it be correct to do that - create extra layout:
@extends('main')
@push('styles')
// push styles here
@endpush
@push('scripts')
// push scripts here
@endpush
Then extend the extra layout in some page:
@extends('extra')
@section('content')
// some content
@endsection
But I think it's not correct, because then on pages where I need to extend the content, it won't be available because I don't think it inherits the layout 2 levels above