Comments (5)
@ebottis If you look into source code of the package, there is called $this->roleProfile
but in your model is decleared and set statically so the value will be null
and you will have that error.
To fix this please remove static
from protected static $roleProfile = 'profile-name';
.
from ntrust.
I have the same issue when using it in views like I used to use Entrust
@if(Ntrust::can(['can-access-admin']))
from ntrust.
This is actually an issue in Entrust.
http://stackoverflow.com/questions/35785441/laravel-5-2-with-entrust-class-name-must-be-a-valid-object-or-a-string
When trying to use the EntrustUserTrait methods, you encounter the error which looks like
Class name must be a valid object or a string
then probably you don't have published Entrust assets or something went wrong when you did it. First of all check that you have the entrust.php file in your config directory. If you don't, then try php artisan vendor:publish and, if it does not appear, manually copy the /vendor/zizaco/entrust/src/config/config.php file in your config directory and rename it entrust.php.
from ntrust.
I will review today later on and fix this one.
from ntrust.
@ebottis where do you see $this->roleProfile
?
from ntrust.
Related Issues (20)
- Trait method collision with SoftDeletes HOT 20
- Admin.php HOT 11
- BadMethodCallException with message 'Call to undefined method Illuminate\Database\Query\Builder::attachRole() HOT 2
- Call to undefined method Illuminate\Database\Query\Builder::restored() HOT 3
- Class name must be a valid object or a string HOT 4
- Multi Auth migration create HOT 1
- Access to undeclared static property User::$staticRoleProfile HOT 6
- Migration to klaravel/ntrust from Zizaco/entrust HOT 1
- attachRole does not working HOT 6
- error in ntrust:migration
- $roleProfile variable is not present in user object HOT 1
- Access to undeclared static property: $staticRoleProfile HOT 1
- all with the admin role HOT 1
- [BadMethodCallException] Call to undefined method Illuminate\Database\Query\Builder::attachPermissio ns() HOT 1
- ntrust vs laravel built-in authorization HOT 2
- Edit role permissions issue HOT 3
- Route level if condition else redirects to dashboad. HOT 2
- No admin table ? HOT 2
- any plan to support the latest version of Laravel?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ntrust.