After deployment to Forge, my Laravel Livewire site is throwing out a server error. I am using Digital Ocean as well. In the Forge site logs it says that my livewire view can't be found. The app works perfectly on local. Any ideas what to do?
I have attempted these commands
I have followed the path of my files and I can confirm there aren't any spelling errors, and to my knowledge, the names of my files are not an issue, since I have followed conventional php artisan make:livewire folder.FooBar as the documentation states. One thing I might think was that I changed the names and rearranged the folders maybe 20 commits before my deployment commit, but I can't see that affecting anything. Please if you have any suggestions I'd love the help
Here is my github Repository
CodePudding user response:
It's a matter of case-sensitivity.
In your linked repository, the folder for your resources/views/livewire/home/home- index.blade.php
, is actually called resources/views/livewire/Home/home-index.blade.php
, which is a different animal altogether. Notice the capital H in your Home folder. The same thing applies to the other folders within your Livewire resources folder.
Having the folders with capital letters can work in some environments, and not work in others - for different reasons, and to avoid it, all your folders within your resources
directory should always be named with lower-case.
For future reference, this is how I create Livewire components with artisan, and then don't touch the names without using the appropriate renaming command.
php artisan make:livewire Home/HomeIndex
If you want to use the kebab-case notation, note that it's all lowercase.
php artisan make:livewire home.home-index
CodePudding user response:
As @Qirel pointed out, my folder names were not correct. I didn't catch the error because my local file tree was all lowercase [![lowercase][1]][1]
But my master branch had not caught that change long ago when I changed it [![capital][2]][2]
Thank you for the help guys [1]: https://i.stack.imgur.com/1rGns.png [2]: https://i.stack.imgur.com/fQsex.png