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:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Containers\Search\UI\API\Controllers;
|
||||
|
||||
use App\Containers\Search\Services\CategoryFinderService;
|
||||
use App\Containers\Search\Services\StaticFileSearch;
|
||||
use App\Ship\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
class StaticSearchController extends Controller
|
||||
{
|
||||
public function search(Request $request)
|
||||
{
|
||||
return app(StaticFileSearch::class)
|
||||
->search($request);
|
||||
}
|
||||
|
||||
public function getCategories()
|
||||
{
|
||||
return Cache::remember('page_static_categories', now()->addWeek(), function () {
|
||||
return app(CategoryFinderService::class)->getCategories();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user