-
Notifications
You must be signed in to change notification settings - Fork 0
Resource Edits, and Errors Flash #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements error flash message handling and makes UI improvements to the resource edits feature. The changes enable error messages to be displayed as toast notifications, fix error handling to use flash messages consistently, and improve the back button UI. However, critical debug code was accidentally left in the controller that will break the create functionality.
Key changes:
- Added error flash message support across the frontend (ToastHandler, Inertia middleware) and backend (controller error handling)
- Enhanced back button with text label and improved spacing
- Simplified slug generation to use only edit_title (removed id from source)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
app/Http/Controllers/ResourceEditsController.php |
Changed error handling from withErrors to flash messages; contains debug code that must be removed |
app/Http/Middleware/HandleInertiaRequests.php |
Added error flash data to Inertia shared props |
resources/js/Components/ToastHandler.vue |
Added error toast handling for flash.error messages |
resources/js/Pages/ResourceEdits/Create.vue |
Added text label to back button for better UX |
resources/js/Components/Navigation/BackButton.vue |
Changed margin from top-only to vertical for better spacing |
app/Models/ResourceEdits.php |
Simplified slug source to use only edit_title instead of edit_title and id |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* changes * Apply automatic changes * Update app/Http/Controllers/ResourceEditsController.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Resource Edits, and Errors Flash (#59) * changes * Apply automatic changes * Update app/Http/Controllers/ResourceEditsController.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply automatic changes * Update resources/js/Components/NewsItem.vue Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update resources/js/Components/NewsItem.vue Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Initial plan (#62) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Initial plan (#63) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Rename NewsItem component to TrendingResourceItem (#61) * Initial plan * Rename NewsItem.vue to TrendingResourceItem.vue and update all references Co-authored-by: AllanKoder <74692833+AllanKoder@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: AllanKoder <74692833+AllanKoder@users.noreply.github.com> * Quick npm update --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
No description provided.