Fitur: Pembuatan API Tiket Untuk Cek Status Tiket#37
Conversation
- Perbaikan navigasilabel, plurallabel dan navigationgroup
- Tambahkan translate Token
- Menambahkan route api cek tiket - Menambahkan controller tiket
There was a problem hiding this comment.
Pull Request Overview
This PR implements a new API endpoint for checking ticket status by ID. The API provides ticket information including status, name, service, description, and timestamps in a structured JSON response format.
Key changes:
- Added new API route for ticket status checking with authentication
- Implemented TicketController with ticket retrieval and response formatting
- Enhanced TokenResource with proper translation support and navigation grouping
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| routes/api.php | Added authenticated API route for ticket status checking |
| app/Http/Controllers/Api/TicketController.php | New controller with ticket retrieval and JSON response formatting |
| app/Filament/Resources/TokenResource.php | Updated navigation labels to use translations and proper grouping |
| lang/id.json | Added Indonesian translation for "Tokens" |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| if (! $ticket) { | ||
| return response()->json([ | ||
| 'message' => 'Ticket not found', |
There was a problem hiding this comment.
Error message should be localized to match the application's internationalization pattern, similar to how other messages use translation keys.
| 'message' => 'Ticket not found', | |
| 'message' => __('ticket.not_found'), |
| $plainText = trim(strip_tags($content)); | ||
|
|
||
| return response()->json([ | ||
| 'message' => 'Success', |
There was a problem hiding this comment.
Success message should be localized to maintain consistency with the application's internationalization approach.
| 'message' => 'Success', | |
| 'message' => __('Success'), |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Deskripsi
Pembuatan API Tiket untuk cek status Tiket
url:
http://localhost:8083/api/ticket/id/1Perubahan
Screenshot
Untuk Issue: