-
Notifications
You must be signed in to change notification settings - Fork 0
InteractsWithAccessCodes
This page will cover the methods available to your models after using the trait on your model. The source for all these traits can be found here.
Get the access codes. This method will return a MorphMany response for all the access codes related to the model.
Gets the first access code assigned to the model.
Generates an access code and assigns it to your model, it will then return the code. You can adjust the generator setting by passing a generator object as the first parameter. More on generators can be found here.
Set a specific access code to the model, you can also provide a generator as the 2nd augment to have custom validation rules.
This will check if a specific access code string is assigned to the model.
Deletes a specific access code from the model, freeing it up to be used on a new model.
Can be used to find a model based on the access code, this will then return the model if it finds one.