Property | Type | Description | |
---|---|---|---|
$stock |
Method | Description | |
---|---|---|
__construct ( |
||
destroy ( $user_id, $item_id ) : boolean | Delete a "Stock data". | |
firstOrCreate ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Model | get "Stock data" or Store a "Stock data". | |
getByItemId ( $item_id ) : Illuminate\Database\Eloquent\Collection | Get "Stock data". | |
getByUserIdAndItemId ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Collection | Get "Stock data". | |
getRankingStockList ( $limit, $day_period = null ) : array | Get ranking data. | |
getRankingWithCache ( $limit ) : array | Get ranking data from cache. | |
getRecentRankingWithCache ( $limit, $dayPeriod ) : array | Get recent ranking data from cache. | |
getStockList ( $user_id ) : array | Get stock lists. |
public __construct ( |
||
$stock |
public firstOrCreate ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Model | ||
$user_id | int user_id | |
$item_id | int item_id | |
return | Illuminate\Database\Eloquent\Model |
public getByItemId ( $item_id ) : Illuminate\Database\Eloquent\Collection | ||
$item_id | int item_id | |
return | Illuminate\Database\Eloquent\Collection | | Illuminate\Database\Eloquent\Builder |
public getByUserIdAndItemId ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Collection | ||
$user_id | int user_id | |
$item_id | int item_id | |
return | Illuminate\Database\Eloquent\Collection | | Illuminate\Database\Eloquent\Builder |
public getRankingStockList ( $limit, $day_period = null ) : array | ||
$limit | int limit date | |
$day_period | int day period | |
return | array |
public getRankingWithCache ( $limit ) : array | ||
$limit | int limit date | |
return | array |
public getRecentRankingWithCache ( $limit, $dayPeriod ) : array | ||
$limit | int limit date | |
$dayPeriod | int day period | |
return | array |
public getStockList ( $user_id ) : array | ||
$user_id | int user_id | |
return | array |