lundi 19 octobre 2015

laravel 5 datatables collection not working

$data = array(
    ['name' => 'John Doe', 'email' => 'john@email.com'], 
    ['name' => 'Robert Roe', 'email' => 'robert@email.com']
);
$users = new Collection($data);

return Datatables::of($users)->make();

I'm using the yajra/laravel-datatables plugin, it shows me that Collection functions are available on v5.x and later, but after i installed v5.11.10, and tried the above code, it gives me a Class 'Collection' not found error.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire