Support the ongoing development of Laravel.io →
Input Views Forms

Hello all!

I have a table called users (surprisingly). I have a view where we can visualize all the users in a table. What I would like to do is have a link from each user's id to a separate page where we can edit/update the users' info: id, password, level, etc.

This is what my code looks like, I pre-populate the fields with values from the users table. However, I would also like to use validation on the fields. This means that when the view refreshes, due to validation, it crashes.

Any help? Thanks!

Code snippet below:

    <h1>Edit user {{ $usid->id ? $usid->id : e(Input::old('id')) }}</h1>

    <form action="{{ URL::route('admin_edit_post') }}" method="post">

            <div class="field">
                    Id: <input type="text" name="id" value="{{ $usid->id }}">
                    @if($errors->has('id'))
                            {{ $errors->first('id') }}
                    @endif
            </div>
Last updated 3 years ago.
0

Try using jquery ajax for your validations

Last updated 3 years ago.
0

What exactly is "it crashes"?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

csmatyi csmatyi Joined 12 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.