24 lines
555 B
PHP
24 lines
555 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Http\Resources\SI\SttMedicalHistoryResource;
|
|
use App\Models\SI\SttMedicalHistory;
|
|
use Illuminate\Http\Request;
|
|
use Inertia\Inertia;
|
|
|
|
class IndexController extends Controller
|
|
{
|
|
public function index(Request $request)
|
|
{
|
|
$pageSize = $request->get('pageSize', 15);
|
|
|
|
$cards = SttMedicalHistory::query();
|
|
$cards = SttMedicalHistoryResource::collection($cards->paginate($pageSize));
|
|
|
|
return Inertia::render('Home/Index', [
|
|
'cards' => $cards,
|
|
]);
|
|
}
|
|
}
|