Here are some common bugs and troubleshooting tips for MoonShine Laravel:
Images Not Displaying
- Run `php artisan storage:link` to create a symbolic link from `public/storage` to `storage/app/public`
- Make sure the default disk in `config/filesystems.php` is set to `public`, not `local`
- Verify that `APP_URL` in `.env` is correct, e.g. `APP_URL=https://moonshine.test80`[1]
Default Language Issues
- If you have only one language enabled in the MoonShine config but another language is used in the admin panel
- Ensure `config/app.php` specifies the same language as MoonShine[1]
HTTPS Problems
- If forms use `http` URLs but expect `https`
- Make sure you have a valid SSL certificate
- In `app/Http/Middleware/TrustProxies.php`, set `protected $proxies = ['*']`[1]
Page Not Found Errors
- Check that MoonShineServiceProvider is properly configured in `config/app.php`
- Ensure the resource or page is declared in `MoonShineServiceProvider`
- Clear the cache with `php artisan cache:clear`[1]
Sorting Tree Resources
- Use the `moonshine-sortable-tree` package to add sortable nested categories
- Install the package and run `php artisan vendor:publish --provider="Moonshine\Sortable\SortableServiceProvider"`
- Add the `Moonshine\Sortable\Traits\SortableTrait` to your resource model[5]
If you encounter any other issues, be sure to check the official MoonShine documentation for troubleshooting steps[1][4]. You can also report bugs and contribute to improving the package on GitHub[3][4].
Citations:[1] https://moonshine-laravel.com/docs/resource/getting-started/troubleshooting
[2] https://www.youtube.com/watch?v=0IyzwluNXBU
[3] https://github.com/moonshine-software
[4] https://github.com/moonshine-software/moonshine
[5] https://www.youtube.com/watch?v=StLhum9ALpg
[6] https://moonshine-laravel.com/docs/resource/appearance/icons
[7] https://moonshine.cutcode.dev/section/contribution
[8] https://www.laraub.com/projects/43