First Laravel Project.
The "built-in" app.blade.php (what made when we run php artisan make:auth
) has this code:
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="">
<title></title>
<!-- Styles -->
<link href="" rel="stylesheet">
<!-- Scripts -->
<script>
window.Laravel = {!! json_encode([
'csrfToken' => csrf_token(),
]) !!};
</script>
</head>
<body>
<div id="app">
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<!-- Collapsed Hamburger -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Branding Image -->
<a class="navbar-brand" href="">
</a>
</div>
<div class="collapse navbar-collapse" id="app-navbar-collapse">
<!-- Left Side Of Navbar -->
<ul class="nav navbar-nav">
</ul>
<!-- Right Side Of Navbar -->
<ul class="nav navbar-nav navbar-right">
<!-- Authentication Links -->
@if (Auth::guest())
<li><a href="">Login</a></li>
<li><a href="">Register</a></li>
@else
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href=""
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
Logout
</a>
<form id="logout-form" action="" method="POST" style="display: none;">
</form>
</li>
</ul>
</li>
@endif
</ul>
</div>
</div>
</nav>
@yield('main')
</div>
<!-- Scripts -->
<script src=""></script>
</body>
</html>
My master.blade.php has this code (I copied some from the app.blade.php)
<!DOCTYPE HTML>
<html class="html">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="">
<title></title>
<!-- Styles -->
<link href="" rel="stylesheet">
<!-- Scripts -->
<script>
window.Laravel = {!! json_encode([
'csrfToken' => csrf_token(),
]) !!};
</script>
<title>@yield('title')</title>
<link href="" rel="stylesheet">
<link href="" rel="stylesheet">
<link href="media/favicon.ico" rel="icon" type="image/x-icon" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
</head>
<body>
<?php Debugbar::info('Mesterkész'); ?>
<header>
<h1>@yield('title')</h1>
</header>
<article>
<section class="navbar">
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<!-- Collapsed Hamburger -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Branding Image -->
<a class="navbar-brand" href="">
</a>
</div>
<div class="collapse navbar-collapse" id="app-navbar-collapse">
<!-- Left Side Of Navbar -->
<ul class="nav navbar-nav">
</ul>
<!-- Right Side Of Navbar -->
<ul class="nav navbar-nav navbar-right">
<!-- Authentication Links -->
@if (Auth::guest())
<li><a href="">Login</a></li>
<li><a href="">Register</a></li>
@else
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href=""
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
Logout
</a>
<form id="logout-form" action="" method="POST" style="display: none;">
</form>
</li>
</ul>
</li>
@endif
</ul>
</div>
</div>
</nav></section>
<section class="nav">
<table align=center border=1>
<tr>
<td><a href="/"><button class=button>Főoldal</button></a></td>
<td><a href="/inventory"><button class=button>Leltár</button></a></td>
<td><a href="/sell"><button class=button>Eladási mód</button></a></td>
<td><a href="/supplier"><button class=button>Beszállítók</button></a></td>
<td><a href="/search"><button class=button>Keresés</button></a></td>
<td><a href="/stats"><button class=button>Statisztikák</button></a></td>
<td><a href="/options"><button class=button>Beállítások</button></a></td>
<td><a href="/log"><button class=button>Naplózás</button></a></td>
</tr>
<tr>
@section('submenu')
@show
@yield('content')
</tr>
</table>
</section>
<section class="main">
@section('main')
@show
@yield('content')
</section>
</article>
</body>
<footer id=footer>
//Footer will go there
</footer>
</html>
My question is: Why the Dropdowns are working in the app.blade.php and not in master.blade.php?
via Feralheart