Project support has been updated
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Repository\Interfaces\ProjectRepository;
|
||||
@@ -14,12 +16,12 @@ class ProjectController extends Controller
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
return $this->projectRepository->all();
|
||||
}
|
||||
|
||||
public function show()
|
||||
public function show(int $project)
|
||||
{
|
||||
|
||||
return $this->projectRepository->get($project);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
@@ -29,8 +29,7 @@ class ProjectRepository implements ProjectRepositoryInterface
|
||||
{
|
||||
$project = $this->project
|
||||
->query()
|
||||
->find($id)
|
||||
->first();
|
||||
->findOrFail($id);
|
||||
return new ProjectResource($project);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user