Laravel: Get form field error with form element name as key
<p>I am trying to learn <code>laravel</code>. I know <code>Codeigniter</code>. In <code>codeigniter3</code> I will get the form error as an array with key as the form name by using the function </p>

<pre><code>$this -&gt; form_validation -&gt; error_array();
</code></pre>

<p>it will display like</p>

<pre><code>array(
    'form_element1' =&gt; 'this field is required',
    'form_element2' =&gt; 'this field is required'
)
</code></pre>

<p><strong>Is there any way in laravel 5 to do the same?</strong></p>

<p>Please help. Any help could be appreciated</p>