Method | Description | |
---|---|---|
__construct ( |
Create a new Category instance. | |
create ( array $data ) : array | Create new category. | |
findAll ( ) : Illuminate\Database\Eloquent\Collection | |
Find all categories. | |
findImageById ( integer $id ) : string | Find image path by id. | |
findRelationByName ( string $name ) : Illuminate\Database\Eloquent\Collection | |
Find category relation by name. | |
getCreateForm ( ) : |
Get create form service. | |
getUpdateForm ( ) : |
Get update form service. | |
listIdAndName ( ) : array | List id and name. (for admin) | |
listNameAndImageWithRelation ( ) : Illuminate\Database\Eloquent\Collection | |
List all category's name and image with relation | |
update ( integer $id, array $data ) : array | Update category by id. |
public __construct ( |
||
$category |
public findAll ( ) : Illuminate\Database\Eloquent\Collection | |
||
return | Illuminate\Database\Eloquent\Collection | |
public findImageById ( integer $id ) : string | ||
$id | integer | |
return | string |
public findRelationByName ( string $name ) : Illuminate\Database\Eloquent\Collection | |
||
$name | string | |
return | Illuminate\Database\Eloquent\Collection | |
public getCreateForm ( ) : |
||
return |
public getUpdateForm ( ) : |
||
return |
public listIdAndName ( ) : array | ||
return | array |
public listNameAndImageWithRelation ( ) : Illuminate\Database\Eloquent\Collection | |
||
return | Illuminate\Database\Eloquent\Collection | |