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>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community