@@ -5,7 +5,7 @@ easily handle a user verification flow and validate its email.
55
66- Generate and store a verification token for a registered user.
77- Send an email with the verification token link.
8- - Handle the verification.
8+ - Handle the verification of the token .
99- Set the user as verified.
1010
1111## Installation
@@ -15,7 +15,7 @@ To get the latest version of Laravel User Verification, simply add the following
1515the require block of your composer.json file:
1616
1717 "jrean/laravel-user-verification": "dev-master"
18- "jrean/laravel-user-verification": "2.0 "
18+ "jrean/laravel-user-verification": "2.* "
1919
2020or
2121
@@ -94,7 +94,7 @@ Once the migration is generated, edit the file in `database/migration` with the
9494
9595```
9696
97- Where ` :table ` is replaced by the table of your choice.
97+ Where ` :table ` is replaced by the table name of your choice.
9898
9999Migrate the migration with the following command:
100100
@@ -108,17 +108,13 @@ This package offers to send an email with a link containing the verification tok
108108
109109Please refer to the Laravel documentation for the proper email component configuration.
110110
111- [ Laravel Email] ( http://laravel.com/docs/5.1/mail )
112-
113111#### View
114112
115- When a user submits a request to register or when you decide, they will receive
116- an e-mail with a link that points to the getVerification method (typically
117- routed at /auth/verification/{token}) of the AuthController. You will need to
118- create a view for this e-mail at
113+ The user will receive an e-mail with a link leading to the getVerification
114+ method (endpoint). You will need to create a view for this e-mail at
119115resources/views/emails/user-verification.blade.php. The view will receive the
120- ` $user ` variable which contains the user information such as the verification
121- token. Here is an example e-mail view to get you started:
116+ ` $user ` variable which contains the user details such as the verification
117+ token. Here is an sample e-mail view to get you started:
122118
123119```
124120Click here to verify your account {{ url('auth/verification/' . $user->verification_token) }}
@@ -132,7 +128,7 @@ The package public API offers four (4) methods.
132128
133129* ` generate(AuthenticatableContract $user) `
134130
135- Generate and save a verification token the given user.
131+ Generate and save a verification token for the given user.
136132
137133* ` send(AuthenticatableContract $user, $subject = null) `
138134
@@ -155,7 +151,7 @@ over the four (4) previous listed public methods.
155151
156152The package also offers a trait for a quick implementation.
157153
158- #### Actions
154+ #### Endpoints
159155
160156The two following methods are endpoints you can join by defining the proper
161157route(s) of your choice.
@@ -201,15 +197,15 @@ Name of the default table used for managing users.
201197## Example
202198
203199This package whishes to let you be creative while offering you a predefined
204- path. The following examples assume you have configured Laravel for the
200+ path. The following sample assume you have configured Laravel for the
205201package as well as created and migrated the migration according to this
206202documentation.
207203This package doesn't require the user to be authenticated to perform the
208204verification. You are free to implement any flow you may want to achieve.
209205Note that by default the behaviour of Laravel is to return an authenticated
210206user straight after the registration.
211207
212- ### Example 1
208+ ### Example
213209
214210The following code sample aims to showcase a quick and basic implementation.
215211
@@ -243,6 +239,8 @@ Edit the `app\Http\Controller\Auth\AuthController.php` file.
243239 */
244240 public function __construct()
245241 {
242+ // Based on the workflow you want you may update the following lines.
243+
246244 // Laravel 5.0.*|5.1.*
247245 $this->middleware('guest', ['except' => ['getLogout']]);
248246
@@ -288,6 +286,11 @@ Edit the `app\Http\routes.php` file.
288286```
289287 Route::get('auth/verification/error', 'Auth\AuthController@getVerificationError');
290288 Route::get('auth/verification/{token}', 'Auth\AuthController@getVerification');
289+
290+ or
291+
292+ Route::get('verification/error', 'Auth\AuthController@getVerificationError');
293+ Route::get('verification/{token}', 'Auth\AuthController@getVerification');
291294```
292295
293296## Contribute
0 commit comments