PHP Class Chrisbjr\ApiGuard\Repositories\ApiKeyRepository

Inheritance: extends Jenssegers\Mongodb\Model, use trait Illuminate\Database\Eloquent\SoftDeletes
Show file Open project: chrisbjr/api-guard

Protected Properties

Property Type Description
$dates
$fillable
$table

Public Methods

Method Description
generateKey ( ) : string A sure method to generate a unique API key
getByKey ( $key, integer $rememberApiKeyDuration ) : ApiKeyRepository
make ( null $userId = null, integer $level = 10, boolean $ignoreLimits = false ) : static Make an ApiKey

Private Methods

Method Description
keyExists ( $key ) : boolean Checks whether a key exists in the database or not

Method Details

generateKey() public static method

A sure method to generate a unique API key
public static generateKey ( ) : string
return string

getByKey() public method

public getByKey ( $key, integer $rememberApiKeyDuration ) : ApiKeyRepository
$key
$rememberApiKeyDuration integer
return ApiKeyRepository

make() public static method

Make an ApiKey
public static make ( null $userId = null, integer $level = 10, boolean $ignoreLimits = false ) : static
$userId null
$level integer
$ignoreLimits boolean
return static

Property Details

$dates protected property

protected $dates

$fillable protected property

protected $fillable

$table protected property

protected $table