feat: Implement Fast Request feature with file upload and request management
This commit is contained in:
@@ -3,15 +3,31 @@
|
||||
namespace App\Http\Controllers\Client\Doctor;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\Client\CaseResource;
|
||||
use App\Models\Document;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Services\Document\CaseService;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Inertia\Inertia;
|
||||
|
||||
class DocumentController extends Controller
|
||||
{
|
||||
protected CaseService $caseService;
|
||||
|
||||
public function __construct(CaseService $caseService)
|
||||
{
|
||||
$this->caseService = $caseService;
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
return Inertia::client('Dashboard/Documents/Index');
|
||||
$documents = $this->caseService->pendingForUser(Auth::user())
|
||||
->paginate(10)
|
||||
->withQueryString()
|
||||
->onEachSide(1);
|
||||
|
||||
return Inertia::client('Dashboard/Documents/Index', [
|
||||
'documents' => CaseResource::collection($documents),
|
||||
]);
|
||||
}
|
||||
|
||||
public function show(Document $document)
|
||||
|
||||
Reference in New Issue
Block a user