|
|
|
@@ -7,7 +7,9 @@ |
|
|
|
|
|
|
|
namespace App\ApiResource; |
|
|
|
|
|
|
|
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; |
|
|
|
use ApiPlatform\Doctrine\Orm\State\Options; |
|
|
|
use ApiPlatform\Metadata\ApiFilter; |
|
|
|
use ApiPlatform\Metadata\ApiProperty; |
|
|
|
use ApiPlatform\Metadata\ApiResource; |
|
|
|
use ApiPlatform\Metadata\Get; |
|
|
|
@@ -44,6 +46,7 @@ use Symfony\Component\Validator\Constraints as Assert; |
|
|
|
stateOptions: new Options(entityClass: User::class), |
|
|
|
|
|
|
|
)] |
|
|
|
#[ApiFilter(SearchFilter::class, properties: ['firstName' => 'partial', 'lastName' => 'partial'])] |
|
|
|
class UserApi |
|
|
|
{ |
|
|
|
#[ApiProperty(readable: false, writable: false, identifier: true)] |
|
|
|
|