eBook - ePub
Laravel 5 Essentials
Martin Bean
This is a test
Partager le livre
- 144 pages
- English
- ePUB (adapté aux mobiles)
- Disponible sur iOS et Android
eBook - ePub
Laravel 5 Essentials
Martin Bean
DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations
Foire aux questions
Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier lâabonnement ». Câest aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via lâapplication. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă la bibliothĂšque et Ă toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode dâabonnement : avec lâabonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă 12 mois dâabonnement mensuel.
Quâest-ce que Perlego ?
Nous sommes un service dâabonnement Ă des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă toute une bibliothĂšque pour un prix infĂ©rieur Ă celui dâun seul livre par mois. Avec plus dâun million de livres sur plus de 1 000 sujets, nous avons ce quâil vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Ăcouter sur votre prochain livre pour voir si vous pouvez lâĂ©couter. Lâoutil Ăcouter lit le texte Ă haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, lâaccĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Laravel 5 Essentials est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă Laravel 5 Essentials par Martin Bean en format PDF et/ou ePUB ainsi quâĂ dâautres livres populaires dans Computer Science et Programming in PHP. Nous disposons de plus dâun million dâouvrages Ă dĂ©couvrir dans notre catalogue.
Informations
Sujet
Computer ScienceSous-sujet
Programming in PHPLaravel 5 Essentials
Table of Contents
Laravel 5 Essentials
Credits
About the Author
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. An Introduction to Laravel
The need for frameworks
The limitations of homemade tools
Laravel to the rescue
A new approach to developing PHP applications
A more robust HTTP foundation
Embracing PHP
Laravel's main features and sources of inspiration
Expressiveness and simplicity
Prettifying PHP
Responsibilities, naming, and conventions
Helping you become a better developer
Structure of a Laravel application
The service container and request lifecycle
Exploring Laravel
Changes in Version 5 from Version 4
Summary
2. Setting Up a Development Environment
Meeting Composer
Working with the command line
Meet Homestead
Installing Homestead
Everyday usage of Homestead
Adding additional websites
Connecting to your databases
Creating a new Laravel application
Summary
3. Your First Application
Planning our application
Entities, relationships, and attributes
The map of our application
Starting the application
Setting the application namespace
Writing the first routes
Restricting the route parameters
Handling HTTP exceptions
Performing redirections
Returning views
Preparing the database
Creating Eloquent models
Building the database schema
Seeding the database
Mastering Blade
Creating a master view
Back to the routes
The overview page
Displaying a cat's page
Route-model binding
Adding, editing, and deleting cats
Moving from simple routing to powerful controllers
Resource controllers
Summary
4. Eloquent ORM
Eloquent conventions
Retrieving data
Filtering records
Saving data
Mass assignment
Deleting data
Soft deletion
Including deleted models in results
Query scopes
Relationships
One-to-one
Many-to-many
Storing data in the pivot table
Has-many-through
Polymorphic relations
Many-to-many polymorphic relations
Model events
Registering event listeners
Model observers
Collections
Checking whether a key exists in a collection
Summary
5. Testing â It's Easier Than You Think
The benefits of testing
The anatomy of a test
Unit testing with PHPUnit
Defining what you expect with assertions
Preparing the scene and cleaning up objects
Expecting exceptions
Testing interdependent classes in isolation
End-to-end testing
Testing â batteries included
Framework assertions
Impersonating users
Testing with a database
Inspecting the rendered views
Summary
6. A Command-line Companion Called Artisan
Keeping up with the latest changes
Inspecting and interacting with your application
Fiddling with the internals
Turning the engine off
Fine-tuning your application
Caching routes
Generators
Rolling out your own Artisan commands
Creating the command
The anatomy of a command
Writing the command
Scheduling commands
Viewing the output of scheduled commands
Summary
7. Authentication and Security
Authenticating users
Creating the user model
Creating the necessary database schema
Authentication routes and views
Middleware
Validating user input
Form requests
Securing your application
Cross-site request forgery
Escaping content to prevent cross-site scripting (XSS)
Avoiding SQL injection
Using mass assignment with care
Cookies â secure by default
Forcing HTTPS when exchanging sensitive data
Summary
A. An Arsenal of Tools
Array helpers
The usage examples of array helpers
String and text manipulation
Boolean functions
Transformation functions
Inflection functions
Dealing with files
File uploads
Sending e-mails
Easier date and time handling with Carbon
Instantiating Carbon objects
Outputting user-friendly timestamps
Boolean methods
Carbon for Eloquent DateTime properties
Don't wait any longer with queues
Creating a command and pushing it onto the queue
Listening to a queue and executing jobs
Getting notified when a job fails
Queues without background processes
Where to go next?
Index
Laravel 5 Essentials
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2015
Production reference: 1240415
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-301-7
www.packtpub.com
Credits
Author
Martin Bean
Reviewers
Si Fleming
Michael Peacock
Brayan Laurindo Rastelli
Michele Somma
Commissioning Editor
Akram Hussain
Acquisition Editor
Reshma Raman
Content Development Editor
Mohammed Fahad
Technical Editor
Ankur Ghiye
Copy Editors
Merilyn Pereira
Laxmi Subramanian
Project Coordinator
Danuta Jones
Proofreaders
Safis Editing
Paul Hindle
Indexer
Monica Ajmera Mehta
Production Coordinator
Nilesh R. Mohite
Cover Work
Nilesh R. Mohite
2323__pe...