Merge pull request #278 from nabeelio/laravel-57

[WIP] Laravel 5.7 Update
This commit is contained in:
Nabeel Shahzad 2018-09-20 14:20:25 -05:00 committed by GitHub
commit c5498937dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 775 additions and 1023 deletions

View File

@ -23,7 +23,7 @@ class LoginController extends Controller
*/
public function __construct()
{
$this->redirectTo = config('app.login_redirect');
$this->redirectTo = config('phpvms.login_redirect');
$this->middleware('guest', ['except' => 'logout']);
}

View File

@ -52,7 +52,7 @@ class RegisterController extends Controller
$this->userService = $userService;
$this->middleware('guest');
$this->redirectTo = config('app.registration_redirect');
$this->redirectTo = config('phpvms.registration_redirect');
}
/**

View File

@ -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');
}
}

View File

@ -72,7 +72,7 @@ class DownloadController extends Controller
// Allowed to download? If not, direct to login
if (!$file->public && !Auth::check()) {
return redirect(config('app.login_redirect'));
return redirect(config('phpvms.login_redirect'));
}
$file->download_count++;

View File

@ -8,6 +8,8 @@ use App\Listeners\AwardListener;
use App\Listeners\ExpenseListener;
use App\Listeners\FinanceEvents;
use App\Listeners\NotificationEvents;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
@ -17,6 +19,10 @@ class EventServiceProvider extends ServiceProvider
ExpenseListener::class,
],
Registered::class => [
SendEmailVerificationNotification::class,
],
UserStatsChanged::class => [
AwardListener::class,
],

View File

@ -44,7 +44,7 @@ Route::group([
Route::resource('profile', 'ProfileController');
});
Auth::routes();
Auth::routes(['verify' => true]);
Route::get('/logout', 'Auth\LoginController@logout')->name('logout');
require app_path('Routes/admin.php');

View File

@ -2,8 +2,8 @@
namespace App\Support;
use Composer\Autoload\ClassMapGenerator;
use Log;
use Symfony\Component\ClassLoader\ClassMapGenerator;
/**
* Class find/load related functionality. Is used to find

View File

@ -12,36 +12,37 @@
"ext-json": "*",
"ext-mbstring": "*",
"ext-pdo": "*",
"laravel/framework": "^5.6",
"laravelcollective/html": "5.6.x",
"composer/composer": "^1.7",
"laravel/framework": "5.7.x",
"laravelcollective/html": "5.7.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",
"league/geotools": "0.8.x",
"toin0u/geotools-laravel": "1.0.x",
"fzaninotto/faker": "^1.8",
"webpatser/laravel-uuid": "3.0.x",
"composer/semver": "1.4.x",
"hashids/hashids": "2.0.x",
"nwidart/laravel-modules": "^3.0",
"sebastiaanluca/laravel-helpers": "1.0.x",
"jackiedo/timezonelist": "5.x",
"tivie/php-os-detector": "1.1.x",
"santigarcor/laratrust": "5.0.x",
"pragmarx/version": "0.2.x",
"guzzlehttp/guzzle": "6.3.x",
"jmikola/geojson": "1.0.x",
"laracasts/flash": "3.0.x",
"arrilot/laravel-widgets": "3.9.x",
"nabeel/vacentral": "^1.0",
"league/iso3166": "2.1.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",
"php-units-of-measure/php-units-of-measure": "2.1.x",
"markrogoyski/math-php": "^0.38.0",
"akaunting/money": "^1.0",
"igaster/laravel-theme": "^2.0",
"anhskohbo/no-captcha": "^3.0",
"league/csv": "^9.1",
"intervention/image": "^2.4",
@ -49,15 +50,13 @@
},
"require-dev": {
"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.*",
"filp/whoops": "~2.0",
"bpocallaghan/generators": "5.0.1",
"nunomaduro/collision": "^2.0",
"phpstan/phpstan": "^0.9.2",
"weebly/phpstan-laravel": "^1.1",
"codedungeon/phpunit-result-printer": "^0.13.0",
"barryvdh/laravel-debugbar": "^3.1"
"codedungeon/phpunit-result-printer": "^0.13.0"
},
"autoload": {
"classmap": [

1669
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -17,10 +17,6 @@ return [
'locale' => env('APP_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
// optimizations and figuring out where slowdowns might be happening
'analytics' => true,

View File

@ -15,6 +15,16 @@ return [
*/
'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
*

View File

@ -14,7 +14,7 @@ return [
# Don't forget to change these when live
'env' => 'local',
'debug' => true,
'debug' => false,
],
# overrides phpvms.php
@ -103,5 +103,4 @@ return [
'default' => 'file',
'lifetime' => 60 * 24, # 24 hours
],
];

View File

@ -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