Agregue calendario, trendria q dejar de usar cdn y nose si algo mas.

This commit is contained in:
2026-02-20 18:36:06 -03:00
parent e8bece9037
commit 8102265f92
8 changed files with 532 additions and 242 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Appointment;
class AgendaController extends Controller
{
public function index()
{
$all_appointments = Appointment::with('client')->get();
$appointments = [];
foreach($all_appointments as $appointment){
$appointments[] = [
'id' => $appointment->id,
'title' => $appointment->scheduled_at->format('H:i') . ' - ' . $appointment->client->name,
'start' => $appointment->scheduled_at->format('Y-m-d\TH:i:s'),
'extendedProps' => [
'description' => $appointment->problem_description,
'status' => $appointment->status,
],
];
}
return view('agenda', compact('appointments'));
}
}