وبلاگ بلیان

Laravel Application Development Cookbook: over 90 recipes to learn all the key aspects of Laravel, including installation, authentication, testing, and the deployment and integration of third parties in your application

معرفی کتاب «Laravel Application Development Cookbook: over 90 recipes to learn all the key aspects of Laravel, including installation, authentication, testing, and the deployment and integration of third parties in your application» نوشتهٔ Terry Matula، منتشرشده توسط نشر Packt Publishing در سال 2013. این کتاب در 5 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است.

'This is a practical hands-on book with clear instructions and lot of code examples. It takes a simple approach, guiding you through different architectural topics using realistic sample projects. A single project is implemented using different architectural styles to make the reader understand the details of each style. There are also many small independent code samples to explain design patterns, WCF, and localization. This book is for people familiar with the ASP.NET framework using either C# or VB.NET. You don't need to be an ASP.NET guru – the book is ideal for novice and intermediate developers. If reading about application architecture usually confuses you or sends you to sleep, then this book will be perfect for you! In short, any ASP.NET programmer who is confused or disoriented reading different books or materials on architectures wondering how and what to implement in their application, will definitely benefit from this book!' Cover 1 Copyright 3 Credits 4 About the Author 5 About the Reviewers 6 www.PacktPub.com 7 Table of Contents 8 Preface 12 Chapter 1: Setting Up and Installing Laravel 16 Introduction 16 Installing Laravel as a git submodule 17 Setting up a virtual host and development environment in Apache 18 Creating "clean" URLS 20 Configuring Laravel 21 Using Laravel with Sublime Text 2 22 Setting up your IDE to auto-complete Laravel's namespaces 25 Using Autoloader to map a class name to its file 29 Creating advanced Autoloaders with namespaces and directories 30 Chapter 2: Using Forms and Gathering Input 32 Introduction 32 Creating a simple form 33 Gathering form input to display on another page 34 Validating user input 36 Creating a file uploader 38 Validating a file upload 40 Creating a custom error message 42 Adding a honey pot to a form 44 Uploading an image using Redactor 47 Cropping an image with Jcrop 49 Creating an autocomplete text input 53 Making a CAPTCHA-style spam catcher 55 Chapter 3: Authenticating Your Application 60 Introduction 60 Setting up and configuring the Auth library 61 Creating an authentication system 63 Retrieving and updating user info after logging in 67 Restricting access to certain pages 71 Setting up OAuth with the HybridAuth package 72 Using OpenID for logins 73 Logging in using Facebook credentials 76 Logging in using Twitter credentials 78 Logging in using LinkedIn 79 Chapter 4: Storing and Using Data 82 Introduction 82 Creating data tables using migrations and schemas 83 Querying using raw SQL statements 86 Querying using Fluent 88 Querying using Eloquent ORM 91 Using automatic validation in models 93 Using advanced Eloquent and relationships 96 Creating a CRUD system 99 Importing a CSV using Eloquent 102 Using RSS as a data source 105 Using attributes() to change table column names 106 Using a non-Eloquent ORM in Laravel 109 Chapter 5: Using Controllers and Routes for URLs and APIs 112 Introduction 112 Creating a basic controller 113 Creating a route using a closure 114 Making the controller RESTful 115 Using advanced routing 116 Using a filter on the route 117 Using route groups 119 Building a RESTful API with routes 120 Using named routes 126 Using a subdomain in your route 128 Chapter 6: Displaying Your Views 132 Introduction 132 Creating and using a basic view 133 Passing data into a view 134 Loading a view into another view/nested views 136 Adding assets 139 Creating a view using Blade 141 Using TWIG templates 143 Utilizing advanced Blade usage 146 Creating localization of content 148 Creating menus in Laravel 151 Integrating with Bootstrap 154 Using named views and view composers 157 Chapter 7: Creating and Using Composer Packages 160 Introduction 160 Downloading and installing packages 161 Using the Generators package to set up an app 164 Creating a Composer package in Laravel 168 Adding your Composer package to Packagist 173 Adding a non-Packagist package to Composer 175 Creating a custom artisan command 177 Chapter 8: Using Ajax and jQuery 182 Introduction 182 Getting data from another page 183 Setting up a controller to return JSON data 186 Creating an Ajax search function 188 Creating and validating a user using Ajax 190 Filtering data based on checkbox selection 193 Making an Ajax newsletter sign-up box 196 Sending an e-mail using Laravel and jQuery 199 Creating a sortable table using jQuery and Laravel 202 Chapter 9: Using Security and Sessions Effectively 206 Introduction 206 Encrypting and decrypting data 207 Hashing passwords and other data 210 Using CSRF tokens and filters in forms 213 Using advanced validation in forms 215 Building a shopping cart 218 Using Redis to save sessions 222 Using basic sessions and cookies 223 Creating a secure API server 226 Chapter 10: Testing and Debugging Your App 230 Introduction 230 Setting up and configuring PHPUnit 230 Writing and running a test case 232 Using Mockery to test controllers 234 Writing acceptance tests using Codeception 237 Debugging and profiling your app 239 Chapter 11: Deploying and Integrating Third-party Services into Your Application 244 Introduction 244 Creating a queue and using Artisan to run it 245 Deploying a Laravel app to Pagoda Box 247 Using the Stripe payment gateway with Laravel 251 Doing a GeoIP Lookup and seting custom routing 254 Gathering e-mail addresses and using them with a third party e-mail service 256 Storing and retrieving cloud content from Amazon S3 259 Index 264

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 Laravels 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.

Approach

Follow along as we work together to build 10 different applications using Laravel 4. Since each chapter is devoted to the design of a different application, there is no need to read the book in any particular order. Instead, you can pick and choose the blueprints that are of most interest to you and dive right in.

Who this book is for

This book is for intermediate to advanced level PHP programmers who want to master Laravel. Its assumed that you will have some experience with PHP already. This book is also for those who are already using a different PHP framework and are looking for better solutions.

In Detail

Laravel is fundamentally changing the PHP web-development landscape. Laravel is bringing the paradigm-shifts that PHP developers have been craving. We now can take control of our application architecture and advance our craft without needing to fight against our tools. Laravel's philosophy is to provide a highly flexible architecture and an extremely expressive API while emphasizing PHP's strengths and abstracting out its weaknesses. For these reasons Laravel is ideal for quickly creating high performance, robust applications. By providing developers with tools for automating tasks including database schema modification, CRUD operations, and testing we're able to reduce our workload, application complexity, and human-error.

"Laravel Starter" is the ideal introduction to this game-changing framework. Learn best-practiced approaches to web-application development with Laravel from a seasoned professional.

It starts out by installing and configuring the framework step-by-step. Then you'll use Laravel best-practices to create a private user administration system that is ready for real-world use. The later part deals with digging deep into Eloquent relationships, exploring the different relationship types and how Eloquent is working under-the-hood to simplify your life without forcing you to relinquish control. Exploring Laravel's simple yet flexible authentication system, data validation, and filters allows you to easily run code before and after your controller actions. Finally, it discusses Laravel bundles, the most flexible PHP modular code implementation in its weightclass.

Focused on the how as much as the why, Laravel Starter gives you the tools to immediately begin creating professional web-applications with Laravel.

Approach

Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. This book is a practical, task-based, step-by-step tutorial that demonstrates topics ranging from MVC code-separation, to code-modularity, to utilizing ActiveRecord for data abstraction which are explained from the ground-up to provide a strong framework of understanding for creating professional web-applications with Laravel.

Who this book is for

This book is ideal for programmers familiar with PHP who are interested in learning the Laravel way of solving the common problems faced in their day to day work.

In Detail

Zend Framework 2 is a modern object-oriented PHP framework. It has lots of useful components, which are easy to use and user friendly, helping you get your job done faster. This book shows you how to use the framework components to build a practical MVC application. Topics covered in this application include validation, file upload, database CRUD (create, read, update, and delete) operations, and so on.

Instant Zend Framework 2 has been specifically created to provide you with all the information that you need to get up with Zend Framework 2 applications. You will learn the basic of Zend Framework 2, and get started with building your first Zend Framework MVC application. The book promises to deliver all the information you need to get started with Zend Framework 2.

Instant Zend Framework 2 starts with how to download Zend Framework 2 and the skeleton application, and then shows how to configure the skeleton application to use the Zend Framework 2. Then it takes you through step-by-step instructions of how to create and configure modules, controllers, views, models, helpers and so on. By following the instructions in the book, you will be able to build a small fully functional database-driven MVC application.

You will also learn how to use different framework components like the event manager, Zend log, and how to configure them with the module. This will give you an idea of how to configure any component with the module. After finishing this book you will be able to build a small database-driven web application with Zend Framework 2.

Approach

Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. This book is fast-paced, practical guide that will provide step-by-step instructions for building a practical database-driven MVC application using Zend Framework 2.

Who this book is for

This book is for developers who possess entry level knowledge or who have no prior experience with Zend Framework. An understanding of object-oriented programming is important and experience with namespaces will be required.

Over 90 recipes to learn all the key aspects of Laravel, including installation, authentication, testing, and the deployment and integration of third parties in your application Overview 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 Laravels 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 Laravels 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. What you will learn from this book 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 written 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. Annotation Laravel is fundamentally changing the PHP web-development landscape. Laravel is bringing the paradigm-shifts that PHP developers have been craving. We now can take control of our application architecture and advance our craft without needing to fight against our tools. Laravels philosophy is to provide a highly flexible architecture and an extremely expressive API while emphasizing PHPs strengths and abstracting out its weaknesses. For these reasons Laravel is ideal for quickly creating high performance, robust applications. By providing developers with tools for automating tasks including database schema modification, CRUD operations, and testing were able to reduce our workload, application complexity, and human-error."Laravel Starter" is the ideal introduction to this game-changing framework. Learn best-practiced approaches to web-application development with Laravel from a seasoned professional. It starts out by installing and configuring the framework step-by-step. Then youll use Laravel best-practices to create a private user administration system that is ready for real-world use. The later part deals with digging deep into Eloquent relationships, exploring the different relationship types and how Eloquent is working under-the-hood to simplify your life without forcing you to relinquish control. Exploring Laravels simple yet flexible authentication system, data validation, and filters allows you to easily run code before and after your controller actions. Finally, it discusses Laravel bundles, the most flexible PHP modular code implementation in its weightclass. Focused on the how as much as the why, Laravel Starter gives you the tools to immediately begin creating professional web-applications with 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 Laravels 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 Laravels 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.

Annotation CodeIgniter (CI) is a powerful open-source PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. CodeIgniter is an MVC framework, similar in some ways to the Rails framework for Ruby, and is designed to enable, not overwhelm. This book explains how to work with CodeIgniter in a clear logical way. It is not a detailed guide to the syntax of CodeIgniter, but makes an ideal complement to the existing online CodeIgniter user guide, helping you grasp the bigger picture and bringing together many ideas to get your application development started as smoothly as possible. What you will learn from this book * Setting up the CI package on your web server * Understanding the Model-View-Controller (MVC) pattern for organizing a dynamic website * Understanding the structure of a CI site * Designing better views and controllers * Object-oriented aspects of CI * Integrating databases such as MySQL and simplifying your database access * Making your site more robust and professional by using CI's built-in classes * Creating and validating HTML forms with CI form helpers * Handling files, images, and sessions with CI * Sending email from CI * Using CI for testing your code with error handling, unit testing, benchmarking, and profiling * Getting an XML-RPC server and client working * Generating Create, Update, Delete, and Read (C.R.U.D) entries on each database table

In Detail

CodeIgniter (CI) is a powerful open-source PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. CodeIgniter is an MVC framework, similar in some ways to the Rails framework for Ruby, and is designed to enable, not overwhelm.

This book explains how to work with CodeIgniter in a clear logical way. It is not a detailed guide to the syntax of CodeIgniter, but makes an ideal complement to the existing online CodeIgniter user guide, helping you grasp the bigger picture and bringing together many ideas to get your application development started as smoothly as possible.

Improve your PHP coding productivity with this guide to the powerful and popular CodeIgniter framework.

Approach

This book steps you through the main features of CodeIgniter in a systematic way, explaining them clearly with illustrative code examples.

Who this book is for

This book is for developers who are new to CodeIgniter. Basic skills in PHP and MySQL are required, but only rudimentary object-oriented knowledge is required.

If you're looking for a better way to develop PHP applications, or want to find out more about the CodeIgniter framework as a viable option for one of your own projects, this book will help you.

Laravel is a clean and classy framework for PHP web development. 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. 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. -- Publisher's description Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks.A short and precise guide to get you started with EaselJS, helping you to create some cool applications and games.EaselJS greatly simplifies application development in HTML5 Canvas using a syntax and an architecture very similar to the ActionScript 3.0 language. As a result, Flash / Flex developers will immediately feel at home but it's very easy to learn even if you've never opened Flash in your life. The book targets Web designers, animators, Digital content producers, and Flash and Flex developers. Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. A short and precise guide to get you started with EaselJS, helping you to create some cool applications and games. EaselJS greatly simplifies application development in HTML5 Canvas using a syntax and an architecture very similar to the ActionScript 3.0 language. As a result, Flash / Flex developers will immediately feel at home but it's very easy to learn even if you've never opened Flash in your life. The book targets Web designers, animators
دانلود کتاب Laravel Application Development Cookbook: over 90 recipes to learn all the key aspects of Laravel, including installation, authentication, testing, and the deployment and integration of third parties in your application