Laravel - my first framework
Laravel - my first framework
Companion for developers discovering Laravel PHP framework
About the Book
This book answers the following questions that newcomers to Laravel have:
- Why should I use Laravel?
- What is Composer?
- What is routing?
- How is MVC used in Laravel applications?
- What are sessions and how are they used?
- What is Eloquent ORM and how does it work?
While you read over 200 illustrated pages of the book and code samples you will gain understanding of Laravel framework, its components and concepts behind their usage.
- About the author
- Source Code
1. Meeting Laravel
1.1 Introducing Laravel 4 PHP framework
- 1.1.1 Laravel’s Expressive code
- 1.1.2 Laravel applications use Model-View-Controller pattern
- 1.1.3 Laravel was built by a great community
1.2 History of Laravel framework
- 1.2.1 State of PHP frameworks world before Laravel 4
- 1.2.2 Evolution of Laravel framework
1.3 Advantages of Using Laravel
- 1.3.1 Convention over configuration
- 1.3.2 Ready out of the box
- 1.3.3 Clear organization of all parts of the application
- 1.3.4 Built-in Authentication
- 1.3.5 Eloquent ORM – Laravel’s Active Record implementation
- 1.4 Summary
- 1.1 Introducing Laravel 4 PHP framework
2. Getting started for Development with Laravel
- 2.1 Development overview
- 2.2 Meeting Composer
- 2.3 Installing Laravel
- 2.4 Meeting Artisan: Laravel’s command line interface
2.5 Application structure overview
- 2.5.1 Files and folders in the root level of the application
- 2.5.2 Contents of the “app” folder
- 2.5.3 Configuration settings
2.6 Tutorial: building a website with Laravel
- 2.6.1 The big picture – development overview
- 2.6.2 Creating a new Laravel project
- 2.6.3 Configuring application settings
- 2.6.4 Specifying endpoints (routes) of the website
- 2.6.5 Creating the database structure and the model for the data
- 2.6.6 Filling the database with data
2.6.7 Creating HTML and Blade views
- 184.108.40.206 Building the layout
- 220.127.116.11 Building the template for the home page
- 18.104.22.168 Building the template for the services page
- 22.214.171.124 Building the template for the contact page
2.6.8 Displaying view templates from the routes
- 126.96.36.199 Connecting the home page route to the view template
- 188.8.131.52 Connecting the services page route to the view template
- 184.108.40.206 Connecting the contact page route to the view template
- 2.6.9 Adding validation to the contact form
- 2.6.10 Sending HTML email with Laravel
- 2.7 Summary
3.1 Introduction to Routing in Laravel
- 3.1.1 Structure of a basic route
- 3.1.2 Types of route requests
3.1.3 Routing example: login form
- 220.127.116.11 Building routing structure for the login form example
- 18.104.22.168 Showing HTML form and processing user input
3.2 Passing parameters to routes
3.2.1 Using route parameters
- 22.214.171.124 Passing more than one parameter
- 3.2.2 Route constraints
- 3.2.3 Making route parameters optional
- 3.2.1 Using route parameters
3.3 Route Filters
- 3.3.1 Attaching filters to routes
- 3.3.2 Creating custom filters
- 3.3.3 Adding multiple route filters
- 3.4 Grouping routes
3.5 Route responses
- 3.5.1 Showing output
- 126.96.36.199 Redirecting to other URLs inside of the application
- 188.8.131.52 Redirecting to named routes
- 3.6 Summary
- 3.1 Introduction to Routing in Laravel
4.1 Introducing views and templates
- 4.1.1 Views - application’s response to a request
- 4.1.2 Templates in Laravel, Blade
4.2 Creating and organizing views
- 184.108.40.206 Separating view templates in folders
4.3 Passing data to views
- 4.3.1 Using “View::make” arguments to pass data
- 4.3.2 Using method “with”
4.4 Blade template engine
4.4.1 Outputting and escaping data
- 220.127.116.11 Escaping Data
4.4.2 Using conditional statements and loops
- 18.104.22.168 Using conditional statements in the views with plain php
- 22.214.171.124 Using conditional statements in the views with blade
- 126.96.36.199 Using loops
- 4.4.1 Outputting and escaping data
4.5 Blade layouts
4.5.1 Creating and using a layout
- 188.8.131.52 Using layouts from views
- 184.108.40.206 Using method “@yield” to specify placeholders
- 4.5.2 Using sections
- 4.5.3 Nesting views by using @include
- 4.5.1 Creating and using a layout
- 4.6 Summary
- 4.1 Introducing views and templates
5. Understanding Controllers
- 5.1 Introducing controllers, the “C” in MVC
5.2 Default Controllers: BaseController and HomeController
- 5.2.1 Base controller (app/controllers/BaseController.php)
- 5.2.2 Home controller (app/controllers/HomeController.php)
5.3 Creating controllers
- 5.3.1 Creating a new controller: LoginController
- 5.3.2 Creating logic for the LoginController
- 5.3.3 Defining routing for LoginController
5.4 Using Basic, RESTful and Resource controllers
- 5.4.1 Creating and using Basic Controllers
- 5.4.2 Creating and using RESTful Controllers
5.4.3 Creating and using Resource Controllers
- 220.127.116.11 Creating resource controller with artisan command
5.5 Using controllers with routes
- 5.5.1 Routing to Basic Controllers
- 5.5.2 Routing to RESTful Controllers
- 5.5.3 Routing to Resource Controllers
5.6 Passing route parameters to controllers
- 5.6.1 Passing parameters to methods of a Basic Controller
- 5.6.2 Passing parameters to methods of a RESTful Controller
- 5.6.3 Passing parameters to methods of a Resource Controller
5.7 Using filters with controllers
- 5.7.1 Attaching filters to a controller
5.7.2 Applying filters to specific methods of a controller
- 18.104.22.168 Using the “on” keyword
- 22.214.171.124 Using the “except” and “only” keywords
- 5.8 Summary
6. Database operations
6.1 Introducing Database Operations in Laravel
- 6.1.1 Configuring database settings
6.1.2 Introducing Query Builder & Eloquent ORM
- 126.96.36.199 Query Builder
- 188.8.131.52 Eloquent ORM
6.2 Using Query Builder
6.2.1 Inserting records
- 184.108.40.206 Inserting a single record
- 220.127.116.11 Inserting multiple records
6.2.2 Retrieving records
- 18.104.22.168 Retrieving a single record
- 22.214.171.124 Retrieving all records in the table
- 126.96.36.199 Retrieving specific columns of all records in the table
- 188.8.131.52 Retrieving a limited number of records
6.2.3 Updating records
- 184.108.40.206 Updating specific records
- 220.127.116.11 Updating all records in the table
- 6.2.4 Deleting records
- 6.2.5 Deleting specific records
- 6.2.1 Inserting records
6.3 Filtering, sorting and grouping data
- 6.3.1 Query Chaining
6.3.2 Using “where” operator to filter data
- 18.104.22.168 Simple “where” query
- 22.214.171.124 Using “orWhere” operator
- 126.96.36.199 Using “whereBetween” operator
- 6.3.3 Using “orderBy” to sort data
- 6.3.4 Using “groupBy” to group data
6.4 Using Join Statements
- 6.4.1 Using Inner Join
- 6.4.2 Using Left Join
- 6.4.3 Using other types of Joins
- 6.5 Summary
- 6.1 Introducing Database Operations in Laravel
7. Eloquent ORM
7.1 Introducing Eloquent ORM
- 7.1.1 Introducing models
- 7.1.2 Understanding conventions
7.2 Creating and using models with Eloquent
- 188.8.131.52 Creating models
- 184.108.40.206 Using models
- 7.2.1 Inserting records
7.2.2 Retrieving records
- 220.127.116.11 Retrieving specific record by using query builder’s operator find()
- 18.104.22.168 Retrieving first record by using eloquent’s operator first()
- 22.214.171.124 Retrieving all records from a table using eloquent’s operator all()
- 126.96.36.199 Using operator get()
- 7.2.3 Updating records
- 7.2.4 Deleting records
7.3 Using relationships
- 7.3.1 One to one relationships
- 7.3.2 One to Many relationships
- 7.3.3 Many to Many relationships
- 7.3.4 Polymorphic relationships
- 7.3.5 Eager loading relations
7.4 Filtering data
- 7.4.1 Using query builder
- 7.4.2 Using query scopes
7.5 Working with retrieved data
- 7.5.1 Using collections to iterate through data
- 7.5.2 Converting results
- 7.5.3 Displaying data
- 7.6 Overriding conventions
- 7.7 Summary
- 7.1 Introducing Eloquent ORM
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
C++ Best PracticesJason Turner
Level up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
Functional Design and ArchitectureAlexander Granin
Software Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
OpenIntro StatisticsDavid Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntro
A complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
R Programming for Data ScienceRoger D. Peng
This book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
C++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
I am a Software Engineer and I am in ChargeAlexis Monville and Michael Doyle
I am a Software Engineer and I am in Charge is a real-world, practical book that helps you increase your impact and satisfaction at work no matter who you work with.
In the book, we will follow Sandrine, a fictional character who learns to think in a new way enabling her to take a different course of action.
Invest In Digital Health - The Medical Futurist's GuideDr. Bertalan Mesko
Artificial Intelligence and Digital Health are booming. In this book, we explain why now it's a good time to invest in Digital Health and give recommendations on where to invest by looking at the top 24 technological trends we find the most promising.
Atomic KotlinBruce Eckel and Svetlana Isakova
For both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
The Hundred-Page Machine Learning BookAndriy Burkov
Everything you really need to know in Machine Learning in a hundred pages.
Mastering STM32Carmine Noviello
With more than 600 microcontrollers, STM32 is probably the most complete ARM Cortex-M platform on the market. This book aims to be the first guide around that introduces the reader to this exciting MCU portfolio from ST Microelectronics and its official CubeHAL.
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before...
The Future of Digital Health
6 BooksWe put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy and how technology giants such as Amazon or Google want to conquer...
Cisco CCNA 200-301 Complet
4 BooksCe lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301.
CCDE Practical Studies (All labs)
3 BooksCCDE lab
"The C++ Standard Library" and "Concurrency with Modern C++"
2 BooksGet my books "The C++ Standard Library" and "Concurrency with Modern C++" in a bundle. The first book gives you the details you should know about the C++ standard library; the second one dives deeper into concurrency with modern C++. In sum, you get more than 600 pages full of modern C++ and about 250 source files presenting the standard library...
Modern Management Made Easy
3 BooksRead all three Modern Management Made Easy books. Learn to manage yourself, lead and serve others, and lead the organization.
Programming with Ease
3 BooksAlle drei Bände der Serie Programming with Ease in einem Paket. Darin findest du alles, was ich dir zu den wichtigsten Phasen der Softwareentwicklung im Hinblick auf Clean Code Development für langfristig hohe Produktivität sagen kann.Im Band Slicing findest du die Anforderungsanalyse im Rahmen eines iterativ-inkrementellen Vorgehensmodells aus...
2 BooksUnveil the power of Ansible and Vagrant with this bundle at a special price. You'll have everything you need to get started with Vagrant - learn the basics and how to create your virtual development environments, using Ansible as provisioner! About Vagrant Cookbook Vagrant Cookbook is a complete guide to get started with Vagrant and create your...
2 BooksDocker and Kubernetes are taking the world by storm! These books will get you up-to-speed fast! Docker Deep Dive is over 400 pages long, and covers all objectives on the Docker Certified Associate exam.The Kubernetes Book includes everything you need to get up and running with Kubernetes!
Growing Agile: The Complete Coach's Guide
7 BooksGrowing Agile: Coach's Guide Series This bundle provides a collection of training and workshop plans for a variety of agile topics. The series is aimed at agile coaches, trainers and ScrumMasters who often find themselves needing to help teams understand agile concepts. Each book in the series provides the plans, slides, handouts and activity...