PHP Class Encore\Admin\Auth\Database\Menu

Inheritance: extends Illuminate\Database\Eloquent\Model
Afficher le fichier Open project: z-song/laravel-admin Class Usage Examples

Protected Properties

Свойство Type Description
$branchOrder array
$fillable array The attributes that are mass assignable.

Méthodes publiques

Méthode Description
__construct ( array $attributes = [] ) Create a new Eloquent model instance.
buildSelectOptions ( array $elements = [], integer $parentId, string $prefix = '' ) : array Build options of select field in form.
delete ( ) : boolean | null Delete current item and its children.
roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany A Menu belongs to many roles.
saveTree ( array $tree = [], integer $parentId ) Save a tree from a tree like array.
toTree ( array $elements = [], integer $parentId ) : array Format data to tree like array.

Méthodes protégées

Méthode Description
setBranchOrder ( array $order ) : void Set the order of branches in the tree.

Method Details

__construct() public méthode

Create a new Eloquent model instance.
public __construct ( array $attributes = [] )
$attributes array

buildSelectOptions() public static méthode

Build options of select field in form.
public static buildSelectOptions ( array $elements = [], integer $parentId, string $prefix = '' ) : array
$elements array
$parentId integer
$prefix string
Résultat array

delete() public méthode

Delete current item and its children.
public delete ( ) : boolean | null
Résultat boolean | null

roles() public méthode

A Menu belongs to many roles.
public roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
Résultat Illuminate\Database\Eloquent\Relations\BelongsToMany

saveTree() public static méthode

Save a tree from a tree like array.
public static saveTree ( array $tree = [], integer $parentId )
$tree array
$parentId integer

setBranchOrder() protected static méthode

Set the order of branches in the tree.
protected static setBranchOrder ( array $order ) : void
$order array
Résultat void

toTree() public static méthode

Format data to tree like array.
public static toTree ( array $elements = [], integer $parentId ) : array
$elements array
$parentId integer
Résultat array

Property Details

$branchOrder protected_oe static_oe property

protected static array $branchOrder
Résultat array

$fillable protected_oe property

The attributes that are mass assignable.
protected array $fillable
Résultat array