Browse Source

Fix missing vars in method definition

pull/2/head
Mohammad Akbari 4 years ago
parent
commit
9c22aa2b12
Signed by: akbarjimi GPG Key ID: 55726AEFECE5E683
  1. 10
      app/Http/Controllers/ProjectController.php

10
app/Http/Controllers/ProjectController.php

@ -22,7 +22,7 @@ class ProjectController extends Controller
return Business::info($request->route('business'), true);
}
public function update(Request $request,string $project)
public function update(Request $request, int $business, string $project)
{
permit('projectEdit', ['project_id' => $project]);
$project = Project::findOrFail($project);
@ -31,7 +31,7 @@ class ProjectController extends Controller
}
public function delete(Request $request, string $project)
public function delete(Request $request, int $business, string $project)
{
permit('businessProjects');
$project = Project::findOrFail($project);
@ -39,7 +39,7 @@ class ProjectController extends Controller
return Business::info($request->route('business'));
}
public function restore(Request $request, string $project)
public function restore(Request $request, int $business, string $project)
{
$project = Project::onlyTrashed()->findOrFail($project);
$project->restore();
@ -139,7 +139,7 @@ class ProjectController extends Controller
}
}
public function setAvatar(Request $request, string $project)
public function setAvatar(Request $request, int $business, string $project)
{
$project = Project::findOrFail($project);
if ($request->hasFile('avatar')) {
@ -149,7 +149,7 @@ class ProjectController extends Controller
return $project;
}
public function unSetAvatar(Request $request, string $project)
public function unSetAvatar(Request $request,int $business ,string $project)
{
$project = Project::findOrFail($project);
$project->deleteAvatar();

Loading…
Cancel
Save