update deploy

This commit is contained in:
bulut
2026-03-27 10:41:54 +03:00
parent 69d19c0176
commit 6f6448aa06
422 changed files with 37956 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\Announcement;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<Announcement>
*/
interface AnnouncementRepositoryInterface extends BaseRepositoryInterface
{
public function findBySlug(string $slug): ?Announcement;
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, Announcement>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
}

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Repositories\Contracts;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @template T of Model
*/
interface BaseRepositoryInterface
{
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, T>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
/**
* @return T|null
*/
public function findById(int $id): ?Model;
/**
* @param array<string, mixed> $data
* @return T
*/
public function create(array $data): Model;
/**
* @param array<string, mixed> $data
* @return T
*/
public function update(Model $model, array $data): Model;
public function delete(Model $model): bool;
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\Category;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<Category>
*/
interface CategoryRepositoryInterface extends BaseRepositoryInterface
{
public function findBySlug(string $slug): ?Category;
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, Category>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\Comment;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<Comment>
*/
interface CommentRepositoryInterface extends BaseRepositoryInterface
{
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, Comment>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
/**
* @return Collection<int, Comment>
*/
public function getApprovedByCommentable(string $commentableType, int $commentableId): Collection;
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\Course;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<Course>
*/
interface CourseRepositoryInterface extends BaseRepositoryInterface
{
public function findBySlug(string $slug): ?Course;
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, Course>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
}

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Repositories\Contracts;
use App\Enums\FaqCategory;
use App\Models\Faq;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<Faq>
*/
interface FaqRepositoryInterface extends BaseRepositoryInterface
{
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, Faq>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
/**
* @return Collection<int, Faq>
*/
public function getByCategory(FaqCategory $category): Collection;
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\GuideCard;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<GuideCard>
*/
interface GuideCardRepositoryInterface extends BaseRepositoryInterface
{
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, GuideCard>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
/**
* @return Collection<int, GuideCard>
*/
public function active(): Collection;
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\HeroSlide;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<HeroSlide>
*/
interface HeroSlideRepositoryInterface extends BaseRepositoryInterface
{
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, HeroSlide>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
/**
* @return Collection<int, HeroSlide>
*/
public function active(): Collection;
}

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\Lead;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<Lead>
*/
interface LeadRepositoryInterface extends BaseRepositoryInterface
{
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, Lead>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
}

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Repositories\Contracts;
use App\Enums\MenuLocation;
use App\Models\Menu;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<Menu>
*/
interface MenuRepositoryInterface extends BaseRepositoryInterface
{
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, Menu>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
/**
* @return Collection<int, Menu>
*/
public function getByLocation(MenuLocation $location): Collection;
/**
* @param array<int, array{id: int, order_index: int, parent_id?: int|null}> $items
*/
public function reorder(array $items): void;
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\Page;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<Page>
*/
interface PageRepositoryInterface extends BaseRepositoryInterface
{
public function findBySlug(string $slug): ?Page;
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, Page>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\CourseSchedule;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<CourseSchedule>
*/
interface ScheduleRepositoryInterface extends BaseRepositoryInterface
{
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, CourseSchedule>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
/**
* @return Collection<int, CourseSchedule>
*/
public function upcoming(int $limit = 20): Collection;
}

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Repositories\Contracts;
use App\Enums\SettingGroup;
use App\Models\Setting;
use Illuminate\Database\Eloquent\Collection;
/**
* @extends BaseRepositoryInterface<Setting>
*/
interface SettingRepositoryInterface extends BaseRepositoryInterface
{
/**
* @return Collection<int, Setting>
*/
public function all(): Collection;
/**
* Get all public settings grouped by group name (nested key-value format).
*
* @return array<string, array<string, mixed>>
*/
public function publicGrouped(): array;
/**
* Get public settings for a single group (key-value format).
*
* @return array<string, mixed>
*/
public function publicByGroup(SettingGroup $group): array;
public function findByKey(string $key): ?Setting;
/**
* @return Collection<int, Setting>
*/
public function getByGroup(SettingGroup $group): Collection;
/**
* Bulk update settings using dot notation keys (e.g. "general.site_name").
*
* @param array<string, mixed> $settings
*/
public function bulkUpdate(array $settings): void;
/**
* Clear all setting caches.
*/
public function clearCache(): void;
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Repositories\Contracts;
use App\Models\User;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* @extends BaseRepositoryInterface<User>
*/
interface UserRepositoryInterface extends BaseRepositoryInterface
{
/**
* @param array<string, mixed> $filters
* @return LengthAwarePaginator<int, User>
*/
public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;
public function findByEmail(string $email): ?User;
}