Porcentaje de tareas por proyecto
This commit is contained in:
@@ -10,7 +10,12 @@ class ProjectController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$projects = auth()->user()->projects()->latest()->get();
|
||||
$projects = auth()->user()->projects()
|
||||
->with(['tasks' => function ($query) {
|
||||
$query->select('id', 'project_id', 'status');
|
||||
}])
|
||||
->latest()
|
||||
->get();
|
||||
|
||||
return Inertia::render('Projects/Index', [
|
||||
'projects' => $projects,
|
||||
|
||||
Reference in New Issue
Block a user