Migrate backend to Porto architecture and fix minor bugs

- Fully transitioned the backend to the Porto architectural pattern
- Improved code organization and maintainability
- Fixed minor bugs and inconsistencies
This commit is contained in:
F4ilji
2025-05-12 08:47:43 +05:00
parent 76deaf75f3
commit c01016a154
620 changed files with 16218 additions and 6073 deletions
+1 -2
View File
@@ -2,8 +2,7 @@
namespace App\Http\Middleware;
use App\Models\Page;
use App\Containers\AppStructure\Models\Page;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -2,7 +2,7 @@
namespace App\Http\Middleware;
use App\Models\CustomForm;
use App\Containers\Widget\Models\CustomForm;
use Carbon\Carbon;
use Closure;
use Illuminate\Http\Request;
+4 -5
View File
@@ -2,13 +2,12 @@
namespace App\Http\Middleware;
use App\Http\Resources\ClientBreadcrumbPage;
use App\Http\Resources\ClientBreadcrumbSection;
use App\Http\Resources\ClientBreadcrumbSubSection;
use App\Models\Page;
use App\Containers\AppStructure\Models\Page;
use App\Ship\Resources\Breadcrumb\ClientBreadcrumbPage;
use App\Ship\Resources\Breadcrumb\ClientBreadcrumbSection;
use App\Ship\Resources\Breadcrumb\ClientBreadcrumbSubSection;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class GenerateBreadcrumbs
{
@@ -2,8 +2,8 @@
namespace App\Http\Middleware;
use App\Http\Resources\ClientNavigationResource;
use App\Models\MainSection;
use App\Containers\AppStructure\Models\MainSection;
use App\Containers\AppStructure\UI\API\Transformers\NavigationResource;
use App\Services\App\Breadcrumb\BreadcrumbService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
@@ -23,7 +23,7 @@ class HandleInertiaRequests extends Middleware
{
// Навигация (кешированная)
$navigation = Cache::remember('navigation', now()->addHours(1), function () {
return ClientNavigationResource::collection(
return NavigationResource::collection(
MainSection::with('subSections.pages.section')
->orderBy('sort', 'asc')
->get()