Closed mikimaine closed 8 years ago
Have you generated a new .env
file? Because if you have, and it is set accordingly to the code below, you should get the error message directly in the browser.
APP_ENV=local
APP_DEBUG=true
I guess you installed all the composer dependencies and followed the installation instructions successfully?
ok here is the error message when i set APP_DEBUG=true
FatalErrorException in Model.php line 1011: Class name must be a valid object or a string
the page i access are : http://localhost:8888/admin/access/roles and http://localhost:8888/admin/access/roles/permissions . is this related with entrust??
when i see the server log this is the error :
127.0.0.1:42597 [500]: /admin/access/roles/permissions - Class name must be a valid object or a string in /var/www/html/ecommerce/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 1011 [Sun Feb 7 16:20:03 2016] 127.0.0.1:42598 Invalid request (Unexpected EOF) [Sun Feb 7 16:20:43 2016] 127.0.0.1:42605 Invalid request (Unexpected EOF)
Entrust is not included in this project, it has a custom access system. That is a laravel error, which may stem from a PHP error. What version are you running?
Make sure your server meets all the laravel requirements for this version and composer and all the packaged are updated.
im running version 5.6 on Ubuntu and other models perfectly work except for the the role and permission models ?? and it perfectly work on version 5.1 but this happens in v5.2
I think the error is raised in the rolerelationship trait. permissions() method when returning belongstomany(). The first parameter is config(access.permission) and laravel is saying it is not a valid object or string
I have heck the config file but it looks correct to me .
I don't know why but only that method return this error
Ohh finally I found the problem and now it is solved The error was the users relation in both rolerelationship and permissionrelationship trait the config(auth.model) should be config(auth.providers.users.model) when using laravel 5.2
Thanks all!
Was it a problem in the project or just your local version?
It was downloaded 2 weeks ago . I will try with the current commit
It was downloaded 2 weeks ago . I will try with the current commit
Did you find any success/solution @mikimaine ?
yes changing config(auth.model) to config(auth.providers.users.model) in both rolerelationship and permissionrelationship trait solved my problem! thanks
Glad to hear!
the style will break and have error message oops something went wrong.
when i see the log file it says in model.php :1011 is not a valid class name.
i haven't add any custom model it is the fresh install