PHP Class Fenos\Notifynder\Categories\CategoryRepository

Repository responsible to approach database queries of the categories
Inheritance: implements Fenos\Notifynder\Contracts\CategoryDB
Afficher le fichier Open project: fenos/notifynder Class Usage Examples

Protected Properties

Свойство Type Description
$categoryModel Fenos\Notifynder\Models\NotificationCategory | Illuminate\Database\Eloquent\Builder | Builder

Méthodes publiques

Méthode Description
__construct ( NotificationCategory $categoryModel )
add ( array $name, $text ) : static Add a category to the DB.
delete ( $categoryId ) : mixed Delete category by ID.
deleteByName ( $name ) : mixed Delete category by name.
find ( $categoryId ) : mixed Find By Id.
findByName ( $name ) : mixed Find by name.
findByNames ( array $name ) : mixed Find by names returning lists of ids.
update ( array $data, $categoryId ) : mixed Update a category by id.

Method Details

__construct() public méthode

public __construct ( NotificationCategory $categoryModel )
$categoryModel Fenos\Notifynder\Models\NotificationCategory

add() public méthode

Add a category to the DB.
public add ( array $name, $text ) : static
$name array
$text
Résultat static

delete() public méthode

Delete category by ID.
public delete ( $categoryId ) : mixed
$categoryId
Résultat mixed

deleteByName() public méthode

Delete category by name.
public deleteByName ( $name ) : mixed
$name
Résultat mixed

find() public méthode

Find By Id.
public find ( $categoryId ) : mixed
$categoryId
Résultat mixed

findByName() public méthode

Find by name.
public findByName ( $name ) : mixed
$name
Résultat mixed

findByNames() public méthode

Find by names returning lists of ids.
public findByNames ( array $name ) : mixed
$name array
Résultat mixed

update() public méthode

Update a category by id.
public update ( array $data, $categoryId ) : mixed
$data array
$categoryId
Résultat mixed

Property Details

$categoryModel protected_oe property

| Builder
protected NotificationCategory,Fenos\Notifynder\Models|Builder,Illuminate\Database\Eloquent $categoryModel
Résultat Fenos\Notifynder\Models\NotificationCategory | Illuminate\Database\Eloquent\Builder