Laravel: getting Sentinel authentication to do registration, login etc Easy questions

GETTING SENTINEL AUTHENTICATION-AUTHORIZATION PACKAGE REALLY RUNNING FOR TOTAL BEGINNERS:

https://github.com/rydurham/Sentinel/blob/master/readme.md

It is the very author. If you had installed following any other site's instructions you had better removed your installation and run again composer update so that it gets rid off any traces of sentinel.

Install following ryan durham steps. (they are at least valid as of the date I post).

Once you do that, you will find there are already pre-created blade pages. You can go to Register as the first one, and enter your data (having configured your DB and Mail parameters before of course).

Also, at the Mail.php in the very latest version of Laravel, there is one parameter changed compared to former versions: the one about encryption. In my case I needed to set it as it was in the past, simply:

'encryption' => 'ssl' and NOT AS 'encryption' => env('MAIL_ENCRYPTION', $_ENV['MAIL_ENCRYPTION']

in the second case it won't be able to connect to your mail server.

This is saying, yes, that Sentinel already has that pre-built. Once you fill out the Registration Form, you will see yourself added to the Database but still not activated. Then in your mail box you will have that link I talked about. Click on it and your account will be activated.


The following code:

use Cartalyst\Sentinel\Native\Facades\Sentinel; use Illuminate\Database\Capsule\Manager as Capsule;

Is for people trying to use the package natively. Since you are using laravel, you don't need this. Please make sure you follow the laravel-specific instructions.

Because You've tagged laravel-5 in your question, I'm assuming that this is what you are using. In that case, first add this to your composer.json: composer require cartalyst/sentinel "2.0.*" and the following to your config/app.php file:

To the $providers array: 'Cartalyst\Sentinel\Laravel\SentinelServiceProvider',

And to the $alias~ array :

'Activation' => 'Cartalyst\Sentinel\Laravel\Facades\Activation', 'Reminder' => 'Cartalyst\Sentinel\Laravel\Facades\Reminder', 'Sentinel' => 'Cartalyst\Sentinel\Laravel\Facades\Sentinel',

Once you've done this, you can publish and migrate the package. You will also need to extendend Cartalyst\Sentinel\Users\EloquentUser on your user model instead of Eloquent. You will need to do the same if you are using a "roles" model.

For more information, follow the documentation: https://cartalyst.com/manual/sentinel/2.0#laravel-5

make sure you are on the correct version: 2.0 for Laravel 5 and 1.0 for laravel 4.*

In regards to your second question, you will have to send an e-mail to the client with the activation code (usually the code is hidden as a query string or something, so the user don't necessarily need to have knowledge of it) and than you do the activation using the code. Or if you prefer you can authenticate automatically once they sign up.

Read more upon activation on their documentation, if you still can't figure out we are here to help, but try for yourself first.


Take a look at this package :
https://github.com/srlabs/centaur
it will help you get up and running with cartalyst/sentinel