last day (15 days later) » 

5:02 PM
0
Q: Laravel 4 form redirect fails

dotslashI'm new to Laravel and am stuck with something. I'm trying to get a form to work, but for now all I want is to redirect to a page when the submit button is pressed. The problem is that the same login page is reloading and no redirect happens. Please help. The route file: Route::get('/', array('...

 
Can we see the whole code for the form?
 
@Raphael_ Posted in the original question.
 
Oh boy, you should really take a look at Blade.
 
@Raphael_ I did start with blade, but am really new and got confused as to how to plan sidebars, etc., especially what they might change from page to page. You think this has got something to do with Blade?
 
Nope, it's just that this is plain ugly (no offenses meant). Did you try reducing your problem? Like, deleting all that bloat HTML and replacing it all with only a static form, like <html><body><form action="/" method="post"><input type="submit"></form></body></html>. And if that works, slowly build towards your full problem so that you can know exactly what is giving you trobules?
 
5:02 PM
@Raphael_ LOL. I knew when I started coding how ugly this looks, so no offense taken. :-) I intend to use Blade (and all the other nice features of Laravel) but I have to get this up in a few days and I'm racing against time. Will try what you have suggested and report. I take it, then, then the routing and all I've used is fine?
Did what you said, and funnily, it now redirects me to localhost/xampp What do I do now? O.O
 
Well, ideally, you would return 'Success'; instead of echoing, on the controller. But ye, other than that, it seems okey.
What's the full address of your website? Locally, I mean.
 
hey
 
Oi
 
thanks for all the help already
:)
 
Np, mate
 
5:05 PM
the path is localhost/manger
so I access the root using localhost/manger/public
 
Hmmm. You have to setup your .htaccess then, for redirecting
 
ohh
I'm ashamed to say I don't know how to do that, but I'll learn
just tell me what to redirect to where
 
There's a note on Laravel docs, sec
 
k
 
And you also need to point the root of your server to manger/public. stackoverflow.com/questions/5891802/…
 
5:09 PM
Hmmm . . .
so, will localhost/xampp still be accessible?
 
To be honest, XAMP/WAMP/LAMP aren't the best solutions for Laravel developing. You should really take a look at Homestead.
 
or will it redirect to Laravel?
okay . . .
 
I'm not that sure, I've had problems with XAMP as well before moving to Homestead
 
Okay . . .
well, thanks, I guess
 
You can find most of what you need for Homestead on Laravel docs: laravel.com/docs/4.2/homestead
I know this seems a bit too much at first, but it does pay off.
 
5:11 PM
yeah, I can agree
well, thanks a ton anyway
:-)
 
np
=D
cya
 
have a good day!
yup
 

last day (15 days later) »