diff --git a/app/Http/Controllers/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Auth/ConfirmPasswordController.php new file mode 100644 index 0000000..138c1f0 --- /dev/null +++ b/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -0,0 +1,40 @@ +middleware('auth'); + } +} diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 6a247fe..465c39c 100755 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -19,14 +19,4 @@ class ForgotPasswordController extends Controller */ use SendsPasswordResetEmails; - - /** - * Create a new controller instance. - * - * @return void - */ - public function __construct() - { - $this->middleware('guest'); - } } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index e4cec9c..2395ddc 100755 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -2,6 +2,7 @@ namespace App\Http\Middleware; +use App\Providers\RouteServiceProvider; use Closure; use Illuminate\Support\Facades\Auth; @@ -18,7 +19,7 @@ class RedirectIfAuthenticated public function handle($request, Closure $next, $guard = null) { if (Auth::guard($guard)->check()) { - return redirect('/home'); + return redirect(RouteServiceProvider::HOME); } return $next($request); diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 548e4be..527eee3 100755 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -16,6 +16,13 @@ class RouteServiceProvider extends ServiceProvider */ protected $namespace = 'App\Http\Controllers'; + /** + * The path to the "home" route for your application. + * + * @var string + */ + public const HOME = '/home'; + /** * Define your route model bindings, pattern filters, etc. * diff --git a/composer.json b/composer.json index 87332a4..922f3fd 100755 --- a/composer.json +++ b/composer.json @@ -8,27 +8,26 @@ ], "license": "MIT", "require": { - "php": "^7.1.3", - "andreasindal/laravel-markdown": "^3.0", - "barryvdh/laravel-dompdf": "^0.8.4", - "buglinjo/laravel-webp": "^1.0", - "doctrine/dbal": "^2.9", - "fideloper/proxy": "^4.0", - "intervention/image": "^2.4", - "laravel/framework": "5.8.*", - "laravel/tinker": "^1.0", - "laravelcollective/html": "5.8.*", - "laravelium/feed": "^3.0", - "spatie/laravel-feed": "^2.1", - "spatie/laravel-sitemap": "^5.2" + "php": "^7.2|^8.0", + "andreasindal/laravel-markdown": "^3.1", + "barryvdh/laravel-dompdf": "^1.0", + "buglinjo/laravel-webp": "^2.3", + "doctrine/dbal": "^2.13", + "fideloper/proxy": "^4.4", + "intervention/image": "^2.7", + "laravel/framework": "^6.20", + "laravel/tinker": "^2.5", + "laravelcollective/html": "^6.3", + "laravelium/feed": "^6.0", + "spatie/laravel-feed": "^2.7", + "spatie/laravel-sitemap": "^5.8" }, "require-dev": { - "beyondcode/laravel-dump-server": "^1.0", - "filp/whoops": "^2.0", - "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", "nunomaduro/collision": "^3.0", - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^8.5.8|^9.3.3", + "fakerphp/faker": "^1.9.1", + "facade/ignition": "^1.16.4" }, "config": { "optimize-autoloader": true, diff --git a/config/auth.php b/config/auth.php index a09f02d..a899920 100755 --- a/config/auth.php +++ b/config/auth.php @@ -44,6 +44,7 @@ 'api' => [ 'driver' => 'token', 'provider' => 'users', + 'hash' => false, ], 'admin' => [ @@ -79,10 +80,12 @@ 'driver' => 'eloquent', 'model' => App\User::class, ], + 'admins' => [ 'driver' => 'eloquent', 'model' => App\Admin::class, ], + // 'users' => [ // 'driver' => 'database', // 'table' => 'users', @@ -109,6 +112,7 @@ 'provider' => 'users', 'table' => 'password_resets', 'expire' => 60, + 'throttle' => 60, ], 'admins' => [ @@ -118,4 +122,17 @@ ], ], + /* + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ + + 'password_timeout' => 10800, + ]; diff --git a/config/broadcasting.php b/config/broadcasting.php index 3ca45ea..3bba110 100755 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -37,7 +37,7 @@ 'app_id' => env('PUSHER_APP_ID'), 'options' => [ 'cluster' => env('PUSHER_APP_CLUSTER'), - 'encrypted' => true, + 'useTLS' => true, ], ], diff --git a/config/database.php b/config/database.php index 921769c..b42d9b3 100755 --- a/config/database.php +++ b/config/database.php @@ -119,10 +119,10 @@ 'redis' => [ - 'client' => env('REDIS_CLIENT', 'predis'), + 'client' => env('REDIS_CLIENT', 'phpredis'), 'options' => [ - 'cluster' => env('REDIS_CLUSTER', 'predis'), + 'cluster' => env('REDIS_CLUSTER', 'redis'), 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), ], @@ -130,16 +130,16 @@ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), - 'database' => env('REDIS_DB', 0), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_DB', '0'), ], 'cache' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), - 'database' => env('REDIS_CACHE_DB', 1), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_CACHE_DB', '1'), ], ], diff --git a/config/filesystems.php b/config/filesystems.php index 77fa5de..220c010 100755 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -37,7 +37,7 @@ | may even configure multiple disks of the same driver. Defaults have | been setup for each driver as an example of the required options. | - | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" + | Supported Drivers: "local", "ftp", "sftp", "s3" | */ @@ -62,6 +62,7 @@ 'region' => env('AWS_DEFAULT_REGION'), 'bucket' => env('AWS_BUCKET'), 'url' => env('AWS_URL'), + 'endpoint' => env('AWS_ENDPOINT'), ], ], diff --git a/config/logging.php b/config/logging.php index d09cd7d..088c204 100755 --- a/config/logging.php +++ b/config/logging.php @@ -1,5 +1,6 @@ [ 'stack' => [ 'driver' => 'stack', - 'channels' => ['daily'], + 'channels' => ['single'], 'ignore_exceptions' => false, ], @@ -89,6 +90,15 @@ 'driver' => 'errorlog', 'level' => 'debug', ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], ], ]; diff --git a/config/mail.php b/config/mail.php index 6f8469f..3c65eb3 100644 --- a/config/mail.php +++ b/config/mail.php @@ -11,8 +11,8 @@ | sending of e-mail. You may specify which one you're using throughout | your application here. By default, Laravel is setup for SMTP mail. | - | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses", - | "sparkpost", "postmark", "log", "array" + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array" | */ diff --git a/config/queue.php b/config/queue.php index 07c7d2a..3a30d6c 100755 --- a/config/queue.php +++ b/config/queue.php @@ -80,6 +80,7 @@ */ 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], diff --git a/config/services.php b/config/services.php index 8ce6cc6..2a1d616 100755 --- a/config/services.php +++ b/config/services.php @@ -8,7 +8,7 @@ |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such - | as Mailgun, SparkPost and others. This file provides a sane default + | as Mailgun, Postmark, AWS and more. This file provides the de facto | location for this type of information, allowing packages to have | a conventional file to locate the various service credentials. | @@ -30,8 +30,4 @@ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], - 'sparkpost' => [ - 'secret' => env('SPARKPOST_SECRET'), - ], - ]; diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php index e5544d2..724de4b 100755 --- a/resources/lang/en/passwords.php +++ b/resources/lang/en/passwords.php @@ -13,9 +13,9 @@ | */ - 'password' => 'Passwords must be at least six characters and match the confirmation.', 'reset' => 'Your password has been reset!', 'sent' => 'We have e-mailed your password reset link!', + 'throttled' => 'Please wait before retrying.', 'token' => 'This password reset token is invalid.', 'user' => "We can't find a user with that e-mail address.", diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index e1d879f..a65914f 100755 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -40,7 +40,7 @@ 'dimensions' => 'The :attribute has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute must end with one of the following: :values', + 'ends_with' => 'The :attribute must end with one of the following: :values.', 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', @@ -93,6 +93,7 @@ 'not_in' => 'The selected :attribute is invalid.', 'not_regex' => 'The :attribute format is invalid.', 'numeric' => 'The :attribute must be a number.', + 'password' => 'The password is incorrect.', 'present' => 'The :attribute field must be present.', 'regex' => 'The :attribute format is invalid.', 'required' => 'The :attribute field is required.', @@ -109,7 +110,7 @@ 'string' => 'The :attribute must be :size characters.', 'array' => 'The :attribute must contain :size items.', ], - 'starts_with' => 'The :attribute must start with one of the following: :values', + 'starts_with' => 'The :attribute must start with one of the following: :values.', 'string' => 'The :attribute must be a string.', 'timezone' => 'The :attribute must be a valid zone.', 'unique' => 'The :attribute has already been taken.',