Perm extends Model
Information about a Permission
Table of Contents
- $actions : array<string|int, mixed>|null
 - $code : int|null
 - The permission's code
 - $description : string|null
 - The permission's description (in english)
 - $name : string|null
 - The permission's name
 - $resources : array<string|int, mixed>|null
 - from() : static
 - Initializing a model from an array
 - getActions() : array<string|int, string>
 - Getter for actions
 - getCode() : int
 - Getter for code
 - getDescription() : string
 - Getter for description
 - getName() : string
 - Getter for name
 - getResources() : array<string|int, string>
 - Getter for resources
 - jsonSerialize() : array<string|int, mixed>
 - setActions() : static
 - Setter for actions
 - setCode() : static
 - Setter for code
 - setDescription() : static
 - Setter for description
 - setName() : static
 - Setter for name
 - setResources() : static
 - Setter for resources
 
Properties
$actions
    protected
        array<string|int, mixed>|null
    $actions
     = null
    
    
    
$code
The permission's code
    protected
        int|null
    $code
     = null
    
    
    
$description
The permission's description (in english)
    protected
        string|null
    $description
     = null
    
    
    
$name
The permission's name
    protected
        string|null
    $name
     = null
    
    
    
$resources
    protected
        array<string|int, mixed>|null
    $resources
     = null
    
    
    
Methods
from()
Initializing a model from an array
    public
            static    from(array<string|int, mixed> $params) : static
    
        Parameters
- $params : array<string|int, mixed>
 - 
                    
Pass this parameter if you want to initial property value from an array. See API reference for all property names and types
 
Tags
Return values
static —getActions()
Getter for actions
    public
                getActions() : array<string|int, string>
    
    
    
        Return values
array<string|int, string> —getCode()
Getter for code
    public
                getCode() : int
    
    
    
        Return values
int —The permission's code
getDescription()
Getter for description
    public
                getDescription() : string
    
    
    
        Return values
string —The permission's description (in english)
getName()
Getter for name
    public
                getName() : string
    
    
    
        Return values
string —The permission's name
getResources()
Getter for resources
    public
                getResources() : array<string|int, string>
    
    
    
        Return values
array<string|int, string> —jsonSerialize()
    public
                jsonSerialize() : array<string|int, mixed>
    
    
    
    Tags
Return values
array<string|int, mixed> —setActions()
Setter for actions
    public
                setActions(array<string|int, string> $actions) : static
    
        Parameters
- $actions : array<string|int, string>
 
Return values
static —To use in method chains
setCode()
Setter for code
    public
                setCode(int $code) : static
    
        Parameters
- $code : int
 - 
                    
The permission's code
 
Return values
static —To use in method chains
setDescription()
Setter for description
    public
                setDescription(string $description) : static
    
        Parameters
- $description : string
 - 
                    
The permission's description (in english)
 
Return values
static —To use in method chains
setName()
Setter for name
    public
                setName(string $name) : static
    
        Parameters
- $name : string
 - 
                    
The permission's name
 
Return values
static —To use in method chains
setResources()
Setter for resources
    public
                setResources(array<string|int, string> $resources) : static
    
        Parameters
- $resources : array<string|int, string>
 
Return values
static —To use in method chains