Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sphinx Laravel Package

hans-thomas/sphinx

View on GitHub
Deep Wiki
Context7

+++ date = "2023-06-26" draft = false weight = 20 description = "A bunch of useful and handy methods." title = "Trait" bref= "Sphinx adds some useful and necessary methods through the trait. there is the list of available methods" toc = false +++

Available methods

{{< rawhtml >}}

can

Determine if the entity has the given abilities.

$user->can('has-ability'); // ture
$user->can('hasnt-ability'); // false

canAny

Determine if the entity has any of the given abilities.

$user->canAny( ['has-ability','hasnt-ability'] ); // true
$user->canAny( ['hasnt-ability','hasnt-other-ability'] ); // false

cant

Determine if the entity does not have the given abilities.

$user->cant('hasnt-ability'); // true
$user->cant('has-ability'); // false

cannot

Alias for cant method.

getDeviceLimit

Determine the limitation of logged-in devices using one user account.

$user->getDeviceLimit(); // int number

extract

Extract some necessary attributes of user to put in the tokens.

$user->extract(); // an array of user's attributes

username

Returns username column name of the user.

$user->username(); // email column for example

extractRole

Extract attributes of user's role.

$user->extractRole(); // an array of user's role attributes

extractPermissions

Extract attributes of owned permissions of user.

$user->extractPermissions(); // an array of user's permissions attributes
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky