PHP 클래스 Learner\Repositories\Eloquent\CategoryRepository

상속: extends AbstractRepository, implements Learner\Repositories\CategoryRepositoryInterface
파일 보기 프로젝트 열기: RryLee/learner.video

공개 메소드들

메소드 설명
__construct ( Category $category ) Create a new Category instance.
create ( array $data ) : array Create new category.
findAll ( ) : Illuminate\Database\Eloquent\Collection | Category[] Find all categories.
findImageById ( integer $id ) : string Find image path by id.
findRelationByName ( string $name ) : Illuminate\Database\Eloquent\Collection | Category[] Find category relation by name.
getCreateForm ( ) : CreateCategoryFormService Get create form service.
getUpdateForm ( ) : UpdateCategoryFormService Get update form service.
listIdAndName ( ) : array List id and name. (for admin)
listNameAndImageWithRelation ( ) : Illuminate\Database\Eloquent\Collection | Category[] List all category's name and image with relation
update ( integer $id, array $data ) : array Update category by id.

메소드 상세

__construct() 공개 메소드

Create a new Category instance.
public __construct ( Category $category )
$category Learner\Models\Category

create() 공개 메소드

Create new category.
public create ( array $data ) : array
$data array
리턴 array

findAll() 공개 메소드

Find all categories.
public findAll ( ) : Illuminate\Database\Eloquent\Collection | Category[]
리턴 Illuminate\Database\Eloquent\Collection | Learner\Models\Category[]

findImageById() 공개 메소드

Find image path by id.
public findImageById ( integer $id ) : string
$id integer
리턴 string

findRelationByName() 공개 메소드

Find category relation by name.
public findRelationByName ( string $name ) : Illuminate\Database\Eloquent\Collection | Category[]
$name string
리턴 Illuminate\Database\Eloquent\Collection | Learner\Models\Category[]

getCreateForm() 공개 메소드

Get create form service.
public getCreateForm ( ) : CreateCategoryFormService
리턴 Learner\Services\Forms\CreateCategoryFormService

getUpdateForm() 공개 메소드

Get update form service.
public getUpdateForm ( ) : UpdateCategoryFormService
리턴 Learner\Services\Forms\UpdateCategoryFormService

listIdAndName() 공개 메소드

List id and name. (for admin)
public listIdAndName ( ) : array
리턴 array

listNameAndImageWithRelation() 공개 메소드

List all category's name and image with relation
public listNameAndImageWithRelation ( ) : Illuminate\Database\Eloquent\Collection | Category[]
리턴 Illuminate\Database\Eloquent\Collection | Learner\Models\Category[]

update() 공개 메소드

Update category by id.
public update ( integer $id, array $data ) : array
$id integer
$data array
리턴 array