Skip to content

Commit

Permalink
Update to Laravel 5.7, Folklore/Image, prepare user welcome email.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbaldessin committed Oct 3, 2019
1 parent 6ed572b commit ea3a8d1
Show file tree
Hide file tree
Showing 19 changed files with 1,452 additions and 841 deletions.
41 changes: 41 additions & 0 deletions app/Http/Controllers/Auth/VerificationController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\VerifiesEmails;

class VerificationController extends Controller
{
/*
|--------------------------------------------------------------------------
| Email Verification Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling email verification for any
| user that recently registered with the application. Emails may also
| be re-sent if the user didn't receive the original email message.
|
*/

use VerifiesEmails;

/**
* Where to redirect users after verification.
*
* @var string
*/
protected $redirectTo = '/';

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
$this->middleware('signed')->only('verify');
$this->middleware('throttle:6,1')->only('verify', 'resend');
}
}
1 change: 1 addition & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ class Kernel extends HttpKernel
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
}
2 changes: 1 addition & 1 deletion app/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function getSeoImagesAttribute()
$urls = [];
if ($images && sizeof($images) > 0) {
$urls = $images->map(function ($i) {
return url(\Folklore\Image\Facades\Image::url($i->path, 600));
return url(\Folklore\Image\Support\Facades\Image::url($i->path, 600));
})->all();
}
return $urls;
Expand Down
5 changes: 5 additions & 0 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;

class EventServiceProvider extends ServiceProvider
{
Expand All @@ -16,6 +18,9 @@ class EventServiceProvider extends ServiceProvider
'App\Events\Event' => [
'App\Listeners\EventListener',
],
Registered::class => [
SendEmailVerificationNotification::class,
],
];

/**
Expand Down
4 changes: 2 additions & 2 deletions app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace App;

use Illuminate\Notifications\Notifiable;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable // implements MustVerifyEmail
class User extends Authenticatable implements MustVerifyEmail
{
use Notifiable;

Expand Down
9 changes: 9 additions & 0 deletions app/helpers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

if (! function_exists('encodeURIComponent')) {
function encodeURIComponent($str)
{
$revert = array('%21'=>'!', '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')', '%2F' => '/');
return strtr(rawurlencode($str), $revert);
}
}
15 changes: 11 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"caouecs/laravel-lang": "~3.0",
"fideloper/proxy": "^4.0",
"flynsarmy/csv-seeder": "^1.0",
"folklore/image": "^0.3.24",
"folklore/image": "v1.1.x-dev",
"guzzlehttp/guzzle": "^6.3",
"kalnoy/nestedset": "^4.3",
"laravel/framework": "5.6.*",
"laravel/framework": "^5.8.0",
"laravel/scout": "^4.0",
"laravel/tinker": "^1.0",
"laravelium/sitemap": "2.8.*",
"laravelium/sitemap": "3.1.*",
"league/flysystem": "^1.0",
"league/flysystem-memory": "^1.0",
"nothingworks/blade-svg": "^0.2.2",
Expand All @@ -29,13 +29,18 @@
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.1",
"composer/composer": "^1.9",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
"autoload": {
"files": [
"app/helpers.php",
"vendor/folklore/image/src/Folklore/Image/helpers.php"
],
"classmap": [
"database/seeds",
"database/factories"
Expand All @@ -51,7 +56,9 @@
},
"extra": {
"laravel": {
"dont-discover": []
"dont-discover": [
"folklore/image"
]
}
},
"scripts": {
Expand Down
Loading

0 comments on commit ea3a8d1

Please sign in to comment.