I have two simple problems in my laravel project
1.ORM getting result as objects
Here is my query to get details that matches an email
$users =User::where('user_email',$request->email)->first()->toArray();
Now i will get the result as array,but i need the result as objects.
eg: i need to read echo $users->user_email;
2.Named routes didn't worked
In my routes file i've this
Route::post('login',['as'=>'validatelogin','uses'=>'LoginController@login']);
And in my view
<form role="form" action="{{ url('validatelogin') }}" method="post">
But i will get methodnotfound exception
Laravel version:5.2