问题
@extends('layouts.app') does not work on some of my web pages. it just shows the content without the layout. why is this happening?
I already tried making a new layout folder and calling it but still some pages still doesn't show the layout.
both show.blade.php and create.blade.php doesn't display the layout
it only shows like this
app.blade.php this is the navbar.blade.php
回答1:
Your CSS file maybe not loading properly.
change your app.blade.php
file like below,
<link rel="stylesheet" href= "/css/app.css" >
回答2:
you might what to try this:
<link rel="stylesheet" href="{{ asset('css/app.css') }}" />
回答3:
In my case this fixed it (had to add public):
href="{{ asset('public/css/app.css')
来源:https://stackoverflow.com/questions/54283283/laravel-extendslayouts-app-not-working-on-some-pages