Support the ongoing development of Laravel.io →
posted 9 years ago
Forms
Last updated 1 year ago.
0

There are a few things that need looking at really. Too much to cover in a forum post.

I'd suggest taking a look at a few tutorials to learn how the MVC pattern works and how to return etc.

If you want to continue experimenting, your doLogin isn't returning anything. You could try ' return 'success'; '.

Laracast.com is a great resource. Also tuts plus has some good videos.

Sorry I couldn't be more help.

Last updated 1 year ago.
0

T2theC said: Sorry I couldn't be more help.

It's all right. return 'success'; didn't work, but thanks anyway. :)

Last updated 1 year ago.
0

Ah. It should have. Where have you got you view in the file structure? Can you show us the entire view?

Have you read up on Blade templating in the docs? You don't need to add the PHP opening and closing tags if you surround the Form line in {{ Form... }}

You can also remove the URL in your form - where it is posting to. Laravel will assume you want to post to the same URL and as you have your route set up to accept it, you should be good to go.

Another thing to check (which is what I presume is wrong in your view), is that your form is correctly being rendered. As we can't see the view in full, we can't assume all is ok in there. Basically, your route is set up properly (if you use return ...). So I guess your form isn't properly rendered and that is why the page is refreshing and your function doLogin isn't getting hit.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ankush981 ankush981 Joined 11 Oct 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.

© 2024 Laravel.io - All rights reserved.