feat: search results
This commit is contained in:
@@ -2,7 +2,25 @@
|
||||
|
||||
namespace App\Search\Action\Input;
|
||||
|
||||
class SearchInput
|
||||
{
|
||||
use App\Search\Action\Command\SearchCommand;
|
||||
use OneToMany\RichBundle\Attribute\SourceQuery;
|
||||
use OneToMany\RichBundle\Attribute\SourceRequest;
|
||||
use OneToMany\RichBundle\Contract\CommandInterface;
|
||||
use OneToMany\RichBundle\Contract\InputInterface;
|
||||
|
||||
}
|
||||
/**
|
||||
* @implements InputInterface<SearchCommand>
|
||||
*/
|
||||
class SearchInput implements InputInterface
|
||||
{
|
||||
public function __construct(
|
||||
#[SourceQuery('term')]
|
||||
#[SourceRequest('term')]
|
||||
public string $term
|
||||
){}
|
||||
|
||||
public function toCommand(): CommandInterface
|
||||
{
|
||||
return new SearchCommand($this->term);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user