-1

I found this topic: laravel-admin.org generate menu command line But the issue was not resolved. How do I create a menu item, via code or command? so that I can share the result with a friend via git. If there is no solution, i will have to write a seeder. Its very popular extension, and i cannot find an answer to a simple question. Please help me. picture

chingis31
  • 1
  • 2

1 Answers1

0

I made migration:

    public function up()
{
    /** @var \Illuminate\Database\Eloquent\Model $menuModel */
    $menuModel = config('admin.database.menu_model');
    $menuModel::create([
        'parent_id' => 0,
        'order'     => 0,
        'title'     => 'Settings',
        'icon'      => 'fa-gears',
        'uri'       => '/settings'
    ]);
}
chingis31
  • 1
  • 2