Laravel-admin: Menu保存失敗

Created on 22 Jan 2018  ·  18Comments  ·  Source: z-song/laravel-admin

  • Laravel Version: 5.5.32
  • PHP Version:
  • Laravel-admin: v1.5.8

Description:

新安裝的Laravel-admin ,Menu調整順序后保存失敗。

Steps To Reproduce:

Most helpful comment

@zhsb190101 @lianke @samfrm @xinhaonaner Fixed now, update to latest version(v1.5.9)

All 18 comments

我今天也发现这个问题了,是不是框架哪里有问题?

Open this file : vendor/encore/laravel-admin/src/Controllers/MenuController.php
in index() method after this line $form->action(admin_base_path('auth/menu'));
add this :
$form->hidden('_token')->default(csrf_token());
Refresh the page, it will work.

好像还是不行

可以了,谢谢,原来是少了csrf

@xinhaonaner 我觉得不应该改框架,一更新就不可以了.
还有一个问题就是你试试你那里的 menu排序是否正常?

发现 v1.5.8 是有这个问题, v1.5.5 没有

@samfrm After sorting in the menu, click save error。

修改composer.json,将 laravel-admin 的版本限制为 1.5.5,然后更新
发现 v1.5.8 是有这个问题

Make sure you use laravel 5.5 and latest update of laravel-admin. this bug will be fixed with a small update.

@zhsb190101 @lianke @samfrm @xinhaonaner Fixed now, update to latest version(v1.5.9)

@zhsb190101 It's because of the issue in table admin_menu where title, icon, uri have not a default value.
Also after fixing the database issue, it will insert empty rows in table too. It needs to be fixed.

I can not upda larevel-admin via composer

i got this error !!!
The requested package encore/laravel-admin 1.5.9 exists as encore/laravel-admin[1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.x-dev, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.x-dev, 1.3.x-dev, 1.4.x-dev,
1.5.x-dev, dev-develop, dev-master, v1.1.6, v1.2.10, v1.2.6, v1.2.7, v1.2.8, v1.2.9, v1.3.0, v1.3.1, v1.3.2, v1.3.3, v1.3.4, v1.4.1, v1.4.2, v1.4.3, v1.4.4, v1.4.5, v1.5.0, v1.5.1, v1.5.2, v1.5.3, v1.5.4, v1.5.5, v1.5.6, v1.5.7, v1.5.8] but these are rejected by your constraint.

@Quekie What laravel version are you using?

@samfrm
in composer.json :5.5.*
in composer.lock: v5.5.32

@Quekie Please post your "require": { block content.

@samfrm
"require": {
"php": ">=7.0.0",
"encore/laravel-admin": "1.5.*",
"fideloper/proxy": "~3.3",
"laravel-admin-ext/helpers": "^1.0",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0"
}

@Quekie
change this line : "encore/laravel-admin": "1.5.*",
to this : "encore/laravel-admin": "^1.5",
and try it again.

@samfrm i change nothing but update successed today, seems net work problem.
Thanks for your help anyway

Was this page helpful?
0 / 5 - 0 ratings

Related issues

clock1129 picture clock1129  ·  3Comments

antranapp picture antranapp  ·  3Comments

qcol picture qcol  ·  3Comments

joernroeder picture joernroeder  ·  3Comments

piian picture piian  ·  3Comments