add id to text and find method to text repo
This commit is contained in:
parent
c0994d806e
commit
df7ce696a9
2 changed files with 3 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ namespace App\Text;
|
||||||
class Text
|
class Text
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
private int $id,
|
||||||
private string $name,
|
private string $name,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,6 @@ use App\Text\CreateTextDto;
|
||||||
interface TextRepository
|
interface TextRepository
|
||||||
{
|
{
|
||||||
public function create(CreateTextDto $dto): Text;
|
public function create(CreateTextDto $dto): Text;
|
||||||
|
|
||||||
|
public function find(int $id): ?Text;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue