Updated repositories

This commit is contained in:
2022-02-13 19:55:25 +01:00
parent b0232f39e6
commit 90895be05f
4 changed files with 94 additions and 23 deletions

View File

@@ -4,10 +4,16 @@ declare(strict_types=1);
namespace App\Repository\Interfaces;
use App\Http\Resources\CategoryResource;
use App\Models\Category;
use Illuminate\Support\Collection;
interface CategoryRepository
{
public function all();
public function get(string $slug);
public function all(): Collection;
public function get(string $slug): CategoryResource;
public function update(Category $category, array $data = []): bool;
public function create(array $data = []): Category;
}

View File

@@ -4,10 +4,16 @@ declare(strict_types=1);
namespace App\Repository\Interfaces;
use App\Http\Resources\ProjectResource;
use App\Models\Project;
use Illuminate\Support\Collection;
interface ProjectRepository
{
public function all();
public function get(int $id);
public function all(): Collection;
public function get(int $id): ProjectResource;
public function update(Project $project, array $data = []): bool;
public function create(array $data = []): Project;
}