MediaRepository
abstract class MediaRepository extends FileRepository
Abstract class MediaRepository
Traits
Properties
static protected array | $models | model class name | from EloquentRepositoryTrait |
Methods
int
increment(Model $item, string $column, int $amount = 1)
Increment a column's value by a given amount.
int
decrement(Model $item, string $column, int $amount = 1)
Decrement a column's value by a given amount.
Builder
query()
query
create(array $data = array(), string|null $id = null)
Save a new file model and return the instance.
from FileRepository
Collection|File[]
fetchIn(array $ids, array $columns = array('*'))
Get files by given ids
from FileRepository
Collection|File[]
fetchByFileable(string $fileableId, array $columns = array('*'))
Get the files for fileable
from FileRepository
Details
in EloquentRepositoryTrait at line 42
Model
update(Model $item, array $data = array())
update
in EloquentRepositoryTrait at line 56
bool|null
delete(Model $item)
delete
in EloquentRepositoryTrait at line 69
int
increment(Model $item, string $column, int $amount = 1)
Increment a column's value by a given amount.
in EloquentRepositoryTrait at line 82
int
decrement(Model $item, string $column, int $amount = 1)
Decrement a column's value by a given amount.
in EloquentRepositoryTrait at line 92
static string
getModel()
The name of Category model class
in EloquentRepositoryTrait at line 103
static void
setModel(string $model)
Set the name of Category model
in EloquentRepositoryTrait at line 113
Model
createModel()
Create model instance
at line 36
Builder
query()
query
in EloquentRepositoryTrait at line 137
mixed
__call(string $name, array $arguments)
__call
in FileRepository at line 42
File
create(array $data = array(), string|null $id = null)
Save a new file model and return the instance.
in FileRepository at line 63
Collection|File[]
fetchIn(array $ids, array $columns = array('*'))
Get files by given ids
in FileRepository at line 75
Collection|File[]
fetchByFileable(string $fileableId, array $columns = array('*'))
Get the files for fileable
in FileRepository at line 95
array
bytesByMime(callable $scope = null)
mime 별 파일 용량 정보 반환
in FileRepository at line 122
array
countByMime(callable $scope = null)
mime 별 파일 갯수 반환