More updates for laravel 11
This commit is contained in:
parent
0bd2f6e82c
commit
dc2e84386f
73
.env.example
73
.env.example
@ -1,57 +1,25 @@
|
|||||||
APP_NAME="Clearing Houz"
|
APP_NAME="Clearing Houz"
|
||||||
APP_ENV=production
|
|
||||||
APP_KEY=
|
APP_KEY=
|
||||||
APP_DEBUG=false
|
APP_MAINTENANCE_DRIVER=cache
|
||||||
APP_URL=http://clrghouz
|
APP_MAINTENANCE_STORE=memcached
|
||||||
APP_TIMEZONE=
|
APP_TIMEZONE=
|
||||||
|
APP_URL=
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
AUTH_PASSWORD_RESET_TOKEN_TABLE=password_resets
|
||||||
LOG_LEVEL=info
|
|
||||||
|
CACHE_STORE=memcached
|
||||||
|
MEMCACHED_HOST=memcached
|
||||||
|
|
||||||
DB_CONNECTION=pgsql
|
DB_CONNECTION=pgsql
|
||||||
DB_HOST=postgres
|
DB_HOST=postgres
|
||||||
DB_PORT=5432
|
|
||||||
DB_DATABASE=clrghouz
|
DB_DATABASE=clrghouz
|
||||||
DB_USERNAME=clrghouz
|
DB_USERNAME=clrghouz
|
||||||
DB_PASSWORD=
|
DB_PASSWORD=
|
||||||
#DB_SSLMODE=prefer
|
|
||||||
#DB_SSLROOTCERT=/var/www/html/config/ssl/ca.crt
|
|
||||||
#DB_SSLCERT=/var/www/html/config/ssl/client.crt
|
|
||||||
#DB_SSLKEY=/var/www/html/config/ssl/client.key
|
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
|
||||||
MEMCACHED_HOST=memcached
|
|
||||||
CACHE_DRIVER=memcached
|
|
||||||
QUEUE_CONNECTION=database
|
QUEUE_CONNECTION=database
|
||||||
SESSION_DRIVER=file
|
SESSION_DRIVER=file
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
|
|
||||||
REDIS_HOST=127.0.0.1
|
|
||||||
REDIS_PASSWORD=
|
|
||||||
REDIS_PORT=6379
|
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
|
||||||
MAIL_HOST=smtp
|
|
||||||
MAIL_PORT=25
|
|
||||||
MAIL_USERNAME=
|
|
||||||
MAIL_PASSWORD=
|
|
||||||
MAIL_ENCRYPTION=
|
|
||||||
MAIL_AUTO_EMBED_METHOD=base64
|
|
||||||
|
|
||||||
PUSHER_APP_ID=
|
|
||||||
PUSHER_APP_KEY=
|
|
||||||
PUSHER_APP_SECRET=
|
|
||||||
PUSHER_APP_CLUSTER=mt1
|
|
||||||
|
|
||||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
|
||||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
|
||||||
|
|
||||||
FIDO_DIR=fido
|
|
||||||
FIDO_PACKET_KEEP=false
|
|
||||||
FIDO_STRICT=false
|
|
||||||
FIDO_HAPROXY=false
|
|
||||||
|
|
||||||
FILESYSTEM_DISK=s3
|
|
||||||
AWS_ACCESS_KEY_ID=
|
AWS_ACCESS_KEY_ID=
|
||||||
AWS_SECRET_ACCESS_KEY=
|
AWS_SECRET_ACCESS_KEY=
|
||||||
AWS_BUCKET=
|
AWS_BUCKET=
|
||||||
@ -59,12 +27,23 @@ AWS_ENDPOINT=
|
|||||||
AWS_DEFAULT_REGION=home
|
AWS_DEFAULT_REGION=home
|
||||||
AWS_USE_PATH_STYLE_ENDPOINT=true
|
AWS_USE_PATH_STYLE_ENDPOINT=true
|
||||||
|
|
||||||
#MATRIX_SERVER=
|
LOG_CHANNEL=daily
|
||||||
#MATRIX_AS_TOKEN=
|
LOG_LEVEL=info
|
||||||
#MATRIX_HS_TOKEN=
|
LOG_DAILY_DAYS=93
|
||||||
|
|
||||||
#FIDO_DNS_NS=
|
MAIL_MAILER=smtp
|
||||||
#FIDO_DNS_AAAA=
|
MAIL_HOST=smtp
|
||||||
#FIDO_DNS_ORDER_AAAA=
|
MAIL_PORT=25
|
||||||
#FIDO_DNS_A=
|
MAIL_USERNAME=
|
||||||
#FIDO_DNS_ORDER_A=
|
MAIL_PASSWORD=
|
||||||
|
MAIL_ENCRYPTION=
|
||||||
|
MAIL_AUTO_EMBED_METHOD=base64
|
||||||
|
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
|
||||||
|
# Clrghouz configuration
|
||||||
|
FIDO_DNS_NS=
|
||||||
|
|
||||||
|
MATRIX_SERVER=
|
||||||
|
MATRIX_AS_TOKEN=
|
||||||
|
MATRIX_HS_TOKEN=
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Console;
|
|
||||||
|
|
||||||
use Illuminate\Console\Scheduling\Schedule;
|
|
||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
||||||
|
|
||||||
use App\Jobs\{AddressIdleDomain,MailSend,SystemHeartbeat};
|
|
||||||
|
|
||||||
class Kernel extends ConsoleKernel
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The Artisan commands provided by your application.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $commands = [
|
|
||||||
//
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the application's command schedule.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function schedule(Schedule $schedule)
|
|
||||||
{
|
|
||||||
$schedule->job(new MailSend(TRUE))->everyMinute()->withoutOverlapping();
|
|
||||||
$schedule->job(new MailSend(FALSE))->twiceDaily(1,13);
|
|
||||||
$schedule->job(new SystemHeartbeat)->hourly();
|
|
||||||
$schedule->job(new AddressIdleDomain)->weeklyOn(0,'01:00');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register the commands for the application.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function commands()
|
|
||||||
{
|
|
||||||
$this->load(__DIR__.'/Commands');
|
|
||||||
|
|
||||||
require base_path('routes/console.php');
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Exceptions;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* A list of the exception types that are not reported.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $dontReport = [
|
|
||||||
//
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of the inputs that are never flashed for validation exceptions.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $dontFlash = [
|
|
||||||
'password',
|
|
||||||
'password_confirmation',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register the exception handling callbacks for the application.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function register()
|
|
||||||
{
|
|
||||||
$this->reportable(function (Throwable $e) {
|
|
||||||
//
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
213
app/Helpers/PageAssets.php
Normal file
213
app/Helpers/PageAssets.php
Normal file
@ -0,0 +1,213 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Helpers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Useful tools (js/css) used when rendering pages
|
||||||
|
*/
|
||||||
|
class PageAssets
|
||||||
|
{
|
||||||
|
// Types that we can handle
|
||||||
|
private const array types = [
|
||||||
|
'css',
|
||||||
|
'js',
|
||||||
|
];
|
||||||
|
|
||||||
|
public const array assets = [
|
||||||
|
'datatables' => [
|
||||||
|
'base' => [
|
||||||
|
'css' => [
|
||||||
|
'//cdn.datatables.net/2.1.2/css/dataTables.bootstrap4.css',
|
||||||
|
//'//cdn.datatables.net/2.1.2/css/dataTables.dataTables.min.css',
|
||||||
|
],
|
||||||
|
'js' => [
|
||||||
|
'//cdn.datatables.net/2.1.2/js/dataTables.min.js',
|
||||||
|
'//cdn.datatables.net/2.1.2/js/dataTables.bootstrap4.min.js',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'buttons' => [
|
||||||
|
'css' => [
|
||||||
|
'//cdn.datatables.net/buttons/3.1.0/css/buttons.bootstrap4.min.css',
|
||||||
|
//'//cdn.datatables.net/buttons/3.1.0/css/buttons.dataTables.min.css',
|
||||||
|
],
|
||||||
|
'js' => [
|
||||||
|
'//cdn.datatables.net/buttons/3.1.0/js/dataTables.buttons.min.js',
|
||||||
|
//'//cdn.datatables.net/buttons/3.1.0/js/buttons.dataTables.min.js',
|
||||||
|
'//cdn.datatables.net/buttons/3.1.0/js/buttons.bootstrap4.min.js',
|
||||||
|
'//cdnjs.cloudflare.com/ajax/libs/jszip/3.2.0/jszip.min.js',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'conditionalpaging' => [
|
||||||
|
'js' => [
|
||||||
|
'//cdn.datatables.net/plug-ins/2.0.5/features/conditionalPaging/dataTables.conditionalPaging.min.js',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'fixedheader' => [
|
||||||
|
'css' => [
|
||||||
|
'//cdn.datatables.net/fixedheader/4.0.1/css/fixedHeader.bootstrap4.min.css',
|
||||||
|
//'//cdn.datatables.net/fixedheader/4.0.1/css/fixedHeader.dataTables.min.css',
|
||||||
|
],
|
||||||
|
'js' => [
|
||||||
|
'//cdn.datatables.net/fixedheader/4.0.1/js/dataTables.fixedHeader.min.js',
|
||||||
|
//'//cdn.datatables.net/fixedheader/4.0.1/js/fixedHeader.dataTables.min.js',
|
||||||
|
'//cdn.datatables.net/fixedheader/4.0.1/js/fixedHeader.bootstrap4.min.js',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'responsive' => [
|
||||||
|
'css' => [
|
||||||
|
'//cdn.datatables.net/responsive/3.0.2/css/responsive.bootstrap4.min.css',
|
||||||
|
//'//cdn.datatables.net/responsive/3.0.2/css/responsive.dataTables.min.css',
|
||||||
|
],
|
||||||
|
'js' => [
|
||||||
|
'//cdn.datatables.net/responsive/3.0.2/js/dataTables.responsive.min.js',
|
||||||
|
//'//cdn.datatables.net/responsive/3.0.2/js/responsive.bootstrap.min.js',
|
||||||
|
'//cdn.datatables.net/responsive/3.0.2/js/responsive.bootstrap4.min.js',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'rowgroup' => [
|
||||||
|
'css' => [
|
||||||
|
'//cdn.datatables.net/rowgroup/1.5.0/css/rowGroup.bootstrap4.min.css',
|
||||||
|
//'//cdn.datatables.net/rowgroup/1.5.0/css/rowGroup.dataTables.min.css',
|
||||||
|
],
|
||||||
|
'js' => [
|
||||||
|
'//cdn.datatables.net/rowgroup/1.5.0/js/dataTables.rowGroup.min.js',
|
||||||
|
//'//cdn.datatables.net/rowgroup/1.5.0/js/rowGroup.dataTables.min.js',
|
||||||
|
'//cdn.datatables.net/rowgroup/1.5.0/js/rowGroup.bootstrap4.min.js',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'searchpanes' => [
|
||||||
|
'css' => [
|
||||||
|
'//cdn.datatables.net/searchpanes/2.3.1/css/searchPanes.bootstrap4.min.css',
|
||||||
|
//'//cdn.datatables.net/searchpanes/2.3.1/css/searchPanes.dataTables.min.css',
|
||||||
|
],
|
||||||
|
'js' => [
|
||||||
|
'//cdn.datatables.net/searchpanes/2.3.1/js/dataTables.searchPanes.min.js',
|
||||||
|
//'//cdn.datatables.net/searchpanes/2.3.1/js/searchPanes.dataTables.min.js',
|
||||||
|
'//cdn.datatables.net/searchpanes/2.3.1/js/searchPanes.bootstrap4.min.js',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'searchpanes-left' => [
|
||||||
|
'css' => [
|
||||||
|
'/plugin/dataTables/leftSearchPanes.css',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'select' => [
|
||||||
|
'css' => [
|
||||||
|
'//cdn.datatables.net/select/2.0.3/css/select.bootstrap4.min.css',
|
||||||
|
//'//cdn.datatables.net/select/2.0.3/css/select.dataTables.min.css',
|
||||||
|
],
|
||||||
|
'js' => [
|
||||||
|
'//cdn.datatables.net/select/2.0.3/js/dataTables.select.min.js',
|
||||||
|
//'//cdn.datatables.net/select/2.0.3/js/select.dataTables.min.js',
|
||||||
|
'//cdn.datatables.net/select/2.0.3/js/select.bootstrap4.min.js',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'select2' => [
|
||||||
|
'base' => [
|
||||||
|
'css' => [
|
||||||
|
'//cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css',
|
||||||
|
],
|
||||||
|
'js' => [
|
||||||
|
'//cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'autofocus' => [
|
||||||
|
'js' => [
|
||||||
|
'/plugin/select2/fix-autofocus.js',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'simplemde' => [
|
||||||
|
'base' => [
|
||||||
|
'css' => [
|
||||||
|
'//cdn.jsdelivr.net/simplemde/latest/simplemde.min.css',
|
||||||
|
],
|
||||||
|
'js' => [
|
||||||
|
'//cdn.jsdelivr.net/simplemde/latest/simplemde.min.js',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// Items to manage
|
||||||
|
public static Collection $items;
|
||||||
|
|
||||||
|
// Add an item to the list
|
||||||
|
public static function add(string $type,Collection|array|string $asset): void
|
||||||
|
{
|
||||||
|
if (! in_array($type,self::types))
|
||||||
|
throw new \Exception('Invalid type: '.$type);
|
||||||
|
|
||||||
|
if (! isset(self::$items))
|
||||||
|
self::init();
|
||||||
|
|
||||||
|
if (is_string($asset))
|
||||||
|
self::$items
|
||||||
|
->get($type)
|
||||||
|
->push($asset)
|
||||||
|
->unique();
|
||||||
|
else
|
||||||
|
self::$items->put($type,
|
||||||
|
self::$items
|
||||||
|
->get($type)
|
||||||
|
->merge($asset->values())
|
||||||
|
->unique());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a predefined asset
|
||||||
|
public static function asset(string $id): void
|
||||||
|
{
|
||||||
|
if (! isset(self::$items))
|
||||||
|
self::init();
|
||||||
|
|
||||||
|
if (str_contains($id,',')) {
|
||||||
|
[$item,$arguments] = explode(',',$id,2);
|
||||||
|
$arguments = collect(explode('|',$arguments));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$item = $id;
|
||||||
|
$arguments = collect();
|
||||||
|
}
|
||||||
|
|
||||||
|
$arguments = $arguments->prepend('base');
|
||||||
|
$asset = collect(Arr::get(self::assets,$item))->only($arguments);
|
||||||
|
|
||||||
|
foreach (self::types as $type)
|
||||||
|
if ($x=$asset->pluck($type)->filter()->flatten())
|
||||||
|
self::add($type,$x);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Render the CSS items
|
||||||
|
public static function css(): string
|
||||||
|
{
|
||||||
|
return isset(self::$items)
|
||||||
|
? self::$items
|
||||||
|
->get('css')
|
||||||
|
->map(fn($item)=>sprintf('<link rel="stylesheet" href="%s">',$item))
|
||||||
|
->join('')
|
||||||
|
: '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function init(): void
|
||||||
|
{
|
||||||
|
self::$items = collect([
|
||||||
|
'js' => collect(),
|
||||||
|
'css' => collect(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Render the JS items
|
||||||
|
public static function js(): string
|
||||||
|
{
|
||||||
|
return isset(self::$items)
|
||||||
|
? self::$items
|
||||||
|
->get('js')
|
||||||
|
->map(fn($item)=>sprintf('<script type="text/javascript" src="%s"></script>',$item))
|
||||||
|
->join('')
|
||||||
|
: '';
|
||||||
|
}
|
||||||
|
}
|
@ -1,83 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
||||||
|
|
||||||
class Kernel extends HttpKernel
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The application's global HTTP middleware stack.
|
|
||||||
*
|
|
||||||
* These middleware are run during every request to your application.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $middleware = [
|
|
||||||
\App\Http\Middleware\CheckForMaintenanceMode::class,
|
|
||||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
|
||||||
\App\Http\Middleware\TrimStrings::class,
|
|
||||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
|
||||||
\App\Http\Middleware\TrustProxies::class,
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The application's route middleware groups.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $middlewareGroups = [
|
|
||||||
'web' => [
|
|
||||||
\App\Http\Middleware\EncryptCookies::class,
|
|
||||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
||||||
\Illuminate\Session\Middleware\StartSession::class,
|
|
||||||
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
|
||||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
||||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
|
||||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
||||||
\App\Http\Middleware\AddUserToView::class,
|
|
||||||
],
|
|
||||||
|
|
||||||
'api' => [
|
|
||||||
\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
|
||||||
\Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
|
|
||||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The application's route middleware.
|
|
||||||
*
|
|
||||||
* These middleware may be assigned to groups or used individually.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $routeMiddleware = [
|
|
||||||
'activeuser' => \App\Http\Middleware\ActiveUser::class,
|
|
||||||
'auth' => \App\Http\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' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
|
||||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
|
||||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The priority-sorted list of middleware.
|
|
||||||
*
|
|
||||||
* This forces the listed middleware to always be in the given order.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $middlewarePriority = [
|
|
||||||
\Illuminate\Session\Middleware\StartSession::class,
|
|
||||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
||||||
\App\Http\Middleware\Authenticate::class,
|
|
||||||
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
|
||||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
||||||
\Illuminate\Auth\Middleware\Authorize::class,
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
|
||||||
|
|
||||||
class Authenticate extends Middleware
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Get the path the user should be redirected to when they are not authenticated.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function redirectTo($request)
|
|
||||||
{
|
|
||||||
if (! $request->expectsJson()) {
|
|
||||||
return route('login');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
|
|
||||||
|
|
||||||
class CheckForMaintenanceMode extends Middleware
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The URIs that should be reachable while maintenance mode is enabled.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $except = [
|
|
||||||
//
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
|
||||||
|
|
||||||
class EncryptCookies extends Middleware
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The names of the cookies that should not be encrypted.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $except = [
|
|
||||||
//
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
|
|
||||||
use App\Providers\RouteServiceProvider;
|
|
||||||
|
|
||||||
class RedirectIfAuthenticated
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Handle an incoming request.
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
* @param \Closure $next
|
|
||||||
* @param string|null $guard
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function handle(Request $request,\Closure $next,?string $guard=NULL)
|
|
||||||
{
|
|
||||||
if (Auth::guard($guard)->check()) {
|
|
||||||
return redirect(RouteServiceProvider::HOME);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $next($request);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
|
||||||
|
|
||||||
class TrimStrings extends Middleware
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The names of the attributes that should not be trimmed.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $except = [
|
|
||||||
'password',
|
|
||||||
'password_confirmation',
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
|
||||||
|
|
||||||
class TrustProxies extends Middleware
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The trusted proxies for this application.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $proxies;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The headers that should be used to detect proxies.
|
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
|
||||||
protected $headers =
|
|
||||||
Request::HEADER_X_FORWARDED_FOR |
|
|
||||||
Request::HEADER_X_FORWARDED_HOST |
|
|
||||||
Request::HEADER_X_FORWARDED_PORT |
|
|
||||||
Request::HEADER_X_FORWARDED_PROTO |
|
|
||||||
Request::HEADER_X_FORWARDED_AWS_ELB;
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
|
||||||
|
|
||||||
class VerifyCsrfToken extends Middleware
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
protected $addHttpCookie = true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The URIs that should be excluded from CSRF verification.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $except = [
|
|
||||||
//
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Casts;
|
namespace App\Models\Casts;
|
||||||
|
|
||||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
class CollectionOrNull implements CastsAttributes
|
class CollectionOrNull implements CastsAttributes
|
||||||
@ -10,13 +11,13 @@ class CollectionOrNull implements CastsAttributes
|
|||||||
/**
|
/**
|
||||||
* Cast the given value.
|
* Cast the given value.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Database\Eloquent\Model $model
|
* @param Model $model
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $attributes
|
* @param array $attributes
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
public function get($model,string $key,$value,array $attributes): Collection
|
public function get(Model $model,string $key,$value,array $attributes): Collection
|
||||||
{
|
{
|
||||||
return collect(json_decode($value, true));
|
return collect(json_decode($value, true));
|
||||||
}
|
}
|
||||||
@ -30,7 +31,7 @@ class CollectionOrNull implements CastsAttributes
|
|||||||
* @param array $attributes
|
* @param array $attributes
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function set($model,string $key,$value,array $attributes): ?string
|
public function set(Model $model,string $key,$value,array $attributes): ?string
|
||||||
{
|
{
|
||||||
return ($value->count()) ? json_encode($value) : NULL;
|
return ($value->count()) ? json_encode($value) : NULL;
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Casts;
|
namespace App\Models\Casts;
|
||||||
|
|
||||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Casts;
|
namespace App\Models\Casts;
|
||||||
|
|
||||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
@ -5,7 +5,7 @@ namespace App\Models;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
use App\Casts\CollectionOrNull;
|
use App\Models\Casts\CollectionOrNull;
|
||||||
|
|
||||||
class Dynamic extends Model
|
class Dynamic extends Model
|
||||||
{
|
{
|
||||||
|
@ -9,10 +9,10 @@ use Illuminate\Support\Collection;
|
|||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use App\Casts\{CollectionOrNull,CompressedStringOrNull,UTF8StringOrNull};
|
|
||||||
use App\Classes\FTN\Message;
|
use App\Classes\FTN\Message;
|
||||||
use App\Events\Echomail as EchomailEvent;
|
use App\Events\Echomail as EchomailEvent;
|
||||||
use App\Interfaces\Packet;
|
use App\Interfaces\Packet;
|
||||||
|
use App\Models\Casts\{CompressedStringOrNull,CollectionOrNull,UTF8StringOrNull};
|
||||||
use App\Traits\{MessageAttributes,MsgID,ParseAddresses,QueryCacheableConfig};
|
use App\Traits\{MessageAttributes,MsgID,ParseAddresses,QueryCacheableConfig};
|
||||||
|
|
||||||
final class Echomail extends Model implements Packet
|
final class Echomail extends Model implements Packet
|
||||||
@ -250,6 +250,7 @@ final class Echomail extends Model implements Packet
|
|||||||
}
|
}
|
||||||
|
|
||||||
// See if we need to export this message.
|
// See if we need to export this message.
|
||||||
|
// @todo We need to limit exporting if address/system is not active
|
||||||
if ($model->echoarea->sec_read) {
|
if ($model->echoarea->sec_read) {
|
||||||
$exportto = $model
|
$exportto = $model
|
||||||
->echoarea
|
->echoarea
|
||||||
|
@ -11,7 +11,7 @@ use Illuminate\Support\Facades\DB;
|
|||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
use App\Casts\{CollectionOrNull,CompressedStringOrNull};
|
use App\Models\Casts\{CompressedStringOrNull,CollectionOrNull};
|
||||||
|
|
||||||
class File extends Model
|
class File extends Model
|
||||||
{
|
{
|
||||||
|
@ -10,9 +10,9 @@ use Illuminate\Support\Collection;
|
|||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use App\Casts\{CollectionOrNull,CompressedStringOrNull,UTF8StringOrNull};
|
|
||||||
use App\Interfaces\Packet;
|
use App\Interfaces\Packet;
|
||||||
use App\Pivots\ViaPivot;
|
use App\Models\Casts\{CompressedStringOrNull,CollectionOrNull,UTF8StringOrNull};
|
||||||
|
use App\Models\Pivots\ViaPivot;
|
||||||
use App\Traits\{MessageAttributes,MsgID};
|
use App\Traits\{MessageAttributes,MsgID};
|
||||||
|
|
||||||
final class Netmail extends Model implements Packet
|
final class Netmail extends Model implements Packet
|
||||||
|
@ -2,10 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
use App\Casts\UTF8StringOrNull;
|
use App\Models\Casts\UTF8StringOrNull;
|
||||||
|
|
||||||
class Origin extends Model
|
class Origin extends Model
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Pivots;
|
namespace App\Models\Pivots;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Relations\Pivot;
|
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Policies;
|
namespace App\Models\Policies;
|
||||||
|
|
||||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Policies;
|
namespace App\Models\Policies;
|
||||||
|
|
||||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Policies;
|
namespace App\Models\Policies;
|
||||||
|
|
||||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Policies;
|
namespace App\Models\Policies;
|
||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
|
@ -2,10 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
use App\Casts\UTF8StringOrNull;
|
use App\Models\Casts\UTF8StringOrNull;
|
||||||
|
|
||||||
class Tagline extends Model
|
class Tagline extends Model
|
||||||
{
|
{
|
||||||
|
@ -2,10 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
use App\Casts\UTF8StringOrNull;
|
use App\Models\Casts\UTF8StringOrNull;
|
||||||
|
|
||||||
class Tearline extends Model
|
class Tearline extends Model
|
||||||
{
|
{
|
||||||
|
@ -5,15 +5,18 @@ namespace App\Providers;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Notifications\ChannelManager;
|
use Illuminate\Notifications\ChannelManager;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Blade;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Illuminate\Support\Facades\Notification;
|
use Illuminate\Support\Facades\Notification;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
use App\Events\Echomail as EchomailEvent;
|
||||||
use App\Events\Matrix\Message;
|
use App\Events\Matrix\Message;
|
||||||
use App\Listeners\EchomailListener;
|
use App\Listeners\EchomailListener;
|
||||||
use App\Listeners\Matrix\MessageListener;
|
use App\Listeners\Matrix\MessageListener;
|
||||||
use App\Notifications\Channels\{EchomailChannel,MatrixChannel,NetmailChannel};
|
use App\Notifications\Channels\{EchomailChannel,MatrixChannel,NetmailChannel};
|
||||||
use App\Models\{Echomail,Netmail};
|
use App\Models\{Echomail,Netmail,User};
|
||||||
use App\Traits\SingleOrFail;
|
use App\Traits\SingleOrFail;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
@ -51,10 +54,21 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
{
|
{
|
||||||
static::bootSingleOrFail();
|
static::bootSingleOrFail();
|
||||||
|
|
||||||
|
// Add our page assets
|
||||||
|
Blade::directive('pa',function($expression) {
|
||||||
|
return sprintf('<?php PageAssets::asset(\'%s\') ?>',$expression);
|
||||||
|
});
|
||||||
|
|
||||||
Auth::viaRequest('matrix-token',function (Request $request) {
|
Auth::viaRequest('matrix-token',function (Request $request) {
|
||||||
return (config('matrix.hs_token') && ($request->bearerToken() === config('matrix.hs_token'))) ? TRUE : NULL;
|
return (config('matrix.hs_token') && ($request->bearerToken() === config('matrix.hs_token'))) ? TRUE : NULL;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Mailer Admin
|
||||||
|
Gate::define('admin',fn(User $o)=>($o->admin === TRUE));
|
||||||
|
|
||||||
|
// ZC of a Zone
|
||||||
|
Gate::define('zc',fn(User $o)=>(($o->admin === TRUE) || $o->ZC()));
|
||||||
|
|
||||||
Event::listen(
|
Event::listen(
|
||||||
Message::class,
|
Message::class,
|
||||||
MessageListener::class,
|
MessageListener::class,
|
||||||
@ -62,7 +76,7 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
|
|
||||||
// @todo This should be detected automatically?
|
// @todo This should be detected automatically?
|
||||||
Event::listen(
|
Event::listen(
|
||||||
\App\Events\Echomail::class,
|
EchomailEvent::class,
|
||||||
EchomailListener::class,
|
EchomailListener::class,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Providers;
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Gate;
|
|
||||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
||||||
|
|
||||||
use App\Models\User;
|
|
||||||
|
|
||||||
class AuthServiceProvider extends ServiceProvider
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The policy mappings for the application.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $policies = [
|
|
||||||
//'App\Model' => 'App\Policies\ModelPolicy',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register any authentication / authorization services.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function boot()
|
|
||||||
{
|
|
||||||
$this->registerPolicies();
|
|
||||||
|
|
||||||
// Mailer Admin
|
|
||||||
Gate::define('admin',fn(User $o)=>($o->admin === TRUE));
|
|
||||||
|
|
||||||
// ZC of a Zone
|
|
||||||
Gate::define('zc',fn(User $o)=>(($o->admin === TRUE) || $o->ZC()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Providers;
|
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
|
||||||
use Illuminate\Support\Facades\Broadcast;
|
|
||||||
|
|
||||||
class BroadcastServiceProvider extends ServiceProvider
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Bootstrap any application services.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function boot()
|
|
||||||
{
|
|
||||||
Broadcast::routes();
|
|
||||||
|
|
||||||
require base_path('routes/channels.php');
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Providers;
|
|
||||||
|
|
||||||
use Illuminate\Cache\RateLimiting\Limit;
|
|
||||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\RateLimiter;
|
|
||||||
use Illuminate\Support\Facades\Route;
|
|
||||||
|
|
||||||
class RouteServiceProvider extends ServiceProvider
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The path to the "home" route for your application.
|
|
||||||
*
|
|
||||||
* This is used by Laravel authentication to redirect users after login.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
public const HOME = '/';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The controller namespace for the application.
|
|
||||||
*
|
|
||||||
* When present, controller route declarations will automatically be prefixed with this namespace.
|
|
||||||
*
|
|
||||||
* @var string|null
|
|
||||||
*/
|
|
||||||
// protected $namespace = 'App\\Http\\Controllers';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define your route model bindings, pattern filters, etc.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function boot()
|
|
||||||
{
|
|
||||||
$this->configureRateLimiting();
|
|
||||||
|
|
||||||
$this->routes(function () {
|
|
||||||
Route::prefix('api')
|
|
||||||
->middleware('api')
|
|
||||||
->namespace($this->namespace)
|
|
||||||
->group(base_path('routes/api.php'));
|
|
||||||
|
|
||||||
Route::middleware('web')
|
|
||||||
->namespace($this->namespace)
|
|
||||||
->group(base_path('routes/web.php'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Configure the rate limiters for the application.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function configureRateLimiting()
|
|
||||||
{
|
|
||||||
RateLimiter::for('api', function (Request $request) {
|
|
||||||
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -13,6 +13,7 @@ trait SingleOrFail
|
|||||||
private static function bootSingleOrFail(): void
|
private static function bootSingleOrFail(): void
|
||||||
{
|
{
|
||||||
// When a query should return 1 object, or FAIL if it doesnt
|
// When a query should return 1 object, or FAIL if it doesnt
|
||||||
|
// @deprecated use sole()
|
||||||
Builder::macro('singleOrFail',function () {
|
Builder::macro('singleOrFail',function () {
|
||||||
$result = $this->get();
|
$result = $this->get();
|
||||||
|
|
||||||
|
@ -1,55 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
use Illuminate\Foundation\Application;
|
||||||
|--------------------------------------------------------------------------
|
use Illuminate\Foundation\Configuration\Exceptions;
|
||||||
| Create The Application
|
use Illuminate\Foundation\Configuration\Middleware;
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| The first thing we will do is create a new Laravel application instance
|
|
||||||
| which serves as the "glue" for all the components of Laravel, and is
|
|
||||||
| the IoC container for the system binding all of the various parts.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$app = new Illuminate\Foundation\Application(
|
use App\Http\Middleware\{ActiveUser,AddUserToView};
|
||||||
dirname(__DIR__)
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
return Application::configure(basePath: dirname(__DIR__))
|
||||||
|--------------------------------------------------------------------------
|
->withRouting(
|
||||||
| Bind Important Interfaces
|
web: __DIR__.'/../routes/web.php',
|
||||||
|--------------------------------------------------------------------------
|
api: __DIR__.'/../routes/api.php',
|
||||||
|
|
commands: __DIR__.'/../routes/console.php',
|
||||||
| Next, we need to bind some important interfaces into the container so
|
health: '/up',
|
||||||
| we will be able to resolve them when needed. The kernels serve the
|
)
|
||||||
| incoming requests to this application from both the web and CLI.
|
->withMiddleware(function (Middleware $middleware) {
|
||||||
|
|
$middleware->appendToGroup('web', [
|
||||||
*/
|
AddUserToView::class,
|
||||||
|
]);
|
||||||
|
|
||||||
$app->singleton(
|
$middleware->alias([
|
||||||
Illuminate\Contracts\Http\Kernel::class,
|
'activeuser' => ActiveUser::class,
|
||||||
App\Http\Kernel::class
|
]);
|
||||||
);
|
})
|
||||||
|
->withExceptions(function (Exceptions $exceptions) {
|
||||||
$app->singleton(
|
//
|
||||||
Illuminate\Contracts\Console\Kernel::class,
|
})->create();
|
||||||
App\Console\Kernel::class
|
|
||||||
);
|
|
||||||
|
|
||||||
$app->singleton(
|
|
||||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
|
||||||
App\Exceptions\Handler::class
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| 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;
|
|
6
bootstrap/providers.php
Normal file
6
bootstrap/providers.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
App\Providers\AppServiceProvider::class,
|
||||||
|
App\Providers\CustomBladeServiceProvider::class,
|
||||||
|
];
|
@ -5,7 +5,7 @@
|
|||||||
"keywords": ["framework","laravel"],
|
"keywords": ["framework","laravel"],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2|8.3",
|
"php": "^8.3",
|
||||||
"ext-bz2": "*",
|
"ext-bz2": "*",
|
||||||
"ext-pcntl": "*",
|
"ext-pcntl": "*",
|
||||||
"ext-sockets": "*",
|
"ext-sockets": "*",
|
||||||
|
24
composer.lock
generated
24
composer.lock
generated
@ -127,16 +127,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
"version": "3.325.0",
|
"version": "3.325.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||||
"reference": "ea36e53745cff21519c2dadd808e2482f0bfadf5"
|
"reference": "9e354a5e0cd1d563ec85245e3000e98e16a44fce"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/ea36e53745cff21519c2dadd808e2482f0bfadf5",
|
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/9e354a5e0cd1d563ec85245e3000e98e16a44fce",
|
||||||
"reference": "ea36e53745cff21519c2dadd808e2482f0bfadf5",
|
"reference": "9e354a5e0cd1d563ec85245e3000e98e16a44fce",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -219,9 +219,9 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.325.0"
|
"source": "https://github.com/aws/aws-sdk-php/tree/3.325.2"
|
||||||
},
|
},
|
||||||
"time": "2024-10-30T18:11:21+00:00"
|
"time": "2024-11-01T18:08:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
@ -2625,20 +2625,20 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
"version": "3.8.0",
|
"version": "3.8.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||||
"reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f"
|
"reference": "10ac0aa86b8062219ce21e8189123d611ca3ecd9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bbd3eef89af8ba66a3aa7952b5439168fbcc529f",
|
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/10ac0aa86b8062219ce21e8189123d611ca3ecd9",
|
||||||
"reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f",
|
"reference": "10ac0aa86b8062219ce21e8189123d611ca3ecd9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"carbonphp/carbon-doctrine-types": "*",
|
"carbonphp/carbon-doctrine-types": "<100.0",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"php": "^8.1",
|
"php": "^8.1",
|
||||||
"psr/clock": "^1.0",
|
"psr/clock": "^1.0",
|
||||||
@ -2727,7 +2727,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-08-19T06:22:39+00:00"
|
"time": "2024-11-03T16:02:24+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nette/schema",
|
"name": "nette/schema",
|
||||||
|
175
config/app.php
175
config/app.php
@ -7,14 +7,13 @@ return [
|
|||||||
| Application Name
|
| Application Name
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This value is the name of your application. This value is used when the
|
| This value is the name of your application, which will be used when the
|
||||||
| framework needs to place the application's name in a notification or
|
| framework needs to place the application's name in a notification or
|
||||||
| any other location as required by the application or its packages.
|
| other UI elements where an application name needs to be displayed.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'name' => env('APP_NAME', 'Laravel'),
|
'name' => env('APP_NAME', 'Laravel'),
|
||||||
'id' => env('APP_SETUP_ID', 1),
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -42,12 +41,6 @@ return [
|
|||||||
|
|
||||||
'debug' => (bool) env('APP_DEBUG', false),
|
'debug' => (bool) env('APP_DEBUG', false),
|
||||||
|
|
||||||
// Where the maintenance mode file is stored when calling down
|
|
||||||
'maintenance' => [
|
|
||||||
'driver' => 'cache',
|
|
||||||
//'store' => 'memcached',
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application URL
|
| Application URL
|
||||||
@ -55,22 +48,20 @@ return [
|
|||||||
|
|
|
|
||||||
| This URL is used by the console to properly generate URLs when using
|
| 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
|
| the Artisan command line tool. You should set this to the root of
|
||||||
| your application so that it is used when running Artisan tasks.
|
| the application so that it's available within Artisan commands.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
||||||
'asset_url' => env('ASSET_URL', null),
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Timezone
|
| Application Timezone
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may specify the default timezone for your application, which
|
| 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
|
| will be used by the PHP date and date-time functions. The timezone
|
||||||
| ahead and set this to a sensible default for you out of the box.
|
| is set to "UTC" by default as it is suitable for most use cases.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -82,164 +73,56 @@ return [
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The application locale determines the default locale that will be used
|
| The application locale determines the default locale that will be used
|
||||||
| by the translation service provider. You are free to set this value
|
| by Laravel's translation / localization methods. This option can be
|
||||||
| to any of the locales which will be supported by the application.
|
| set to any locale for which you plan to have translation strings.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'locale' => 'en',
|
'locale' => env('APP_LOCALE', 'en'),
|
||||||
|
|
||||||
/*
|
'fallback_locale' => env('APP_FALLBACK_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',
|
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Faker Locale
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This locale will be used by the Faker PHP library when generating fake
|
|
||||||
| data for your database seeds. For example, this will be used to get
|
|
||||||
| localized telephone numbers, street address information and more.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'faker_locale' => 'en_US',
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Encryption Key
|
| Encryption Key
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This key is used by the Illuminate encrypter service and should be set
|
| This key is utilized by Laravel's encryption services and should be set
|
||||||
| to a random, 32 character string, otherwise these encrypted strings
|
| to a random, 32 character string to ensure that all encrypted values
|
||||||
| will not be safe. Please do this before deploying an application!
|
| are secure. You should do this prior to deploying the application.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'key' => env('APP_KEY'),
|
|
||||||
|
|
||||||
'cipher' => 'AES-256-CBC',
|
'cipher' => 'AES-256-CBC',
|
||||||
|
|
||||||
/*
|
'key' => env('APP_KEY'),
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| 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' => [
|
'previous_keys' => [
|
||||||
|
...array_filter(
|
||||||
/*
|
explode(',', env('APP_PREVIOUS_KEYS', ''))
|
||||||
* 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...
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Application Service Providers...
|
|
||||||
*/
|
|
||||||
App\Providers\AppServiceProvider::class,
|
|
||||||
App\Providers\AuthServiceProvider::class,
|
|
||||||
// App\Providers\BroadcastServiceProvider::class,
|
|
||||||
App\Providers\RouteServiceProvider::class,
|
|
||||||
App\Providers\CustomBladeServiceProvider::class,
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Other Service Providers...
|
|
||||||
*/
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Class Aliases
|
| Maintenance Mode Driver
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This array of class aliases will be registered when this application
|
| These configuration options determine the driver used to determine and
|
||||||
| is started. However, feel free to register as many as you wish as
|
| manage Laravel's "maintenance mode" status. The "cache" driver will
|
||||||
| the aliases are "lazy" loaded so they don't hinder performance.
|
| allow maintenance mode to be controlled across multiple machines.
|
||||||
|
|
|
||||||
|
| Supported drivers: "file", "cache"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'aliases' => [
|
'maintenance' => [
|
||||||
|
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
|
||||||
'App' => Illuminate\Support\Facades\App::class,
|
'store' => env('APP_MAINTENANCE_STORE', 'database'),
|
||||||
'Arr' => Illuminate\Support\Arr::class,
|
|
||||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
|
||||||
'Asset' => Orchestra\Support\Facades\Asset::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,
|
|
||||||
'Carbon' => \Carbon\Carbon::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,
|
|
||||||
'Date' => Illuminate\Support\Facades\Date::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,
|
|
||||||
'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,
|
|
||||||
'Redis' => 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,
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// @todo MOVE this to a clrghouz configuration file
|
||||||
|
'id' => env('APP_SETUP_ID', 1),
|
||||||
];
|
];
|
||||||
|
@ -7,15 +7,15 @@ return [
|
|||||||
| Authentication Defaults
|
| Authentication Defaults
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This option controls the default authentication "guard" and password
|
| This option defines the default authentication "guard" and password
|
||||||
| reset options for your application. You may change these defaults
|
| reset "broker" for your application. You may change these values
|
||||||
| as required, but they're a perfect start for most applications.
|
| as required, but they're a perfect start for most applications.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'defaults' => [
|
'defaults' => [
|
||||||
'guard' => 'web',
|
'guard' => env('AUTH_GUARD', 'web'),
|
||||||
'passwords' => 'users',
|
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -25,13 +25,13 @@ return [
|
|||||||
|
|
|
|
||||||
| Next, you may define every authentication guard for your application.
|
| Next, you may define every authentication guard for your application.
|
||||||
| Of course, a great default configuration has been defined for you
|
| Of course, a great default configuration has been defined for you
|
||||||
| here which uses session storage and the Eloquent user provider.
|
| which utilizes session storage plus the Eloquent user provider.
|
||||||
|
|
|
|
||||||
| All authentication drivers have a user provider. This defines how the
|
| All authentication guards have a user provider, which defines how the
|
||||||
| users are actually retrieved out of your database or other storage
|
| users are actually retrieved out of your database or other storage
|
||||||
| mechanisms used by this application to persist your user's data.
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
|
||||||
| Supported: "session", "token"
|
| Supported: "session"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -40,22 +40,6 @@ return [
|
|||||||
'driver' => 'session',
|
'driver' => 'session',
|
||||||
'provider' => 'users',
|
'provider' => 'users',
|
||||||
],
|
],
|
||||||
|
|
||||||
'api' => [
|
|
||||||
'driver' => 'sanctum',
|
|
||||||
'provider' => 'users',
|
|
||||||
'hash' => false,
|
|
||||||
],
|
|
||||||
|
|
||||||
'token' => [
|
|
||||||
'driver' => 'token',
|
|
||||||
'provider' => 'users',
|
|
||||||
'hash' => false,
|
|
||||||
],
|
|
||||||
|
|
||||||
'matrix' => [
|
|
||||||
'driver' => 'matrix-token',
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -63,12 +47,12 @@ return [
|
|||||||
| User Providers
|
| User Providers
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| All authentication drivers have a user provider. This defines how the
|
| All authentication guards have a user provider, which defines how the
|
||||||
| users are actually retrieved out of your database or other storage
|
| users are actually retrieved out of your database or other storage
|
||||||
| mechanisms used by this application to persist your user's data.
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
|
||||||
| If you have multiple user tables or models you may configure multiple
|
| If you have multiple user tables or models you may configure multiple
|
||||||
| sources which represent each model / table. These sources may then
|
| providers to represent the model / table. These providers may then
|
||||||
| be assigned to any extra authentication guards you have defined.
|
| be assigned to any extra authentication guards you have defined.
|
||||||
|
|
|
|
||||||
| Supported: "database", "eloquent"
|
| Supported: "database", "eloquent"
|
||||||
@ -78,7 +62,7 @@ return [
|
|||||||
'providers' => [
|
'providers' => [
|
||||||
'users' => [
|
'users' => [
|
||||||
'driver' => 'eloquent',
|
'driver' => 'eloquent',
|
||||||
'model' => App\Models\User::class,
|
'model' => env('AUTH_MODEL', App\Models\User::class),
|
||||||
],
|
],
|
||||||
|
|
||||||
// 'users' => [
|
// 'users' => [
|
||||||
@ -92,20 +76,24 @@ return [
|
|||||||
| Resetting Passwords
|
| Resetting Passwords
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| You may specify multiple password reset configurations if you have more
|
| These configuration options specify the behavior of Laravel's password
|
||||||
| than one user table or model in the application and you want to have
|
| reset functionality, including the table utilized for token storage
|
||||||
| separate password reset settings based on the specific user types.
|
| and the user provider that is invoked to actually retrieve users.
|
||||||
|
|
|
|
||||||
| The expire time is the number of minutes that the reset token should be
|
| The expiry time is the number of minutes that each reset token will be
|
||||||
| considered valid. This security feature keeps tokens short-lived so
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
| they have less time to be guessed. You may change this as needed.
|
| they have less time to be guessed. You may change this as needed.
|
||||||
|
|
|
|
||||||
|
| The throttle setting is the number of seconds a user must wait before
|
||||||
|
| generating more password reset tokens. This prevents the user from
|
||||||
|
| quickly generating a very large amount of password reset tokens.
|
||||||
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'passwords' => [
|
'passwords' => [
|
||||||
'users' => [
|
'users' => [
|
||||||
'provider' => 'users',
|
'provider' => 'users',
|
||||||
'table' => 'password_resets',
|
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
|
||||||
'expire' => 60,
|
'expire' => 60,
|
||||||
'throttle' => 60,
|
'throttle' => 60,
|
||||||
],
|
],
|
||||||
@ -117,25 +105,11 @@ return [
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may define the amount of seconds before a password confirmation
|
| 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
|
| window expires and users are asked to re-enter their password via the
|
||||||
| confirmation screen. By default, the timeout lasts for three hours.
|
| confirmation screen. By default, the timeout lasts for three hours.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'password_timeout' => 10800,
|
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Social Network Configuration
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
'social' => [
|
|
||||||
'w3id' => [
|
|
||||||
'name' => 'W3id',
|
|
||||||
'id' => 'w3id',
|
|
||||||
'class' => 'btn-primary',
|
|
||||||
'icon' => 'fas fa-address-card',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
];
|
];
|
@ -1,59 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Default Broadcaster
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This option controls the default broadcaster that will be used by the
|
|
||||||
| framework when an event needs to be broadcast. You may set this to
|
|
||||||
| any of the connections defined in the "connections" array below.
|
|
||||||
|
|
|
||||||
| Supported: "pusher", "redis", "log", "null"
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'default' => 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' => [
|
|
||||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
|
||||||
'encrypted' => true,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
'redis' => [
|
|
||||||
'driver' => 'redis',
|
|
||||||
'connection' => 'default',
|
|
||||||
],
|
|
||||||
|
|
||||||
'log' => [
|
|
||||||
'driver' => 'log',
|
|
||||||
],
|
|
||||||
|
|
||||||
'null' => [
|
|
||||||
'driver' => 'null',
|
|
||||||
],
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
|
@ -9,15 +9,13 @@ return [
|
|||||||
| Default Cache Store
|
| Default Cache Store
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This option controls the default cache connection that gets used while
|
| This option controls the default cache store that will be used by the
|
||||||
| using this caching library. This connection is used when another is
|
| framework. This connection is utilized if another isn't explicitly
|
||||||
| not explicitly specified when executing a given caching function.
|
| specified when running a cache operation inside the application.
|
||||||
|
|
|
||||||
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('CACHE_DRIVER', 'file'),
|
'default' => env('CACHE_STORE', 'database'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -28,27 +26,30 @@ return [
|
|||||||
| well as their drivers. You may even define multiple stores for the
|
| well as their drivers. You may even define multiple stores for the
|
||||||
| same cache driver to group types of items stored in your caches.
|
| same cache driver to group types of items stored in your caches.
|
||||||
|
|
|
|
||||||
|
| Supported drivers: "array", "database", "file", "memcached",
|
||||||
|
| "redis", "dynamodb", "octane", "null"
|
||||||
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'stores' => [
|
'stores' => [
|
||||||
|
|
||||||
'apc' => [
|
|
||||||
'driver' => 'apc',
|
|
||||||
],
|
|
||||||
|
|
||||||
'array' => [
|
'array' => [
|
||||||
'driver' => 'array',
|
'driver' => 'array',
|
||||||
|
'serialize' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'database' => [
|
'database' => [
|
||||||
'driver' => 'database',
|
'driver' => 'database',
|
||||||
'table' => 'cache',
|
'connection' => env('DB_CACHE_CONNECTION'),
|
||||||
'connection' => null,
|
'table' => env('DB_CACHE_TABLE', 'cache'),
|
||||||
|
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
|
||||||
|
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'file' => [
|
'file' => [
|
||||||
'driver' => 'file',
|
'driver' => 'file',
|
||||||
'path' => storage_path('framework/cache/data'),
|
'path' => storage_path('framework/cache/data'),
|
||||||
|
'lock_path' => storage_path('framework/cache/data'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'memcached' => [
|
'memcached' => [
|
||||||
@ -72,7 +73,21 @@ return [
|
|||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
'driver' => 'redis',
|
'driver' => 'redis',
|
||||||
'connection' => 'cache',
|
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
|
||||||
|
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'dynamodb' => [
|
||||||
|
'driver' => 'dynamodb',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||||
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'octane' => [
|
||||||
|
'driver' => 'octane',
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
@ -82,12 +97,12 @@ return [
|
|||||||
| Cache Key Prefix
|
| Cache Key Prefix
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| When utilizing a RAM based store such as APC or Memcached, there might
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
|
||||||
| be other applications utilizing the same cache. So, we'll specify a
|
| stores, there might be other applications using the same cache. For
|
||||||
| value to get prefixed to all our keys so we can avoid collisions.
|
| that reason, you may prefix every cache key to avoid collisions.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -8,26 +10,22 @@ return [
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may specify which of the database connections below you wish
|
| Here you may specify which of the database connections below you wish
|
||||||
| to use as your default connection for all database work. Of course
|
| to use as your default connection for database operations. This is
|
||||||
| you may use many connections at once using the Database library.
|
| the connection which will be utilized unless another connection
|
||||||
|
| is explicitly specified when you execute a query / statement.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('DB_CONNECTION', 'mysql'),
|
'default' => env('DB_CONNECTION', 'sqlite'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Database Connections
|
| Database Connections
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here are each of the database connections setup for your application.
|
| Below are all of the database connections defined for your application.
|
||||||
| Of course, examples of configuring each database platform that is
|
| An example configuration is provided for each database system which
|
||||||
| supported by Laravel is shown below to make development simple.
|
| is supported by Laravel. You're free to add / remove connections.
|
||||||
|
|
|
||||||
|
|
|
||||||
| 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.
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -35,6 +33,7 @@ return [
|
|||||||
|
|
||||||
'sqlite' => [
|
'sqlite' => [
|
||||||
'driver' => 'sqlite',
|
'driver' => 'sqlite',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||||
@ -42,81 +41,72 @@ return [
|
|||||||
|
|
||||||
'mysql' => [
|
'mysql' => [
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
'host' => env('DB_HOST', '127.0.0.1'),
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
'port' => env('DB_PORT', '3306'),
|
'port' => env('DB_PORT', '3306'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
'username' => env('DB_USERNAME', 'forge'),
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'unix_socket' => env('DB_SOCKET', ''),
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
'charset' => 'utf8mb4',
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||||
'collation' => 'utf8mb4_unicode_ci',
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'prefix_indexes' => true,
|
'prefix_indexes' => true,
|
||||||
'strict' => true,
|
'strict' => true,
|
||||||
'engine' => null,
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'mariadb' => [
|
||||||
|
'driver' => 'mariadb',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||||
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
],
|
],
|
||||||
|
|
||||||
'pgsql' => [
|
'pgsql' => [
|
||||||
'driver' => 'pgsql',
|
'driver' => 'pgsql',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
'host' => env('DB_HOST', '127.0.0.1'),
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
'port' => env('DB_PORT', '5432'),
|
'port' => env('DB_PORT', '5432'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
'username' => env('DB_USERNAME', 'forge'),
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => 'utf8',
|
'charset' => env('DB_CHARSET', 'utf8'),
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'prefix_indexes' => true,
|
'prefix_indexes' => true,
|
||||||
'schema' => 'public',
|
'search_path' => 'public',
|
||||||
'sslmode' => 'disable', //depends on your security level https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS
|
'sslmode' => 'prefer',
|
||||||
'sslrootcert' => env('DB_SSLROOTCERT', 'config/ssl/ca.crt'),
|
|
||||||
'sslcert' => env('DB_SSLCERT', 'config/ssl/client.crt'),
|
|
||||||
'sslkey' => env('DB_SSLKEY', 'config/ssl/client.key'),
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'sqlsrv' => [
|
'sqlsrv' => [
|
||||||
'driver' => 'sqlsrv',
|
'driver' => 'sqlsrv',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
'host' => env('DB_HOST', 'localhost'),
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
'port' => env('DB_PORT', '1433'),
|
'port' => env('DB_PORT', '1433'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
'username' => env('DB_USERNAME', 'forge'),
|
|
||||||
'password' => env('DB_PASSWORD', ''),
|
|
||||||
'charset' => 'utf8',
|
|
||||||
'prefix' => '',
|
|
||||||
'prefix_indexes' => true,
|
|
||||||
],
|
|
||||||
|
|
||||||
'cockroach' => [
|
|
||||||
'driver' => 'cockroach',
|
|
||||||
'host' => env('DB_HOST', 'HOSTNAME-OF-COCKROACH-SERVER'),
|
|
||||||
'port' => env('DB_PORT', '26257'),
|
|
||||||
'database' => env('DB_DATABASE', 'DATABASE-NAME'),
|
|
||||||
'username' => env('DB_USERNAME', 'root'),
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => 'utf8',
|
'charset' => env('DB_CHARSET', 'utf8'),
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'schema' => 'public',
|
'prefix_indexes' => true,
|
||||||
'sslmode' => env('DB_SSLMODE', 'prefer'),
|
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
||||||
|
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
||||||
// Only set these keys if you want to run en secure mode
|
|
||||||
// otherwise you can them out of the configuration array
|
|
||||||
'sslcert' => env('DB_SSLCERT', 'config/ssl/client.crt'),
|
|
||||||
'sslkey' => env('DB_SSLKEY', 'config/ssl/client.key'),
|
|
||||||
'sslrootcert' => env('DB_SSLROOTCERT', 'config/ssl/ca.crt'),
|
|
||||||
],
|
|
||||||
|
|
||||||
'mongodb' => [
|
|
||||||
'driver' => 'mongodb',
|
|
||||||
'host' => env('DB_MONGO_HOST', '127.0.0.1'),
|
|
||||||
'port' => env('DB_MONGO_PORT', 27017),
|
|
||||||
'database' => env('DB_MONGO_DATABASE', 'fido'),
|
|
||||||
'username' => env('DB_MONGO_USERNAME', 'mongo'),
|
|
||||||
'password' => env('DB_MONGO_PASSWORD', 'password'),
|
|
||||||
'options' => [
|
|
||||||
// here you can pass more settings to the Mongo Driver Manager
|
|
||||||
// see https://www.php.net/manual/en/mongodb-driver-manager.construct.php under "Uri Options" for a list of complete parameters that you can use
|
|
||||||
|
|
||||||
'database' => env('DB_AUTHENTICATION_DATABASE', 'admin'), // required with Mongo 3+
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
@ -128,11 +118,14 @@ return [
|
|||||||
|
|
|
|
||||||
| This table keeps track of all the migrations that have already run for
|
| This table keeps track of all the migrations that have already run for
|
||||||
| your application. Using this information, we can determine which of
|
| your application. Using this information, we can determine which of
|
||||||
| the migrations on disk haven't actually been run in the database.
|
| the migrations on disk haven't actually been run on the database.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'migrations' => 'migrations',
|
'migrations' => [
|
||||||
|
'table' => 'migrations',
|
||||||
|
'update_date_on_publish' => true,
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -141,26 +134,35 @@ return [
|
|||||||
|
|
|
|
||||||
| Redis is an open source, fast, and advanced key-value store that also
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
| provides a richer body of commands than a typical key-value system
|
| provides a richer body of commands than a typical key-value system
|
||||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
| such as Memcached. You may define your connection settings here.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
|
|
||||||
'client' => 'phpredis',
|
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||||
|
|
||||||
|
'options' => [
|
||||||
|
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||||
|
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||||
|
],
|
||||||
|
|
||||||
'default' => [
|
'default' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
'password' => env('REDIS_PASSWORD', null),
|
'username' => env('REDIS_USERNAME'),
|
||||||
'port' => env('REDIS_PORT', 6379),
|
'password' => env('REDIS_PASSWORD'),
|
||||||
'database' => env('REDIS_DB', 0),
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_DB', '0'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'cache' => [
|
'cache' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
'password' => env('REDIS_PASSWORD', null),
|
'username' => env('REDIS_USERNAME'),
|
||||||
'port' => env('REDIS_PORT', 6379),
|
'password' => env('REDIS_PASSWORD'),
|
||||||
'database' => env('REDIS_CACHE_DB', 1),
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_CACHE_DB', '1'),
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -9,7 +9,7 @@ return [
|
|||||||
|
|
|
|
||||||
| Here you may specify the default filesystem disk that should be used
|
| 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
|
| by the framework. The "local" disk, as well as a variety of cloud
|
||||||
| based disks are available to your application. Just store away!
|
| based disks are available to your application for file storage.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -20,11 +20,11 @@ return [
|
|||||||
| Filesystem Disks
|
| Filesystem Disks
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may configure as many filesystem "disks" as you wish, and you
|
| Below you may configure as many filesystem disks as necessary, and you
|
||||||
| may even configure multiple disks of the same driver. Defaults have
|
| may even configure multiple disks for the same driver. Examples for
|
||||||
| been set up for each driver as an example of the required values.
|
| most supported storage drivers are configured here for reference.
|
||||||
|
|
|
|
||||||
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
| Supported drivers: "local", "ftp", "sftp", "s3"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ return [
|
|||||||
'local' => [
|
'local' => [
|
||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'root' => storage_path('app'),
|
'root' => storage_path('app'),
|
||||||
'throw' => true,
|
'throw' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'public' => [
|
'public' => [
|
||||||
@ -53,7 +53,7 @@ return [
|
|||||||
'url' => env('AWS_URL'),
|
'url' => env('AWS_URL'),
|
||||||
'endpoint' => env('AWS_ENDPOINT'),
|
'endpoint' => env('AWS_ENDPOINT'),
|
||||||
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||||
'throw' => true,
|
'throw' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Default Hash Driver
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This option controls the default hash driver that will be used to hash
|
|
||||||
| passwords for your application. By default, the bcrypt algorithm is
|
|
||||||
| used; however, you remain free to modify this option if you wish.
|
|
||||||
|
|
|
||||||
| Supported: "bcrypt", "argon", "argon2id"
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'driver' => 'bcrypt',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| 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,
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
|
@ -3,6 +3,7 @@
|
|||||||
use Monolog\Handler\NullHandler;
|
use Monolog\Handler\NullHandler;
|
||||||
use Monolog\Handler\StreamHandler;
|
use Monolog\Handler\StreamHandler;
|
||||||
use Monolog\Handler\SyslogUdpHandler;
|
use Monolog\Handler\SyslogUdpHandler;
|
||||||
|
use Monolog\Processor\PsrLogMessageProcessor;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
@ -11,33 +12,49 @@ return [
|
|||||||
| Default Log Channel
|
| Default Log Channel
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This option defines the default log channel that gets used when writing
|
| This option defines the default log channel that is utilized to write
|
||||||
| messages to the logs. The name specified in this option should match
|
| messages to your logs. The value provided here should match one of
|
||||||
| one of the channels defined in the "channels" configuration array.
|
| the channels present in the list of "channels" configured below.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('LOG_CHANNEL', 'stack'),
|
'default' => env('LOG_CHANNEL', 'stack'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Deprecations Log Channel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the log channel that should be used to log warnings
|
||||||
|
| regarding deprecated PHP and library features. This allows you to get
|
||||||
|
| your application ready for upcoming major versions of dependencies.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'deprecations' => [
|
||||||
|
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||||
|
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Log Channels
|
| Log Channels
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may configure the log channels for your application. Out of
|
| Here you may configure the log channels for your application. Laravel
|
||||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
| utilizes the Monolog PHP logging library, which includes a variety
|
||||||
| you a variety of powerful log handlers / formatters to utilize.
|
| of powerful log handlers and formatters that you're free to use.
|
||||||
|
|
|
|
||||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
| Available drivers: "single", "daily", "slack", "syslog",
|
||||||
| "errorlog", "monolog",
|
| "errorlog", "monolog", "custom", "stack"
|
||||||
| "custom", "stack"
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'channels' => [
|
'channels' => [
|
||||||
|
|
||||||
'stack' => [
|
'stack' => [
|
||||||
'driver' => 'stack',
|
'driver' => 'stack',
|
||||||
'channels' => ['daily'],
|
'channels' => explode(',', env('LOG_STACK', 'single')),
|
||||||
'ignore_exceptions' => false,
|
'ignore_exceptions' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -45,31 +62,36 @@ return [
|
|||||||
'driver' => 'single',
|
'driver' => 'single',
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
'level' => env('LOG_LEVEL', 'debug'),
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
'daily' => [
|
'daily' => [
|
||||||
'driver' => 'daily',
|
'driver' => 'daily',
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
'level' => env('LOG_LEVEL', 'debug'),
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
'days' => 93,
|
'days' => env('LOG_DAILY_DAYS', 14),
|
||||||
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
'slack' => [
|
'slack' => [
|
||||||
'driver' => 'slack',
|
'driver' => 'slack',
|
||||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
'username' => 'Laravel Log',
|
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
|
||||||
'emoji' => ':boom:',
|
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
|
||||||
'level' => env('LOG_LEVEL', 'critical'),
|
'level' => env('LOG_LEVEL', 'critical'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
'papertrail' => [
|
'papertrail' => [
|
||||||
'driver' => 'monolog',
|
'driver' => 'monolog',
|
||||||
'level' => env('LOG_LEVEL', 'debug'),
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
'handler' => SyslogUdpHandler::class,
|
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||||
'handler_with' => [
|
'handler_with' => [
|
||||||
'host' => env('PAPERTRAIL_URL'),
|
'host' => env('PAPERTRAIL_URL'),
|
||||||
'port' => env('PAPERTRAIL_PORT'),
|
'port' => env('PAPERTRAIL_PORT'),
|
||||||
|
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||||
],
|
],
|
||||||
|
'processors' => [PsrLogMessageProcessor::class],
|
||||||
],
|
],
|
||||||
|
|
||||||
'stderr' => [
|
'stderr' => [
|
||||||
@ -80,16 +102,20 @@ return [
|
|||||||
'with' => [
|
'with' => [
|
||||||
'stream' => 'php://stderr',
|
'stream' => 'php://stderr',
|
||||||
],
|
],
|
||||||
|
'processors' => [PsrLogMessageProcessor::class],
|
||||||
],
|
],
|
||||||
|
|
||||||
'syslog' => [
|
'syslog' => [
|
||||||
'driver' => 'syslog',
|
'driver' => 'syslog',
|
||||||
'level' => env('LOG_LEVEL', 'debug'),
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
|
||||||
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
'errorlog' => [
|
'errorlog' => [
|
||||||
'driver' => 'errorlog',
|
'driver' => 'errorlog',
|
||||||
'level' => env('LOG_LEVEL', 'debug'),
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
'null' => [
|
'null' => [
|
||||||
@ -100,6 +126,7 @@ return [
|
|||||||
'emergency' => [
|
'emergency' => [
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -7,13 +7,14 @@ return [
|
|||||||
| Default Mailer
|
| Default Mailer
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This option controls the default mailer that is used to send any email
|
| This option controls the default mailer that is used to send all email
|
||||||
| messages sent by your application. Alternative mailers may be setup
|
| messages unless another mailer is explicitly specified when sending
|
||||||
| and used as needed; however, this mailer will be used by default.
|
| the message. All additional mailers can be configured within the
|
||||||
|
| "mailers" array. Examples of each type of mailer are provided.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('MAIL_MAILER', 'smtp'),
|
'default' => env('MAIL_MAILER', 'log'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -24,43 +25,49 @@ return [
|
|||||||
| their respective settings. Several examples have been configured for
|
| their respective settings. Several examples have been configured for
|
||||||
| you and you are free to add your own as your application requires.
|
| you and you are free to add your own as your application requires.
|
||||||
|
|
|
|
||||||
| Laravel supports a variety of mail "transport" drivers to be used while
|
| Laravel supports a variety of mail "transport" drivers that can be used
|
||||||
| sending an e-mail. You will specify which one you are using for your
|
| when delivering an email. You may specify which one you're using for
|
||||||
| mailers below. You are free to add additional mailers as required.
|
| your mailers below. You may also add additional mailers if needed.
|
||||||
|
|
|
|
||||||
| Supported: "smtp", "sendmail", "mailgun", "ses",
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
|
||||||
| "postmark", "log", "array"
|
| "postmark", "resend", "log", "array",
|
||||||
|
| "failover", "roundrobin"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'mailers' => [
|
'mailers' => [
|
||||||
|
|
||||||
'smtp' => [
|
'smtp' => [
|
||||||
'transport' => 'smtp',
|
'transport' => 'smtp',
|
||||||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
'url' => env('MAIL_URL'),
|
||||||
'port' => env('MAIL_PORT', 587),
|
'host' => env('MAIL_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MAIL_PORT', 2525),
|
||||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||||
'username' => env('MAIL_USERNAME'),
|
'username' => env('MAIL_USERNAME'),
|
||||||
'password' => env('MAIL_PASSWORD'),
|
'password' => env('MAIL_PASSWORD'),
|
||||||
'timeout' => null,
|
'timeout' => null,
|
||||||
'auth_mode' => null,
|
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
|
||||||
'verify_peer' => false,
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'ses' => [
|
'ses' => [
|
||||||
'transport' => 'ses',
|
'transport' => 'ses',
|
||||||
],
|
],
|
||||||
|
|
||||||
'mailgun' => [
|
|
||||||
'transport' => 'mailgun',
|
|
||||||
],
|
|
||||||
|
|
||||||
'postmark' => [
|
'postmark' => [
|
||||||
'transport' => 'postmark',
|
'transport' => 'postmark',
|
||||||
|
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
|
||||||
|
// 'client' => [
|
||||||
|
// 'timeout' => 5,
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
'resend' => [
|
||||||
|
'transport' => 'resend',
|
||||||
],
|
],
|
||||||
|
|
||||||
'sendmail' => [
|
'sendmail' => [
|
||||||
'transport' => 'sendmail',
|
'transport' => 'sendmail',
|
||||||
'path' => '/usr/sbin/sendmail -bs',
|
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'log' => [
|
'log' => [
|
||||||
@ -71,6 +78,23 @@ return [
|
|||||||
'array' => [
|
'array' => [
|
||||||
'transport' => 'array',
|
'transport' => 'array',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'failover' => [
|
||||||
|
'transport' => 'failover',
|
||||||
|
'mailers' => [
|
||||||
|
'smtp',
|
||||||
|
'log',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'roundrobin' => [
|
||||||
|
'transport' => 'roundrobin',
|
||||||
|
'mailers' => [
|
||||||
|
'ses',
|
||||||
|
'postmark',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -78,9 +102,9 @@ return [
|
|||||||
| Global "From" Address
|
| Global "From" Address
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| You may wish for all e-mails sent by your application to be sent from
|
| You may wish for all emails sent by your application to be sent from
|
||||||
| the same address. Here, you may specify a name and address that is
|
| 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.
|
| used globally for all emails that are sent by your application.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -89,23 +113,4 @@ return [
|
|||||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| 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'),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -7,22 +7,22 @@ return [
|
|||||||
| Default Queue Connection Name
|
| Default Queue Connection Name
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Laravel's queue API supports an assortment of back-ends via a single
|
| Laravel's queue supports a variety of backends via a single, unified
|
||||||
| API, giving you convenient access to each back-end using the same
|
| API, giving you convenient access to each backend using identical
|
||||||
| syntax for every one. Here you may define a default connection.
|
| syntax for each. The default queue connection is defined below.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('QUEUE_CONNECTION', 'sync'),
|
'default' => env('QUEUE_CONNECTION', 'database'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Queue Connections
|
| Queue Connections
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may configure the connection information for each server that
|
| Here you may configure the connection options for every queue backend
|
||||||
| is used by your application. A default configuration has been added
|
| used by your application. An example configuration is provided for
|
||||||
| for each back-end shipped with Laravel. You are free to add more.
|
| each backend supported by Laravel. You're also free to add more.
|
||||||
|
|
|
|
||||||
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||||
|
|
|
|
||||||
@ -35,53 +35,77 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
'database' => [
|
'database' => [
|
||||||
//'connection' => 'jobs',
|
|
||||||
'driver' => 'database',
|
'driver' => 'database',
|
||||||
'table' => 'jobs',
|
'connection' => env('DB_QUEUE_CONNECTION'),
|
||||||
'queue' => 'default',
|
'table' => env('DB_QUEUE_TABLE', 'jobs'),
|
||||||
'retry_after' => 90,
|
'queue' => env('DB_QUEUE', 'default'),
|
||||||
|
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
|
||||||
|
'after_commit' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'beanstalkd' => [
|
'beanstalkd' => [
|
||||||
'driver' => 'beanstalkd',
|
'driver' => 'beanstalkd',
|
||||||
'host' => 'localhost',
|
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
|
||||||
'queue' => 'default',
|
'queue' => env('BEANSTALKD_QUEUE', 'default'),
|
||||||
'retry_after' => 90,
|
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
|
||||||
|
'block_for' => 0,
|
||||||
|
'after_commit' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'sqs' => [
|
'sqs' => [
|
||||||
'driver' => 'sqs',
|
'driver' => 'sqs',
|
||||||
'key' => env('SQS_KEY', 'your-public-key'),
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
'secret' => env('SQS_SECRET', 'your-secret-key'),
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||||
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
'queue' => env('SQS_QUEUE', 'default'),
|
||||||
'region' => env('SQS_REGION', 'us-east-1'),
|
'suffix' => env('SQS_SUFFIX'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
'after_commit' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
'driver' => 'redis',
|
'driver' => 'redis',
|
||||||
'connection' => 'default',
|
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
|
||||||
'queue' => env('REDIS_QUEUE', 'default'),
|
'queue' => env('REDIS_QUEUE', 'default'),
|
||||||
'retry_after' => 90,
|
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
|
||||||
'block_for' => null,
|
'block_for' => null,
|
||||||
|
'after_commit' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Job Batching
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following options configure the database and table that store job
|
||||||
|
| batching information. These options can be updated to any database
|
||||||
|
| connection and table which has been defined by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'batching' => [
|
||||||
|
'database' => env('DB_CONNECTION', 'sqlite'),
|
||||||
|
'table' => 'job_batches',
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Failed Queue Jobs
|
| Failed Queue Jobs
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| These options configure the behavior of failed queue job logging so you
|
| 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
|
| can control how and where failed jobs are stored. Laravel ships with
|
||||||
| have failed. You may change them to any database / table you wish.
|
| support for storing failed jobs in a simple file or in a database.
|
||||||
|
|
|
||||||
|
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'failed' => [
|
'failed' => [
|
||||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||||
'database' => env('DB_CONNECTION', 'pgsql'),
|
'database' => env('DB_CONNECTION', 'sqlite'),
|
||||||
'table' => 'failed_jobs',
|
'table' => 'failed_jobs',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -14,12 +14,6 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'mailgun' => [
|
|
||||||
'domain' => env('MAILGUN_DOMAIN'),
|
|
||||||
'secret' => env('MAILGUN_SECRET'),
|
|
||||||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
|
||||||
],
|
|
||||||
|
|
||||||
'postmark' => [
|
'postmark' => [
|
||||||
'token' => env('POSTMARK_TOKEN'),
|
'token' => env('POSTMARK_TOKEN'),
|
||||||
],
|
],
|
||||||
@ -30,11 +24,15 @@ return [
|
|||||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'w3id' => [
|
'resend' => [
|
||||||
'access' => env('AUTH_W3ID_BLUEGROUP_ACCESS'),
|
'key' => env('RESEND_KEY'),
|
||||||
'admin' => env('AUTH_W3ID_BLUEGROUP_ADMIN'),
|
|
||||||
'client_id' => env('AUTH_W3ID_CLIENT_ID'),
|
|
||||||
'client_secret' => env('AUTH_W3ID_SECRET'),
|
|
||||||
'redirect' => '/auth/w3id/callback',
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'notifications' => [
|
||||||
|
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
|
||||||
|
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -9,16 +9,16 @@ return [
|
|||||||
| Default Session Driver
|
| Default Session Driver
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This option controls the default session "driver" that will be used on
|
| This option determines the default session driver that is utilized for
|
||||||
| requests. By default, we will use the lightweight native driver but
|
| incoming requests. Laravel supports a variety of storage options to
|
||||||
| you may specify any of the other wonderful drivers provided here.
|
| persist session data. Database storage is a great default choice.
|
||||||
|
|
|
|
||||||
| Supported: "file", "cookie", "database", "apc",
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
| "memcached", "redis", "array"
|
| "memcached", "redis", "dynamodb", "array"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'driver' => env('SESSION_DRIVER', 'file'),
|
'driver' => env('SESSION_DRIVER', 'database'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -27,13 +27,14 @@ return [
|
|||||||
|
|
|
|
||||||
| Here you may specify the number of minutes that you wish the session
|
| 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 be allowed to remain idle before it expires. If you want them
|
||||||
| to immediately expire on the browser closing, set that option.
|
| to expire immediately when the browser is closed then you may
|
||||||
|
| indicate that via the expire_on_close configuration option.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'lifetime' => env('SESSION_LIFETIME', 120),
|
'lifetime' => env('SESSION_LIFETIME', 120),
|
||||||
|
|
||||||
'expire_on_close' => false,
|
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -41,21 +42,21 @@ return [
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This option allows you to easily specify that all of your session data
|
| 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
|
| should be encrypted before it's stored. All encryption is performed
|
||||||
| automatically by Laravel and you can use the Session like normal.
|
| automatically by Laravel and you may use the session like normal.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'encrypt' => false,
|
'encrypt' => env('SESSION_ENCRYPT', false),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Session File Location
|
| Session File Location
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| When using the native session driver, we need a location where session
|
| When utilizing the "file" session driver, the session files are placed
|
||||||
| files may be stored. A default has been set for you but a different
|
| on disk. The default storage location is defined here; however, you
|
||||||
| location may be specified. This is only needed for file sessions.
|
| are free to provide another location where they should be stored.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -72,33 +73,35 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'connection' => env('SESSION_CONNECTION', null),
|
'connection' => env('SESSION_CONNECTION'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Session Database Table
|
| Session Database Table
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| When using the "database" session driver, you may specify the table we
|
| When using the "database" session driver, you may specify the table to
|
||||||
| should use to manage the sessions. Of course, a sensible default is
|
| be used to store sessions. Of course, a sensible default is defined
|
||||||
| provided for you; however, you are free to change this as needed.
|
| for you; however, you're welcome to change this to another table.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'table' => 'sessions',
|
'table' => env('SESSION_TABLE', 'sessions'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Session Cache Store
|
| Session Cache Store
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| When using the "apc" or "memcached" session drivers, you may specify a
|
| When using one of the framework's cache driven session backends, you may
|
||||||
| cache store that should be used for these sessions. This value must
|
| define the cache store which should be used to store the session data
|
||||||
| correspond with one of the application's configured cache stores.
|
| between requests. This must match one of your defined cache stores.
|
||||||
|
|
|
||||||
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'store' => env('SESSION_STORE', null),
|
'store' => env('SESSION_STORE'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -118,9 +121,9 @@ return [
|
|||||||
| Session Cookie Name
|
| Session Cookie Name
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may change the name of the cookie used to identify a session
|
| Here you may change the name of the session cookie that is created by
|
||||||
| instance by ID. The name specified here will get used every time a
|
| the framework. Typically, you should not need to change this value
|
||||||
| new session cookie is created by the framework for every driver.
|
| since doing so does not grant a meaningful security improvement.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -136,24 +139,24 @@ return [
|
|||||||
|
|
|
|
||||||
| The session cookie path determines the path for which the cookie will
|
| The session cookie path determines the path for which the cookie will
|
||||||
| be regarded as available. Typically, this will be the root path of
|
| be regarded as available. Typically, this will be the root path of
|
||||||
| your application but you are free to change this when necessary.
|
| your application, but you're free to change this when necessary.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'path' => '/',
|
'path' => env('SESSION_PATH', '/'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Session Cookie Domain
|
| Session Cookie Domain
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may change the domain of the cookie used to identify a session
|
| This value determines the domain and subdomains the session cookie is
|
||||||
| in your application. This will determine which domains the cookie is
|
| available to. By default, the cookie will be available to the root
|
||||||
| available to in your application. A sensible default has been set.
|
| domain and all subdomains. Typically, this shouldn't be changed.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'domain' => env('SESSION_DOMAIN', null),
|
'domain' => env('SESSION_DOMAIN'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -162,11 +165,11 @@ return [
|
|||||||
|
|
|
|
||||||
| By setting this option to true, session cookies will only be sent back
|
| 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
|
| 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.
|
| the cookie from being sent to you when it can't be done securely.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'secure' => env('SESSION_SECURE_COOKIE', false),
|
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -175,11 +178,11 @@ return [
|
|||||||
|
|
|
|
||||||
| Setting this value to true will prevent JavaScript from accessing the
|
| Setting this value to true will prevent JavaScript from accessing the
|
||||||
| value of the cookie and the cookie will only be accessible through
|
| value of the cookie and the cookie will only be accessible through
|
||||||
| the HTTP protocol. You are free to modify this option if needed.
|
| the HTTP protocol. It's unlikely you should disable this option.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'http_only' => true,
|
'http_only' => env('SESSION_HTTP_ONLY', true),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -188,12 +191,27 @@ return [
|
|||||||
|
|
|
|
||||||
| This option determines how your cookies behave when cross-site requests
|
| This option determines how your cookies behave when cross-site requests
|
||||||
| take place, and can be used to mitigate CSRF attacks. By default, we
|
| 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.
|
| will set this value to "lax" to permit secure cross-site requests.
|
||||||
|
|
|
|
||||||
| Supported: "lax", "strict"
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
||||||
|
|
|
||||||
|
| Supported: "lax", "strict", "none", null
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'same_site' => env('SESSION_SAME_SITE', 'lax'),
|
'same_site' => env('SESSION_SAME_SITE', 'lax'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Partitioned Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will tie the cookie to the top-level site for
|
||||||
|
| a cross-site context. Partitioned cookies are accepted by the browser
|
||||||
|
| when flagged "secure" and the Same-Site attribute is set to "none".
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| View Storage Paths
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Most templating systems load templates from disk. Here you may specify
|
|
||||||
| an array of paths that should be checked for your views. Of course
|
|
||||||
| the usual Laravel view path has already been registered for you.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'paths' => [
|
|
||||||
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' => realpath(storage_path('framework/views')),
|
|
||||||
|
|
||||||
];
|
|
@ -1,18 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Foundation\Inspiring;
|
use Illuminate\Support\Facades\Schedule;
|
||||||
|
|
||||||
/*
|
use App\Jobs\AddressIdleDomain;
|
||||||
|--------------------------------------------------------------------------
|
use App\Jobs\MailSend;
|
||||||
| Console Routes
|
use App\Jobs\SystemHeartbeat;
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This file is where you may define all of your Closure based console
|
|
||||||
| commands. Each Closure is bound to a command instance allowing a
|
|
||||||
| simple approach to interacting with each command's IO methods.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
Artisan::command('inspire', function () {
|
Schedule::job(new MailSend(TRUE))
|
||||||
$this->comment(Inspiring::quote());
|
->timezone('Australia/Melbourne')
|
||||||
})->describe('Display an inspiring quote');
|
->everyMinute()
|
||||||
|
->withoutOverlapping();
|
||||||
|
|
||||||
|
Schedule::job(new MailSend(FALSE))
|
||||||
|
->timezone('Australia/Melbourne')
|
||||||
|
->twiceDaily(1,13);
|
||||||
|
|
||||||
|
Schedule::job(new SystemHeartbeat)
|
||||||
|
->timezone('Australia/Melbourne')
|
||||||
|
->hourly();
|
||||||
|
|
||||||
|
Schedule::job(new AddressIdleDomain)
|
||||||
|
->timezone('Australia/Melbourne')
|
||||||
|
->weeklyOn(0,'01:00');
|
Loading…
Reference in New Issue
Block a user