Laravel 4: A Start at a RESTful API (Updated) RESTful API's are hard! There are a lot of aspects to designing and writing a successful one. For instance, some of the topics that you may find yourself handling include authentication, hypermedia/HATEOS, versioning, rate limits, and content negotiation. Rather than tackling all of these concepts, however, let's instead focus on the basics of REST. We'll make some JSON endpoints behind a basic authentication system, and learn a few Laravel 4 tricks in the process. Let's build an API for a simple Read-It-Later app. Create a new install of Laravel 4. We're going to first create an encryption key for secure password hashing. Alternatively, you can simple edit your app/config/app.php encryption key: Once you have a working install of Laravel 4, we can get started with the fun. This will only require two database tables: Users, including a username and passwordURLs, including a url and description We'll use Laravel's migrations to create and populate the database.
My goal for this month is to learn building RESTful APIs from scratch in Laravel – the framework that I use for all of my new web applications. If you don’t know what RESTful means, check out this wikipedia article : What is the purpose of RESTful APIs? Check out the slides below : (from Or watch this video on vimeo : Teach a Dog to REST from Apigee on Vimeo. In Routes.php I just add :