z-song / demo.laravel-admin.org

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

Demo_Source_Code Demo-Posts can't run normally, Sir #35

Closed hbkq110 closed 5 years ago

hbkq110 commented 6 years ago

![Uploading image.png…]() Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN) Trait 'Encore\Admin\Controllers\HasResourceActions' not found

hbkq110 commented 5 years ago

The lacked file (HasResourceActions) has been copied from laravel-admin folder. But another issue occur as below:

Symfony\Component\Debug\Exception\FatalErrorException thrown with message "Method Encore\Admin\Grid::toString() must not throw an exception, caught TypeError: Argument 1 passed to Encore\Admin\Grid\Filter\Where::construct() must be an instance of Closure, string given, called in E:\DD\laravel_admin_demo\vendor\encore\laravel-admin\src\Grid\Filter.php on line 303"

Stacktrace:

0 Symfony\Component\Debug\Exception\FatalErrorException in E:\DD\laravel_admin_demo\vendor\encore\laravel-admin\src\Layout\Column.php:0

hbkq110 commented 5 years ago

Cannot use object of type Encore\Admin\Grid\Tools\BatchDelete as array (View: E:\DD\laravel_admin_demo\vendor\encore\laravel-admin\resources\views\grid\batch-actions.blade.php) (View: E:\DD\laravel_admin_demo\vendor\encore\laravel-admin\resources\views\grid\batch-actions.blade.php)

hbkq110 commented 5 years ago
z-song commented 5 years ago

Runcomposer update, make sure that you are using the latest 1.5.x-dev version of larave-admin.

z-song commented 5 years ago

You'd better clone this repo and reinstall it, don't just use git pull to update.

hbkq110 commented 5 years ago

Thanks, it's done now.

space-blank commented 5 years ago

FatalErrorExceptionTrait 'Encore\Admin\Controllers\HasResourceActions' not found

in UserController.php line 12

space-blank commented 5 years ago

The lacked file (HasResourceActions) has been copied from laravel-admin folder? Where does it copy from? I didn't find

z-song commented 5 years ago

@space-blank Clone this repo and reinstall

space-blank commented 5 years ago

v1.5.8和master分支上的代码不一样, 重新安装也是缺少这个文件

z-song commented 5 years ago

@space-blank 这个demo依赖的laravel-admin版本是1.5.x-dev, 1.5.x-dev对应master分支

space-blank commented 5 years ago

好的,我再试试,我按照教程安装之后,laravel-admin版本都是v1.5.18,可是这个版本和master分支不一样,我还是直接下载master的分支才发现有这个HasResourceActions文件

space-blank commented 5 years ago

弱弱的问一句 ,对于分表的查询,能否指教下?

DudleyDawson commented 5 years ago

I'm trying to update an old codebase with the latest laravel-admin and still seeing this. I have confirmed that HasResourceActions is present in vendor/encore/laravel-admin/src/Controllers, what can I do to fix this? I'm currently configuring composer like so: "encore/laravel-admin": "^1.6"