Leanpub Header

Skip to main content

Laravel: Code Smart

The Laravel Framework Version 5 for Beginners

Code Smart is the number one book for learning the Laravel PHP framework. It is written in a simple, understandable, and entertaining style that is welcoming to all. Let's discover Laravel together.

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
653
Readers
458
Pages
About

About

About the Book

Laravel: Code Smart is the third installment in my 'Code' series of books for the Laravel framework. The 'Code' books have thousands of readers and are considered by many to be the most effective method of learning the Laravel framework. As always, my books serve as both an introduction for beginners, and reference material for more experienced developers. I promise that you're going to love it! You'll be writing Laravel applications in no time.

Features

Code Smart is the true evolution of the 'Code' series. Here are some of the new features.

  • Full support for Laravel 5.
  • Revamped code examples, with improved highlighting.
  • Existing content from Code Bright is refreshed for the new generation of Laravel.
  • Code samples now adhere to the PSR-2 coding standard, and use modern PHP features.
  • Spelling and grammar have improved tenfold!
  • Entirely new introductory and installation chapters. It's now much easier to get started.
  • Get started using 'Homestead' to be up and running with Laravel in no time at all.
  • A bunch of extra hints and tips scattered throughout the chapters.
  • Free beer.

Launch Content

Code Smart will launch with existing Code Bright content revamped, new Laravel 5 chapters, and almost 400 pages. Then it will grow on a weekly basis to become the biggest and greatest resource for learning the Laravel framework. I'm committed to writing at least one new chapter a week. You can vote for the new chapters, by tweeting with the hashtag #codesmart.

Direct Contact

If you find any topic confusing, would like something explained in a different way, or would like something added to the book, simply email me! We'll work together to make Code Smart the number one book for the Laravel framework.

Oh. By the way. Did I mention that there are pandas? There are loads of pandas! Buy it now!

Seriously, though. If you decide to buy Code Smart, then you'll be supporting my future career as a technical author. Thanks to each and every one of you.

Price

Pick Your Price...

Minimum price

$29.99

$37.99

You pay

$37.99

Author earns

$30.39
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 2)

2
The author will earn $24.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

Dayle Rees

Dayle is a thirty-one-year-old software developer from Wales, UK. He was one of the first users of the Laravel framework. Deciding to share the joy of Laravel with the rest of the world, he wrote a series of technical books about the Laravel framework that are read by tens of thousands of developers worldwide.

Dayle has contributed to the Laravel framework, spoken at a number of conferences and meetups, and acted as an ambassador for Laravel since its inception.

Dayle writes books in a friendly, approachable language that is easily understood by newcomers to technology, foreign language speakers, and anyone who enjoys a little humour!

Translations

Translations

Contents

Table of Contents

  • Acknowledgements
  • Errata
  • Feedback
  • Translations
  • How to read this book
    • Beginners
    • Experienced
    • Updates
  • Changes
  • I Introduction
  • II Installation
    • 1. Install Software Dependencies
    • 2. Create a Laravel Project
    • 3. Install Homestead
    • 4. Mastering Vagrant
  • III Valet
    • 5. Installation
    • 6. Adding Sites
    • 7. Valet Commands
    • 8. Sharing
  • IV Lifecycle
    • 9. Request
    • 10. Services
    • 11. Routing
    • 12. Logic
    • 13. Response
  • V Namespaces
    • 14. Global Namespace
    • 15. Simple Name-spacing
    • 16. The Theory of Relativity
    • 17. Structure
    • 18. Limitations
  • VI JSON
    • 19. What is JSON?
    • 20. JSON Syntax
    • 21. JSON and PHP
  • VII Composer
    • 22. Configuration
    • 23. Dependency Management
    • 24. Auto Loading
    • 25. Installation
    • 26. Usage
  • VIII Configuration
    • 27. Configuration Files
    • 28. Environmental Variables
    • 29. Configuration Caching
  • IX Basic Routing
    • 30. Defining Routes
    • 31. Route Parameters
  • X Responses
    • 32. Views
    • 33. View Data
    • 34. Redirects
    • 35. Custom Responses
  • XI Blade Templates
    • 36. Building Templates
    • 37. Processing PHP
    • 38. Control Structures
    • 39. Template Inclusion
    • 40. Template Inheritance
    • 41. Comments
    • 42. Javascript Support
  • XII Request Data
    • 43. Retrieval
    • 44. Old Input
    • 45. Uploaded Files
    • 46. Cookies
  • XIII Facades
    • 47. What is a Facade?
    • 48. How do they work?
  • XIV Advanced Routing
    • 49. Named Routes
    • 50. Parameter Constraints
    • 51. Route Groups
    • 52. Route Prefixing
    • 53. Domain Routing
  • XV Controllers
    • 54. Creating Controllers
    • 55. Controller Routing
    • 56. Resource Controllers
    • 57. Dependency Injection
    • 58. Route Caching
  • XVI URL Generation
    • 59. The current URL
    • 60. Generating Route URLs
    • 61. Asset URLs
  • XVII Databases
    • 62. Abstraction
    • 63. Configuration
    • 64. Preparing
  • XVIII Schema Builder
    • 65. Creating Tables
    • 66. Column Types
    • 67. Special Column Types
    • 68. Column Modifiers
    • 69. Updating Tables
    • 70. Dropping Tables
    • 71. Schema Tricks
  • XIX Migrations
    • 72. Basic Concept
    • 73. Creating Migrations
    • 74. Running Migrations
    • 75. Rolling Back
    • 76. Migration Tricks
  • XX Eloquent ORM
    • 77. Creating new models.
    • 78. Reading Existing Models
    • 79. Updating Existing Models
    • 80. Deleting Existing Models
  • XXI Eloquent Queries
    • 81. Preparation
    • 82. Eloquent To String
    • 83. Query Structure
    • 84. Fetch Methods
    • 85. Query Constraints
    • 86. Magic Where Queries
    • 87. Query Scopes
  • XXII Eloquent Collections
    • 88. The Collection Class
    • 89. Collection Methods
    • 90. Best Practice
  • XXIII Eloquent Relationships
    • 91. Implementing Relationships
    • 92. Relating and Querying
  • XXIV Validation
    • 93. Simple Validation
    • 94. Validation Rules
    • 95. Error Messages
    • 96. Custom Validation Rules
    • 97. Custom Validation Messages
  • XXV Events
    • 98. Concept
    • 99. Firing Events
    • 100. Listening for Events
    • 101. Event Subscribers
    • 102. Global Events
    • 103. Use Cases
  • XXVI Dependency Injection
    • 104. Concept
    • 105. Dependency Injection with the Container
    • 106. Injection within Controllers
    • 107. Injecting Services
    • 108. Contracts
  • XXVII Middleware
    • 109. Middleware Classes
    • 110. Global Middleware
    • 111. Route Middleware
    • 112. Middleware Parameters
    • 113. Middleware Groups
  • XXVIII Service Providers
    • 114. Registering Providers
    • 115. Writing Providers
    • 116. Deferred Providers
  • XXIX The Container
    • 117. Useful Terms
    • 118. Basic Usage
    • 119. Singletons
    • 120. Bound Instances
    • 121. Class Resolution
    • 122. Implementation Binding
    • 123. Contextual Binding
    • 124. Tagging Bindings
    • 125. Resolution Methods
  • XXX Session
    • 126. Storing Values
    • 127. Retrieving Values
    • 128. Removing Values
    • 129. Flash Data
    • 130. Tips & Tricks
    • 131. Configuration
  • XXXI Cache
    • 132. Storing Values
    • 133. Retrieving Values
    • 134. Removing Items
    • 135. Tagging Items
    • 136. Tips & Shortcuts
    • 137. Using Stores
  • XXXII Coming Soon

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

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) and EPUB (for phones, tablets and 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.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub