The route is configured this way:
Route::get('database/getClubes', 'DataBase@getClubes');
The Controller looks like this:
public function getClubes()
{
return ClubesDB::getClubes();
}
The Model looks like this:
public static function getClubes(){
return ClubesDB::all();
}
The JS to get the answer looks like this:
this.list = jQuery.get('database/getClubes');