I have run into a roadblock with getting the value of the Select.
Please have a look at my form:
{!! Form::open(array('action' => 'MasterController@datamaker')) !!}
{!! Form::select('Area', array('Science', 'Arts',)); !!}
{!! Form::input('date', 'Year') !!}
{!! Form::submit('Add') !!}
Here is my (simplified) method in the controller:
public function datamaker() {
$input = Request::all();
$Database = new Database;
$Database -> Area = Request::get('Area');
$Database -> Year = $input['Year'];
$Database -> save();
return (Request::get('Area')); <----- This is returning "0" instead of the values declared in the form
}
I have checked other sources and the solutions they have provided have not worked. Whatever I have tried, it always just returns "0" instead of the values declared in the form.
Can anyone point me in the right direction?
Thanks!