Skeleton is ready
This commit is contained in:
23
app/Feature/Example/Http/Controller/User.php
Normal file
23
app/Feature/Example/Http/Controller/User.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Feature\Example\Http\Controller;
|
||||
|
||||
use App\Feature\Example\Dto\SearchUsers;
|
||||
use App\Feature\Example\Http\Request\Index;
|
||||
use App\Feature\Example\Http\Resource\Users;
|
||||
use App\Feature\Example\Service\UsersRepository;
|
||||
|
||||
class User
|
||||
{
|
||||
public function __construct(
|
||||
private UsersRepository $users,
|
||||
) {}
|
||||
|
||||
public function index(Index $request): Users
|
||||
{
|
||||
$dto = SearchUsers::fromArray($request->validated());
|
||||
return Users::make($this->users->search($dto));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user