Refactoring.
This commit is contained in:
parent
35c2368ae2
commit
478cbe4762
@ -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;
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user