Skip to content

Instantly share code, notes, and snippets.

@amite
Created July 30, 2012 18:17
Show Gist options
  • Save amite/3208857 to your computer and use it in GitHub Desktop.
Save amite/3208857 to your computer and use it in GitHub Desktop.
Get request for laravel with backbone not working
var InvoiceMaker = {
Models : {},
Controllers: {},
Views: {}
}
InvoiceMaker.Models.Client = Backbone.Model.extend({
defaults : {
name: "Client Name",
notes: "Enter notes here"
},
url: "laravelbackbone/public/clients"
})
var client = new InvoiceMaker.Models.Client;
client.fetch();
class Clients_Controller extends Base_Controller {
public $restful = true;
public function get_index()
{
return Response::eloquent(Client::find(1));
}
}
Route::controller('clients');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment