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?
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')