use case for getting all carriers
This commit is contained in:
parent
2032e1525c
commit
4e852ab5d1
1 changed files with 21 additions and 0 deletions
21
src/Carrier/UseCases/GetAllCarriers.php
Normal file
21
src/Carrier/UseCases/GetAllCarriers.php
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace FreightQuote\Carrier\UseCases;
|
||||||
|
|
||||||
|
use FreightQuote\Carrier\Carrier;
|
||||||
|
use FreightQuote\Carrier\CarrierRepository;
|
||||||
|
|
||||||
|
class GetAllCarriers
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private CarrierRepository $carrierRepo,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Carrier[]
|
||||||
|
*/
|
||||||
|
public function execute(): array
|
||||||
|
{
|
||||||
|
return $this->carrierRepo->getAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue