This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "ec150c09-8955-48d4-b682-7d27d09c7a08", | |
"name": "Solr", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | |
"_exporter_id": "353871" | |
}, | |
"item": [ | |
{ | |
"name": "01-collection-employee", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use App\Services\GithubUserService; | |
use Illuminate\Console\Command; | |
class GetGithubUserCommand extends Command | |
{ | |
protected $signature = 'app:github-user {username}'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Http\Requests\GithubUserRequest; | |
use App\Services\GithubUserService; | |
class GithubUserController extends Controller | |
{ | |
private GithubUserService $githubUserService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Transformers; | |
use League\Fractal\TransformerAbstract; | |
class GithubUserTransformer extends TransformerAbstract | |
{ | |
public function transform($record) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services; | |
use App\Contracts\GithubUserRepo; | |
use App\Transformers\GithubUserTransformer; | |
use Exception; | |
class GithubUserService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Repos; | |
use App\Contracts\GithubUserRepo; | |
use Exception; | |
use Illuminate\Support\Facades\Http; | |
class GithubUserRepoHttpImpl implements GithubUserRepo | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Contracts; | |
interface GithubUserRepo | |
{ | |
public function getUser(string $username); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class GithubUserService | |
{ | |
private GithubUserRepoInterface $githubUserRepo; | |
public function __construct(GithubUserRepoInterface $githubUserRepo) | |
{ | |
$this->githubUserRepo = $githubUserRepo; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class GithubUserController extends Controller | |
{ | |
private GithubUserService $githubUserService; | |
public function __construct(GithubUserService $githubUserService) | |
{ | |
$this->githubUserService = $githubUserService; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
class VehicleSearchController extends Controller | |
{ | |
public function searchVehicle(VehicleSearchRequest $request) | |
{ | |
$data = $request->validated(); | |
//Instantiate |