-
Notifications
You must be signed in to change notification settings - Fork 21
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
error at watchtower/user #12
Comments
I'm not getting that error. In your config file, did you specify a model or are you using the default? |
Using the default :/ |
I haven't been able to reproduce this error on a Windows box. What version of Windows/Laravel are you using? (looks like Win 7...?) Can you post your watchtower config menu? Is there anything in the laravel.log file? Oh - and which version of the package are you using? |
I just installed it view composer and I have the same error. I'm using Laravel 5.2 and PHP Version 5.6.23 I replaced at userController the "$this->model" with "User". Seems to work. |
Okay. I just installed it again with L5.2 and can't replicate the issue. I made no changes except for the ones necessary so I don't know what to tell you guys. Changing it to User would work, but then you are locked into using that User model. Which means you have to edit my vendor version if you want to see your changes reflected OR you have to copy over the "roles()" function from my User model. The getModel function that incorporates the "this->model" allows you to use your own User model without having to edit mine. On line 38-39 of your watchtower config file do you have the following lines?
And is there any error logged in your laravel.log file? That would be much helpful in trying to solve this problem. |
Found the issue. Its the PHP Version. I will sort out a fix for this asap. |
it seems that $this->getModel() is not a reference of the User class, but an instance of it . A workaround is to replace all $this->model::method() invocation with $this->model->method(). Just take care of not replacing working static calls like Shinobi::can(...) where class_name is actually a reference to a class, not an object. This worked for my for the @dev branch & PHP/5.6.24! |
In a Laravel 5.3 upgraded from 5.2 and PHP 5.6.4 $users = $this->model->where('name', 'LIKE', '%'.$value.'%')->orderBy('name')->paginate( config('watchtower.pagination.users', 15) ); and work too; |
FatalErrorException in E:\wamp\www\monkey\vendor\smarch\watchtower\src\Controllers\UserController.php line 52:
syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM)
Anyone else facing the same issue ?
The text was updated successfully, but these errors were encountered: