@@ -13,9 +13,9 @@ easily handle a user verification and validate the e-mail.
1313
1414## Installation
1515
16- This project can be installed via [ Composer] ( http://getcomposer.org ) .
17- To get the latest version of Laravel User Verification, simply add the following line to
18- the require block of your composer.json file:
16+ This project can be installed via [ Composer] ( http://getcomposer.org ) . To get
17+ the latest version of Laravel User Verification, add the following line to the
18+ require block of your composer.json file:
1919
2020 {
2121 "require": {
@@ -48,7 +48,7 @@ Open up `config/app.php` and add the following to the `aliases` key:
4848
4949## Configuration
5050
51- Prior to use this package the table representing the ` User ` must be updated with
51+ Prior to use this package the table representing the user must be updated with
5252two new columns, ` verified ` and ` verification_token ` .
5353
5454** It is mandatory to add the two columns on the same table and where the user's
@@ -74,7 +74,8 @@ For instance if you want to keep the default Eloquent User table:
7474php artisan make:migration add_verification_to_users_table --table="users"
7575```
7676
77- Once the migration is generated, edit the generated migration file in ` database/migration ` with the following:
77+ Once the migration is generated, edit the generated migration file in
78+ ` database/migration ` with the following lines:
7879
7980```
8081 /**
@@ -115,11 +116,10 @@ php artisan migrate
115116
116117### Exception
117118
118- If the table representing the user is not updated and a user instance is given
119- to the package without implement the authenticatable interface
120- ` Illuminate\Contracts\Auth\Authenticatable ` a ` ModelNotCompliantException ` will
121- be thrown.
122-
119+ If the table representing the user is not updated with the two new columns and
120+ the model representing the user doesn't implement the authenticatable interface
121+ ` Illuminate\Contracts\Auth\Authenticatable ` , a ` ModelNotCompliantException `
122+ will be thrown.
123123
124124## E-mail
125125
@@ -136,7 +136,8 @@ By default the package will use the `from` and `name` values defined into the
136136If you want to override the values, simply set the ` $from ` and (optional)
137137` $name ` parameters.
138138
139- Please refer to the Laravel [ documentation] ( https://laravel.com/docs/ ) for the proper e-mail component configuration.
139+ Refer to the Laravel [ documentation] ( https://laravel.com/docs/ ) for the
140+ proper e-mail component configuration.
140141
141142### E-mail View
142143
@@ -145,6 +146,8 @@ method (endpoint). Create a view for this e-mail at
145146` resources/views/emails/user-verification.blade.php ` . The view will receive the
146147` $user ` variable which contains the user details such as the verification
147148token. Here is a sample e-mail view content to get you started with:
149+ ** The link url must contain the verification token as parameter + (mandatory) a
150+ query string with the user's e-mail as parameter.**
148151
149152```
150153Click here to verify your account: <a href="{{ $link = url('verification', $user->verification_token) . '?email=' . urlencode($user->email) }}"> {{ $link }}</a>
@@ -153,7 +156,7 @@ Click here to verify your account: <a href="{{ $link = url('verification', $user
153156## Errors
154157
155158This package throws several exceptions. You are free to use ` try/catch `
156- statements or to rely on Laravel built-in exceptions handling.
159+ statements or to rely on the Laravel built-in exceptions handling.
157160
158161* ` ModelNotCompliantException `
159162
@@ -177,8 +180,11 @@ No user found for the given e-mail adresse.
177180
178181Create a view for the default verification error route ` /verification/error ` at
179182` resources/views/errors/user-verification.blade.php ` . If an error occurs, the
180- user will be redirected to this route and this view will be rendered. Customize
181- this view to your needs.
183+ user will be redirected to this route and this view will be rendered. ** You
184+ must implement and customize this view to your needs.** For instance you may
185+ wish to display a short message saying that something went wrong and then ask
186+ for the user's e-mail again and start the process from scratch (generate, send,
187+ verify, ...).
182188
183189## Usage
184190
@@ -195,7 +201,7 @@ customizable.
195201### Trait
196202
197203The package offers two (2) traits for a quick implementation.
198- Only ` VerifiesUsers ` must be included.
204+ ** Only ` VerifiesUsers ` must be included.**
199205
200206` Jrean\UserVerification\Traits\VerifiesUsers `
201207
@@ -236,7 +242,7 @@ Process the token verification for the given e-mail and token.
236242
237243The package offers a facade ` UserVerification:: ` .
238244
239- ### Custom attributes/properties
245+ ### Attributes/Properties
240246
241247To customize the package behaviour and the redirects you can implement and
242248customize six (6) attributes/properties:
@@ -265,9 +271,9 @@ Name of the view returned by the getVerificationError method.
265271
266272Name of the default table used for managing users.
267273
268- ### Custom methods/attributes/properties
274+ ### Customize
269275
270- You can easily customize the package behaviour by overriding/overwriting the
276+ You can customize the package behaviour by overriding/overwriting the
271277public methods and the attributes/properties. Dig into the source.
272278
273279## Guidelines
@@ -287,8 +293,8 @@ user straight after the registration step.
287293
288294The following code sample aims to showcase a quick and basic implementation
289295following Laravel logic. You are free to implement the way you want.
290- It is highly recommended to read and understand the way Laravel implements
291- registration / authentication before implementing the package .
296+ It is highly recommended to read and to understand the way Laravel implements
297+ registration/ authentication.
292298
293299Edit the ` app\Http\routes.php ` file.
294300
0 commit comments