I have the following code in my view page
<form action="{{ action('AnswerController@handleCreate') }}" method="post" role="form">
<div class="form-group dropdown">
<label for="question">Question</label>
<select id="question" class="drop" name="question">
@foreach($questions as $question)
<option value="{{$question->question}}">{{$question->question}}</option>
@endforeach
</select>
</div>
in my controller i have the following code
$question = Question::whereQuestion(Input::get('question'))->first();
$n = $question->id;
They give me an error at $n=$question ->id telling trying to get property of non-object