Saltar al contenido principal

Moonshine

Introducción

Instalación

Requirements To use MoonShine, the following requirements must be met before installation:

php >= 8.1 laravel >= 10.23 composer > 2

composer require moonshine/moonshine
php artisan moonshine:install
 Dashboard created ............................................. DONE

Install migrations? (yes/no) [yes]
yes

INFO Nothing to migrate.


Create super user ? (yes/no) [yes]
yes

Username(email):
❯ admin@test.com

WARN There is already a username, try another one.

Username(email):
❯ admin

Name: [admin]
12345678

Password:


User is created

Can you quickly star our GitHub repository? 🙏🏻: (yes/no) [yes]
❯ no

⇂ Star or contribute to MoonShine: https://github.com/moonshine-software/moonshine
php artisan moonshine:user
namespace App\Providers;

use MoonShine\Menu\MenuGroup;
use MoonShine\Menu\MenuItem;
use MoonShine\Providers\MoonShineApplicationServiceProvider;
use MoonShine\Resources\MoonShineUserResource;
use MoonShine\Resources\MoonShineUserRoleResource;

class MoonShineServiceProvider extends MoonShineApplicationServiceProvider
{
protected function resources(): array
{
return [
];
}

protected function menu(): array
{
return [
MenuGroup::make('moonshine::ui.resource.system', [
MenuItem::make('moonshine::ui.resource.admins_title', new MoonShineUserResource())
->translatable(),
MenuItem::make('moonshine::ui.resource.role_title', new MoonShineUserRoleResource())
->translatable(),
])->translatable(),

MenuItem::make('Documentation', 'https://laravel.com')
->badge(fn() => 'Check'),
];
}

protected function theme(): array
{
return [];
}
}
php artisan moonshine:resource Bloque
 public function fields(): array
{
return [
Block::make([
ID::make()->sortable(),
]),
Text::make('Nombre','nombre'),
Textarea::make('Descripción','descripcion')
];
}
```