You are previewing Laravel Application Development Blueprints.
O'Reilly logo
Laravel Application Development Blueprints

Book Description

For intermediate to advanced PHP programmers this is the perfect volume for mastering Laverel. It starts with the basics then digs deep, covering the building of 10 different applications. Extend your capabilities with ease.

  • Learn how to integrate third-party scripts and libraries into your application

  • With different techniques, learn how to adapt different methods to your needs

  • Expand your knowledge of Laravel 4 so you can tailor the sample solutions to your requirements

  • In Detail

    Laravel is a clean and classy framework for PHP web development. It helps you to create wonderful applications using simple, expressive syntax. Development should be a creative and enjoyable experience, not something that is painful, and Laravel makes it enjoyable for the users. Laravel's directory structure is designed to be familiar to users of other popular PHP frameworks. Web applications of any shape or size can easily be created using this structure similar to the way that they would be created in other frameworks. With the recently released 4th Version, Laravel became even better in numerous ways. Within this book, we will help you learn about both the old and new features of Laravel while developing various applications.

    Laravel Application Development Blueprints covers how to develop 10 different applications step-by-step using Laravel 4. You will also learn about both basic and advanced usage of Laravel’s built-in methods, which will come in handy for your project. Also, you will learn how to extend the current libraries with the built-in methods and include third-party libraries.

    This book looks at the Laravel PHP framework and breaks down the ingrained prejudice that coding with PHP causes due to spaghetti code. It will take you through a number of clear, practical applications that will help you to take advantage of the Laravel PHP framework and PHP OOP programming whilst avoiding spaghetti code.

    You'll also learn about creating secure web applications using different methods such as file uploading and processing, making RESTful AJAX requests, and form processing. If you want to take advantage of the Laravel PHP framework's validate, file processing, and RESTful controllers in various types of projects, then this is the book for you.

    Everything you need to know to code fast and secure applications with the Laravel PHP framework will be discussed in this book.

    Table of Contents

    1. Laravel Application Development Blueprints
      1. Table of Contents
      2. Laravel Application Development Blueprints
      3. Credits
      4. About the Authors
      5. About the Reviewers
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Building a URL Shortener Website
        1. Creating a database and migrating our URL shortener's table
        2. Creating our form
        3. Creating our Link model
        4. Saving data to the database
          1. Validating the users' input
          2. Returning the messages to the view
        5. Diving further into controller and processing the form
        6. Getting individual URL from the database and redirecting
        7. Summary
      9. 2. Building a To-do List with Ajax
        1. Creating and migrating our to-do list's database
        2. Creating a todos model
        3. Creating the template
        4. Inserting data to the database with Ajax
        5. Retrieving the list from the database
        6. How to allow only Ajax requests
          1. Allowing the request using route filters
          2. Allowing the request using the controller side
        7. Wrapping up
        8. Summary
      10. 3. Building an Image Sharing Website
        1. Creating a database and migrating the images table
        2. Creating a photo model
        3. Setting custom configuration values
        4. Installing a third-party library
        5. Creating a secure form for file upload
        6. Validating and processing the form
        7. Showing the image with a user interface
        8. Listing images
        9. Deleting the image from the database and server
        10. Summary
      11. 4. Building a Personal Blog
        1. Creating and migrating the posts database
        2. Creating a posts model
        3. Creating and migrating the authors database
        4. Creating a members-only area
        5. Saving a blog post
          1. Assigning blog posts to users
        6. Listing articles
        7. Paginating the content
        8. Summary
      12. 5. Building a News Aggregation Website
        1. Creating the database and migrating the feeds table
        2. Creating a feeds model
        3. Creating our form
        4. Validating and processing the form
        5. Extending the core classes
        6. Reading and parsing an external feed
        7. Summary
      13. 6. Creating a Photo Gallery System
        1. Creating a table and migrating albums
          1. Creating an Album model
        2. Creating the images database with the migrating class
        3. Creating an Image model
        4. Creating an album
          1. Adding a template for creating albums
        5. Creating a photo upload form
          1. Validating the photo
          2. Assigning a photo to an album
        6. Moving photos between albums
          1. Creating an update form
        7. Summary
      14. 7. Creating a Newsletter System
        1. Creating a database and migrating the subscribers table
        2. Creating a subscribers model
        3. Creating our subscription form
        4. Validating and processing the form
        5. Creating a queue system for basic e-mail sending
        6. Using the Email class to process e-mails inside the queue
        7. Testing the system
        8. Sending e-mails with the queue directly
        9. Summary
      15. 8. Building a Q&A Web Application
        1. Removing the public segment from Laravel 4
        2. Installing Sentry 2 and an authentication library and setting access rights
        3. Creating custom filters
        4. Creating our registration and login forms
          1. Validating and processing the form
          2. Processing the login and logout requests
        5. Creating our questions table and model
        6. Creating our tags table with a pivot table
        7. Creating and processing our question form
          1. Creating our questions form
          2. Processing our questions form
        8. Creating our questions list page
          1. Adding upvote and downvote functionality
        9. Creating our questions page
        10. Creating our answers table and resources
          1. Processing the answers
          2. Choosing the best answer
        11. Searching questions by the tags
        12. Summary
      16. 9. Building a RESTful API – The Movies and Actors Databases
        1. Creating and migrating the users database
          1. Adding sample users
        2. Creating and migrating the movies database
        3. Creating a movie model
          1. Adding sample movies
        4. Creating and migrating the actors database
        5. Creating an actor model
        6. Assigning actors to movies
        7. Understanding the authentication mechanism
        8. Querying the API
          1. Getting movie/actor information from the API
          2. Sending new movies/actors to the API's database
          3. Deleting movies/actors from the API
        9. Summary
      17. 10. Building an E-Commerce Website
        1. Building an authorization system
        2. Creating and migrating the members' database
        3. Creating and migrating the authors' database
          1. Adding authors to the database
        4. Creating and migrating the books database
          1. Adding books to the database
        5. Creating and migrating the carts database
        6. Creating and migrating the orders database
        7. Listing books
          1. Creating a template file to list books
        8. Taking orders
        9. Summary
      18. Index