Refactoring.

This commit is contained in:
Leonid Nikitin 2024-05-03 00:03:35 +05:00
parent 35c2368ae2
commit 478cbe4762
Signed by: kor-elf
GPG Key ID: 3C0F720C170F6E1D
3 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,6 @@
namespace App\Http\Controllers\Site; namespace App\Http\Controllers\Site;
use App\Http\Requests\Site\Feedback\SendRequest; use App\Http\Requests\Site\Feedback\SendRequest;
use App\Models\ProjectFeedback;
use App\Services\Site\FeedbackService; use App\Services\Site\FeedbackService;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;

View File

@ -16,7 +16,6 @@ public function index(Request $request): View
{ {
$user = $request->user(); $user = $request->user();
$project = $request->get('project'); $project = $request->get('project');
$websiteTranslations = $request->get('websiteTranslations');
if (\is_null($project)) { if (\is_null($project)) {
$with = ['storage']; $with = ['storage'];
@ -28,7 +27,8 @@ public function index(Request $request): View
return \view('site.projects.index', $result->getData()); return \view('site.projects.index', $result->getData());
} }
$result = $this->projectService->getAboutByProject($project, $websiteTranslations, $request->user()); $websiteTranslations = $request->get('websiteTranslations');
$result = $this->projectService->getAboutByProject($project, $websiteTranslations, $user);
if ($result->isError()) { if ($result->isError()) {
$this->errors($result); $this->errors($result);
} }

View File

@ -7,7 +7,7 @@
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Closure; use Closure;
class ProjectAndLanguage extends ProjectLanguage final class ProjectAndLanguage extends ProjectLanguage
{ {
public function handle(Request $request, Closure $next): Response public function handle(Request $request, Closure $next): Response
{ {