for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Containers\SocialAuthentication\UI\WEB\Controllers;
use App\Containers\SocialAuthentication\Actions\SocialLoginAction;
use App\Containers\User\UI\API\Transformers\UserTransformer;
use App\Port\Controller\Abstracts\PortWebController;
use Laravel\Socialite\Facades\Socialite;
/**
* Class Controller
*
* @author Mahmoud Zalt <[email protected]>
*/
class Controller extends PortWebController
{
* WEB Callback handler only, all the others are for API from Mobile.
* @param $provider
* @param \App\Containers\SocialAuthentication\Actions\SocialLoginAction $action
* @return \Dingo\Api\Http\Response
public function webAuthenticateAll($provider, SocialLoginAction $action)
$user = $action->run($provider);
return $this->response->item($user, new UserTransformer());
response
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
* @return mixed
public function webRedirectAll($provider)
return Socialite::driver($provider)->redirect();
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: