dimanche 15 avril 2018

master.blade.php isn't loading CSS properly when doing @include

I'm trying to make a navbar appear using @include in a master.blade.php file so i get that navbar in all of my pages, the navbar does load but the CSS is messed up.

I know its not the navbar's CSS because if I load the navbar php by itself without the master file the CSS its perfectly fine.

Here is my code:

home.blade.php:

@extends('master')
@section('title','Home')
@section('content')

<div class="container">
    <div class="content">
        <div class="title">Home page</div>
    </div>
</div>

@endsection

master.blade.php:

<html>
<head>
    <title> @yield('title')</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
    <script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
    @include('shared.navbar')

    @yield('content')
</body>
</html>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire