Laravel Application Development Cookbook


Laravel Application Development Cookbook
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Install and set up a Laravel application and then deploy and integrate third parties in your application
  • Create a secure authentication system and build a RESTful API
  • Build your own Composer Package and incorporate JavaScript and AJAX methods into Laravel

Book Details

Language : English
Paperback : 272 pages [ 235mm x 191mm ]
Release Date : October 2013
ISBN : 1782162828
ISBN 13 : 9781782162827
Author(s) : Terry Matula
Topics and Technologies : All Books, Web Development, Cookbooks, Open Source, PHP

Table of Contents

Preface
Chapter 1: Setting Up and Installing Laravel
Chapter 2: Using Forms and Gathering Input
Chapter 3: Authenticating Your Application
Chapter 4: Storing and Using Data
Chapter 5: Using Controllers and Routes for URLs and APIs
Chapter 6: Displaying Your Views
Chapter 7: Creating and Using Composer Packages
Chapter 8: Using Ajax and jQuery
Chapter 9: Using Security and Sessions Effectively
Chapter 10: Testing and Debugging Your App
Chapter 11: Deploying and Integrating Third-party Services into Your Application
Index
  • Chapter 1: Setting Up and Installing Laravel
    • Introduction
    • Installing Laravel as a git submodule
    • Setting up a virtual host and development environment in Apache
    • Creating "clean" URLs
    • Configuring Laravel
    • Using Laravel with Sublime Text 2
    • Setting up your IDE to autocomplete Laravel's namespaces
    • Using Autoloader to map a class name to its file
    • Creating advanced Autoloaders with namespaces and directories
    • Chapter 2: Using Forms and Gathering Input
      • Introduction
      • Creating a simple form
      • Gathering form input to display on another page
      • Validating user input
      • Creating a file uploader
      • Validating a file upload
      • Creating a custom error message
      • Adding a honey pot to a form
      • Uploading an image using Redactor
      • Cropping an image with Jcrop
      • Creating an autocomplete text input
      • Making a CAPTCHA-style spam catcher
      • Chapter 3: Authenticating Your Application
        • Introduction
        • Setting up and configuring the Auth library
        • Creating an authentication system
        • Retrieving and updating user info after logging in
        • Restricting access to certain pages
        • Setting up OAuth with the HybridAuth package
        • Using OpenID for logins
        • Logging in using Facebook credentials
        • Logging in using Twitter credentials
        • Logging in using LinkedIn
        • Chapter 4: Storing and Using Data
          • Introduction
          • Creating data tables using migrations and schemas
          • Querying using raw SQL statements
          • Querying using Fluent
          • Querying using Eloquent ORM
          • Using automatic validation in models
          • Using advanced Eloquent and relationships
          • Creating a CRUD system
          • Importing a CSV using Eloquent
          • Using RSS as a data source
          • Using attributes to change table column names
          • Using a non-Eloquent ORM in Laravel
          • Chapter 5: Using Controllers and Routes for URLs and APIs
            • Introduction
            • Creating a basic controller
            • Creating a route using a closure
            • Creating a RESTful controller
            • Using advanced routing
            • Using a filter on the route
            • Using route groups
            • Building a RESTful API with routes
            • Using named routes
            • Using a subdomain in your route
            • Chapter 6: Displaying Your Views
              • Introduction
              • Creating and using a basic view
              • Passing data into a view
              • Loading a view into another view/nested views
              • Adding assets
              • Creating a view using Blade
              • Using TWIG templates
              • Utilizing advanced Blade usage
              • Creating localization of content
              • Creating menus in Laravel
              • Integrating with Bootstrap
              • Using named views and view composers
              • Chapter 7: Creating and Using Composer Packages
                • Introduction
                • Downloading and installing packages
                • Using the Generators package to set up an app
                • Creating a Composer package in Laravel
                • Adding your Composer package to Packagist
                • Adding a non-Packagist package to Composer
                • Creating a custom artisan command
                • Chapter 8: Using Ajax and jQuery
                  • Introduction
                  • Getting data from another page
                  • Setting up a controller to return JSON data
                  • Creating an Ajax search function
                  • Creating and validating a user using Ajax
                  • Filtering data based on checkbox selection
                  • Making an Ajax newsletter sign-up box
                  • Sending an e-mail using Laravel and jQuery
                  • Creating a sortable table using jQuery and Laravel
                  • Chapter 9: Using Security and Sessions Effectively
                    • Introduction
                    • Encrypting and decrypting data
                    • Hashing passwords and other data
                    • Using CSRF tokens and filters in forms
                    • Using advanced validation in forms
                    • Building a shopping cart
                    • Using Redis to save sessions
                    • Using basic sessions and cookies
                    • Creating a secure API server
                    • Chapter 10: Testing and Debugging Your App
                      • Introduction
                      • Setting up and configuring PHPUnit
                      • Writing and running a test case
                      • Using Mockery to test controllers
                      • Writing acceptance tests using Codeception
                      • Debugging and profiling your app

                        Terry Matula

                        Terry Matula is a web developer and Laravel advocate based in Austin, TX. He's been a passionate computer enthusiast since he first played Oregon Trail on an Apple//e. He started programming in BASIC at a young age, making simple Scott Adams-like games on a Commodore Vic-20. Since then, he's worked as a developer using Flash/ActionScript, ASP.NET, PHP, and numerous PHP frameworks, with Laravel being his favorite by far. He blogs web development tips and tricks at his website http://terrymatula.com

                        Code Downloads

                        Download the code and support files for this book.


                        Submit Errata

                        Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

                        Sample chapters

                        You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                        Frequently bought together

                        Laravel Application Development Cookbook +    iOS Development using MonoTouch Cookbook =
                        50% Off
                        the second eBook
                        Price for both: £24.64

                        Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                        What you will learn from this book

                        • Set up a virtual host and development environment in Apache
                        • Set up a user authentication system
                        • Use the RESTful controllers
                        • Debug and profile your application
                        • Store and retrieve content from the cloud
                        • Use the Artisan command-line tool
                        • Integrate JavaScript and jQuery into your Laravel app
                        • Write unit tests for Laravel

                        In Detail

                        When creating a web application, there are many PHP frameworks from which to choose. Some are very easy to set up, and some have a much steeper learning curve. Laravel offers both paths. You can do a quick installation and have your app up-and-running in no time, or you can use Laravel’s extensibility to create an advanced and fully-featured app.

                        Laravel Application Development Cookbook provides you with working code examples for many of the common problems that web developers face. In the process, it will also allow both new and existing Laravel users to expand their knowledge of the framework.

                        This book will walk you through all aspects of Laravel development. It begins with basic set up and installation procedures, and continues through more advanced use cases.

                        You will also learn about all the helpful features that Laravel provides to make your development quick and easy. For more advanced needs, you will also see how to utilize Laravel’s authentication features and how to create a RESTful API.

                        In the Laravel Application Development Cookbook, you will learn everything you need to know about a great PHP framework, with working code that will get you up-and-running in no time.

                        Approach

                        This book is written in the form of a Cookbook, with practical recipes for building web applications and explaining some of the more complex features of Laravel.

                        Who this book is for

                        The Laravel Application Development Cookbook is for PHP developers who are new to Laravel or development frameworks in general, as well as experienced Laravel developers looking to expand their knowledge. This book assumes that the reader has some familiarity with PHP.

                        Code Download and Errata
                        Packt Anytime, Anywhere
                        Register Books
                        Print Upgrades
                        eBook Downloads
                        Video Support
                        Contact Us
                        Awards Voting Nominations Previous Winners
                        Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                        Resources
                        Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software