Skip to content

Instantly share code, notes, and snippets.

View orobogenius's full-sized avatar
🏠
Remote

Lucky Ozoka orobogenius

🏠
Remote
View GitHub Profile
<?php
class Router
{
/**
* An array of the routes keyed by URI.
*
* @var array
*/
protected $routes = [];
<?php
namespace App\OAuth\Bridge\Repositories;
use Laravel\Passport\Passport;
use League\OAuth2\Server\Entities\ClientEntityInterface;
use Laravel\Passport\Bridge\ScopeRepository as PassportScopeRepository;
class ScopeRepository extends PassportScopeRepository
{
<?php
namespace App\Providers;
use Laravel\Passport\Passport;
use App\OAuth\SocialUserProvider;
use App\OAuth\Bridge\Grant\SocialGrant;
use Illuminate\Support\ServiceProvider;
use App\OAuth\SocialUserProviderInterface;
use League\OAuth2\Server\AuthorizationServer;
<?php
namespace App\Repositories;
use App\User;
class UserRepository
{
/**
* @var \Illuminate\Database\Eloquent\Model
<?php
namespace App\OAuth;
use App\Repositories\UserRepository;
use Laravel\Socialite\Facades\Socialite;
use Laravel\Passport\Bridge\User as UserEntity;
use League\OAuth2\Server\Exception\OAuthServerException;
class SocialUserProvider implements SocialUserProviderInterface
<?php
namespace App\OAuth;
interface SocialUserProviderInterface
{
/**
* Get a social user from the provider by their access token.
*
* @param string $provider
<?php
namespace App\OAuth\Bridge\Grant;
use DateInterval;
use League\OAuth2\Server\RequestEvent;
use App\OAuth\SocialUserProviderInterface;
use Psr\Http\Message\ServerRequestInterface;
use League\OAuth2\Server\Grant\AbstractGrant;
use League\OAuth2\Server\Entities\UserEntityInterface;
@orobogenius
orobogenius / SmsComponentTest.php
Last active October 27, 2022 07:33
Test to verify that the custom component is able to use multiple drivers.
<?php
namespace Tests\Unit;
use SMS;
use Tests\TestCase;
use App\Components\Sms\Drivers\NexmoDriver;
use App\Components\Sms\Drivers\TwilioDriver;
use App\Components\Sms\Drivers\NullDriver;
use App\Components\Sms\Contracts\SMS as SmsContract;
<?php
namespace App\Components\Sms\Drivers;
use Nexmo\Client as NexmoClient;
class NexmoDriver extends Driver
{
/**
* The Nexmo client.
<?php
return [
/*
|--------------------------------------------------------------------------
| The default SMS Driver
|--------------------------------------------------------------------------
|
| The default sms driver to use as a fallback when no driver is specified