add: service class required when creating new address.

This commit is contained in:
weichien00
2021-07-08 04:00:23 +08:00
parent 6cc27d1c43
commit 3ac76cfc99
@@ -0,0 +1,34 @@
<?php
namespace App\Classes\Modules\Companies\Services;
use App\Classes\General\Eloquent\AbstractFetchRecord;
use Illuminate\Database\Eloquent\Builder;
use App\Models\Company;
class FetchesCompany extends AbstractFetchRecord
{
/** @var Company */
private $repository;
/**
* FetchesCompany constructor.
* @param Company $repository
*/
public function __construct(Company $repository)
{
$this->repository = $repository;
}
/**
* @return Builder
*/
public function getRepository(): Builder
{
return $this->repository->newQuery();
}
}