Support the ongoing development of Laravel.io →
Views Blade Forms
Last updated 2 years ago.
0

In your controller something like:

$rules = array('username' => 'required', 'password' => 'required');
$v = Validator::make($input, $rules);
if($v->passes())
{ //do something }
else
{ return Redirect::to('/')->withInput()->withErrors($v);}

In the view:

{{ implode('', $errors->all('<li class="alert" style="color: #ffffff">:message</li>')) }}

I followed the tutorials (1-6) here to come up with this solution: https://www.youtube.com/watch?v=9MGBdy_Sqjg

Last updated 2 years ago.
0
{{ Form::text('link', Input::old('link'), ['class' => 'form-control']) }}
Last updated 2 years ago.
0

Many thanks to us!

I missed ->withInput() in the controller and I didn't know about the existence of Input::old().

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.

© 2024 Laravel.io - All rights reserved.