Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Laravel 5 Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
Laravel 5 Essentials

Laravel 5 Essentials

By : Martin Bean
3.7 (13)
close
close
Laravel 5 Essentials

Laravel 5 Essentials

3.7 (13)
By: Martin Bean

Overview of this book

This book is intended for PHP web developers who have an interest in Laravel and who know the basics of the framework in theory, but don't really know how to use it in practice. No experience of using frameworks is required, but it is assumed you are at least familiar with building dynamic websites in PHP already.
Table of Contents (10 chapters)
close
close
9
Index

Authenticating users


Allowing users to register and sign in is an extremely common feature in web applications. Yet, PHP does not dictate how it should be done, nor does it give you any helpers to implement it. This has led to the creation of disparate, and sometimes insecure, methods of authenticating users and restricting access to specific pages. In that respect, Laravel provides you with different tools to make these features more secure and easier to integrate. It does so with the help of its authentication service and functionality that we have not covered yet—middleware.

Creating the user model

First of all, we need to define the model that will be used to represent the users of our application. Laravel already provides you with sensible defaults inside config/auth.php, where you can change the model or table that is used to store your user accounts.

It also comes with an existing User model inside app/User.php. For the purposes of this application, we are going to simplify it slightly...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Laravel 5 Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon