0

im using laravel-admin.org as my laravel admin panel

when i want to access my system admins, i generate a new route by this command

php artisan admin:make UserController --model=App\\User

then it make a controller for me.

then after running this command , it tell me to add this line

    $router->resource('users', UserController::class);

into routes.php in admin folder. (app\admin\routes.php)

this is my routes.php file that i can sync it to my server by ftp tools like filezilla

<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');
    $router->resource('users', UserController::class);

});

then i m usually should create my desired menus manually from admin panel and add new menus item.

http://localhost:8000/admin/auth/menu

i should add those items in my server again. by UI. !!!

How can i apply this last step in the server automatically?

i want to export my menus and import them into server.

is it possible to create a new command line for my laravel ? and generate menus like migrate command and add only newer on the server?

we know when we run migrate command just run only the migration files that they are new in server. and those tables that did not exist there.

i want to insert them increment and if i add a new menu, then only they are new to import from my local and only the new items export to my server.

saber tabatabaee yazdi
  • 4,404
  • 3
  • 42
  • 58

1 Answers1

0

i'm using seed

  1. Use iseed component for inverse seed from local db and convert it to seed file and next step is to run that seed file on your server https://github.com/orangehill/iseed
  2. Second solution we can use excel seeder https://github.com/bfinlay/laravel-excel-seeder
saber tabatabaee yazdi
  • 4,404
  • 3
  • 42
  • 58