Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Blade Include Not Found Up One Directory – Laravel 9

Having an issue with a view not being found. Trying to include a file within an already included file. This works in an older version of Laravel, but seems to be giving me issues in Laravel 9.

I have tried 150 things, not sure where to begin on that aspect; hoping someone can’t point me in a solid direction.

And sorry for the external image links stack overflow says my reputation isn’t high enough to add images?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Thanks everyone!

Directory Structure and file I am trying to include:

Image: https://www.dropbox.com/s/mvxaufggn3elifw/trying-to-include.jpg?dl=0

Primary Layout/Template File and Directory:

Image: https://www.dropbox.com/s/5danurl87fzqtlh/template-file.jpg?dl=0

Page where template file is extended

Image: https://www.dropbox.com/s/j7gl0w69lqj0suc/main-page.jpg?dl=0

Common File where I am Trying to include layouts/main-head.blade.php

Image: https://www.dropbox.com/s/ibzn03wsc69mlvk/common-head.jpg?dl=0

Error Message

Image: https://www.dropbox.com/s/rvxjn4xwm6pdfab/error.jpg?dl=0

>Solution :

Your head.blade.php should be like this

@include('layouts.main-head')
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading