use InertiaInertia;
class EventsController extends Controller
{
public function show(Event $event)
{
return Inertia::render('Event/Show', [
'event' => $event->only(
'id',
'title',
'start_date',
'description'
),
]);
}
}
class UsersController
{
public function index()
{
$users = User::active()
->orderByName()
->get()
->only('id', 'name', 'email');
return Inertia::render('Users', [
'users' => $users
]);
}
}