При переходе на main я не получаю отображения страници ..
Пустая страница без каких либо ошибок в консоли ..
Почему не выводит navigation и footer?
По URL:
localhost/conlineltd/public/main -> выводит "From main"
Route::get('/main', function () {
echo "From main";
return view('main');
});
.htaccess:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header<code lang="php">
</code>
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
main page:
<html>
<head>
<meta charset="UTF-8">
<title>C_ONLINE_LTD</title>
<link rel="stylesheet" href="{{URL::to('css/main.css')}}">
<link rel="stylesheet" href="{{URL::to('node_modules/bootstrap/dist/css/bootstrap.min.css')}}">
</head>
<body>
<div class="container">
<div class="row">
@yield('navigation')
</div>
</div>
<div class="container">
<div class="row">
@yield('footer')
</div>
</div>
<script src="{{URL::to('node_modules/jquery/dist/jquery.min.js')}}"></script>
<script src="{{URL::to('node_modules/bootstrap/dist/js/bootstrap.min.js')}}"></script>
</body>
</html>
nav page:
@extends('main')
@section('navigation')
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar color"></span>
<span class="icon-bar color"></span>
<span class="icon-bar color"></span>
</button>
<a class="navbar-brand" href="../content/index.php" id="logo">C ONLINE LTD</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="../content/index.php">Home</a></li>
<li><a href="../content/about.php">About Us</a></li>
<li><a href="../content/contact.php">Contact Us</a></li>
<li><a href="../content/news.php">News</a></li>
<li><a href="../content/location.php">Our Location</a></li>
<li><a href="../content/clients.php">Our Clients</a></li>
<li><a href="../content/login.php">Login</a></li>
<li><a href="../content/register.php">Register</a></li>
</ul>
</div>
</div>
</nav>
@endsection
footer page:
@extends('main')
@section('footer')
<div>
Footer Block
</div>
@endsection