I have a login/registration system I am looking to build in Laravel. Currently I am having trouble pulling the information from the form and inputting it into the table. When I submit the form it submits, but the data goes nowhere, I am admittedly new to Laravel.
This is how the form is written:
{{ Form::open() }} @if (Session::get("error")) {{ Session::get("error") }}<br /> @endif {{ Form::label("first_name", "First Name") }} {{ Form::text("first_name") }} {{ $errors->first("first_name") }}<br /> {{ Form::label("email", "Email") }} {{ Form::text('email', Input::old('email')) }} {{ $errors->first("email") }}<br /> {{ Form::label("password", "Password") }} {{ Form::password("password") }} {{ $errors->first("password") }}<br /> {{ Form::label("password_confirmation", "Confirm") }} {{ Form::password("password_confirmation") }} {{ $errors->first("password_confirmation") }}<br /> {{ Form::submit("register") }} {{ Form::close() }} The user.register (part of a larger controller) which this POSTs to and GETs from is as follows:
public function register() { return View::make("user/register"); $validation = Validator::make(Input::all(), User::$rules); if ($validation->fails()) { return Redirect::to('register')->withErrors($validation)->withInput(); } $users = new User; $users->first_name = Input::get('first_name'); $users->email = Input::get('email'); $users->password = Hash::make(Input::get('password')); if ($users->save()) { Auth::loginUsingId($users->id); return Redirect::to('profile'); } return Redirect::to('register')-withInput(); } } Currently when I submit I get no errors simply a blank redirect to the registration page and nothing ends up in my DB. I am wondering if there is something wrong with my paths? The only other page that is similar to this that I have previously worked on (inputting data to a database) is a page to reset passwords (which works great), but that used a slightly different system through the Auth extension of Laravel.
This I am not familiar with. Can someone point me in the right direction? I have been compiling the knowledge I have gained from guides online but keep ending up in the same place!
Thanks a lot in advance, Anything else you need (models, routes, etc. I just didn't think they were necessary) lemme know!