Skip to content

Commit 6c41cfb

Browse files
committed
Merge branch '4.0' into develop
2 parents ada8a40 + 68f55bc commit 6c41cfb

File tree

2 files changed

+31
-14
lines changed

2 files changed

+31
-14
lines changed

README.md

+30-13
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ easily handle a user verification and validate the e-mail.
55

66
## VERSIONS
77

8-
**This package is Laravel 5.3 compliant.**
9-
10-
| laravel/branch | [2.2](https://github.com/jrean/laravel-user-verification/tree/2.2) | [3.0](https://github.com/jrean/laravel-user-verification/tree/3.0) | [master](https://github.com/jrean/laravel-user-verification/tree/master) |
11-
|---------|-----|-----|--------|
12-
| 5.0.* | x | | |
13-
| 5.1.* | x | | |
14-
| 5.2.* | x | | |
15-
| 5.3.* | | x | x |
8+
**This package is Laravel 5.4 compliant.**
9+
A few minor changes remain to be updated for the email queue methods.
10+
A 2.3 ; 3.1 ; 4.1 update is coming soon with several improvements.
11+
12+
| laravel/branch | [2.2](https://github.com/jrean/laravel-user-verification/tree/2.2) | [3.0](https://github.com/jrean/laravel-user-verification/tree/3.0) | [4.0](https://github.com/jrean/laravel-user-verification/tree/4.0) | [master](https://github.com/jrean/laravel-user-verification/tree/master) |
13+
|---------|-----|-----|-----|--------|
14+
| 5.0.* | x | | | |
15+
| 5.1.* | x | | | |
16+
| 5.2.* | x | | | |
17+
| 5.3.* | | x | | |
18+
| 5.4.* | | | x | x |
1619

1720
## ABOUT
1821

@@ -369,15 +372,15 @@ Edit the `app\Http\Controllers\Auth\RegisterController.php` file.
369372
namespace App\Http\Controllers\Auth;
370373

371374
use App\User;
372-
use Validator;
373375
use App\Http\Controllers\Controller;
376+
use Illuminate\Support\Facades\Validator;
374377
use Illuminate\Foundation\Auth\RegistersUsers;
375-
use Illuminate\Http\Request;
376378

379+
use Illuminate\Http\Request;
380+
use Illuminate\Auth\Events\Registered;
377381
use Jrean\UserVerification\Traits\VerifiesUsers;
378382
use Jrean\UserVerification\Facades\UserVerification;
379383

380-
381384
class RegisterController extends Controller
382385
{
383386
/*
@@ -391,10 +394,18 @@ Edit the `app\Http\Controllers\Auth\RegisterController.php` file.
391394
|
392395
*/
393396

397+
394398
use RegistersUsers;
395399

396400
use VerifiesUsers;
397401

402+
/**
403+
* Where to redirect users after registration.
404+
*
405+
* @var string
406+
*/
407+
protected $redirectTo = '/home';
408+
398409
/**
399410
* Create a new controller instance.
400411
*
@@ -407,7 +418,7 @@ Edit the `app\Http\Controllers\Auth\RegisterController.php` file.
407418
$this->middleware('guest', ['except' => ['getVerification', 'getVerificationError']]);
408419
}
409420

410-
/**
421+
/**
411422
* Get a validator for an incoming registration request.
412423
*
413424
* @param array $data
@@ -448,13 +459,19 @@ Edit the `app\Http\Controllers\Auth\RegisterController.php` file.
448459
$this->validator($request->all())->validate();
449460

450461
$user = $this->create($request->all());
462+
463+
event(new Registered($user));
464+
451465
$this->guard()->login($user);
452466

453467
UserVerification::generate($user);
468+
454469
UserVerification::send($user, 'My Custom E-mail Subject');
455470

456-
return redirect($this->redirectPath());
471+
return $this->registered($request, $user)
472+
?: redirect($this->redirectPath());
457473
}
474+
458475
}
459476
```
460477

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": ">=5.6.4",
14-
"illuminate/support": "5.3.*"
14+
"illuminate/support": "5.4.*"
1515
},
1616
"autoload": {
1717
"psr-4": {

0 commit comments

Comments
 (0)