Merge pull request #278 from nabeelio/laravel-57
[WIP] Laravel 5.7 Update
This commit is contained in:
@@ -23,7 +23,7 @@ class LoginController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->redirectTo = config('app.login_redirect');
|
$this->redirectTo = config('phpvms.login_redirect');
|
||||||
$this->middleware('guest', ['except' => 'logout']);
|
$this->middleware('guest', ['except' => 'logout']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class RegisterController extends Controller
|
|||||||
$this->userService = $userService;
|
$this->userService = $userService;
|
||||||
$this->middleware('guest');
|
$this->middleware('guest');
|
||||||
|
|
||||||
$this->redirectTo = config('app.registration_redirect');
|
$this->redirectTo = config('phpvms.registration_redirect');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Auth\VerifiesEmails;
|
||||||
|
use Illuminate\Routing\Controller;
|
||||||
|
|
||||||
|
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 resent if the user did not receive the original email message.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
use VerifiesEmails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Where to redirect users after verification.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $redirectTo = '/home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -72,7 +72,7 @@ class DownloadController extends Controller
|
|||||||
|
|
||||||
// Allowed to download? If not, direct to login
|
// Allowed to download? If not, direct to login
|
||||||
if (!$file->public && !Auth::check()) {
|
if (!$file->public && !Auth::check()) {
|
||||||
return redirect(config('app.login_redirect'));
|
return redirect(config('phpvms.login_redirect'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$file->download_count++;
|
$file->download_count++;
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ use App\Listeners\AwardListener;
|
|||||||
use App\Listeners\ExpenseListener;
|
use App\Listeners\ExpenseListener;
|
||||||
use App\Listeners\FinanceEvents;
|
use App\Listeners\FinanceEvents;
|
||||||
use App\Listeners\NotificationEvents;
|
use App\Listeners\NotificationEvents;
|
||||||
|
use Illuminate\Auth\Events\Registered;
|
||||||
|
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
class EventServiceProvider extends ServiceProvider
|
class EventServiceProvider extends ServiceProvider
|
||||||
@@ -17,6 +19,10 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
ExpenseListener::class,
|
ExpenseListener::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
Registered::class => [
|
||||||
|
SendEmailVerificationNotification::class,
|
||||||
|
],
|
||||||
|
|
||||||
UserStatsChanged::class => [
|
UserStatsChanged::class => [
|
||||||
AwardListener::class,
|
AwardListener::class,
|
||||||
],
|
],
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ Route::group([
|
|||||||
Route::resource('profile', 'ProfileController');
|
Route::resource('profile', 'ProfileController');
|
||||||
});
|
});
|
||||||
|
|
||||||
Auth::routes();
|
Auth::routes(['verify' => true]);
|
||||||
Route::get('/logout', 'Auth\LoginController@logout')->name('logout');
|
Route::get('/logout', 'Auth\LoginController@logout')->name('logout');
|
||||||
|
|
||||||
require app_path('Routes/admin.php');
|
require app_path('Routes/admin.php');
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Support;
|
namespace App\Support;
|
||||||
|
|
||||||
|
use Composer\Autoload\ClassMapGenerator;
|
||||||
use Log;
|
use Log;
|
||||||
use Symfony\Component\ClassLoader\ClassMapGenerator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class find/load related functionality. Is used to find
|
* Class find/load related functionality. Is used to find
|
||||||
|
|||||||
+15
-16
@@ -12,36 +12,37 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"laravel/framework": "^5.6",
|
"composer/composer": "^1.7",
|
||||||
"laravelcollective/html": "5.6.x",
|
"laravel/framework": "5.7.x",
|
||||||
|
"laravelcollective/html": "5.7.x",
|
||||||
"prettus/l5-repository": "2.6.x",
|
"prettus/l5-repository": "2.6.x",
|
||||||
|
"nwidart/laravel-modules": "^3.0",
|
||||||
|
"santigarcor/laratrust": "5.0.*",
|
||||||
|
"arrilot/laravel-widgets": "3.x",
|
||||||
|
"sebastiaanluca/laravel-helpers": "1.x",
|
||||||
|
"joshbrw/laravel-module-installer": "0.1.x",
|
||||||
|
"webpatser/laravel-uuid": "3.*",
|
||||||
|
"igaster/laravel-theme": "^2.0",
|
||||||
|
"irazasyed/laravel-gamp": "1.3.x",
|
||||||
|
"toin0u/geotools-laravel": "1.0.x",
|
||||||
"spatie/laravel-pjax": "1.3.x",
|
"spatie/laravel-pjax": "1.3.x",
|
||||||
"league/geotools": "0.8.x",
|
"league/geotools": "0.8.x",
|
||||||
"toin0u/geotools-laravel": "1.0.x",
|
|
||||||
"fzaninotto/faker": "^1.8",
|
"fzaninotto/faker": "^1.8",
|
||||||
"webpatser/laravel-uuid": "3.0.x",
|
|
||||||
"composer/semver": "1.4.x",
|
"composer/semver": "1.4.x",
|
||||||
"hashids/hashids": "2.0.x",
|
"hashids/hashids": "2.0.x",
|
||||||
"nwidart/laravel-modules": "^3.0",
|
|
||||||
"sebastiaanluca/laravel-helpers": "1.0.x",
|
|
||||||
"jackiedo/timezonelist": "5.x",
|
"jackiedo/timezonelist": "5.x",
|
||||||
"tivie/php-os-detector": "1.1.x",
|
"tivie/php-os-detector": "1.1.x",
|
||||||
"santigarcor/laratrust": "5.0.x",
|
|
||||||
"pragmarx/version": "0.2.x",
|
"pragmarx/version": "0.2.x",
|
||||||
"guzzlehttp/guzzle": "6.3.x",
|
"guzzlehttp/guzzle": "6.3.x",
|
||||||
"jmikola/geojson": "1.0.x",
|
"jmikola/geojson": "1.0.x",
|
||||||
"laracasts/flash": "3.0.x",
|
"laracasts/flash": "3.0.x",
|
||||||
"arrilot/laravel-widgets": "3.9.x",
|
|
||||||
"nabeel/vacentral": "^1.0",
|
"nabeel/vacentral": "^1.0",
|
||||||
"league/iso3166": "2.1.x",
|
"league/iso3166": "2.1.x",
|
||||||
"theiconic/php-ga-measurement-protocol": "2.7.x",
|
"theiconic/php-ga-measurement-protocol": "2.7.x",
|
||||||
"joshbrw/laravel-module-installer": "0.1.x",
|
|
||||||
"irazasyed/laravel-gamp": "1.3.x",
|
|
||||||
"vierbergenlars/php-semver": "3.0.x",
|
"vierbergenlars/php-semver": "3.0.x",
|
||||||
"php-units-of-measure/php-units-of-measure": "2.1.x",
|
"php-units-of-measure/php-units-of-measure": "2.1.x",
|
||||||
"markrogoyski/math-php": "^0.38.0",
|
"markrogoyski/math-php": "^0.38.0",
|
||||||
"akaunting/money": "^1.0",
|
"akaunting/money": "^1.0",
|
||||||
"igaster/laravel-theme": "^2.0",
|
|
||||||
"anhskohbo/no-captcha": "^3.0",
|
"anhskohbo/no-captcha": "^3.0",
|
||||||
"league/csv": "^9.1",
|
"league/csv": "^9.1",
|
||||||
"intervention/image": "^2.4",
|
"intervention/image": "^2.4",
|
||||||
@@ -49,15 +50,13 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~7.0",
|
"phpunit/phpunit": "~7.0",
|
||||||
"barryvdh/laravel-ide-helper": "2.4.x",
|
"barryvdh/laravel-ide-helper": "^2.0",
|
||||||
|
"barryvdh/laravel-debugbar": "^3.0",
|
||||||
"mockery/mockery": "0.9.*",
|
"mockery/mockery": "0.9.*",
|
||||||
"filp/whoops": "~2.0",
|
"filp/whoops": "~2.0",
|
||||||
"bpocallaghan/generators": "5.0.1",
|
"bpocallaghan/generators": "5.0.1",
|
||||||
"nunomaduro/collision": "^2.0",
|
"nunomaduro/collision": "^2.0",
|
||||||
"phpstan/phpstan": "^0.9.2",
|
"codedungeon/phpunit-result-printer": "^0.13.0"
|
||||||
"weebly/phpstan-laravel": "^1.1",
|
|
||||||
"codedungeon/phpunit-result-printer": "^0.13.0",
|
|
||||||
"barryvdh/laravel-debugbar": "^3.1"
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
|
|||||||
Generated
+673
-996
File diff suppressed because it is too large
Load Diff
@@ -17,10 +17,6 @@ return [
|
|||||||
'locale' => env('APP_LOCALE', 'en'),
|
'locale' => env('APP_LOCALE', 'en'),
|
||||||
'fallback_locale' => 'en',
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
// Where to redirect after logging in/registration
|
|
||||||
'login_redirect' => '/dashboard',
|
|
||||||
'registration_redirect' => '/profile',
|
|
||||||
|
|
||||||
// This sends install and vaCentral specific information to help with
|
// This sends install and vaCentral specific information to help with
|
||||||
// optimizations and figuring out where slowdowns might be happening
|
// optimizations and figuring out where slowdowns might be happening
|
||||||
'analytics' => true,
|
'analytics' => true,
|
||||||
|
|||||||
@@ -15,6 +15,16 @@ return [
|
|||||||
*/
|
*/
|
||||||
'installed' => env('PHPVMS_INSTALLED', false),
|
'installed' => env('PHPVMS_INSTALLED', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Where to redirect after logging in
|
||||||
|
*/
|
||||||
|
'login_redirect' => '/dashboard',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Where to redirect after registration
|
||||||
|
*/
|
||||||
|
'registration_redirect' => '/profile',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The ISO "Currency Code" to use, the list is in config/money.php
|
* The ISO "Currency Code" to use, the list is in config/money.php
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ return [
|
|||||||
|
|
||||||
# Don't forget to change these when live
|
# Don't forget to change these when live
|
||||||
'env' => 'local',
|
'env' => 'local',
|
||||||
'debug' => true,
|
'debug' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
# overrides phpvms.php
|
# overrides phpvms.php
|
||||||
@@ -103,5 +103,4 @@ return [
|
|||||||
'default' => 'file',
|
'default' => 'file',
|
||||||
'lifetime' => 60 * 24, # 24 hours
|
'lifetime' => 60 * 24, # 24 hours
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">{{ __('Verify Your Email Address') }}</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
@if (session('resent'))
|
||||||
|
<div class="alert alert-success" role="alert">
|
||||||
|
{{ __('A fresh verification link has been sent to your email address.') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{ __('Before proceeding, please check your email for a verification link.') }}
|
||||||
|
{{ __('If you did not receive the email') }}, <a
|
||||||
|
href="{{ route('verification.resend') }}">{{ __('click here to request another') }}</a>.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Reference in New Issue
Block a user