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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle