Skip to content

Conversation

@woodseowl
Copy link
Contributor

@woodseowl woodseowl commented Dec 18, 2025

Adds the ability to edit users as a way to demonstrate form usage.

  • Links user table to user edit page
  • Updates callout-error.blade.php to incorporate Laravel error handling

Copy link
Contributor

Copilot AI left a 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 adds user management functionality to demonstrate form usage in the application, introducing user editing capabilities and improving the table component structure.

Key Changes:

  • Implements user CRUD routes under /admin prefix with edit and show pages
  • Refactors UserTable component to be reusable and moves the example page to a standard view
  • Enhances the callout-error component to automatically display Laravel validation errors

Reviewed changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
routes/web.php Adds /admin routes for user management (list, show, edit)
routes/examples.php Converts table example route from Livewire component to view
resources/views/livewire/users/user-update.blade.php New user edit form with name and email fields
resources/views/livewire/users/user-table.blade.php Refactors table to be reusable component, adds edit navigation
resources/views/livewire/users/user-show.blade.php New user detail view page
resources/views/examples/table.blade.php New example page that embeds UserTable component
resources/views/examples/errors.blade.php Updates error example to use new callout-error API
resources/views/components/cds/callout-error.blade.php Enhances to automatically display validation errors from Laravel
public/build/manifest.json Build artifact with updated asset hashes
public/build/assets/app-ppwW4VC5.css Removed old build artifact
app/Livewire/Users/UserUpdate.php New Livewire component for user editing with validation
app/Livewire/Users/UserShow.php New Livewire component for displaying user details

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@inaydich inaydich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss the directories structure in the meeting. If this is the team project then we need to agree on the structure and file naming in within a team. This looks like a diversion form what we discussed last time.

#[Layout('components.layouts.app', [
'title' => 'Edit User',
])]
class UserUpdate extends Component
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would name this component UserEdit to match the route, The route says 'edit'

@@ -0,0 +1,13 @@
<x-layouts.app title="CD Laravel Base" subtitle="Custom Development">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having this file is confusing. It is just extra layer to call user-table blade.

<x-cds.button :href="route('admin.users')">
Back to Users
</x-cds.button>
</x-layouts.main-article>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can improve the workflow here. A user needs to do several extra clicks to see the results.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I really just wanted to get a "display item" kind of page in our examples so we can discuss the general solution we want to try for on lists + details. I think this is UX + design as much as anything.

Cancel
</x-cds.button>
</form>
</x-layouts.main-article>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think user-edit would be better name for this blade/component since it matches the route.
Also moving this form to the modal dialog would improve user experience with editing data workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the component names. Personally I'm still kind of fussing over the names, since Laravel seems to like different words in different places for these functions. And I agree that in this example user-edit is fine.

routes/web.php Outdated
return view('welcome');
})->name('home');

Route::prefix('/admin')->group(function () {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding staying with simple routes would be better example. These are just examples and not the real application. Also unfortunately most of FCS applications will manage user roles and permissions via RoleManagemnt app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants