i'm new to Laravel, i'm using laravel 5.1 I want to get the specified column in the database.
It's my controller:
public function index()
{
$markQuizs = MarkAss::select('year')->where('user_id','=','abc001')->get();
return view('marks-management', ['markQuizs'=> $markQuizs]);
}
In the view page, i try to echo
$markQuizs
but it got
[{"year":2016}]
how can i only get the "2016" value? Does it need ajax?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire