PHP Class Owl\Repositories\Fluent\LikeRepository

Inheritance: extends AbstractFluent, implements Owl\Repositories\LikeRepositoryInterface
Show file Open project: owl/owl

Protected Properties

Property Type Description
$table

Public Methods

Method Description
destroy ( $user_id, $item_id ) : boolean Delete a "Like data".
firstOrCreate ( $user_id, $item_id ) : stdClass get "Like data" or Store a "Like data".
get ( $user_id, $item_id ) : stdClass Get a "Like data".
getLikeById ( $id ) : stdClass Get a like by id.
getTableName ( ) : string Get a table name.

Method Details

destroy() public method

Delete a "Like data".
public destroy ( $user_id, $item_id ) : boolean
$user_id int user_id
$item_id int item_id
return boolean

firstOrCreate() public method

get "Like data" or Store a "Like data".
public firstOrCreate ( $user_id, $item_id ) : stdClass
$user_id int user_id
$item_id int item_id
return stdClass

get() public method

Get a "Like data".
public get ( $user_id, $item_id ) : stdClass
$user_id int user_id
$item_id int item_id
return stdClass

getLikeById() public method

Get a like by id.
public getLikeById ( $id ) : stdClass
$id int
return stdClass

getTableName() public method

Get a table name.
public getTableName ( ) : string
return string

Property Details

$table protected property

protected $table