for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace App\Modules\OauthClients\Repositories;
use App\Modules\Core\BaseClasses\BaseRepository;
use App\Modules\OauthClients\OauthClient;
class OauthClientRepository extends BaseRepository
{
/**
* Init new object.
*
* @param OauthClient $model
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
*/
public function __construct(OauthClient $model)
parent::__construct($model);
}
* Revoke the given client.
* @param integer $clientId
public function revoke($clientId)
$client = $this->find($clientId);
$client->tokens()->update(['revoked' => true]);
$this->save(['id'=> $clientId, 'revoked' => true]);
* Un revoke the given client.
public function unRevoke($clientId)
$this->save(['id'=> $clientId, 'revoked' => false]);
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.