Learning never exhausts the mind. Leonardo da Vinci
Idea Transcript
Enterprise
Pricing
Sign In
START FREE TRIAL
Laravel Design Patterns and Best Practices 3 reviews
START READING
by H. İbrahim YILMAZ, Arda Kılıçdağı Publisher: Packt Publishing Release Date: July 2014 ISBN: 9781783287987 Topics: Design Patterns
View table of contents
Book Description Enhance the quality of your web applications by efficiently implementing design patterns in Laravel In Detail This book covers how to develop different applications and solve recurring problems using Laravel 4 design patterns. It will walk you through the widely used design patterns—the Builder (Manager) pattern, Factory pattern, Repository pattern, and Strategy pattern—and will empower you to use these patterns while developing various applications with Laravel. This book will help you find stable and acceptable solutions, thereby improving the quality of your applications. Throughout the course of the book, you will be introduced to a number of clear, practical examples about PHP design patterns and their usage in various projects. You will also get acquainted with the best practices for Laravel that will greatly reduce the probability of introducing errors into your web applications. By the end of the book, you will be accustomed to the best practices and the important design patterns used in Laravel to make a great website. What You Will Learn „Learn about the design pattern fundamentals in OOP programming „Get acquainted with the structure of MVC architecture and use objects in your applications Discover Laravel's approach to MVC and its benefits Work with various design patterns used in Laravel such as the Builder (Manager) pattern, Factory pattern, Repository pattern, and Strategy pattern Create and maintain web applications using Laravel best practices „Implement PHP design patterns to solve commonly occurring problems Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
Table of Contents Laravel Design Patterns and Best Practices Table of Contents Laravel Design Patterns and Best Practices Credits About the Authors About the Reviewers www.PacktPub.com Support files, eBooks, discount offers, and more Why subscribe? Free access for Packt account holders Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Errata Piracy Questions 1. Design and Architectural Pattern Fundamentals Design patterns Elements of design patterns Classification of design patterns Creational patterns Structural patterns Behavioral patterns What is MVC? Summary 2. Models in MVC What is a Model? Purposes of the Model Model instances The Model in Laravel Fluent Query Builder Eloquent ORM Relationships Mass assignment Soft deleting Eager loading Timestamps Query scopes Accessors and mutators Model events Model observers Migrations Database seeders Summary 3. Views in MVC What is a View? View objects View in Laravel Summary 4. Controllers in MVC What is a Controller? The purpose of the Controller Controllers in Laravel Routes Using Controllers inside folders Summary 5. Design Patterns in Laravel The Builder (Manager) pattern The need for the Builder (Manager) pattern The Factory pattern The need for the Factory pattern The Repository pattern The need for the Repository pattern The Strategy pattern The need for the Strategy pattern The Provider pattern The Facade pattern Summary 6. Best Practices in Laravel Basic practices Advanced practices The Factory pattern The Builder pattern The Strategy pattern The Repository pattern Summary Index