zareismail / nova-trust Goto Github PK
View Code? Open in Web Editor NEWAn nova acl package based on laratrust laravel package
License: MIT License
An nova acl package based on laratrust laravel package
License: MIT License
If my traits for User.php are:
use \Staudenmeir\EloquentHasManyDeep\HasRelationships, LaratrustUserTrait, \NovaTrust\Concerns\InteractsWithNovaTrust, Notifiable, SoftDeletes, \Spatie\Tags\HasTags;
then I get:
Trait method roles has not been applied, because there are collisions with other trait methods on App\User
If I remove 'LaratrustUserTrait ' like this:
use \Staudenmeir\EloquentHasManyDeep\HasRelationships, \NovaTrust\Concerns\InteractsWithNovaTrust, Notifiable, SoftDeletes, \Spatie\Tags\HasTags;
Then I get:
502 Bad Gateway from Nova but works on front-end
Issue was experienced when I updated the package (with PR) to work with v.7 of Laravel: #6
Hey,
I've just installed your package and some functions don't work for me.
For example the permission tab doesn't work, because some helper functions are missing:
Currently using Laravel Nova 2.0 and Laravel 6.X.
My fix would be:
File: Helpers/PermissionContainer.php
/**
* Make displayable name for ability.
*
* @param string $ability
* @return string
*/
static public function displayName(string $ability)
{
$ability = str_replace('-', ' ', $ability);
$name = collect(explode('.', $ability))->reverse()->filter()->implode(' ');
return Str::title(Str::snake($name, ' '));
}
I've already got my migrations in place for Team and Roles and so forth with additional customisations.
Now I'm adding this pacakge after a setup site I'm having the migration files from the vendor directory added automatically despite not being in my migrations/ folder..
Consequently I get a conflict:
`
Migrating: 2020_04_09_135211_create_team_table
Illuminate\Database\QueryException
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'teams' already exists`
Any thoughts on how I stop the package from insisting on the migrations? I feel this is the final block to me using this package!
Cheers!
Hi, the full error is:
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous (SQL: select exists(select * from
rolesinner join
role_useron
roles.
id=
role_user.
role_idwhere
role_user.
user_id= 1 and
id= 1 and
roles.
deleted_atis null) as
exists)
can you help me with this.
thanks
سلام
تو اسکرین شات هایی که گذاشتید دیدم که گویا نوا رو راست به چپ کردید
https://novapackages.com//storage/screenshots/gaszcgRwEjL0VEUkjVC5rSTIZO8PdXFZ1o7q8ys0.png
https://novapackages.com//storage/screenshots/rkC6AW6ZExwMdaxRkIhJ3PHDbLTp4sDXrrFa5C1B.png
میشه بپرسم چطور؟
In NovaTrust\Helpers\PermissionContainer method at displayName
undefined title_case and snake_case
static public function displayName(string $ability)
{
$ability = str_replace('-', ' ', $ability);
$name = collect(explode('.', $ability))->reverse()->filter()->implode(' ');
return title_case(snake_case($name, ' '));
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.