\App\Repositories\EloquentImageRepositoryEloquent

Class ImageRepositoryEloquent

Summary

Methods
Properties
Constants
model()
boot()
saveImage()
getList()
getYearMonth()
getInfo()
destroy()
edit()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

model()

model() : string

Specify Model class name

Returns

string

boot()

boot() 

Boot up the repository, pushing criteria

saveImage()

saveImage(  $file_arr,   $user) : boolean

保存

Parameters

$file_arr

array 文件信息

$user

object 用户对象

Returns

boolean —

存储的ID

getList()

getList(  $limit = 10,   $condition = array(),   $order = 'created_at',   $sort = 'desc') : object

获取文件列表

Parameters

$limit

int 分页长度

$condition

array 查询条件

$order

string 排序字段

$sort

string 排序方式

Returns

object

getYearMonth()

getYearMonth() 

获取年份月份

getInfo()

getInfo(  $id) : object

获取图片详细信息

Parameters

$id

int 图片ID

Returns

object

destroy()

destroy(  $id) 

Parameters

$id

edit()

edit(  $id,   $request) 

Parameters

$id
$request