z-song / demo.laravel-admin.org

Source code of official http://demo.laravel-admin.org website.
507 stars 250 forks source link

create new menu #2

Open miadz opened 6 years ago

miadz commented 6 years ago

QueryException In Connection.php line 664 :

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'menu_id' cannot be null (SQL: insert into admin_role_menu (menu_id, role_id) values (, 1)) Expand Collapse

miadz commented 6 years ago

also "data from api" menu items not work,

miadz commented 6 years ago

create new user SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null (SQL: insert into admin_role_users (role_id, user_id) values (1, ))

martinym28 commented 6 years ago

same issue about create new user above

miadz commented 6 years ago

@martinym28 I install this and problem gone. https://github.com/z-song/laravel-admin and then install all helper and config it manaully https://packagist.org/packages/laravel-admin-ext/

Hige commented 6 years ago

Need help! The problem did not go away! ("encore/laravel-admin": "^1.5" - v1.5.6) Other versions also tried.

2017-11-10 18 04 02 2017-11-10 18 05 29 2017-11-10 18 08 03

Hige commented 6 years ago

/app/Providers/AppServiceProvider.php

`<php class AppServiceProvider extends ServiceProvider { public function boot() {

// The reason for all problems with saving. /*** $callback = function () { return false; }; Menu::saving($callback); Role::saving($callback); Permission::saving($callback); Administrator::saving($callback);

    Menu::deleting($callback);
    Role::deleting($callback);
    Permission::deleting($callback);
    Administrator::deleting($callback);

*/ } } `