lee-to/moonshine
MoonShine is a Laravel admin panel package by lee-to for building fast, customizable admin interfaces and CRUD panels with minimal code. It combines Blade, Alpine.js, and Tailwind CSS for a flexible, developer-friendly dashboard experience.
lee-to/moonshine is the author's source repo; production installs usually target the canonical Composer package (commonly moonshine/moonshine). Check the README and composer show before committing — this repo has 0 known dependents, so confirm you're not pulling a stale mirror or fork.php artisan moonshine:install). This publishes config, migrations, assets, and scaffolds the admin service provider. Run php artisan migrate to create the admin user/guard tables.app/MoonShine/ — resources, pages, layouts (v3-style structure)config/moonshine.php — route prefix, middleware, guard, auth wiringapp/MoonShine/MoonShineServiceProvider.php — resource/page registrationapp/MoonShine/Layouts/MoonShineLayout.php — menu, branding, notificationsphp artisan moonshine:resource Post, open app/MoonShine/Resources/PostResource.php, declare fields(), then visit the panel and log in with the seeded admin. That's the fastest proof of value — a working list/create/edit/delete back office in minutes.fields(), indexFields(), formFields(), detailFields(), filters(), and search(). Keep definitions declarative; push branching into field callbacks or resource methods.->required(), ->rules(), ->hint(). A custom field class is the extension point when a built-in doesn't fit.BelongsTo for foreign keys, HasMany/BelongsToMany for nested editing on detail pages. Always pair relation fields with eager loading to avoid N+1.app/MoonShine/Pages and compose metric cards/widgets rather than cramming analytics into a resource. Keep them read-only and cache expensive queries.MoonShineLayout::menu(). Use this file for branding, nav grouping, and notification badges.auth + verified middleware. If you don't want the separate admin user table, point the guard at your existing user model — but update model, guard, and password broker together. For public apps, keep the panel route-prefixed and role/IP-restricted.php artisan optimize:clear.field('name') to the model attribute and use ->column() when the display label differs.->query(fn ($q) => $q->with([...])) on the resource and verify with Telescope or DB::listen during development.->rules() so the admin UI rejects bad input before it hits the model.users requires updating guard config, provider model, and password broker together — otherwise logins fail with no useful error.php artisan optimize:clear when new registrations don't show up in the nav.onBeforeSave, onAfterSave) for side effects.storage/logs. Most panel issues are route/middleware problems or missing published assets, not field logic. Use php artisan route:list to confirm panel routes registered.How can I help you explore Laravel packages today?