diff --git a/.env.example b/.env.example index 9932324f3..1b579eceb 100644 --- a/.env.example +++ b/.env.example @@ -45,14 +45,25 @@ ADMIN_EMAIL= APP_NAME=NNTmux APP_ENV=production APP_DEBUG=false +APP_TIMEZONE=UTC APP_URL= + +APP_LOCALE=en +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=en_US + +APP_MAINTENANCE_DRIVER=file +APP_MAINTENANCE_STORE=database + +BCRYPT_ROUNDS=12 APP_TZ=Europe/Paris APP_KEY= LOG_CHANNEL=stack +LOG_STACK=single PASSWORD_HASH=argon2id -BROADCAST_DRIVER=log -CACHE_DRIVER=redis +BROADCAST_CONNECTION=log +CACHE_STORE=redis QUEUE_CONNECTION=sync REDIS_HOST=127.0.0.1 @@ -173,3 +184,7 @@ PURGE_INACTIVE_USERS=false OTP_ENABLED=false FLARE_KEY= + +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null diff --git a/app/Console/Commands/CleanNZB.php b/app/Console/Commands/CleanNZB.php index 7176637e4..edd7dfe7f 100644 --- a/app/Console/Commands/CleanNZB.php +++ b/app/Console/Commands/CleanNZB.php @@ -34,7 +34,7 @@ class CleanNZB extends Command /** * Execute the console command. */ - public function handle() + public function handle(): void { // Check if any options are false if (! $this->option('notindb') && ! $this->option('notondisk')) { diff --git a/app/Console/Commands/ImportNzbs.php b/app/Console/Commands/ImportNzbs.php index 594a8ffaf..d06467672 100644 --- a/app/Console/Commands/ImportNzbs.php +++ b/app/Console/Commands/ImportNzbs.php @@ -30,7 +30,7 @@ class ImportNzbs extends Command /** * Execute the console command. */ - public function handle() + public function handle(): void { if ($this->option('folder')) { if ($this->option('filename')) { diff --git a/app/Console/Commands/RecategorizeReleases.php b/app/Console/Commands/RecategorizeReleases.php index f6907b0bd..5c6989d12 100644 --- a/app/Console/Commands/RecategorizeReleases.php +++ b/app/Console/Commands/RecategorizeReleases.php @@ -34,7 +34,7 @@ class RecategorizeReleases extends Command /** * Execute the console command. */ - public function handle() + public function handle(): void { $countQuery = Release::query(); if ($this->option('misc')) { diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index 9b2a62220..000000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,48 +0,0 @@ -command('disposable:update')->weekly(); - $schedule->command('clean:directories')->hourly()->withoutOverlapping(); - $schedule->command('nntmux:delete-unverified-users')->twiceDaily(1, 13); - $schedule->command('nntmux:update-expired-roles')->daily(); - $schedule->command('nntmux:remove-bad')->hourly()->withoutOverlapping(); - $schedule->command('telescope:prune')->daily(); - $schedule->command('horizon:snapshot')->everyFiveMinutes()->withoutOverlapping(); - $schedule->command('cloudflare:reload')->daily(); - $schedule->command('cache:prune-stale-tags')->hourly(); - if (config('nntmux.purge_inactive_users') === true) { - $schedule->job(new RemoveInactiveAccounts())->daily(); - } - } - - /** - * Register the commands for the application. - */ - protected function commands(): void - { - $this->load(__DIR__.'/Commands'); - - require base_path('routes/console.php'); - } -} diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index a0a2a8a34..e749914fa 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -7,7 +7,7 @@ use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; -class Controller extends BaseController +abstract class Controller extends BaseController { use AuthorizesRequests, DispatchesJobs, ValidatesRequests; } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php deleted file mode 100644 index 5d1f25639..000000000 --- a/app/Http/Kernel.php +++ /dev/null @@ -1,69 +0,0 @@ - [ - Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\Session\Middleware\AuthenticateSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - - 'api' => [ - 'throttle:60,1', - 'bindings', - ], - ]; - - /** - * The application's route middleware. - * - * These middleware may be assigned to groups or used individually. - * - * @var array - */ - protected $middlewareAliases = [ - 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, - 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => Middleware\RedirectIfAuthenticated::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'isVerified' => \Jrean\UserVerification\Middleware\IsVerified::class, - 'role' => \Spatie\Permission\Middleware\RoleMiddleware::class, - 'permission' => \Spatie\Permission\Middleware\PermissionMiddleware::class, - 'role_or_permission' => \Spatie\Permission\Middleware\RoleOrPermissionMiddleware::class, - 'clearance' => Middleware\ClearanceMiddleware::class, - '2fa' => Middleware\Google2FAMiddleware::class, - ]; -} diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index 9b131d0d9..000000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,19 +0,0 @@ -expectsJson()) { - return route('login'); - } - } -} diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php deleted file mode 100644 index 033136ad1..000000000 --- a/app/Http/Middleware/EncryptCookies.php +++ /dev/null @@ -1,17 +0,0 @@ -check()) { - return redirect()->to('/'); - } - - return $next($request); - } -} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php deleted file mode 100644 index 5a50e7b5c..000000000 --- a/app/Http/Middleware/TrimStrings.php +++ /dev/null @@ -1,18 +0,0 @@ -belongsTo(AnidbTitle::class, 'anidbid'); } - public function info() + public function info(): HasMany { return $this->hasMany(AnidbInfo::class, 'anidbid'); } diff --git a/app/Models/AnidbTitle.php b/app/Models/AnidbTitle.php index 94677909f..816d4b056 100644 --- a/app/Models/AnidbTitle.php +++ b/app/Models/AnidbTitle.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Model; /** @@ -52,12 +53,12 @@ class AnidbTitle extends Model */ protected $guarded = []; - public function episode() + public function episode(): HasMany { return $this->hasMany(AnidbEpisode::class, 'anidbid'); } - public function info() + public function info(): HasMany { return $this->hasMany(AnidbInfo::class, 'anidbid'); } diff --git a/app/Models/DnzbFailure.php b/app/Models/DnzbFailure.php index 3703a778b..a4a8b998e 100644 --- a/app/Models/DnzbFailure.php +++ b/app/Models/DnzbFailure.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -49,12 +50,12 @@ class DnzbFailure extends Model */ protected $guarded = []; - public function release() + public function release(): BelongsTo { return $this->belongsTo(Release::class, 'release_id'); } - public function user() + public function user(): BelongsTo { return $this->belongsTo(User::class, 'users_id'); } diff --git a/app/Models/Genre.php b/app/Models/Genre.php index 503d5a265..3ee52d7f9 100644 --- a/app/Models/Genre.php +++ b/app/Models/Genre.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Model; /** @@ -41,7 +42,7 @@ class Genre extends Model */ protected $guarded = []; - public function music() + public function music(): HasMany { return $this->hasMany(MusicInfo::class, 'genres_id'); } diff --git a/app/Models/Invitation.php b/app/Models/Invitation.php index 55f15fb5c..8e2cc7ed8 100644 --- a/app/Models/Invitation.php +++ b/app/Models/Invitation.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -47,7 +48,7 @@ class Invitation extends Model */ protected $guarded = ['id']; - public function user() + public function user(): BelongsTo { return $this->belongsTo(User::class, 'users_id'); } diff --git a/app/Models/MusicInfo.php b/app/Models/MusicInfo.php index 2258784ee..b34f9af26 100644 --- a/app/Models/MusicInfo.php +++ b/app/Models/MusicInfo.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; use Laravel\Scout\Searchable; @@ -71,7 +72,7 @@ class MusicInfo extends Model */ protected $guarded = []; - public function genre() + public function genre(): BelongsTo { return $this->belongsTo(Genre::class, 'genres_id'); } diff --git a/app/Models/Predb.php b/app/Models/Predb.php index 0b9c796d7..b18bf557a 100644 --- a/app/Models/Predb.php +++ b/app/Models/Predb.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\HasMany; use Blacklight\ColorCLI; use Blacklight\ConsoleTools; use Blacklight\ElasticSearchSiteSearch; @@ -89,12 +90,12 @@ class Predb extends Model */ protected $guarded = []; - public function hash() + public function hash(): HasMany { return $this->hasMany(PredbHash::class, 'predb_id'); } - public function release() + public function release(): HasMany { return $this->hasMany(Release::class, 'predb_id'); } diff --git a/app/Models/Release.php b/app/Models/Release.php index 6b81dd470..6acb8cff5 100644 --- a/app/Models/Release.php +++ b/app/Models/Release.php @@ -180,7 +180,7 @@ class Release extends Model return $this->hasMany(UsersRelease::class, 'releases_id'); } - public function file() + public function file(): HasMany { return $this->hasMany(ReleaseFile::class, 'releases_id'); } diff --git a/app/Models/ReleaseNfo.php b/app/Models/ReleaseNfo.php index 95ec44507..f54dec4ed 100644 --- a/app/Models/ReleaseNfo.php +++ b/app/Models/ReleaseNfo.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -39,7 +40,7 @@ class ReleaseNfo extends Model */ protected $guarded = []; - public function release() + public function release(): BelongsTo { return $this->belongsTo(Release::class, 'releases_id'); } diff --git a/app/Models/ReleasesGroups.php b/app/Models/ReleasesGroups.php index 4ece8b993..dbcf77e5e 100644 --- a/app/Models/ReleasesGroups.php +++ b/app/Models/ReleasesGroups.php @@ -20,6 +20,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -69,7 +70,7 @@ class ReleasesGroups extends Model */ protected $guarded = []; - public function release() + public function release(): BelongsTo { return $this->belongsTo(Release::class, 'releases_id'); } diff --git a/app/Models/TvEpisode.php b/app/Models/TvEpisode.php index 81878a7e5..2edad1a6c 100644 --- a/app/Models/TvEpisode.php +++ b/app/Models/TvEpisode.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; @@ -51,7 +52,7 @@ class TvEpisode extends Model */ public $timestamps = false; - public function video() + public function video(): BelongsTo { return $this->belongsTo(Video::class, 'videos_id'); } diff --git a/app/Models/UsersRelease.php b/app/Models/UsersRelease.php index 1b96e7a38..448f0f0a6 100644 --- a/app/Models/UsersRelease.php +++ b/app/Models/UsersRelease.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -39,12 +40,12 @@ class UsersRelease extends Model */ protected $guarded = ['id']; - public function user() + public function user(): BelongsTo { return $this->belongsTo(User::class, 'users_id'); } - public function release() + public function release(): BelongsTo { return $this->belongsTo(Release::class, 'releases_id'); } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php deleted file mode 100644 index eb7a524fc..000000000 --- a/app/Providers/AuthServiceProvider.php +++ /dev/null @@ -1,24 +0,0 @@ - 'App\Policies\ModelPolicy', - ]; - - /** - * Register any authentication / authorization services. - */ - public function boot(): void - { - } -} diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php deleted file mode 100644 index 2be04f5d9..000000000 --- a/app/Providers/BroadcastServiceProvider.php +++ /dev/null @@ -1,19 +0,0 @@ - [ - SendEmailVerificationNotification::class, - ], - - UserLoggedIn::class => [ - UpdateUserLoggedIn::class, - ], - - UserAccessedApi::class => [ - UpdateUserAccessedApi::class, - ], - ]; - - /** - * Register any events for your application. - */ - public function boot(): void - { - parent::boot(); - - // - } -} diff --git a/artisan b/artisan index 0cf63cb67..8e04b4224 100755 --- a/artisan +++ b/artisan @@ -1,53 +1,15 @@ #!/usr/bin/env php handleCommand(new ArgvInput); - /* - |-------------------------------------------------------------------------- - | Run The Artisan Application - |-------------------------------------------------------------------------- - | - | When we run the console application, the current CLI command will be - | executed in this console and the response sent back to a terminal - | or another output device for the developers. Here goes nothing! - | - */ - - $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); - - $status = $kernel->handle( - $input = new Symfony\Component\Console\Input\ArgvInput, - new Symfony\Component\Console\Output\ConsoleOutput - ); - - /* - |-------------------------------------------------------------------------- - | Shutdown The Application - |-------------------------------------------------------------------------- - | - | Once Artisan has finished running, we will fire off the shutdown events - | so that any final work may be done by the application before we shut - | down the process. This is the last thing to happen to the request. - | - */ - - $kernel->terminate($input, $status); - - exit($status); +exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php index 037e17df0..2219604d2 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,55 +1,51 @@ withProviders([ + \Laravel\Tinker\TinkerServiceProvider::class, + \Jrean\UserVerification\UserVerificationServiceProvider::class, + ]) + ->withRouting( + web: __DIR__.'/../routes/web.php', + api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', + channels: __DIR__.'/../routes/channels.php', + health: '/up', + ) + ->withMiddleware(function (Middleware $middleware) { + $middleware->redirectGuestsTo(fn () => route('login')); + $middleware->redirectUsersTo('/'); -/* -|-------------------------------------------------------------------------- -| Bind Important Interfaces -|-------------------------------------------------------------------------- -| -| Next, we need to bind some important interfaces into the container so -| we will be able to resolve them when needed. The kernels serve the -| incoming requests to this application from both the web and CLI. -| -*/ + $middleware->validateCsrfTokens(except: [ + 'failed', + 'admin/*', + 'btcpay/webhook', + ]); -$app->singleton( - Illuminate\Contracts\Http\Kernel::class, - App\Http\Kernel::class -); + $middleware->append([ + \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, + \Monicahq\Cloudflare\Http\Middleware\TrustProxies::class, + \App\Http\Middleware\ForceJsonOnAPI::class, + ]); -$app->singleton( - Illuminate\Contracts\Console\Kernel::class, - App\Console\Kernel::class -); + $middleware->web(\Illuminate\Session\Middleware\AuthenticateSession::class); -$app->singleton( - Illuminate\Contracts\Debug\ExceptionHandler::class, - App\Exceptions\Handler::class -); + $middleware->throttleApi('60,1'); -/* -|-------------------------------------------------------------------------- -| Return The Application -|-------------------------------------------------------------------------- -| -| This script returns the application instance. The instance is given to -| the calling script so we can separate the building of the instances -| from the actual running of the application and sending responses. -| -*/ - -return $app; + $middleware->alias([ + '2fa' => \App\Http\Middleware\Google2FAMiddleware::class, + 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, + 'clearance' => \App\Http\Middleware\ClearanceMiddleware::class, + 'isVerified' => \Jrean\UserVerification\Middleware\IsVerified::class, + 'permission' => \Spatie\Permission\Middleware\PermissionMiddleware::class, + 'role' => \Spatie\Permission\Middleware\RoleMiddleware::class, + 'role_or_permission' => \Spatie\Permission\Middleware\RoleOrPermissionMiddleware::class, + ]); + }) + ->withExceptions(function (Exceptions $exceptions) { + // + })->create(); diff --git a/bootstrap/providers.php b/bootstrap/providers.php new file mode 100644 index 000000000..ffc860cbb --- /dev/null +++ b/bootstrap/providers.php @@ -0,0 +1,9 @@ + env('APP_NAME', 'NNTmux'), - - /* - |-------------------------------------------------------------------------- - | Application Environment - |-------------------------------------------------------------------------- - | - | This value determines the "environment" your application is currently - | running in. This may determine how you prefer to configure various - | services your application utilizes. Set this in your ".env" file. - | - */ - - 'env' => env('APP_ENV', 'production'), - - /* - |-------------------------------------------------------------------------- - | Application Debug Mode - |-------------------------------------------------------------------------- - | - | When your application is in debug mode, detailed error messages with - | stack traces will be shown on every error that occurs within your - | application. If disabled, a simple generic error page is shown. - | - */ - - 'debug' => env('APP_DEBUG', false), - - /* - |-------------------------------------------------------------------------- - | Application URL - |-------------------------------------------------------------------------- - | - | This URL is used by the console to properly generate URLs when using - | the Artisan command line tool. You should set this to the root of - | your application so that it is used when running Artisan tasks. - | - */ - - 'url' => env('APP_URL', 'http://localhost'), - - 'asset_url' => env('ASSET_URL', null), - - /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. - | - */ - - 'timezone' => env('APP_TZ', 'UTC'), - - /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | - */ - - 'locale' => 'en', - - /* - |-------------------------------------------------------------------------- - | Application Fallback Locale - |-------------------------------------------------------------------------- - | - | The fallback locale determines the locale to use when the current one - | is not available. You may change the value to correspond to any of - | the language folders that are provided through your application. - | - */ - - 'fallback_locale' => 'en', - - /* - |-------------------------------------------------------------------------- - | Encryption Key - |-------------------------------------------------------------------------- - | - | This key is used by the Illuminate encrypter service and should be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! - | - */ - - 'key' => env('APP_KEY'), - - 'cipher' => 'AES-256-CBC', - - /* - |-------------------------------------------------------------------------- - | Autoloaded Service Providers - |-------------------------------------------------------------------------- - | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. - | - */ - - 'providers' => [ - - /* - * Laravel Framework Service Providers... - */ - Illuminate\Auth\AuthServiceProvider::class, - Illuminate\Broadcasting\BroadcastServiceProvider::class, - Illuminate\Bus\BusServiceProvider::class, - Illuminate\Cache\CacheServiceProvider::class, - Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, - Illuminate\Cookie\CookieServiceProvider::class, - Illuminate\Database\DatabaseServiceProvider::class, - Illuminate\Encryption\EncryptionServiceProvider::class, - Illuminate\Filesystem\FilesystemServiceProvider::class, - Illuminate\Foundation\Providers\FoundationServiceProvider::class, - Illuminate\Hashing\HashServiceProvider::class, - Illuminate\Mail\MailServiceProvider::class, - Illuminate\Notifications\NotificationServiceProvider::class, - Illuminate\Pagination\PaginationServiceProvider::class, - Illuminate\Pipeline\PipelineServiceProvider::class, - Illuminate\Queue\QueueServiceProvider::class, - Illuminate\Redis\RedisServiceProvider::class, - Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, - Illuminate\Session\SessionServiceProvider::class, - Illuminate\Translation\TranslationServiceProvider::class, - Illuminate\Validation\ValidationServiceProvider::class, - Illuminate\View\ViewServiceProvider::class, - - /* - * Package Service Providers... - */ - Laravel\Tinker\TinkerServiceProvider::class, - - /* - * Application Service Providers... - */ - App\Providers\AppServiceProvider::class, - App\Providers\AuthServiceProvider::class, - // App\Providers\BroadcastServiceProvider::class, - App\Providers\EventServiceProvider::class, - App\Providers\HorizonServiceProvider::class, - App\Providers\TelescopeServiceProvider::class, - Jrean\UserVerification\UserVerificationServiceProvider::class, - App\Providers\RouteServiceProvider::class, - App\Providers\UserServiceProvider::class, - - ], - - /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. - | - */ - - 'aliases' => [ - - 'App' => Illuminate\Support\Facades\App::class, - 'Arr' => Illuminate\Support\Arr::class, - 'Artisan' => Illuminate\Support\Facades\Artisan::class, - 'Auth' => Illuminate\Support\Facades\Auth::class, - 'Blade' => Illuminate\Support\Facades\Blade::class, - 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, - 'Bus' => Illuminate\Support\Facades\Bus::class, - 'Cache' => Illuminate\Support\Facades\Cache::class, - 'Config' => Illuminate\Support\Facades\Config::class, - 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Crypt' => Illuminate\Support\Facades\Crypt::class, - 'DB' => Illuminate\Support\Facades\DB::class, - 'Eloquent' => Illuminate\Database\Eloquent\Model::class, - 'Event' => Illuminate\Support\Facades\Event::class, - 'File' => Illuminate\Support\Facades\File::class, - 'Gate' => Illuminate\Support\Facades\Gate::class, - 'Hash' => Illuminate\Support\Facades\Hash::class, - 'Http' => Illuminate\Support\Facades\Http::class, - 'Js' => Illuminate\Support\Js::class, - 'Lang' => Illuminate\Support\Facades\Lang::class, - 'Log' => Illuminate\Support\Facades\Log::class, - 'Mail' => Illuminate\Support\Facades\Mail::class, - 'Notification' => Illuminate\Support\Facades\Notification::class, - 'Password' => Illuminate\Support\Facades\Password::class, - 'Queue' => Illuminate\Support\Facades\Queue::class, - 'Redirect' => Illuminate\Support\Facades\Redirect::class, + 'aliases' => Facade::defaultAliases()->merge([ 'RedisManager' => Illuminate\Support\Facades\Redis::class, - 'Request' => Illuminate\Support\Facades\Request::class, - 'Response' => Illuminate\Support\Facades\Response::class, - 'Route' => Illuminate\Support\Facades\Route::class, - 'Schema' => Illuminate\Support\Facades\Schema::class, - 'Session' => Illuminate\Support\Facades\Session::class, - 'Storage' => Illuminate\Support\Facades\Storage::class, - 'Str' => Illuminate\Support\Str::class, - 'URL' => Illuminate\Support\Facades\URL::class, - 'Validator' => Illuminate\Support\Facades\Validator::class, - 'View' => Illuminate\Support\Facades\View::class, 'UserVerification' => Jrean\UserVerification\Facades\UserVerification::class, - ], + ])->toArray(), ]; diff --git a/config/auth.php b/config/auth.php index 706ea97c8..5b47cf5aa 100644 --- a/config/auth.php +++ b/config/auth.php @@ -2,106 +2,17 @@ return [ - /* - |-------------------------------------------------------------------------- - | Authentication Defaults - |-------------------------------------------------------------------------- - | - | This option controls the default authentication "guard" and password - | reset options for your application. You may change these defaults - | as required, but they're a perfect start for most applications. - | - */ - - 'defaults' => [ - 'guard' => 'web', - 'passwords' => 'users', - ], - - /* - |-------------------------------------------------------------------------- - | Authentication Guards - |-------------------------------------------------------------------------- - | - | Next, you may define every authentication guard for your application. - | Of course, a great default configuration has been defined for you - | here which uses session storage and the Eloquent user provider. - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | Supported: "session", "token" - | - */ - 'guards' => [ - 'web' => [ - 'driver' => 'session', - 'provider' => 'users', - ], - 'api' => [ 'driver' => 'token', 'provider' => 'users', 'hash' => false, ], + 'rss' => [ 'driver' => 'token', 'provider' => 'users', ], ], - /* - |-------------------------------------------------------------------------- - | User Providers - |-------------------------------------------------------------------------- - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | If you have multiple user tables or models you may configure multiple - | sources which represent each model / table. These sources may then - | be assigned to any extra authentication guards you have defined. - | - | Supported: "database", "eloquent" - | - */ - - 'providers' => [ - 'users' => [ - 'driver' => 'eloquent', - 'model' => App\Models\User::class, - ], - - // 'users' => [ - // 'driver' => 'database', - // 'table' => 'users', - // ], - ], - - /* - |-------------------------------------------------------------------------- - | Resetting Passwords - |-------------------------------------------------------------------------- - | - | You may specify multiple password reset configurations if you have more - | than one user table or model in the application and you want to have - | separate password reset settings based on the specific user types. - | - | The expire time is the number of minutes that the reset token should be - | considered valid. This security feature keeps tokens short-lived so - | they have less time to be guessed. You may change this as needed. - | - */ - - 'passwords' => [ - 'users' => [ - 'provider' => 'users', - 'table' => 'password_resets', - 'expire' => 60, - ], - ], - ]; diff --git a/config/broadcasting.php b/config/broadcasting.php deleted file mode 100644 index 5eecd2b26..000000000 --- a/config/broadcasting.php +++ /dev/null @@ -1,58 +0,0 @@ - env('BROADCAST_DRIVER', 'null'), - - /* - |-------------------------------------------------------------------------- - | Broadcast Connections - |-------------------------------------------------------------------------- - | - | Here you may define all of the broadcast connections that will be used - | to broadcast events to other systems or over websockets. Samples of - | each available type of connection are provided inside this array. - | - */ - - 'connections' => [ - - 'pusher' => [ - 'driver' => 'pusher', - 'key' => env('PUSHER_APP_KEY'), - 'secret' => env('PUSHER_APP_SECRET'), - 'app_id' => env('PUSHER_APP_ID'), - 'options' => [ - // - ], - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - ], - - 'log' => [ - 'driver' => 'log', - ], - - 'null' => [ - 'driver' => 'null', - ], - - ], - -]; diff --git a/config/cache.php b/config/cache.php deleted file mode 100644 index 0a3b4136a..000000000 --- a/config/cache.php +++ /dev/null @@ -1,87 +0,0 @@ - env('CACHE_DRIVER', 'file'), - /* - |-------------------------------------------------------------------------- - | Cache Stores - |-------------------------------------------------------------------------- - | - | Here you may define all of the cache "stores" for your application as - | well as their drivers. You may even define multiple stores for the - | same cache driver to group types of items stored in your caches. - | - */ - 'stores' => [ - 'apc' => [ - 'driver' => 'apc', - ], - 'array' => [ - 'driver' => 'array', - ], - 'database' => [ - 'driver' => 'database', - 'table' => 'cache', - 'connection' => null, - ], - 'file' => [ - 'driver' => 'file', - 'path' => storage_path('framework/cache/data'), - ], - 'memcached' => [ - 'driver' => 'memcached', - 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), - 'sasl' => [ - env('MEMCACHED_USERNAME'), - env('MEMCACHED_PASSWORD'), - ], - 'options' => [ - // Memcached::OPT_CONNECT_TIMEOUT => 2000, - ], - 'servers' => [ - [ - 'host' => env('MEMCACHED_HOST', '127.0.0.1'), - 'port' => env('MEMCACHED_PORT', 11211), - 'weight' => 100, - ], - ], - ], - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'cache', - ], - 'dynamodb' => [ - 'driver' => 'dynamodb', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_REGION', 'us-east-1'), - 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), - ], - ], - /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. - | - */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), -]; diff --git a/config/database.php b/config/database.php index afe35a1aa..bc7be74fa 100644 --- a/config/database.php +++ b/config/database.php @@ -4,47 +4,10 @@ use Illuminate\Support\Str; return [ - /* - |-------------------------------------------------------------------------- - | Default Database Connection Name - |-------------------------------------------------------------------------- - | - | Here you may specify which of the database connections below you wish - | to use as your default connection for all database work. Of course - | you may use many connections at once using the Database library. - | - */ - - 'default' => env('DB_CONNECTION', 'mysql'), - - /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to make development simple. - | - | - | All database work in Laravel is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. - | - */ - 'connections' => [ - - 'sqlite' => [ - 'driver' => 'sqlite', - 'url' => env('DATABASE_URL'), - 'database' => env('DB_DATABASE', database_path('database.sqlite')), - 'prefix' => '', - ], - 'mysql' => [ 'driver' => 'mysql', - 'url' => env('DATABASE_URL'), + 'url' => env('DB_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'nntmux'), @@ -63,7 +26,7 @@ return [ 'pgsql' => [ 'driver' => 'pgsql', - 'url' => env('DATABASE_URL'), + 'url' => env('DB_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'nntmux'), @@ -75,18 +38,6 @@ return [ 'sslmode' => 'prefer', ], - 'sqlsrv' => [ - 'driver' => 'sqlsrv', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', 'localhost'), - 'port' => env('DB_PORT', '1433'), - 'database' => env('DB_DATABASE', 'nntmux'), - 'username' => env('DB_USERNAME', 'nntmux'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - ], - 'sphinx' => [ 'driver' => 'mysql', 'host' => env('MANTICORESEARCH_HOST', '127.0.0.1'), @@ -95,32 +46,12 @@ return [ 'unix_socket' => '', 'charset' => 'utf8', ], - ], - /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk haven't actually been run in the database. - | - */ - - 'migrations' => 'migrations', - - /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer set of commands than a typical key-value systems - | such as APC or Memcached. Laravel makes it easy to dig right in. - | - */ + 'migrations' => [ + 'table' => 'migrations', + 'update_date_on_publish' => false, // disable to preserve original behavior for existing applications + ], 'redis' => [ 'client' => env('REDIS_CLIENT', 'phpredis'), diff --git a/config/filesystems.php b/config/filesystems.php index 4544f60c4..bf2c99cd4 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -2,67 +2,6 @@ return [ - /* - |-------------------------------------------------------------------------- - | Default Filesystem Disk - |-------------------------------------------------------------------------- - | - | Here you may specify the default filesystem disk that should be used - | by the framework. The "local" disk, as well as a variety of cloud - | based disks are available to your application. Just store away! - | - */ - - 'default' => env('FILESYSTEM_DRIVER', 'local'), - - /* - |-------------------------------------------------------------------------- - | Default Cloud Filesystem Disk - |-------------------------------------------------------------------------- - | - | Many applications store files both locally and in the cloud. For this - | reason, you may specify a default "cloud" driver here. This driver - | will be bound as the Cloud disk implementation in the container. - | - */ - 'cloud' => env('FILESYSTEM_CLOUD', 's3'), - /* - |-------------------------------------------------------------------------- - | Filesystem Disks - |-------------------------------------------------------------------------- - | - | Here you may configure as many filesystem "disks" as you wish, and you - | 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", "s3", "rackspace" - | - */ - - 'disks' => [ - - 'local' => [ - 'driver' => 'local', - 'root' => storage_path('app'), - ], - - 'public' => [ - 'driver' => 'local', - 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', - 'visibility' => 'public', - ], - - 's3' => [ - 'driver' => 's3', - 'key' => env('AWS_KEY'), - 'secret' => env('AWS_SECRET'), - 'region' => env('AWS_REGION'), - 'bucket' => env('AWS_BUCKET'), - ], - - ], - ]; diff --git a/config/hashing.php b/config/hashing.php deleted file mode 100644 index 3ed4c3a17..000000000 --- a/config/hashing.php +++ /dev/null @@ -1,45 +0,0 @@ - env('PASSWORD_HASH', 'argon'), - /* - |-------------------------------------------------------------------------- - | Bcrypt Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Bcrypt algorithm. This will allow you - | to control the amount of time it takes to hash the given password. - | - */ - 'bcrypt' => [ - 'rounds' => env('BCRYPT_ROUNDS', 10), - ], - /* - |-------------------------------------------------------------------------- - | Argon Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Argon algorithm. These will allow you - | to control the amount of time it takes to hash the given password. - | - */ - 'argon' => [ - 'memory' => 1024, - 'threads' => 2, - 'time' => 2, - ], -]; diff --git a/config/logging.php b/config/logging.php index 865d7310a..452c5a01d 100644 --- a/config/logging.php +++ b/config/logging.php @@ -4,32 +4,6 @@ use Monolog\Handler\StreamHandler; use Monolog\Handler\SyslogUdpHandler; return [ - /* - |-------------------------------------------------------------------------- - | Default Log Channel - |-------------------------------------------------------------------------- - | - | This option defines the default log channel that gets used when writing - | messages to the logs. The name specified in this option should match - | one of the channels defined in the "channels" configuration array. - | - */ - 'default' => env('LOG_CHANNEL', 'stack'), - - /* - |-------------------------------------------------------------------------- - | Log Channels - |-------------------------------------------------------------------------- - | - | Here you may configure the log channels for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Drivers: "single", "daily", "slack", "syslog", - | "errorlog", "monolog", - | "custom", "stack" - | - */ 'channels' => [ 'stack' => [ @@ -38,6 +12,7 @@ return [ 'channels' => ['daily', 'flare'], 'ignore_exceptions' => false, ], + 'single' => [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), @@ -46,6 +21,7 @@ return [ 'permission' => 0775, 'locking' => false, ], + 'daily' => [ 'driver' => 'daily', 'path' => storage_path('logs/laravel.log'), @@ -55,40 +31,10 @@ return [ 'permission' => 0775, 'locking' => false, ], - 'slack' => [ - 'driver' => 'slack', - 'url' => env('LOG_SLACK_WEBHOOK_URL'), - 'username' => 'Laravel Log', - 'emoji' => ':boom:', - 'level' => 'critical', - ], - 'papertrail' => [ - 'driver' => 'monolog', - 'level' => 'debug', - 'handler' => SyslogUdpHandler::class, - 'handler_with' => [ - 'host' => env('PAPERTRAIL_URL'), - 'port' => env('PAPERTRAIL_PORT'), - ], - ], - 'stderr' => [ - 'driver' => 'monolog', - 'handler' => StreamHandler::class, - 'formatter' => env('LOG_STDERR_FORMATTER'), - 'with' => [ - 'stream' => 'php://stderr', - ], - ], - 'syslog' => [ - 'driver' => 'syslog', - 'level' => 'debug', - ], - 'errorlog' => [ - 'driver' => 'errorlog', - 'level' => 'debug', - ], + 'flare' => [ 'driver' => 'flare', ], ], + ]; diff --git a/config/mail.php b/config/mail.php index 608b00ac5..2b0c90385 100644 --- a/config/mail.php +++ b/config/mail.php @@ -2,122 +2,18 @@ return [ - /* - |-------------------------------------------------------------------------- - | Mail Driver - |-------------------------------------------------------------------------- - | - | Laravel supports both SMTP and PHP's "mail" function as drivers for the - | 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" - | - */ - 'driver' => env('MAIL_DRIVER', 'smtp'), - /* - |-------------------------------------------------------------------------- - | SMTP Host Address - |-------------------------------------------------------------------------- - | - | Here you may provide the host address of the SMTP server used by your - | applications. A default option is provided that is compatible with - | the Mailgun mail service which will provide reliable deliveries. - | - */ - 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), - /* - |-------------------------------------------------------------------------- - | SMTP Host Port - |-------------------------------------------------------------------------- - | - | This is the SMTP port used by your application to deliver e-mails to - | users of the application. Like the host we have set this value to - | stay compatible with the Mailgun e-mail application by default. - | - */ - 'port' => env('MAIL_PORT', 587), - /* - |-------------------------------------------------------------------------- - | Global "From" Address - |-------------------------------------------------------------------------- - | - | You may wish for all e-mails sent by your application to be sent from - | the same address. Here, you may specify a name and address that is - | used globally for all e-mails that are sent by your application. - | - */ - - 'from' => [ - 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), - 'name' => env('MAIL_FROM_NAME', 'Example'), - ], - - /* - |-------------------------------------------------------------------------- - | E-Mail Encryption Protocol - |-------------------------------------------------------------------------- - | - | Here you may specify the encryption protocol that should be used when - | the application send e-mail messages. A sensible default using the - | transport layer security protocol should provide great security. - | - */ - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - /* - |-------------------------------------------------------------------------- - | SMTP Server Username - |-------------------------------------------------------------------------- - | - | If your SMTP server requires a username for authentication, you should - | set it here. This will get used to authenticate with your server on - | connection. You may also set the "password" value below this one. - | - */ - 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), - /* - |-------------------------------------------------------------------------- - | Sendmail System Path - |-------------------------------------------------------------------------- - | - | When using the "sendmail" driver to send e-mails, we will need to know - | the path to where Sendmail lives on this server. A default path has - | been provided here, which will work well on most of your systems. - | - */ - 'sendmail' => '/usr/sbin/sendmail -bs', - /* - |-------------------------------------------------------------------------- - | Markdown Mail Settings - |-------------------------------------------------------------------------- - | - | If you are using Markdown based email rendering, you may configure your - | theme and component paths here, allowing you to customize the design - | of the emails. Or, you may simply stick with the Laravel defaults! - | - */ - - 'markdown' => [ - 'theme' => 'default', - - 'paths' => [ - resource_path('views/vendor/mail'), - ], - ], - ]; diff --git a/config/queue.php b/config/queue.php deleted file mode 100644 index ff9b45bfa..000000000 --- a/config/queue.php +++ /dev/null @@ -1,79 +0,0 @@ - env('QUEUE_CONNECTION', 'sync'), - - /* - |-------------------------------------------------------------------------- - | Queue Connections - |-------------------------------------------------------------------------- - | - | Here you may configure the connection information for each server that - | is used by your application. A default configuration has been added - | for each back-end shipped with Laravel. You are free to add more. - | - */ - - 'connections' => [ - 'sync' => [ - 'driver' => 'sync', - ], - 'database' => [ - 'driver' => 'database', - 'table' => 'jobs', - 'queue' => 'default', - 'retry_after' => 90, - ], - 'beanstalkd' => [ - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'retry_after' => 90, - 'block_for' => 0, - ], - 'sqs' => [ - 'driver' => 'sqs', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), - 'queue' => env('SQS_QUEUE', 'your-queue-name'), - 'region' => env('AWS_REGION', 'us-east-1'), - ], - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - 'queue' => env('REDIS_QUEUE', 'default'), - 'retry_after' => 90, - 'block_for' => null, - ], - ], - /* - |-------------------------------------------------------------------------- - | Failed Queue Jobs - |-------------------------------------------------------------------------- - | - | These options configure the behavior of failed queue job logging so you - | can control which database and table are used to store the jobs that - | have failed. You may change them to any database / table you wish. - | - */ - 'failed' => [ - 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'failed_jobs', - ], - -]; diff --git a/config/services.php b/config/services.php index e470f6598..cf345c69c 100644 --- a/config/services.php +++ b/config/services.php @@ -2,34 +2,12 @@ return [ - /* - |-------------------------------------------------------------------------- - | Third Party Services - |-------------------------------------------------------------------------- - | - | This file is for storing the credentials for third party services such - | as Stripe, Mailgun, SparkPost and others. This file provides a sane - | default location for this type of information, allowing packages - | to have a conventional place to find your various credentials. - | - */ - 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), ], - 'postmark' => [ - 'token' => env('POSTMARK_TOKEN'), - ], - - 'ses' => [ - 'key' => env('SES_KEY'), - 'secret' => env('SES_SECRET'), - 'region' => env('SES_REGION', 'us-east-1'), - ], - 'sparkpost' => [ 'secret' => env('SPARKPOST_SECRET'), ], diff --git a/config/session.php b/config/session.php deleted file mode 100644 index f5f481c7a..000000000 --- a/config/session.php +++ /dev/null @@ -1,196 +0,0 @@ - env('SESSION_DRIVER', 'cookie'), - - /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle before it expires. If you want them - | to immediately expire on the browser closing, set that option. - | - */ - - 'lifetime' => 120, - - 'expire_on_close' => false, - - /* - |-------------------------------------------------------------------------- - | Session Encryption - |-------------------------------------------------------------------------- - | - | This option allows you to easily specify that all of your session data - | should be encrypted before it is stored. All encryption will be run - | automatically by Laravel and you can use the Session like normal. - | - */ - - 'encrypt' => env('SESSION_ENCRYPT', false), - - /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When using the native session driver, we need a location where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | - */ - - 'files' => storage_path('framework/sessions'), - - /* - |-------------------------------------------------------------------------- - | Session Database Connection - |-------------------------------------------------------------------------- - | - | When using the "database" or "redis" session drivers, you may specify a - | connection that should be used to manage these sessions. This should - | correspond to a connection in your database configuration options. - | - */ - - 'connection' => 'session', - - /* - |-------------------------------------------------------------------------- - | Session Database Table - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the table we - | should use to manage the sessions. Of course, a sensible default is - | provided for you; however, you are free to change this as needed. - | - */ - - 'table' => 'sessions', - - /* - |-------------------------------------------------------------------------- - | Session Cache Store - |-------------------------------------------------------------------------- - | - | When using the "apc", "memcached", or "dynamodb" session drivers you may - | list a cache store that should be used for these sessions. This value - | must match with one of the application's configured cache "stores". - | - */ - 'store' => env('SESSION_STORE', null), - - /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | - */ - - 'lottery' => [2, 100], - - /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | - */ - 'cookie' => env( - 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_').'_session' - ), - - /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | - */ - - 'path' => '/', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | - */ - - 'domain' => env('SESSION_DOMAIN', null), - - /* - |-------------------------------------------------------------------------- - | HTTPS Only Cookies - |-------------------------------------------------------------------------- - | - | By setting this option to true, session cookies will only be sent back - | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you if it can not be done securely. - | - */ - - 'secure' => env('SESSION_SECURE_COOKIE', false), - - /* - |-------------------------------------------------------------------------- - | HTTP Access Only - |-------------------------------------------------------------------------- - | - | Setting this value to true will prevent JavaScript from accessing the - | value of the cookie and the cookie will only be accessible through - | the HTTP protocol. You are free to modify this option if needed. - | - */ - - 'http_only' => false, - - /* - |-------------------------------------------------------------------------- - | Same-Site Cookies - |-------------------------------------------------------------------------- - | - | This option determines how your cookies behave when cross-site requests - | take place, and can be used to mitigate CSRF attacks. By default, we - | do not enable this as other CSRF protection services are in place. - | - | Supported: "lax", "strict", "none" - | - */ - 'same_site' => null, - -]; diff --git a/config/view.php b/config/view.php deleted file mode 100644 index 22b8a18d3..000000000 --- a/config/view.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - resource_path('views'), - ], - - /* - |-------------------------------------------------------------------------- - | Compiled View Path - |-------------------------------------------------------------------------- - | - | This option determines where all the compiled Blade templates will be - | stored for your application. Typically, this is within the storage - | directory. However, as usual, you are free to change this value. - | - */ - - 'compiled' => env( - 'VIEW_COMPILED_PATH', - realpath(storage_path('framework/views')) - ), - -]; diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 8dd3fcdf0..ad3d27a33 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -20,8 +20,8 @@ $factory->define(App\User::class, function (Faker\Generator $faker) { static $password; return [ - 'name' => $faker->name, - 'email' => $faker->unique()->safeEmail, + 'name' => $faker->name(), + 'email' => $faker->unique()->safeEmail(), 'password' => $password ?: $password = bcrypt('secret'), 'remember_token' => Str::random(10), ]; diff --git a/database/factories/ReleaseFactory.php b/database/factories/ReleaseFactory.php index 833e8bc84..6e0edf8bd 100644 --- a/database/factories/ReleaseFactory.php +++ b/database/factories/ReleaseFactory.php @@ -7,20 +7,13 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ReleaseFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = Release::class; - /** * Define the model's default state. */ public function definition(): array { return [ - 'name' => $this->faker->name, + 'name' => $this->faker->name(), 'searchname' => $this->faker->unique()->name(), 'fromname' => $this->faker->unique()->safeEmail(), 'postdate' => $this->faker->date(), diff --git a/resources/lang/en/auth.php b/lang/en/auth.php similarity index 100% rename from resources/lang/en/auth.php rename to lang/en/auth.php diff --git a/resources/lang/en/pagination.php b/lang/en/pagination.php similarity index 100% rename from resources/lang/en/pagination.php rename to lang/en/pagination.php diff --git a/resources/lang/en/passwords.php b/lang/en/passwords.php similarity index 100% rename from resources/lang/en/passwords.php rename to lang/en/passwords.php diff --git a/lang/en/validation.php b/lang/en/validation.php new file mode 100644 index 000000000..aea190d40 --- /dev/null +++ b/lang/en/validation.php @@ -0,0 +1,192 @@ + 'The :attribute field must be accepted.', + 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', + 'active_url' => 'The :attribute field must be a valid URL.', + 'after' => 'The :attribute field must be a date after :date.', + 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', + 'alpha' => 'The :attribute field must only contain letters.', + 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', + 'alpha_num' => 'The :attribute field must only contain letters and numbers.', + 'array' => 'The :attribute field must be an array.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute field must be a date before :date.', + 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute field must have between :min and :max items.', + 'file' => 'The :attribute field must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute field must be between :min and :max.', + 'string' => 'The :attribute field must be between :min and :max characters.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'can' => 'The :attribute field contains an unauthorized value.', + 'confirmed' => 'The :attribute field confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute field must be a valid date.', + 'date_equals' => 'The :attribute field must be a date equal to :date.', + 'date_format' => 'The :attribute field must match the format :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', + 'declined' => 'The :attribute field must be declined.', + 'declined_if' => 'The :attribute field must be declined when :other is :value.', + 'different' => 'The :attribute field and :other must be different.', + 'digits' => 'The :attribute field must be :digits digits.', + 'digits_between' => 'The :attribute field must be between :min and :max digits.', + 'dimensions' => 'The :attribute field has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', + 'email' => 'The :attribute field must be a valid email address.', + 'ends_with' => 'The :attribute field must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'extensions' => 'The :attribute field must have one of the following extensions: :values.', + 'file' => 'The :attribute field must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'array' => 'The :attribute field must have more than :value items.', + 'file' => 'The :attribute field must be greater than :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than :value.', + 'string' => 'The :attribute field must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute field must have :value items or more.', + 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than or equal to :value.', + 'string' => 'The :attribute field must be greater than or equal to :value characters.', + ], + 'hex_color' => 'The :attribute field must be a valid hexadecimal color.', + 'image' => 'The :attribute field must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field must exist in :other.', + 'integer' => 'The :attribute field must be an integer.', + 'ip' => 'The :attribute field must be a valid IP address.', + 'ipv4' => 'The :attribute field must be a valid IPv4 address.', + 'ipv6' => 'The :attribute field must be a valid IPv6 address.', + 'json' => 'The :attribute field must be a valid JSON string.', + 'list' => 'The :attribute field must be a list.', + 'lowercase' => 'The :attribute field must be lowercase.', + 'lt' => [ + 'array' => 'The :attribute field must have less than :value items.', + 'file' => 'The :attribute field must be less than :value kilobytes.', + 'numeric' => 'The :attribute field must be less than :value.', + 'string' => 'The :attribute field must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute field must not have more than :value items.', + 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be less than or equal to :value.', + 'string' => 'The :attribute field must be less than or equal to :value characters.', + ], + 'mac_address' => 'The :attribute field must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute field must not have more than :max items.', + 'file' => 'The :attribute field must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute field must not be greater than :max.', + 'string' => 'The :attribute field must not be greater than :max characters.', + ], + 'max_digits' => 'The :attribute field must not have more than :max digits.', + 'mimes' => 'The :attribute field must be a file of type: :values.', + 'mimetypes' => 'The :attribute field must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute field must have at least :min items.', + 'file' => 'The :attribute field must be at least :min kilobytes.', + 'numeric' => 'The :attribute field must be at least :min.', + 'string' => 'The :attribute field must be at least :min characters.', + ], + 'min_digits' => 'The :attribute field must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute field must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute field format is invalid.', + 'numeric' => 'The :attribute field must be a number.', + 'password' => [ + 'letters' => 'The :attribute field must contain at least one letter.', + 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute field must contain at least one number.', + 'symbols' => 'The :attribute field must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], + 'present' => 'The :attribute field must be present.', + 'present_if' => 'The :attribute field must be present when :other is :value.', + 'present_unless' => 'The :attribute field must be present unless :other is :value.', + 'present_with' => 'The :attribute field must be present when :values is present.', + 'present_with_all' => 'The :attribute field must be present when :values are present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute field format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute field must match :other.', + 'size' => [ + 'array' => 'The :attribute field must contain :size items.', + 'file' => 'The :attribute field must be :size kilobytes.', + 'numeric' => 'The :attribute field must be :size.', + 'string' => 'The :attribute field must be :size characters.', + ], + 'starts_with' => 'The :attribute field must start with one of the following: :values.', + 'string' => 'The :attribute field must be a string.', + 'timezone' => 'The :attribute field must be a valid timezone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'uppercase' => 'The :attribute field must be uppercase.', + 'url' => 'The :attribute field must be a valid URL.', + 'ulid' => 'The :attribute field must be a valid ULID.', + 'uuid' => 'The :attribute field must be a valid UUID.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. + | + */ + + 'attributes' => [], + +]; diff --git a/lang/vendor/forum/.gitkeep b/lang/vendor/forum/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/resources/lang/vendor/forum/de/categories.php b/lang/vendor/forum/de/categories.php similarity index 100% rename from resources/lang/vendor/forum/de/categories.php rename to lang/vendor/forum/de/categories.php diff --git a/resources/lang/vendor/forum/de/general.php b/lang/vendor/forum/de/general.php similarity index 100% rename from resources/lang/vendor/forum/de/general.php rename to lang/vendor/forum/de/general.php diff --git a/resources/lang/vendor/forum/de/posts.php b/lang/vendor/forum/de/posts.php similarity index 100% rename from resources/lang/vendor/forum/de/posts.php rename to lang/vendor/forum/de/posts.php diff --git a/resources/lang/vendor/forum/de/threads.php b/lang/vendor/forum/de/threads.php similarity index 100% rename from resources/lang/vendor/forum/de/threads.php rename to lang/vendor/forum/de/threads.php diff --git a/resources/lang/vendor/forum/de/validation.php b/lang/vendor/forum/de/validation.php similarity index 100% rename from resources/lang/vendor/forum/de/validation.php rename to lang/vendor/forum/de/validation.php diff --git a/resources/lang/vendor/forum/en/categories.php b/lang/vendor/forum/en/categories.php similarity index 100% rename from resources/lang/vendor/forum/en/categories.php rename to lang/vendor/forum/en/categories.php diff --git a/resources/lang/vendor/forum/en/general.php b/lang/vendor/forum/en/general.php similarity index 100% rename from resources/lang/vendor/forum/en/general.php rename to lang/vendor/forum/en/general.php diff --git a/resources/lang/vendor/forum/en/posts.php b/lang/vendor/forum/en/posts.php similarity index 100% rename from resources/lang/vendor/forum/en/posts.php rename to lang/vendor/forum/en/posts.php diff --git a/resources/lang/vendor/forum/en/threads.php b/lang/vendor/forum/en/threads.php similarity index 100% rename from resources/lang/vendor/forum/en/threads.php rename to lang/vendor/forum/en/threads.php diff --git a/resources/lang/vendor/forum/en/validation.php b/lang/vendor/forum/en/validation.php similarity index 100% rename from resources/lang/vendor/forum/en/validation.php rename to lang/vendor/forum/en/validation.php diff --git a/resources/lang/vendor/forum/es/categories.php b/lang/vendor/forum/es/categories.php similarity index 100% rename from resources/lang/vendor/forum/es/categories.php rename to lang/vendor/forum/es/categories.php diff --git a/resources/lang/vendor/forum/es/general.php b/lang/vendor/forum/es/general.php similarity index 100% rename from resources/lang/vendor/forum/es/general.php rename to lang/vendor/forum/es/general.php diff --git a/resources/lang/vendor/forum/es/posts.php b/lang/vendor/forum/es/posts.php similarity index 100% rename from resources/lang/vendor/forum/es/posts.php rename to lang/vendor/forum/es/posts.php diff --git a/resources/lang/vendor/forum/es/threads.php b/lang/vendor/forum/es/threads.php similarity index 100% rename from resources/lang/vendor/forum/es/threads.php rename to lang/vendor/forum/es/threads.php diff --git a/resources/lang/vendor/forum/es/validation.php b/lang/vendor/forum/es/validation.php similarity index 100% rename from resources/lang/vendor/forum/es/validation.php rename to lang/vendor/forum/es/validation.php diff --git a/resources/lang/vendor/forum/fr/categories.php b/lang/vendor/forum/fr/categories.php similarity index 100% rename from resources/lang/vendor/forum/fr/categories.php rename to lang/vendor/forum/fr/categories.php diff --git a/resources/lang/vendor/forum/fr/general.php b/lang/vendor/forum/fr/general.php similarity index 100% rename from resources/lang/vendor/forum/fr/general.php rename to lang/vendor/forum/fr/general.php diff --git a/resources/lang/vendor/forum/fr/posts.php b/lang/vendor/forum/fr/posts.php similarity index 100% rename from resources/lang/vendor/forum/fr/posts.php rename to lang/vendor/forum/fr/posts.php diff --git a/resources/lang/vendor/forum/fr/threads.php b/lang/vendor/forum/fr/threads.php similarity index 100% rename from resources/lang/vendor/forum/fr/threads.php rename to lang/vendor/forum/fr/threads.php diff --git a/resources/lang/vendor/forum/fr/validation.php b/lang/vendor/forum/fr/validation.php similarity index 100% rename from resources/lang/vendor/forum/fr/validation.php rename to lang/vendor/forum/fr/validation.php diff --git a/resources/lang/vendor/forum/id/categories.php b/lang/vendor/forum/id/categories.php similarity index 100% rename from resources/lang/vendor/forum/id/categories.php rename to lang/vendor/forum/id/categories.php diff --git a/resources/lang/vendor/forum/id/general.php b/lang/vendor/forum/id/general.php similarity index 100% rename from resources/lang/vendor/forum/id/general.php rename to lang/vendor/forum/id/general.php diff --git a/resources/lang/vendor/forum/id/posts.php b/lang/vendor/forum/id/posts.php similarity index 100% rename from resources/lang/vendor/forum/id/posts.php rename to lang/vendor/forum/id/posts.php diff --git a/resources/lang/vendor/forum/id/threads.php b/lang/vendor/forum/id/threads.php similarity index 100% rename from resources/lang/vendor/forum/id/threads.php rename to lang/vendor/forum/id/threads.php diff --git a/resources/lang/vendor/forum/id/validation.php b/lang/vendor/forum/id/validation.php similarity index 100% rename from resources/lang/vendor/forum/id/validation.php rename to lang/vendor/forum/id/validation.php diff --git a/resources/lang/vendor/forum/it/categories.php b/lang/vendor/forum/it/categories.php similarity index 100% rename from resources/lang/vendor/forum/it/categories.php rename to lang/vendor/forum/it/categories.php diff --git a/resources/lang/vendor/forum/it/general.php b/lang/vendor/forum/it/general.php similarity index 100% rename from resources/lang/vendor/forum/it/general.php rename to lang/vendor/forum/it/general.php diff --git a/resources/lang/vendor/forum/it/posts.php b/lang/vendor/forum/it/posts.php similarity index 100% rename from resources/lang/vendor/forum/it/posts.php rename to lang/vendor/forum/it/posts.php diff --git a/resources/lang/vendor/forum/it/threads.php b/lang/vendor/forum/it/threads.php similarity index 100% rename from resources/lang/vendor/forum/it/threads.php rename to lang/vendor/forum/it/threads.php diff --git a/resources/lang/vendor/forum/it/validation.php b/lang/vendor/forum/it/validation.php similarity index 100% rename from resources/lang/vendor/forum/it/validation.php rename to lang/vendor/forum/it/validation.php diff --git a/resources/lang/vendor/forum/nl/categories.php b/lang/vendor/forum/nl/categories.php similarity index 100% rename from resources/lang/vendor/forum/nl/categories.php rename to lang/vendor/forum/nl/categories.php diff --git a/resources/lang/vendor/forum/nl/general.php b/lang/vendor/forum/nl/general.php similarity index 100% rename from resources/lang/vendor/forum/nl/general.php rename to lang/vendor/forum/nl/general.php diff --git a/resources/lang/vendor/forum/nl/posts.php b/lang/vendor/forum/nl/posts.php similarity index 100% rename from resources/lang/vendor/forum/nl/posts.php rename to lang/vendor/forum/nl/posts.php diff --git a/resources/lang/vendor/forum/nl/threads.php b/lang/vendor/forum/nl/threads.php similarity index 100% rename from resources/lang/vendor/forum/nl/threads.php rename to lang/vendor/forum/nl/threads.php diff --git a/resources/lang/vendor/forum/nl/validation.php b/lang/vendor/forum/nl/validation.php similarity index 100% rename from resources/lang/vendor/forum/nl/validation.php rename to lang/vendor/forum/nl/validation.php diff --git a/resources/lang/vendor/forum/pt-br/categories.php b/lang/vendor/forum/pt-br/categories.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/categories.php rename to lang/vendor/forum/pt-br/categories.php diff --git a/resources/lang/vendor/forum/pt-br/general.php b/lang/vendor/forum/pt-br/general.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/general.php rename to lang/vendor/forum/pt-br/general.php diff --git a/resources/lang/vendor/forum/pt-br/posts.php b/lang/vendor/forum/pt-br/posts.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/posts.php rename to lang/vendor/forum/pt-br/posts.php diff --git a/resources/lang/vendor/forum/pt-br/threads.php b/lang/vendor/forum/pt-br/threads.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/threads.php rename to lang/vendor/forum/pt-br/threads.php diff --git a/resources/lang/vendor/forum/pt-br/validation.php b/lang/vendor/forum/pt-br/validation.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/validation.php rename to lang/vendor/forum/pt-br/validation.php diff --git a/resources/lang/vendor/forum/ro/categories.php b/lang/vendor/forum/ro/categories.php similarity index 100% rename from resources/lang/vendor/forum/ro/categories.php rename to lang/vendor/forum/ro/categories.php diff --git a/resources/lang/vendor/forum/ro/general.php b/lang/vendor/forum/ro/general.php similarity index 100% rename from resources/lang/vendor/forum/ro/general.php rename to lang/vendor/forum/ro/general.php diff --git a/resources/lang/vendor/forum/ro/posts.php b/lang/vendor/forum/ro/posts.php similarity index 100% rename from resources/lang/vendor/forum/ro/posts.php rename to lang/vendor/forum/ro/posts.php diff --git a/resources/lang/vendor/forum/ro/threads.php b/lang/vendor/forum/ro/threads.php similarity index 100% rename from resources/lang/vendor/forum/ro/threads.php rename to lang/vendor/forum/ro/threads.php diff --git a/resources/lang/vendor/forum/ro/validation.php b/lang/vendor/forum/ro/validation.php similarity index 100% rename from resources/lang/vendor/forum/ro/validation.php rename to lang/vendor/forum/ro/validation.php diff --git a/resources/lang/vendor/forum/ru/categories.php b/lang/vendor/forum/ru/categories.php similarity index 100% rename from resources/lang/vendor/forum/ru/categories.php rename to lang/vendor/forum/ru/categories.php diff --git a/resources/lang/vendor/forum/ru/general.php b/lang/vendor/forum/ru/general.php similarity index 100% rename from resources/lang/vendor/forum/ru/general.php rename to lang/vendor/forum/ru/general.php diff --git a/resources/lang/vendor/forum/ru/posts.php b/lang/vendor/forum/ru/posts.php similarity index 100% rename from resources/lang/vendor/forum/ru/posts.php rename to lang/vendor/forum/ru/posts.php diff --git a/resources/lang/vendor/forum/ru/threads.php b/lang/vendor/forum/ru/threads.php similarity index 100% rename from resources/lang/vendor/forum/ru/threads.php rename to lang/vendor/forum/ru/threads.php diff --git a/resources/lang/vendor/forum/ru/validation.php b/lang/vendor/forum/ru/validation.php similarity index 100% rename from resources/lang/vendor/forum/ru/validation.php rename to lang/vendor/forum/ru/validation.php diff --git a/resources/lang/vendor/forum/sr/categories.php b/lang/vendor/forum/sr/categories.php similarity index 100% rename from resources/lang/vendor/forum/sr/categories.php rename to lang/vendor/forum/sr/categories.php diff --git a/resources/lang/vendor/forum/sr/general.php b/lang/vendor/forum/sr/general.php similarity index 100% rename from resources/lang/vendor/forum/sr/general.php rename to lang/vendor/forum/sr/general.php diff --git a/resources/lang/vendor/forum/sr/posts.php b/lang/vendor/forum/sr/posts.php similarity index 100% rename from resources/lang/vendor/forum/sr/posts.php rename to lang/vendor/forum/sr/posts.php diff --git a/resources/lang/vendor/forum/sr/threads.php b/lang/vendor/forum/sr/threads.php similarity index 100% rename from resources/lang/vendor/forum/sr/threads.php rename to lang/vendor/forum/sr/threads.php diff --git a/resources/lang/vendor/forum/sr/validation.php b/lang/vendor/forum/sr/validation.php similarity index 100% rename from resources/lang/vendor/forum/sr/validation.php rename to lang/vendor/forum/sr/validation.php diff --git a/resources/lang/vendor/forum/sv/categories.php b/lang/vendor/forum/sv/categories.php similarity index 100% rename from resources/lang/vendor/forum/sv/categories.php rename to lang/vendor/forum/sv/categories.php diff --git a/resources/lang/vendor/forum/sv/general.php b/lang/vendor/forum/sv/general.php similarity index 100% rename from resources/lang/vendor/forum/sv/general.php rename to lang/vendor/forum/sv/general.php diff --git a/resources/lang/vendor/forum/sv/posts.php b/lang/vendor/forum/sv/posts.php similarity index 100% rename from resources/lang/vendor/forum/sv/posts.php rename to lang/vendor/forum/sv/posts.php diff --git a/resources/lang/vendor/forum/sv/threads.php b/lang/vendor/forum/sv/threads.php similarity index 100% rename from resources/lang/vendor/forum/sv/threads.php rename to lang/vendor/forum/sv/threads.php diff --git a/resources/lang/vendor/forum/sv/validation.php b/lang/vendor/forum/sv/validation.php similarity index 100% rename from resources/lang/vendor/forum/sv/validation.php rename to lang/vendor/forum/sv/validation.php diff --git a/resources/lang/vendor/forum/th/categories.php b/lang/vendor/forum/th/categories.php similarity index 100% rename from resources/lang/vendor/forum/th/categories.php rename to lang/vendor/forum/th/categories.php diff --git a/resources/lang/vendor/forum/th/general.php b/lang/vendor/forum/th/general.php similarity index 100% rename from resources/lang/vendor/forum/th/general.php rename to lang/vendor/forum/th/general.php diff --git a/resources/lang/vendor/forum/th/posts.php b/lang/vendor/forum/th/posts.php similarity index 100% rename from resources/lang/vendor/forum/th/posts.php rename to lang/vendor/forum/th/posts.php diff --git a/resources/lang/vendor/forum/th/threads.php b/lang/vendor/forum/th/threads.php similarity index 100% rename from resources/lang/vendor/forum/th/threads.php rename to lang/vendor/forum/th/threads.php diff --git a/resources/lang/vendor/forum/th/validation.php b/lang/vendor/forum/th/validation.php similarity index 100% rename from resources/lang/vendor/forum/th/validation.php rename to lang/vendor/forum/th/validation.php diff --git a/resources/lang/vendor/forum/tr/categories.php b/lang/vendor/forum/tr/categories.php similarity index 100% rename from resources/lang/vendor/forum/tr/categories.php rename to lang/vendor/forum/tr/categories.php diff --git a/resources/lang/vendor/forum/tr/general.php b/lang/vendor/forum/tr/general.php similarity index 100% rename from resources/lang/vendor/forum/tr/general.php rename to lang/vendor/forum/tr/general.php diff --git a/resources/lang/vendor/forum/tr/posts.php b/lang/vendor/forum/tr/posts.php similarity index 100% rename from resources/lang/vendor/forum/tr/posts.php rename to lang/vendor/forum/tr/posts.php diff --git a/resources/lang/vendor/forum/tr/threads.php b/lang/vendor/forum/tr/threads.php similarity index 100% rename from resources/lang/vendor/forum/tr/threads.php rename to lang/vendor/forum/tr/threads.php diff --git a/resources/lang/vendor/forum/tr/validation.php b/lang/vendor/forum/tr/validation.php similarity index 100% rename from resources/lang/vendor/forum/tr/validation.php rename to lang/vendor/forum/tr/validation.php diff --git a/resources/lang/vendor/forum/zh/categories.php b/lang/vendor/forum/zh/categories.php similarity index 100% rename from resources/lang/vendor/forum/zh/categories.php rename to lang/vendor/forum/zh/categories.php diff --git a/resources/lang/vendor/forum/zh/general.php b/lang/vendor/forum/zh/general.php similarity index 100% rename from resources/lang/vendor/forum/zh/general.php rename to lang/vendor/forum/zh/general.php diff --git a/resources/lang/vendor/forum/zh/posts.php b/lang/vendor/forum/zh/posts.php similarity index 100% rename from resources/lang/vendor/forum/zh/posts.php rename to lang/vendor/forum/zh/posts.php diff --git a/resources/lang/vendor/forum/zh/threads.php b/lang/vendor/forum/zh/threads.php similarity index 100% rename from resources/lang/vendor/forum/zh/threads.php rename to lang/vendor/forum/zh/threads.php diff --git a/resources/lang/vendor/forum/zh/validation.php b/lang/vendor/forum/zh/validation.php similarity index 100% rename from resources/lang/vendor/forum/zh/validation.php rename to lang/vendor/forum/zh/validation.php diff --git a/phpunit.xml b/phpunit.xml index 1e2c9a449..888fcef4b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -14,7 +14,7 @@ - + diff --git a/public/index.php b/public/index.php index 58500ccd5..947d98963 100644 --- a/public/index.php +++ b/public/index.php @@ -1,55 +1,17 @@ make(Kernel::class); - - $response = $kernel->handle( - $request = Request::capture() - )->send(); - - $kernel->terminate($request, $response); +// Bootstrap Laravel and handle the request... +(require_once __DIR__.'/../bootstrap/app.php') + ->handleRequest(Request::capture()); diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php deleted file mode 100644 index b59ca31d6..000000000 --- a/resources/lang/en/validation.php +++ /dev/null @@ -1,121 +0,0 @@ - 'The :attribute must be accepted.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', - 'between' => [ - 'numeric' => 'The :attribute must be between :min and :max.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', - ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'date' => 'The :attribute is not a valid date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'email' => 'The :attribute must be a valid email address.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field must have a value.', - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'max' => [ - 'numeric' => 'The :attribute may not be greater than :max.', - 'file' => 'The :attribute may not be greater than :max kilobytes.', - 'string' => 'The :attribute may not be greater than :max characters.', - 'array' => 'The :attribute may not have more than :max items.', - ], - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ - 'numeric' => 'The :attribute must be at least :min.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', - ], - 'not_in' => 'The selected :attribute is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'present' => 'The :attribute field must be present.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_if' => 'The :attribute field is required when :other is :value.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values is present.', - 'required_without' => 'The :attribute field is required when :values is not present.', - 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ - 'numeric' => 'The :attribute must be :size.', - 'file' => 'The :attribute must be :size kilobytes.', - 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', - ], - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid zone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute format is invalid.', - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => [ - 'attribute-name' => [ - 'rule-name' => 'custom-message', - ], - ], - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => [], - -]; diff --git a/routes/console.php b/routes/console.php index 0130cb393..f12f8b972 100644 --- a/routes/console.php +++ b/routes/console.php @@ -1,5 +1,8 @@ comment(Inspiring::quote()); })->purpose('Display an inspiring quote'); + + +Schedule::command('disposable:update')->weekly(); +Schedule::command('clean:directories')->hourly()->withoutOverlapping(); +Schedule::command('nntmux:delete-unverified-users')->twiceDaily(1, 13); +Schedule::command('nntmux:update-expired-roles')->daily(); +Schedule::command('nntmux:remove-bad')->hourly()->withoutOverlapping(); +Schedule::command('telescope:prune')->daily(); +Schedule::command('horizon:snapshot')->everyFiveMinutes()->withoutOverlapping(); +Schedule::command('cloudflare:reload')->daily(); +Schedule::command('cache:prune-stale-tags')->hourly(); +if (config('nntmux.purge_inactive_users') === true) { + Schedule::job(new RemoveInactiveAccounts())->daily(); +} diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php deleted file mode 100644 index cc6830112..000000000 --- a/tests/CreatesApplication.php +++ /dev/null @@ -1,21 +0,0 @@ -make(Kernel::class)->bootstrap(); - - return $app; - } -} diff --git a/tests/TestCase.php b/tests/TestCase.php index 2932d4a69..fe1ffc2ff 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -6,5 +6,5 @@ use Illuminate\Foundation\Testing\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase { - use CreatesApplication; + // }