Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hbkq110 opened this issue Aug 21, 2018 · 14 comments
Closed

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

hbkq110 opened this issue Aug 21, 2018 · 14 comments

Comments

@hbkq110
Copy link

hbkq110 commented Aug 21, 2018

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

@hbkq110
Copy link
Author

hbkq110 commented Aug 21, 2018

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
Copy link
Author

hbkq110 commented Aug 21, 2018

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
Copy link
Author

hbkq110 commented Aug 21, 2018

@z-song
Copy link
Owner

z-song commented Aug 21, 2018

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

@z-song z-song closed this as completed Aug 21, 2018
@z-song z-song reopened this Aug 21, 2018
@z-song
Copy link
Owner

z-song commented Aug 21, 2018

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

@hbkq110
Copy link
Author

hbkq110 commented Aug 21, 2018

Thanks, it's done now.

@space-blank
Copy link

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

in UserController.php line 12

@space-blank
Copy link

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

@z-song
Copy link
Owner

z-song commented Aug 21, 2018

@space-blank Clone this repo and reinstall

@space-blank
Copy link

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

@z-song
Copy link
Owner

z-song commented Aug 21, 2018

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

@space-blank
Copy link

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

@space-blank
Copy link

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

@DudleyDawson
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants