chore: upgrade to Laravel 11 (#7193)
This commit is contained in:
@@ -29,8 +29,6 @@ set_conf() {
|
||||
setenv "QUEUE_CONNECTION" "sync"
|
||||
setenv "SESSION_DRIVER" "database"
|
||||
setenv "MAIL_MAILER" "log"
|
||||
setenv "MAIL_FROM_ADDRESS" "from@mail.com"
|
||||
setenv "MAIL_REPLY_TO_ADDRESS" "reply@mail.com"
|
||||
}
|
||||
|
||||
composer_install() {
|
||||
|
||||
+4
-1
@@ -20,5 +20,8 @@ indent_size = 2
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[docker-compose.yml]
|
||||
indent_size = 4
|
||||
|
||||
+17
-17
@@ -24,24 +24,24 @@ APP_KEY=
|
||||
APP_DEBUG=true
|
||||
|
||||
# The URL of your application.
|
||||
APP_URL=localhost:8000
|
||||
APP_URL=http://localhost:8000
|
||||
|
||||
# Database to store information
|
||||
# The documentation is here: https://laravel.com/docs/10.x/database
|
||||
# You can also see the different values you can use in config/database.php
|
||||
DB_CONNECTION=sqlite
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=full_path_to_the_sqlite_database
|
||||
DB_USERNAME=monica
|
||||
DB_PASSWORD=secret
|
||||
# DB_HOST=127.0.0.1
|
||||
# DB_PORT=3306
|
||||
# DB_DATABASE=monica
|
||||
# DB_USERNAME=monica
|
||||
# DB_PASSWORD=secret
|
||||
|
||||
# Database for SQLite - used for local development
|
||||
# Database for tests - used for local development
|
||||
DB_TEST_DRIVER=sqlite
|
||||
DB_TEST_DATABASE=full_path_to_the_sqlite_database
|
||||
DB_TEST_HOST=127.0.0.1
|
||||
DB_TEST_USERNAME=root
|
||||
DB_TEST_PASSWORD=root
|
||||
# DB_TEST_DATABASE=monica
|
||||
# DB_TEST_HOST=127.0.0.1
|
||||
# DB_TEST_USERNAME=root
|
||||
# DB_TEST_PASSWORD=root
|
||||
|
||||
# Frequency of creation of new log files. Logs are written when an error occurs.
|
||||
# Refer to config/logging.php for the possible values.
|
||||
@@ -59,10 +59,9 @@ LOG_CHANNEL=stack
|
||||
#. Queue: sync, database, beanstalkd, sqs, redis
|
||||
# If Queue is not set to 'sync', you'll have to set a queue worker
|
||||
# See https://laravel.com/docs/5.7/queues#running-the-queue-worker
|
||||
CACHE_DRIVER=file
|
||||
CACHE_STORE=database
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
SESSION_DRIVER=database
|
||||
|
||||
# Redis, if you need it for the queues
|
||||
REDIS_HOST=127.0.0.1
|
||||
@@ -70,15 +69,16 @@ REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
# Mailing
|
||||
MAIL_MAILER=smtp
|
||||
# Set the MAIL_MAILER to 'smtp' if you want to send emails.
|
||||
MAIL_MAILER=log
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=
|
||||
MAIL_FROM_ADDRESS=hello@example.com
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
MAIL_REPLY_TO_ADDRESS=
|
||||
MAIL_REPLY_TO_ADDRESS=hello@example.com
|
||||
MAIL_REPLY_TO_NAME="${APP_NAME}"
|
||||
|
||||
# Search
|
||||
|
||||
@@ -14,3 +14,4 @@ jobs:
|
||||
uses: monicahq/workflows/.github/workflows/static.yml@v2
|
||||
with:
|
||||
php-version: 8.3
|
||||
with: phpstan
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name: 'monica:getversion')]
|
||||
class GetVersion extends Command
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Translation\MessageSelector;
|
||||
use Stichoza\GoogleTranslate\GoogleTranslate;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
use function Safe\json_decode;
|
||||
use function Safe\json_encode;
|
||||
@@ -14,6 +15,7 @@ use function Safe\json_encode;
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
#[AsCommand(name: 'monica:localize')]
|
||||
class MonicaLocalize extends Command
|
||||
{
|
||||
private GoogleTranslate $googleTranslate;
|
||||
|
||||
@@ -22,10 +22,12 @@ use Carbon\Carbon;
|
||||
use Faker\Factory as Faker;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Console\ConfirmableTrait;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
#[AsCommand(name: 'monica:dummy')]
|
||||
class SetupDummyAccount extends Command
|
||||
{
|
||||
use ConfirmableTrait;
|
||||
|
||||
@@ -5,7 +5,9 @@ namespace App\Console\Commands\Local;
|
||||
use App\Domains\Contact\DavClient\Jobs\SynchronizeAddressBooks;
|
||||
use App\Models\AddressBookSubscription;
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name: 'monica:updateaddressbooksubscription')]
|
||||
class UpdateAddressBookSubscription extends Command
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,9 @@ use App\Models\User;
|
||||
use App\Models\Vault;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name: 'monica:newaddressbooksubscription')]
|
||||
class NewAddressBookSubscription extends Command
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,11 +5,13 @@ namespace App\Console\Commands;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Console\ConfirmableTrait;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
#[AsCommand(name: 'monica:setup')]
|
||||
class SetupApplication extends Command
|
||||
{
|
||||
use ConfirmableTrait;
|
||||
@@ -68,10 +70,12 @@ class SetupApplication extends Command
|
||||
$this->artisan('✓ Clear config cache', 'config:clear');
|
||||
$this->artisan('✓ Resetting route cache', 'route:cache');
|
||||
$this->artisan('✓ Resetting view cache', 'view:clear');
|
||||
$this->artisan('✓ Resetting event cache', 'event:cache');
|
||||
} else {
|
||||
$this->artisan('✓ Clear config cache', 'config:clear');
|
||||
$this->artisan('✓ Clear route cache', 'route:clear');
|
||||
$this->artisan('✓ Clear view cache', 'view:clear');
|
||||
$this->artisan('✓ Clear event cache', 'event:clear');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Console\ConfirmableTrait;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
use function Safe\passthru;
|
||||
@@ -13,6 +14,7 @@ use function Safe\putenv;
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
#[AsCommand(name: 'scribe:setup')]
|
||||
class SetupDocumentation extends Command
|
||||
{
|
||||
use ConfirmableTrait;
|
||||
|
||||
@@ -4,11 +4,13 @@ namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Console\ConfirmableTrait;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
#[AsCommand(name: 'scout:setup')]
|
||||
class SetupScout extends Command
|
||||
{
|
||||
use ConfirmableTrait;
|
||||
|
||||
@@ -12,7 +12,9 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name: 'test:send-reminders')]
|
||||
class TestReminders extends Command
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,11 +5,13 @@ namespace App\Console\Commands;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Database\Connectors\ConnectionFactory;
|
||||
use Illuminate\Database\SQLiteDatabaseDoesNotExistException;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
use function Safe\chgrp;
|
||||
use function Safe\chown;
|
||||
use function Safe\touch;
|
||||
|
||||
#[AsCommand(name: 'waitfordb')]
|
||||
class WaitForDb extends Command
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use App\Console\Scheduling\CronEvent;
|
||||
use App\Domains\Contact\Dav\Jobs\CleanSyncToken;
|
||||
use App\Domains\Contact\DavClient\Jobs\UpdateAddressBooks;
|
||||
use App\Domains\Contact\ManageReminders\Jobs\ProcessScheduledContactReminders;
|
||||
use App\Logging\CleanLogs;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function commands()
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
if (! App::environment('production')) {
|
||||
$this->load(__DIR__.'/Commands/Local');
|
||||
}
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
$this->scheduleCommand($schedule, 'model:prune', 'daily');
|
||||
$this->scheduleCommand($schedule, 'queue:prune-batches', 'daily');
|
||||
if (config('telescope.enabled')) {
|
||||
$this->scheduleCommand($schedule, 'telescope:prune', 'daily');
|
||||
}
|
||||
$this->scheduleJob($schedule, UpdateAddressBooks::class, 'hourly');
|
||||
$this->scheduleJob($schedule, ProcessScheduledContactReminders::class, 'minutes', 1);
|
||||
$this->scheduleJob($schedule, CleanSyncToken::class, 'daily');
|
||||
$this->scheduleJob($schedule, CleanLogs::class, 'daily');
|
||||
}
|
||||
|
||||
/**
|
||||
* Define a new schedule command with a frequency.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
private function scheduleCommand(Schedule $schedule, string $command, string $frequency, mixed ...$params)
|
||||
{
|
||||
$this->scheduleAction($schedule, $command, $frequency, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define a new schedule command with a frequency.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
private function scheduleJob(Schedule $schedule, string $job, string $frequency, mixed ...$params)
|
||||
{
|
||||
$this->scheduleAction($schedule, $job, $frequency, $params, 'job');
|
||||
}
|
||||
|
||||
/**
|
||||
* Define a new schedule.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
private function scheduleAction(Schedule $schedule, string $command, string $frequency, array $params, string $action = 'command')
|
||||
{
|
||||
$schedule->$action($command)->when(function () use ($command, $frequency, $params) {
|
||||
$event = CronEvent::command($command);
|
||||
if ($frequency) {
|
||||
$event = $event->{$frequency}(...$params);
|
||||
}
|
||||
|
||||
return $event->isDue();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Scheduling;
|
||||
|
||||
use Illuminate\Support\Facades\Schedule as ScheduleFacade;
|
||||
|
||||
/**
|
||||
* @method static void command(string $command, string $frequency = null)
|
||||
* @method static void job(string $command, string $frequency = null, int $args = 0)
|
||||
*/
|
||||
class Schedule
|
||||
{
|
||||
/**
|
||||
* Handle dynamic, static calls to the object.
|
||||
*/
|
||||
public static function __callStatic(string $method, array $args): void
|
||||
{
|
||||
$command = array_shift($args);
|
||||
$frequency = array_shift($args);
|
||||
ScheduleFacade::$method($command)->when(function () use ($command, $frequency, $args) {
|
||||
$event = CronEvent::command($command);
|
||||
if ($frequency !== null) {
|
||||
$event = $event->{$frequency}(...$args);
|
||||
}
|
||||
|
||||
return $event->isDue();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ class ScheduleContactReminderForUser extends BaseService implements ServiceInter
|
||||
|
||||
$notificationChannels = $this->user->notificationChannels;
|
||||
foreach ($notificationChannels as $channel) {
|
||||
$this->upcomingDate->shiftTimezone($this->user->timezone);
|
||||
$this->upcomingDate->shiftTimezone($this->user->timezone ?? config('app.timezone'));
|
||||
$this->upcomingDate->hour = $channel->preferred_time->hour;
|
||||
$this->upcomingDate->minute = $channel->preferred_time->minute;
|
||||
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ class ScheduleAllContactRemindersForNotificationChannel extends BaseService impl
|
||||
}
|
||||
}
|
||||
|
||||
$upcomingDate->shiftTimezone($this->userNotificationChannel->user->timezone);
|
||||
$upcomingDate->shiftTimezone($this->userNotificationChannel->user->timezone ?? config('app.timezone'));
|
||||
$upcomingDate->hour = $this->userNotificationChannel->preferred_time->hour;
|
||||
$upcomingDate->minute = $this->userNotificationChannel->preferred_time->minute;
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Str;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
use function Safe\exec;
|
||||
use function Safe\file_get_contents;
|
||||
use function Safe\preg_match;
|
||||
use function Safe\preg_split;
|
||||
use function Safe\realpath;
|
||||
@@ -102,3 +104,23 @@ if (! function_exists('subClasses')) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('readVersion')) {
|
||||
/**
|
||||
* Read the version from the config file.
|
||||
*/
|
||||
function readVersion(string $file, string $gitCommand, ?string $default = null): ?string
|
||||
{
|
||||
$content = null;
|
||||
if (is_file($file)) {
|
||||
$content = file_get_contents($file);
|
||||
} elseif (is_dir(base_path('.git'))) {
|
||||
$command = Str::of($gitCommand)
|
||||
->start('git ')
|
||||
->replaceStart('git', 'git --git-dir "'.base_path('.git').'"');
|
||||
$content = trim(exec("$command 2>".(substr(php_uname(), 0, 7) === 'Windows' ? 'NUL' : '/dev/null')));
|
||||
}
|
||||
|
||||
return trim($content ?? $default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
abstract class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests;
|
||||
use DispatchesJobs;
|
||||
|
||||
@@ -1,70 +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<int,string>
|
||||
*/
|
||||
protected $middleware = [
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Illuminate\Http\Middleware\HandleCors::class,
|
||||
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*
|
||||
* @var array<string,array<int,string>>
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
\CodeZero\Localizer\Middleware\SetLocale::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
\App\Http\Middleware\HandleInertiaRequests::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||
'throttle:api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*
|
||||
* These middleware may be assigned to groups or used individually.
|
||||
*
|
||||
* @var array<string,string>
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'abilities' => \Laravel\Sanctum\Http\Middleware\CheckAbilities::class,
|
||||
'ability' => \Laravel\Sanctum\Http\Middleware\CheckForAnyAbility::class,
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
];
|
||||
}
|
||||
@@ -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<int,string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
@@ -52,10 +52,10 @@ class EnsureDavRequestsAreStateful
|
||||
|
||||
return $next($request);
|
||||
},
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class,
|
||||
AuthenticateWithTokenOnBasicAuth::class,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Http\Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use Inertia\Middleware;
|
||||
use Tighten\Ziggy\Ziggy;
|
||||
|
||||
class HandleInertiaRequests extends Middleware
|
||||
{
|
||||
@@ -15,16 +16,6 @@ class HandleInertiaRequests extends Middleware
|
||||
*/
|
||||
protected $rootView = 'app';
|
||||
|
||||
/**
|
||||
* Determine the current asset version.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function version(Request $request)
|
||||
{
|
||||
return parent::version($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the props that are shared by default.
|
||||
*
|
||||
@@ -32,14 +23,18 @@ class HandleInertiaRequests extends Middleware
|
||||
*/
|
||||
public function share(Request $request)
|
||||
{
|
||||
return array_merge(parent::share($request), [
|
||||
return [
|
||||
...parent::share($request),
|
||||
'help_links' => fn () => config('monica.help_links'),
|
||||
'help_url' => fn () => config('monica.help_center_url'),
|
||||
'footer' => Str::markdownExternalLink(trans('Version :version — commit [:short](:url).', [
|
||||
'version' => config('monica.app_version'),
|
||||
'short' => substr(config('monica.commit'), 0, 7),
|
||||
'url' => Str::finish(config('monica.repository', 'https://github.com/monicahq/monica/'), '/').'commit/'.config('monica.commit'),
|
||||
]), 'underline text-xs dark:text-gray-100 hover:text-gray-900 hover:dark:text-gray-200'),
|
||||
'footer' => fn () => $this->footer(),
|
||||
'auth' => fn () => [
|
||||
'user' => auth()->user(),
|
||||
],
|
||||
'ziggy' => fn () => [
|
||||
...(new Ziggy)->toArray(),
|
||||
'location' => $request->url(),
|
||||
],
|
||||
'sentry' => fn () => [
|
||||
'dsn' => config('sentry.dsn'),
|
||||
'tunnel' => config('sentry-tunnel.tunnel-url'),
|
||||
@@ -48,6 +43,23 @@ class HandleInertiaRequests extends Middleware
|
||||
'sendDefaultPii' => config('sentry.send_default_pii'),
|
||||
'tracesSampleRate' => config('sentry.traces_sample_rate'),
|
||||
],
|
||||
]);
|
||||
];
|
||||
}
|
||||
|
||||
private function footer(): string
|
||||
{
|
||||
$commit = config('monica.commit');
|
||||
$params = [
|
||||
'version' => config('monica.app_version'),
|
||||
'short' => substr(config('monica.commit'), 0, 7),
|
||||
];
|
||||
if ($commit === null) {
|
||||
$message = trans('Version :version.', $params);
|
||||
} else {
|
||||
$params['url'] = Str::finish(config('monica.repository', 'https://github.com/monicahq/monica/'), '/').'commit/'.config('monica.commit');
|
||||
$message = trans('Version :version — commit [:short](:url).', $params);
|
||||
}
|
||||
|
||||
return Str::markdownExternalLink($message, 'underline text-xs dark:text-gray-100 hover:text-gray-900 hover:dark:text-gray-200');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
|
||||
|
||||
class PreventRequestsDuringMaintenance extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be reachable while maintenance mode is enabled.
|
||||
*
|
||||
* @var array<int,string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param string|null ...$guards
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, Closure $next, ...$guards)
|
||||
{
|
||||
$guards = empty($guards) ? [null] : $guards;
|
||||
|
||||
foreach ($guards as $guard) {
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect(RouteServiceProvider::HOME);
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
@@ -1,19 +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<int,string>
|
||||
*/
|
||||
protected $except = [
|
||||
'current_password',
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustHosts as Middleware;
|
||||
|
||||
class TrustHosts extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the host patterns that should be trusted.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function hosts()
|
||||
{
|
||||
return [
|
||||
$this->allSubdomainsOfApplicationUrl(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The trusted proxies for this application.
|
||||
*
|
||||
* @var array<int,string>|string|null
|
||||
*/
|
||||
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,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||
|
||||
class VerifyCsrfToken extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be excluded from CSRF verification.
|
||||
*
|
||||
* @var array<int,string>
|
||||
*/
|
||||
protected $except = [
|
||||
'/dav',
|
||||
'/dav/*',
|
||||
'/telegram/webhook/*',
|
||||
];
|
||||
}
|
||||
@@ -2,26 +2,39 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Domains\Contact\ManageDocuments\Events\FileDeleted;
|
||||
use App\Domains\Contact\ManageDocuments\Listeners\DeleteFileInStorage;
|
||||
use App\Helpers\CollectionHelper;
|
||||
use App\Http\Controllers\Profile\WebauthnDestroyResponse;
|
||||
use App\Http\Controllers\Profile\WebauthnUpdateResponse;
|
||||
use Illuminate\Auth\Middleware\RedirectIfAuthenticated;
|
||||
use Illuminate\Cache\RateLimiting\Limit;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Testing\TestResponse;
|
||||
use Illuminate\Validation\Rules\Password;
|
||||
use LaravelWebauthn\Facades\Webauthn;
|
||||
use LaravelWebauthn\Listeners\LoginViaRemember;
|
||||
use League\CommonMark\Environment\Environment;
|
||||
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
|
||||
use League\CommonMark\Extension\ExternalLink\ExternalLinkExtension;
|
||||
use League\CommonMark\Extension\GithubFlavoredMarkdownExtension;
|
||||
use League\CommonMark\MarkdownConverter;
|
||||
use SocialiteProviders\Azure\AzureExtendSocialite;
|
||||
use SocialiteProviders\Facebook\FacebookExtendSocialite;
|
||||
use SocialiteProviders\GitHub\GitHubExtendSocialite;
|
||||
use SocialiteProviders\Google\GoogleExtendSocialite;
|
||||
use SocialiteProviders\LinkedIn\LinkedInExtendSocialite;
|
||||
use SocialiteProviders\Manager\SocialiteWasCalled;
|
||||
use Tests\TestResponseMacros;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
@@ -106,6 +119,13 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
if (Config::get('app.force_url') === true) {
|
||||
URL::forceRootUrl(Str::of(config('app.url'))->ltrim('/'));
|
||||
URL::forceScheme('https');
|
||||
}
|
||||
|
||||
RedirectIfAuthenticated::redirectUsing(fn () => route('vault.index', absolute: false));
|
||||
|
||||
Password::defaults(function () {
|
||||
return $this->app->environment('production')
|
||||
// @codeCoverageIgnoreStart
|
||||
@@ -118,11 +138,22 @@ class AppServiceProvider extends ServiceProvider
|
||||
: Password::min(4);
|
||||
});
|
||||
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
||||
});
|
||||
RateLimiter::for('oauth2-socialite', function (Request $request) {
|
||||
return Limit::perMinute(5)->by(optional($request->user())->id ?: $request->ip());
|
||||
});
|
||||
|
||||
Webauthn::updateViewResponseUsing(WebauthnUpdateResponse::class);
|
||||
Webauthn::destroyViewResponseUsing(WebauthnDestroyResponse::class);
|
||||
|
||||
Event::subscribe(LoginViaRemember::class);
|
||||
Event::listen(FileDeleted::class, DeleteFileInStorage::class);
|
||||
Event::listen(SocialiteWasCalled::class, AzureExtendSocialite::class);
|
||||
Event::listen(SocialiteWasCalled::class, FacebookExtendSocialite::class);
|
||||
Event::listen(SocialiteWasCalled::class, GitHubExtendSocialite::class);
|
||||
Event::listen(SocialiteWasCalled::class, GoogleExtendSocialite::class);
|
||||
Event::listen(SocialiteWasCalled::class, LinkedInExtendSocialite::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Broadcast::routes();
|
||||
|
||||
require base_path('routes/channels.php');
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Domains\Contact\ManageDocuments\Events\FileDeleted;
|
||||
use App\Domains\Contact\ManageDocuments\Listeners\DeleteFileInStorage;
|
||||
use App\Listeners\LoginListener;
|
||||
use App\Listeners\WebauthnRegistered;
|
||||
use Illuminate\Auth\Events\Login;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use LaravelWebauthn\Events\WebauthnRegister;
|
||||
use SocialiteProviders\Azure\AzureExtendSocialite;
|
||||
use SocialiteProviders\Facebook\FacebookExtendSocialite;
|
||||
use SocialiteProviders\GitHub\GitHubExtendSocialite;
|
||||
use SocialiteProviders\Google\GoogleExtendSocialite;
|
||||
use SocialiteProviders\LinkedIn\LinkedInExtendSocialite;
|
||||
use SocialiteProviders\Manager\SocialiteWasCalled;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event listener mappings for the application.
|
||||
*
|
||||
* @var array<class-string, array<int, class-string>>
|
||||
*/
|
||||
protected $listen = [
|
||||
Login::class => [
|
||||
LoginListener::class,
|
||||
],
|
||||
FileDeleted::class => [
|
||||
DeleteFileInStorage::class,
|
||||
],
|
||||
Registered::class => [
|
||||
SendEmailVerificationNotification::class,
|
||||
],
|
||||
SocialiteWasCalled::class => [
|
||||
AzureExtendSocialite::class,
|
||||
FacebookExtendSocialite::class,
|
||||
GitHubExtendSocialite::class,
|
||||
GoogleExtendSocialite::class,
|
||||
LinkedInExtendSocialite::class,
|
||||
],
|
||||
WebauthnRegister::class => [
|
||||
WebauthnRegistered::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -1,54 +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 = '/vaults';
|
||||
|
||||
/**
|
||||
* 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());
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,53 +1,15 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader
|
||||
| for our application. We just need to utilize it! We'll require it
|
||||
| into the script here so that we do not have to worry about the
|
||||
| loading of any of our classes manually. It's great to relax.
|
||||
|
|
||||
*/
|
||||
|
||||
// Register the Composer autoloader...
|
||||
require __DIR__.'/vendor/autoload.php';
|
||||
|
||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Artisan Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When we run the console application, the current CLI command will be
|
||||
| executed in this console and the response sent back to a terminal
|
||||
| or another output device for the developers. Here goes nothing!
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||
|
||||
$status = $kernel->handle(
|
||||
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||
new Symfony\Component\Console\Output\ConsoleOutput
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Shutdown The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once Artisan has finished running, we will fire off the shutdown events
|
||||
| so that any final work may be done by the application before we shut
|
||||
| down the process. This is the last thing to happen to the request.
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel->terminate($input, $status);
|
||||
// Bootstrap Laravel and handle the command...
|
||||
$status = (require_once __DIR__.'/bootstrap/app.php')
|
||||
->handleCommand(new ArgvInput);
|
||||
|
||||
exit($status);
|
||||
|
||||
+43
-52
@@ -1,55 +1,46 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 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.
|
||||
|
|
||||
*/
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
use Laravel\Sanctum\Http\Middleware\CheckAbilities;
|
||||
use Laravel\Sanctum\Http\Middleware\CheckForAnyAbility;
|
||||
use LaravelWebauthn\Http\Middleware\WebauthnMiddleware;
|
||||
use Sentry\Laravel\Integration;
|
||||
|
||||
$app = new Illuminate\Foundation\Application(
|
||||
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bind Important Interfaces
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, we need to bind some important interfaces into the container so
|
||||
| we will be able to resolve them when needed. The kernels serve the
|
||||
| incoming requests to this application from both the web and CLI.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Http\Kernel::class,
|
||||
App\Http\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
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;
|
||||
return Application::configure(basePath: dirname(__DIR__))
|
||||
->withRouting(
|
||||
api: __DIR__.'/../routes/api.php',
|
||||
web: __DIR__.'/../routes/web.php',
|
||||
commands: __DIR__.'/../routes/console.php',
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
$middleware->throttleApi();
|
||||
$middleware->validateCsrfTokens(except: [
|
||||
'/dav',
|
||||
'/dav/*',
|
||||
'/telegram/webhook/*',
|
||||
]);
|
||||
$middleware->alias([
|
||||
'abilities' => CheckAbilities::class,
|
||||
'ability' => CheckForAnyAbility::class,
|
||||
'webauthn' => WebauthnMiddleware::class,
|
||||
]);
|
||||
$middleware->web(remove: [
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
]);
|
||||
$middleware->web(append: [
|
||||
\CodeZero\Localizer\Middleware\SetLocale::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
\App\Http\Middleware\HandleInertiaRequests::class,
|
||||
\Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class,
|
||||
]);
|
||||
$middleware->api(prepend: [
|
||||
\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||
]);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions) {
|
||||
Integration::handles($exceptions);
|
||||
})
|
||||
->create();
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
App\Providers\DAVServiceProvider::class,
|
||||
App\Providers\FortifyServiceProvider::class,
|
||||
App\Providers\JetstreamServiceProvider::class,
|
||||
App\Providers\TelescopeServiceProvider::class,
|
||||
];
|
||||
+16
-19
@@ -12,29 +12,28 @@
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"ext-fileinfo": "*",
|
||||
"asbiin/laravel-sentry-tunnel": "^2.0",
|
||||
"asbiin/laravel-webauthn": "^4.0",
|
||||
"codezero/laravel-localizer": "^2.0",
|
||||
"codezero/laravel-localizer": "^3.0",
|
||||
"doctrine/dbal": "^3.6",
|
||||
"guzzlehttp/guzzle": "^7.4",
|
||||
"http-interop/http-factory-guzzle": "^1.2",
|
||||
"inertiajs/inertia-laravel": "^0",
|
||||
"knuckleswtf/scribe": "^4.2",
|
||||
"laravel-notification-channels/telegram": "^4.0",
|
||||
"inertiajs/inertia-laravel": "^1.0",
|
||||
"knuckleswtf/scribe": "^4.33",
|
||||
"laravel-notification-channels/telegram": "^5.0",
|
||||
"laravel/fortify": "^1.13",
|
||||
"laravel/framework": "^10.0",
|
||||
"laravel/jetstream": "^4.0",
|
||||
"laravel/sanctum": "^3.1",
|
||||
"laravel/framework": "^11.0",
|
||||
"laravel/jetstream": "^5.0",
|
||||
"laravel/sanctum": "^4.0",
|
||||
"laravel/scout": "^10.2",
|
||||
"laravel/socialite": "^5.5",
|
||||
"laravel/telescope": "^4.9",
|
||||
"laravel/tinker": "^2.7",
|
||||
"laravel/telescope": "^5.0",
|
||||
"matriphe/iso-639": "^1.2",
|
||||
"meilisearch/meilisearch-php": "^1.0",
|
||||
"moneyphp/money": "^4.3",
|
||||
"monicahq/laravel-sabre": "^1.6",
|
||||
"naugrim/laravel-sentry-tunnel": "^1.1",
|
||||
"rinvex/countries": "^9.0",
|
||||
"sentry/sentry-laravel": "^4.0",
|
||||
"sentry/sentry-laravel": "^4.3",
|
||||
"socialiteproviders/facebook": "^4.1",
|
||||
"socialiteproviders/github": "^4.1",
|
||||
"socialiteproviders/google": "^4.1",
|
||||
@@ -46,24 +45,22 @@
|
||||
"uploadcare/uploadcare-php": "^4.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"amirami/localizator": "^0.12.1@alpha",
|
||||
"amirami/localizator": "^0.13.0-alpha",
|
||||
"barryvdh/laravel-debugbar": "^3.7",
|
||||
"barryvdh/laravel-ide-helper": "^2.12",
|
||||
"barryvdh/laravel-ide-helper": "^3.0",
|
||||
"brianium/paratest": "^7.0",
|
||||
"fakerphp/faker": "^1.9",
|
||||
"larastan/larastan": "^2.7",
|
||||
"laravel-lang/common": "^4.0",
|
||||
"laravel-lang/common": "^6.0",
|
||||
"laravel/pint": "^1.1",
|
||||
"laravel/sail": "^1.14",
|
||||
"mockery/mockery": "^1.4",
|
||||
"nunomaduro/collision": "^7.0",
|
||||
"nunomaduro/collision": "^8.1",
|
||||
"phpunit/phpunit": "^10.0",
|
||||
"psalm/plugin-laravel": "^2.0",
|
||||
"roave/security-advisories": "dev-master",
|
||||
"spatie/laravel-ignition": "^2.0",
|
||||
"spatie/laravel-ignition": "^2.4",
|
||||
"stichoza/google-translate-php": "^5.1",
|
||||
"thecodingmachine/phpstan-safe-rule": "^1.2",
|
||||
"vimeo/psalm": "^5.17"
|
||||
"thecodingmachine/phpstan-safe-rule": "^1.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
Generated
+1279
-1841
File diff suppressed because it is too large
Load Diff
+24
-133
@@ -13,7 +13,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Monica'),
|
||||
'name' => env('APP_REALNAME', env('APP_NAME', 'Monica')),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -54,7 +54,9 @@ return [
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
'asset_url' => env('ASSET_URL', null),
|
||||
'asset_url' => env('ASSET_URL'),
|
||||
|
||||
'force_url' => (bool) env('APP_FORCE_URL', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -67,7 +69,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'UTC',
|
||||
'timezone' => env('APP_TIMEZONE', 'UTC'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -75,38 +77,16 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application locale determines the default locale that will be used
|
||||
| by the translation service provider. You are free to set this value
|
||||
| to any of the locales which will be supported by the application.
|
||||
| by Laravel's translation / localization methods. This option can be
|
||||
| set to any locale for which you plan to have translation strings.
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => 'en',
|
||||
'locale' => env('APP_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' => env('APP_FALLBACK_LOCALE', 'en'),
|
||||
|
||||
'fallback_locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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',
|
||||
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -119,121 +99,32 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('APP_KEY'),
|
||||
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The service providers listed here will be automatically loaded on the
|
||||
| request to your application. Feel free to add your own services to
|
||||
| this array to grant expanded functionality to your applications.
|
||||
|
|
||||
*/
|
||||
'key' => env('APP_KEY'),
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
* Laravel Framework Service Providers...
|
||||
*/
|
||||
Illuminate\Auth\AuthServiceProvider::class,
|
||||
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||
Illuminate\Bus\BusServiceProvider::class,
|
||||
Illuminate\Cache\CacheServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||
Illuminate\Cookie\CookieServiceProvider::class,
|
||||
Illuminate\Database\DatabaseServiceProvider::class,
|
||||
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||
Illuminate\Hashing\HashServiceProvider::class,
|
||||
Illuminate\Mail\MailServiceProvider::class,
|
||||
Illuminate\Notifications\NotificationServiceProvider::class,
|
||||
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||
Illuminate\Queue\QueueServiceProvider::class,
|
||||
Illuminate\Redis\RedisServiceProvider::class,
|
||||
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
||||
Illuminate\Session\SessionServiceProvider::class,
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Package Service Providers...
|
||||
*/
|
||||
SocialiteProviders\Manager\ServiceProvider::class,
|
||||
Laravel\Telescope\TelescopeServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
App\Providers\DAVServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
App\Providers\TelescopeServiceProvider::class,
|
||||
App\Providers\FortifyServiceProvider::class,
|
||||
App\Providers\JetstreamServiceProvider::class,
|
||||
'previous_keys' => [
|
||||
...array_filter(
|
||||
explode(',', env('APP_PREVIOUS_KEYS', ''))
|
||||
),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Aliases
|
||||
| Maintenance Mode Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array of class aliases will be registered when this application
|
||||
| is started. However, feel free to register as many as you wish as
|
||||
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||
| These configuration options determine the driver used to determine and
|
||||
| manage Laravel's "maintenance mode" status. The "cache" driver will
|
||||
| allow maintenance mode to be controlled across multiple machines.
|
||||
|
|
||||
| Supported drivers: "file", "cache"
|
||||
|
|
||||
*/
|
||||
|
||||
'aliases' => [
|
||||
|
||||
'App' => Illuminate\Support\Facades\App::class,
|
||||
'Arr' => Illuminate\Support\Arr::class,
|
||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
|
||||
'Bus' => Illuminate\Support\Facades\Bus::class,
|
||||
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||
'Config' => Illuminate\Support\Facades\Config::class,
|
||||
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||
'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,
|
||||
'Js' => Illuminate\Support\Js::class,
|
||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||
'Log' => Illuminate\Support\Facades\Log::class,
|
||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||
'Password' => Illuminate\Support\Facades\Password::class,
|
||||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::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,
|
||||
|
||||
'maintenance' => [
|
||||
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
|
||||
'store' => env('APP_MAINTENANCE_STORE', 'database'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
+27
-18
@@ -7,15 +7,15 @@ return [
|
||||
| Authentication Defaults
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default authentication "guard" and password
|
||||
| reset options for your application. You may change these defaults
|
||||
| This option defines the default authentication "guard" and password
|
||||
| reset "broker" for your application. You may change these values
|
||||
| as required, but they're a perfect start for most applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
'passwords' => 'users',
|
||||
'guard' => env('AUTH_GUARD', 'web'),
|
||||
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -25,11 +25,11 @@ return [
|
||||
|
|
||||
| Next, you may define every authentication guard for your application.
|
||||
| Of course, a great default configuration has been defined for you
|
||||
| here which uses session storage and the Eloquent user provider.
|
||||
| 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
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
| system used by the application. Typically, Eloquent is utilized.
|
||||
|
|
||||
| Supported: "session"
|
||||
|
|
||||
@@ -47,12 +47,12 @@ return [
|
||||
| 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
|
||||
| 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
|
||||
| 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.
|
||||
|
|
||||
| Supported: "database", "eloquent"
|
||||
@@ -62,8 +62,13 @@ return [
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'webauthn',
|
||||
'model' => App\Models\User::class,
|
||||
'model' => env('AUTH_MODEL', App\Models\User::class),
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
// 'table' => 'users',
|
||||
// ],
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -71,20 +76,24 @@ return [
|
||||
| Resetting Passwords
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify multiple password reset configurations if you have more
|
||||
| than one user table or model in the application and you want to have
|
||||
| separate password reset settings based on the specific user types.
|
||||
| These configuration options specify the behavior of Laravel's password
|
||||
| reset functionality, including the table utilized for token storage
|
||||
| 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
|
||||
| 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' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'table' => 'password_resets',
|
||||
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_resets'),
|
||||
'expire' => 60,
|
||||
'throttle' => 60,
|
||||
],
|
||||
@@ -96,12 +105,12 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 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.
|
||||
|
|
||||
*/
|
||||
|
||||
'password_timeout' => 10800,
|
||||
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -1,64 +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", "ably", "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'),
|
||||
'useTLS' => true,
|
||||
],
|
||||
],
|
||||
|
||||
'ably' => [
|
||||
'driver' => 'ably',
|
||||
'key' => env('ABLY_KEY'),
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'driver' => 'log',
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'null',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
+17
-20
@@ -10,13 +10,13 @@ $config = [
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache connection that gets used while
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
| This option controls the default cache store that will be used by the
|
||||
| framework. This connection is utilized if another isn't explicitly
|
||||
| specified when running a cache operation inside the application.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('CACHE_DRIVER', 'file'),
|
||||
'default' => env('CACHE_STORE', env('CACHE_DRIVER', 'database')),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -27,17 +27,13 @@ $config = [
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
| Supported drivers: "apc", "array", "database", "file",
|
||||
| "memcached", "redis", "dynamodb", "octane", "null"
|
||||
| Supported drivers: "apc", "array", "database", "file", "memcached",
|
||||
| "redis", "dynamodb", "octane", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'stores' => [
|
||||
|
||||
'apc' => [
|
||||
'driver' => 'apc',
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
'serialize' => false,
|
||||
@@ -45,14 +41,15 @@ $config = [
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
'lock_connection' => null,
|
||||
'table' => env('DB_CACHE_TABLE', 'cache'),
|
||||
'connection' => env('DB_CACHE_CONNECTION'),
|
||||
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
'lock_path' => storage_path('framework/cache/data'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
@@ -76,8 +73,8 @@ $config = [
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'cache',
|
||||
'lock_connection' => 'default',
|
||||
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
|
||||
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
|
||||
],
|
||||
|
||||
'dynamodb' => [
|
||||
@@ -100,13 +97,13 @@ $config = [
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||
| be other applications utilizing the same cache. So, we'll specify a
|
||||
| value to get prefixed to all our keys so we can avoid collisions.
|
||||
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
|
||||
| stores, there might be other applications using the same cache. For
|
||||
| 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_'),
|
||||
|
||||
];
|
||||
|
||||
@@ -150,7 +147,7 @@ if (extension_loaded('memcached')) {
|
||||
\Memcached::OPT_POLL_TIMEOUT => $timeout_ms, // milliseconds
|
||||
\Memcached::OPT_SEND_TIMEOUT => $timeout_ms * 1000, // microseconds
|
||||
\Memcached::OPT_RECV_TIMEOUT => $timeout_ms * 1000, // microseconds
|
||||
\Memcached::OPT_CONNECT_TIMEOUT => $timeout_ms, // milliseconds
|
||||
\Memcached::OPT_CONNECT_TIMEOUT => $timeout_ms, // milliseconds
|
||||
|
||||
// Further performance tuning
|
||||
\Memcached::OPT_NO_BLOCK => true,
|
||||
|
||||
+5
-1
@@ -15,7 +15,11 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => ['api/*', 'sanctum/csrf-cookie', 'dav/*'],
|
||||
'paths' => [
|
||||
'api/*',
|
||||
'sanctum/csrf-cookie',
|
||||
'dav/*',
|
||||
],
|
||||
|
||||
'allowed_methods' => ['*'],
|
||||
|
||||
|
||||
+2
-2
@@ -98,10 +98,10 @@ return [
|
||||
],
|
||||
|
||||
'testing' => [
|
||||
'driver' => env('DB_TEST_DRIVER', 'mysql'),
|
||||
'driver' => env('DB_TEST_DRIVER', 'sqlite'),
|
||||
'host' => env('DB_TEST_HOST', 'localhost'),
|
||||
'port' => env('DB_TEST_PORT', '3306'),
|
||||
'database' => env('DB_TEST_DATABASE'),
|
||||
'database' => env('DB_TEST_DATABASE', database_path('database-test.sqlite')),
|
||||
'username' => env('DB_TEST_USERNAME'),
|
||||
'password' => env('DB_TEST_PASSWORD'),
|
||||
'charset' => env('DB_TEST_DRIVER') === 'pgsql' ? 'utf8' : 'utf8mb4',
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Laravel\Fortify\Features;
|
||||
|
||||
return [
|
||||
@@ -61,7 +60,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'home' => RouteServiceProvider::HOME,
|
||||
'home' => '/vaults',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -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,
|
||||
],
|
||||
|
||||
];
|
||||
@@ -1,319 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filename & Format
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default filename
|
||||
|
|
||||
*/
|
||||
|
||||
'filename' => '_ide_helper.php',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Models filename
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default filename for the models helper file
|
||||
|
|
||||
*/
|
||||
|
||||
'models_filename' => '_ide_helper_models.php',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Where to write the PhpStorm specific meta file
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| PhpStorm also supports the directory `.phpstorm.meta.php/` with arbitrary
|
||||
| files in it, should you need additional files for your project; e.g.
|
||||
| `.phpstorm.meta.php/laravel_ide_Helper.php'.
|
||||
|
|
||||
*/
|
||||
'meta_filename' => '.phpstorm.meta.php',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Fluent helpers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to true to generate commonly used Fluent methods
|
||||
|
|
||||
*/
|
||||
|
||||
'include_fluent' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Factory Builders
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to true to generate factory generators for better factory()
|
||||
| method auto-completion.
|
||||
|
|
||||
| Deprecated for Laravel 8 or latest.
|
||||
|
|
||||
*/
|
||||
|
||||
'include_factory_builders' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Write Model Magic methods
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to false to disable write magic methods of model
|
||||
|
|
||||
*/
|
||||
|
||||
'write_model_magic_where' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Write Model External Eloquent Builder methods
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to false to disable write external eloquent builder methods
|
||||
|
|
||||
*/
|
||||
|
||||
'write_model_external_builder_methods' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Write Model relation count properties
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to false to disable writing of relation count properties to model DocBlocks.
|
||||
|
|
||||
*/
|
||||
|
||||
'write_model_relation_count_properties' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Write Eloquent Model Mixins
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This will add the necessary DocBlock mixins to the model class
|
||||
| contained in the Laravel Framework. This helps the IDE with
|
||||
| auto-completion.
|
||||
|
|
||||
| Please be aware that this setting changes a file within the /vendor directory.
|
||||
|
|
||||
*/
|
||||
|
||||
'write_eloquent_model_mixins' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Helper files to include
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Include helper files. By default not included, but can be toggled with the
|
||||
| -- helpers (-H) option. Extra helper files can be included.
|
||||
|
|
||||
*/
|
||||
|
||||
'include_helpers' => false,
|
||||
|
||||
'helper_files' => [
|
||||
base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model locations to include
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define in which directories the ide-helper:models command should look
|
||||
| for models.
|
||||
|
|
||||
| glob patterns are supported to easier reach models in sub-directories,
|
||||
| e.g. `app/Services/* /Models` (without the space)
|
||||
|
|
||||
*/
|
||||
|
||||
'model_locations' => [
|
||||
'app',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Models to ignore
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define which models should be ignored.
|
||||
|
|
||||
*/
|
||||
|
||||
'ignored_models' => [
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Models hooks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define which hook classes you want to run for models to add custom information
|
||||
|
|
||||
| Hooks should implement Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface.
|
||||
|
|
||||
*/
|
||||
|
||||
'model_hooks' => [
|
||||
// App\Support\IdeHelper\MyModelHook::class
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Extra classes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These implementations are not really extended, but called with magic functions
|
||||
|
|
||||
*/
|
||||
|
||||
'extra' => [
|
||||
'Eloquent' => ['Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'],
|
||||
'Session' => ['Illuminate\Session\Store'],
|
||||
],
|
||||
|
||||
'magic' => [],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Interface implementations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These interfaces will be replaced with the implementing class. Some interfaces
|
||||
| are detected by the helpers, others can be listed below.
|
||||
|
|
||||
*/
|
||||
|
||||
'interfaces' => [
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Support for custom DB types
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This setting allow you to map any custom database type (that you may have
|
||||
| created using CREATE TYPE statement or imported using database plugin
|
||||
| / extension to a Doctrine type.
|
||||
|
|
||||
| Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are:
|
||||
| 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql'
|
||||
|
|
||||
| This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant
|
||||
|
|
||||
| The value of the array is an array of type mappings. Key is the name of the custom type,
|
||||
| (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in
|
||||
| our case it is 'json_array'. Doctrine types are listed here:
|
||||
| https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#types
|
||||
|
|
||||
| So to support jsonb in your models when working with Postgres, just add the following entry to the array below:
|
||||
|
|
||||
| "postgresql" => array(
|
||||
| "jsonb" => "json_array",
|
||||
| ),
|
||||
|
|
||||
*/
|
||||
'custom_db_types' => [
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Support for camel cased models
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| There are some Laravel packages (such as Eloquence) that allow for accessing
|
||||
| Eloquent model properties via camel case, instead of snake case.
|
||||
|
|
||||
| Enabling this option will support these packages by saving all model
|
||||
| properties as camel case, instead of snake case.
|
||||
|
|
||||
| For example, normally you would see this:
|
||||
|
|
||||
| * @property \Illuminate\Support\Carbon $created_at
|
||||
| * @property \Illuminate\Support\Carbon $updated_at
|
||||
|
|
||||
| With this enabled, the properties will be this:
|
||||
|
|
||||
| * @property \Illuminate\Support\Carbon $createdAt
|
||||
| * @property \Illuminate\Support\Carbon $updatedAt
|
||||
|
|
||||
| Note, it is currently an all-or-nothing option.
|
||||
|
|
||||
*/
|
||||
'model_camel_case_properties' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Property Casts
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Cast the given "real type" to the given "type".
|
||||
|
|
||||
*/
|
||||
'type_overrides' => [
|
||||
'integer' => 'int',
|
||||
'boolean' => 'bool',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Include DocBlocks from classes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Include DocBlocks from classes to allow additional code inspection for
|
||||
| magic methods and properties.
|
||||
|
|
||||
*/
|
||||
'include_class_docblocks' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Force FQN usage
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Use the fully qualified (class) name in docBlock,
|
||||
| event if class exists in a given file
|
||||
| or there is an import (use className) of a given class
|
||||
|
|
||||
*/
|
||||
'force_fqn' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Additional relation types
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Sometimes it's needed to create custom relation types. The key of the array
|
||||
| is the Relationship Method name. The value of the array is the canonical class
|
||||
| name of the Relationship, e.g. `'relationName' => RelationShipClass::class`.
|
||||
|
|
||||
*/
|
||||
'additional_relation_types' => [],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run artisan commands after migrations to generate model helpers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The specified commands should run after migrations are finished running.
|
||||
|
|
||||
*/
|
||||
'post_migrate' => [
|
||||
// 'ide-helper:models --nowrite',
|
||||
],
|
||||
|
||||
];
|
||||
+28
-15
@@ -3,6 +3,7 @@
|
||||
use Monolog\Handler\NullHandler;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
use Monolog\Processor\PsrLogMessageProcessor;
|
||||
|
||||
return [
|
||||
|
||||
@@ -11,9 +12,9 @@ return [
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
| This option defines the default log channel that is utilized to write
|
||||
| messages to your logs. The value provided here should match one of
|
||||
| the channels present in the list of "channels" configured below.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -30,59 +31,67 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'deprecations' => [
|
||||
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
| Here you may configure the log channels for your application. Laravel
|
||||
| utilizes the Monolog PHP logging library, which includes a variety
|
||||
| of powerful log handlers and formatters that you're free to use.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
| "errorlog", "monolog", "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => explode(',', env('LOG_STACK_CHANNELS', 'single')),
|
||||
'ignore_exceptions' => env('LOG_STACK_IGNORE_EXCEPTIONS', false),
|
||||
'channels' => explode(',', env('LOG_STACK', 'single')),
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => 14,
|
||||
'days' => env('LOG_DAILY_DAYS', 14),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
|
||||
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||
],
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'sentry' => [
|
||||
@@ -99,16 +108,20 @@ return [
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'null' => [
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('MAIL_MAILER', 'smtp'),
|
||||
'default' => env('MAIL_MAILER', 'log'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'app_version' => trim(is_file(__DIR__.'/.version') ? file_get_contents(__DIR__.'/.version') : (is_dir(__DIR__.'/../.git') ? (($v = trim(exec('git --git-dir '.base_path('.git').' describe --abbrev=0 --tags 2>/dev/null'))) != '' ? $v : '0.0.0') : '0.0.0')),
|
||||
'app_version' => readVersion(__DIR__.'/.version', 'git describe --abbrev=0 --tags', '0.0.0'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -22,7 +22,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'commit' => trim(is_file(__DIR__.'/.commit') ? file_get_contents(__DIR__.'/.commit') : (is_dir(__DIR__.'/../.git') ? trim(exec('git --git-dir '.base_path('.git').' log --pretty="%H" -n1')) : '')),
|
||||
'commit' => readVersion(__DIR__.'/.commit', 'git log --pretty="%H" -n1 HEAD'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -73,6 +73,22 @@ return [
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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', 'mysql'),
|
||||
'table' => 'job_batches',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Stateful Domains
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Requests from the following domains / hosts will receive stateful API
|
||||
| authentication cookies. Typically, these should include your local
|
||||
| and production domains which access your API via a frontend SPA.
|
||||
|
|
||||
*/
|
||||
|
||||
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
|
||||
'%s%s',
|
||||
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
|
||||
Sanctum::currentApplicationUrlWithPort()
|
||||
))),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sanctum Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array contains the authentication guards that will be checked when
|
||||
| Sanctum is trying to authenticate a request. If none of these guards
|
||||
| are able to authenticate the request, Sanctum will use the bearer
|
||||
| token that's present on an incoming request for authentication.
|
||||
|
|
||||
*/
|
||||
|
||||
'guard' => ['web'],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Expiration Minutes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value controls the number of minutes until an issued token will be
|
||||
| considered expired. If this value is null, personal access tokens do
|
||||
| not expire. This won't tweak the lifetime of first-party sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'expiration' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sanctum Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When authenticating your first-party SPA with Sanctum you may need to
|
||||
| customize some of the middleware Sanctum uses while processing the
|
||||
| request. You may change the middleware listed below as required.
|
||||
|
|
||||
*/
|
||||
|
||||
'middleware' => [
|
||||
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
|
||||
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
|
||||
],
|
||||
|
||||
];
|
||||
+106
-282
@@ -3,258 +3,129 @@
|
||||
use Knuckles\Scribe\Extracting\Strategies;
|
||||
|
||||
return [
|
||||
|
||||
'theme' => 'default',
|
||||
|
||||
/*
|
||||
* The HTML <title> for the generated documentation. If this is empty, Scribe will infer it from config('app.name').
|
||||
*/
|
||||
// The HTML <title> for the generated documentation. If this is empty, Scribe will infer it from config('app.name').
|
||||
'title' => null,
|
||||
|
||||
/*
|
||||
* A short description of your API. Will be included in the docs webpage, Postman collection and OpenAPI spec.
|
||||
*/
|
||||
// A short description of your API. Will be included in the docs webpage, Postman collection and OpenAPI spec.
|
||||
'description' => '',
|
||||
|
||||
/*
|
||||
* The base URL displayed in the docs. If this is empty, Scribe will use the value of config('app.url').
|
||||
*/
|
||||
// The base URL displayed in the docs. If this is empty, Scribe will use the value of config('app.url') at generation time.
|
||||
// If you're using `laravel` type, you can set this to a dynamic string, like '{{ config("app.tenant_url") }}' to get a dynamic base URL.
|
||||
'base_url' => null,
|
||||
|
||||
/*
|
||||
* Tell Scribe what routes to generate documentation for.
|
||||
* Each group contains rules defining which routes should be included ('match', 'include' and 'exclude' sections)
|
||||
* and settings which should be applied to them ('apply' section).
|
||||
*/
|
||||
'routes' => [
|
||||
[
|
||||
/*
|
||||
* Specify conditions to determine what routes will be a part of this group.
|
||||
* A route must fulfill ALL conditions to be included.
|
||||
*/
|
||||
// Routes that match these conditions will be included in the docs
|
||||
'match' => [
|
||||
/*
|
||||
* Match only routes whose paths match this pattern (use * as a wildcard to match any characters). Example: 'users/*'.
|
||||
*/
|
||||
// Match only routes whose paths match this pattern (use * as a wildcard to match any characters). Example: 'users/*'.
|
||||
'prefixes' => ['api/*'],
|
||||
|
||||
/*
|
||||
* Match only routes whose domains match this pattern (use * as a wildcard to match any characters). Example: 'api.*'.
|
||||
*/
|
||||
// Match only routes whose domains match this pattern (use * as a wildcard to match any characters). Example: 'api.*'.
|
||||
'domains' => ['*'],
|
||||
|
||||
/*
|
||||
* [Dingo router only] Match only routes registered under this version. Wildcards are not supported.
|
||||
*/
|
||||
// [Dingo router only] Match only routes registered under this version. Wildcards are NOT supported.
|
||||
'versions' => ['v1'],
|
||||
],
|
||||
|
||||
/*
|
||||
* Include these routes even if they did not match the rules above.
|
||||
* The route can be referenced by name or path here. Wildcards are supported.
|
||||
*/
|
||||
// Include these routes even if they did not match the rules above.
|
||||
'include' => [
|
||||
// 'users.index', 'healthcheck*'
|
||||
// 'users.index', 'POST /new', '/auth/*'
|
||||
],
|
||||
|
||||
/*
|
||||
* Exclude these routes even if they matched the rules above.
|
||||
* The route can be referenced by name or path here. Wildcards are supported.
|
||||
*/
|
||||
// Exclude these routes even if they matched the rules above.
|
||||
'exclude' => [
|
||||
// '/health', 'admin.*'
|
||||
],
|
||||
|
||||
/*
|
||||
* Settings to be applied to all the matched routes in this group when generating documentation
|
||||
*/
|
||||
'apply' => [
|
||||
/*
|
||||
* Additional headers to be added to the example requests
|
||||
*/
|
||||
'headers' => [
|
||||
'Content-Type' => 'application/json',
|
||||
'Accept' => 'application/json',
|
||||
],
|
||||
|
||||
/*
|
||||
* If no @response or @transformer declarations are found for the route,
|
||||
* Scribe will try to get a sample response by attempting an API call.
|
||||
* Configure the settings for the API call here.
|
||||
*/
|
||||
'response_calls' => [
|
||||
/*
|
||||
* API calls will be made only for routes in this group matching these HTTP methods (GET, POST, etc).
|
||||
* List the methods here or use '*' to mean all methods. Leave empty to disable API calls.
|
||||
*/
|
||||
'methods' => ['GET'],
|
||||
|
||||
/*
|
||||
* Laravel config variables which should be set for the API call.
|
||||
* This is a good place to ensure that notifications, emails and other external services
|
||||
* are not triggered during the documentation API calls.
|
||||
* You can also create a `.env.docs` file and run the generate command with `--env docs`.
|
||||
*/
|
||||
'config' => [
|
||||
'app.env' => 'documentation',
|
||||
// 'app.debug' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
* Query parameters which should be sent with the API call.
|
||||
*/
|
||||
'queryParams' => [
|
||||
// 'key' => 'value',
|
||||
],
|
||||
|
||||
/*
|
||||
* Body parameters which should be sent with the API call.
|
||||
*/
|
||||
'bodyParams' => [
|
||||
// 'key' => 'value',
|
||||
],
|
||||
|
||||
/*
|
||||
* Files which should be sent with the API call.
|
||||
* Each value should be a valid path (absolute or relative to your project directory) to a file on this machine (but not in the project root).
|
||||
*/
|
||||
'fileParams' => [
|
||||
// 'key' => 'storage/app/image.png',
|
||||
],
|
||||
|
||||
/*
|
||||
* Cookies which should be sent with the API call.
|
||||
*/
|
||||
'cookies' => [
|
||||
// 'name' => 'value'
|
||||
],
|
||||
],
|
||||
// 'GET /health', 'admin.*'
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* The type of documentation output to generate.
|
||||
* - "static" will generate a static HTMl page in the /public/docs folder,
|
||||
* - "laravel" will generate the documentation as a Blade view, so you can add routing and authentication.
|
||||
*/
|
||||
// The type of documentation output to generate.
|
||||
// - "static" will generate a static HTMl page in the /public/docs folder,
|
||||
// - "laravel" will generate the documentation as a Blade view, so you can add routing and authentication.
|
||||
// - "external_static" and "external_laravel" do the same as above, but generate a basic template,
|
||||
// passing the OpenAPI spec as a URL, allowing you to easily use the docs with an external generator
|
||||
'type' => 'laravel',
|
||||
|
||||
/*
|
||||
* Settings for `static` type output.
|
||||
*/
|
||||
// See https://scribe.knuckles.wtf/laravel/reference/config#theme for supported options
|
||||
'theme' => 'default',
|
||||
|
||||
'static' => [
|
||||
/*
|
||||
* HTML documentation, assets and Postman collection will be generated to this folder.
|
||||
* Source Markdown will still be in resources/docs.
|
||||
*/
|
||||
// HTML documentation, assets and Postman collection will be generated to this folder.
|
||||
// Source Markdown will still be in resources/docs.
|
||||
'output_path' => 'public/docs',
|
||||
],
|
||||
|
||||
/*
|
||||
* Settings for `laravel` type output.
|
||||
*/
|
||||
'laravel' => [
|
||||
/*
|
||||
* Whether to automatically create a docs endpoint for you to view your generated docs.
|
||||
* If this is false, you can still set up routing manually.
|
||||
*/
|
||||
// Whether to automatically create a docs endpoint for you to view your generated docs.
|
||||
// If this is false, you can still set up routing manually.
|
||||
'add_routes' => true,
|
||||
|
||||
/*
|
||||
* URL path to use for the docs endpoint (if `add_routes` is true).
|
||||
* By default, `/docs` opens the HTML page, `/docs.postman` opens the Postman collection, and `/docs.openapi` the OpenAPI spec.
|
||||
*/
|
||||
// URL path to use for the docs endpoint (if `add_routes` is true).
|
||||
// By default, `/docs` opens the HTML page, `/docs.postman` opens the Postman collection, and `/docs.openapi` the OpenAPI spec.
|
||||
'docs_url' => '/docs',
|
||||
|
||||
/*
|
||||
* Directory within `public` in which to store CSS and JS assets.
|
||||
* By default, assets are stored in `public/vendor/scribe`.
|
||||
* If set, assets will be stored in `public/{{assets_directory}}`
|
||||
*/
|
||||
// Directory within `public` in which to store CSS and JS assets.
|
||||
// By default, assets are stored in `public/vendor/scribe`.
|
||||
// If set, assets will be stored in `public/{{assets_directory}}`
|
||||
'assets_directory' => null,
|
||||
|
||||
/*
|
||||
* Middleware to attach to the docs endpoint (if `add_routes` is true).
|
||||
*/
|
||||
// Middleware to attach to the docs endpoint (if `add_routes` is true).
|
||||
'middleware' => [
|
||||
'web',
|
||||
],
|
||||
],
|
||||
|
||||
'external' => [
|
||||
'html_attributes' => [],
|
||||
],
|
||||
|
||||
'try_it_out' => [
|
||||
/**
|
||||
* Add a Try It Out button to your endpoints so consumers can test endpoints right from their browser.
|
||||
* Don't forget to enable CORS headers for your endpoints.
|
||||
*/
|
||||
// Add a Try It Out button to your endpoints so consumers can test endpoints right from their browser.
|
||||
// Don't forget to enable CORS headers for your endpoints.
|
||||
'enabled' => true,
|
||||
|
||||
/**
|
||||
* The base URL for the API tester to use (for example, you can set this to your staging URL).
|
||||
* Leave as null to use the current app URL (config(app.url)).
|
||||
*/
|
||||
// The base URL for the API tester to use (for example, you can set this to your staging URL).
|
||||
// Leave as null to use the current app URL when generating (config("app.url")).
|
||||
'base_url' => null,
|
||||
|
||||
/**
|
||||
* Fetch a CSRF token before each request, and add it as an X-XSRF-TOKEN header. Needed if you're using Laravel Sanctum.
|
||||
*/
|
||||
// [Laravel Sanctum] Fetch a CSRF token before each request, and add it as an X-XSRF-TOKEN header.
|
||||
'use_csrf' => true,
|
||||
|
||||
/**
|
||||
* The URL to fetch the CSRF token from (if `use_csrf` is true).
|
||||
*/
|
||||
// The URL to fetch the CSRF token from (if `use_csrf` is true).
|
||||
'csrf_url' => '/sanctum/csrf-cookie',
|
||||
],
|
||||
|
||||
/*
|
||||
* How is your API authenticated? This information will be used in the displayed docs, generated examples and response calls.
|
||||
*/
|
||||
// How is your API authenticated? This information will be used in the displayed docs, generated examples and response calls.
|
||||
'auth' => [
|
||||
/*
|
||||
* Set this to true if any endpoints in your API use authentication.
|
||||
*/
|
||||
// Set this to true if ANY endpoints in your API use authentication.
|
||||
'enabled' => true,
|
||||
|
||||
/*
|
||||
* Set this to true if your API should be authenticated by default. If so, you must also set `enabled` (above) to true.
|
||||
* You can then use @unauthenticated or @authenticated on individual endpoints to change their status from the default.
|
||||
*/
|
||||
// Set this to true if your API should be authenticated by default. If so, you must also set `enabled` (above) to true.
|
||||
// You can then use @unauthenticated or @authenticated on individual endpoints to change their status from the default.
|
||||
'default' => true,
|
||||
|
||||
/*
|
||||
* Where is the auth value meant to be sent in a request?
|
||||
* Options: query, body, basic, bearer, header (for custom header)
|
||||
*/
|
||||
// Where is the auth value meant to be sent in a request?
|
||||
// Options: query, body, basic, bearer, header (for custom header)
|
||||
'in' => 'bearer',
|
||||
|
||||
/*
|
||||
* The name of the auth parameter (eg token, key, apiKey) or header (eg Authorization, Api-Key).
|
||||
*/
|
||||
// The name of the auth parameter (eg token, key, apiKey) or header (eg Authorization, Api-Key).
|
||||
'name' => 'Authorization',
|
||||
|
||||
/*
|
||||
* The value of the parameter to be used by Scribe to authenticate response calls.
|
||||
* This will NOT be included in the generated documentation.
|
||||
* If this value is empty, Scribe will use a random value.
|
||||
*/
|
||||
// The value of the parameter to be used by Scribe to authenticate response calls.
|
||||
// This will NOT be included in the generated documentation. If empty, Scribe will use a random value.
|
||||
'use_value' => env('SCRIBE_AUTH_KEY'),
|
||||
|
||||
/*
|
||||
* Placeholder your users will see for the auth parameter in the example requests.
|
||||
* Set this to null if you want Scribe to use a random value as placeholder instead.
|
||||
*/
|
||||
// Placeholder your users will see for the auth parameter in the example requests.
|
||||
// Set this to null if you want Scribe to use a random value as placeholder instead.
|
||||
'placeholder' => '{YOUR_AUTH_KEY}',
|
||||
|
||||
/*
|
||||
* Any extra authentication-related info for your users. For instance, you can describe how to find or generate their auth credentials.
|
||||
* Markdown and HTML are supported.
|
||||
*/
|
||||
// Any extra authentication-related info for your users. Markdown and HTML are supported.
|
||||
// 'extra_info' => 'You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.',
|
||||
|
||||
'extra_info' => 'You can retrieve a new token by visiting Settings > <a href="/user/api-tokens"><b>API Tokens</b></a>.',
|
||||
],
|
||||
|
||||
/*
|
||||
* Text to place in the "Introduction" section, right after the `description`. Markdown and HTML are supported.
|
||||
*/
|
||||
// Text to place in the "Introduction" section, right after the `description`. Markdown and HTML are supported.
|
||||
'intro_text' => <<<'INTRO'
|
||||
This documentation aims to provide all the information you need to work with our API.
|
||||
|
||||
@@ -263,123 +134,77 @@ You can switch the language used with the tabs at the top right (or from the nav
|
||||
INTRO
|
||||
,
|
||||
|
||||
/*
|
||||
* Example requests for each endpoint will be shown in each of these languages.
|
||||
* Supported options are: bash, javascript, php, python
|
||||
* To add a language of your own, see https://scribe.knuckles.wtf/laravel/advanced/example-requests
|
||||
*
|
||||
*/
|
||||
// Example requests for each endpoint will be shown in each of these languages.
|
||||
// Supported options are: bash, javascript, php, python
|
||||
// To add a language of your own, see https://scribe.knuckles.wtf/laravel/advanced/example-requests
|
||||
'example_languages' => [
|
||||
'bash',
|
||||
'php',
|
||||
'javascript',
|
||||
],
|
||||
|
||||
/*
|
||||
* Generate a Postman collection (v2.1.0) in addition to HTML docs.
|
||||
* For 'static' docs, the collection will be generated to public/docs/collection.json.
|
||||
* For 'laravel' docs, it will be generated to storage/app/scribe/collection.json.
|
||||
* Setting `laravel.add_routes` to true (above) will also add a route for the collection.
|
||||
*/
|
||||
// Generate a Postman collection (v2.1.0) in addition to HTML docs.
|
||||
// For 'static' docs, the collection will be generated to public/docs/collection.json.
|
||||
// For 'laravel' docs, it will be generated to storage/app/scribe/collection.json.
|
||||
// Setting `laravel.add_routes` to true (above) will also add a route for the collection.
|
||||
'postman' => [
|
||||
'enabled' => true,
|
||||
|
||||
/*
|
||||
* Manually override some generated content in the spec. Dot notation is supported.
|
||||
*/
|
||||
'overrides' => [
|
||||
// 'info.version' => '2.0.0',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* Generate an OpenAPI spec (v3.0.1) in addition to docs webpage.
|
||||
* For 'static' docs, the collection will be generated to public/docs/openapi.yaml.
|
||||
* For 'laravel' docs, it will be generated to storage/app/scribe/openapi.yaml.
|
||||
* Setting `laravel.add_routes` to true (above) will also add a route for the spec.
|
||||
*/
|
||||
// Generate an OpenAPI spec (v3.0.1) in addition to docs webpage.
|
||||
// For 'static' docs, the collection will be generated to public/docs/openapi.yaml.
|
||||
// For 'laravel' docs, it will be generated to storage/app/scribe/openapi.yaml.
|
||||
// Setting `laravel.add_routes` to true (above) will also add a route for the spec.
|
||||
'openapi' => [
|
||||
'enabled' => true,
|
||||
|
||||
/*
|
||||
* Manually override some generated content in the spec. Dot notation is supported.
|
||||
*/
|
||||
'overrides' => [
|
||||
// 'info.version' => '2.0.0',
|
||||
],
|
||||
],
|
||||
|
||||
'groups' => [
|
||||
/*
|
||||
* Endpoints which don't have a @group will be placed in this default group.
|
||||
*/
|
||||
// Endpoints which don't have a @group will be placed in this default group.
|
||||
'default' => 'Endpoints',
|
||||
|
||||
/*
|
||||
* By default, Scribe will sort groups alphabetically, and endpoints in the order their routes are defined.
|
||||
* You can override this by listing the groups, subgroups and endpoints here in the order you want them.
|
||||
*
|
||||
* Any groups, subgroups or endpoints you don't list here will be added as usual after the ones here.
|
||||
* If an endpoint/subgroup is listed under a group it doesn't belong in, it will be ignored.
|
||||
* Note: you must include the initial '/' when writing an endpoint.
|
||||
*/
|
||||
'order' => [
|
||||
// 'This group will come first',
|
||||
// 'This group will come next' => [
|
||||
// 'POST /this-endpoint-will-comes-first',
|
||||
// 'GET /this-endpoint-will-comes-next',
|
||||
// ],
|
||||
// 'This group will come third' => [
|
||||
// 'This subgroup will come first' => [
|
||||
// 'GET /this-other-endpoint-will-comes-first',
|
||||
// 'GET /this-other-endpoint-will-comes-next',
|
||||
// ]
|
||||
// ]
|
||||
],
|
||||
// By default, Scribe will sort groups alphabetically, and endpoints in the order their routes are defined.
|
||||
// You can override this by listing the groups, subgroups and endpoints here in the order you want them.
|
||||
// See https://scribe.knuckles.wtf/blog/laravel-v4#easier-sorting and https://scribe.knuckles.wtf/laravel/reference/config#order for details
|
||||
'order' => [],
|
||||
],
|
||||
|
||||
/*
|
||||
* Custom logo path. This will be used as the value of the src attribute for the <img> tag,
|
||||
* so make sure it points to an accessible URL or path. Set to false to not use a logo.
|
||||
*
|
||||
* For example, if your logo is in public/img:
|
||||
* - 'logo' => '../img/logo.png' // for `static` type (output folder is public/docs)
|
||||
* - 'logo' => 'img/logo.png' // for `laravel` type
|
||||
*
|
||||
*/
|
||||
// Custom logo path. This will be used as the value of the src attribute for the <img> tag,
|
||||
// so make sure it points to an accessible URL or path. Set to false to not use a logo.
|
||||
// For example, if your logo is in public/img:
|
||||
// - 'logo' => '../img/logo.png' // for `static` type (output folder is public/docs)
|
||||
// - 'logo' => 'img/logo.png' // for `laravel` type
|
||||
'logo' => '../img/favicon.svg',
|
||||
|
||||
/**
|
||||
* Customize the "Last updated" value displayed in the docs by specifying tokens and formats.
|
||||
* Examples:
|
||||
* - {date:F j Y} => March 28, 2022
|
||||
* - {git:short} => Short hash of the last Git commit.
|
||||
*
|
||||
* Available tokens are `{date:<format>}` and `{git:<format>}`.
|
||||
* The format you pass to `date` will be passed to PhP's `date()` function.
|
||||
* The format you pass to `git` can be either "short" or "long".
|
||||
*/
|
||||
// Customize the "Last updated" value displayed in the docs by specifying tokens and formats.
|
||||
// Examples:
|
||||
// - {date:F j Y} => March 28, 2022
|
||||
// - {git:short} => Short hash of the last Git commit
|
||||
// Available tokens are `{date:<format>}` and `{git:<format>}`.
|
||||
// The format you pass to `date` will be passed to PHP's `date()` function.
|
||||
// The format you pass to `git` can be either "short" or "long".
|
||||
'last_updated' => 'Last updated: {date:F j, Y}',
|
||||
|
||||
'examples' => [
|
||||
/*
|
||||
* If you would like the package to generate the same example values for parameters on each run,
|
||||
* set this to any number (eg. 1234)
|
||||
*/
|
||||
// Set this to any number (eg. 1234) to generate the same example values for parameters on each run,
|
||||
'faker_seed' => null,
|
||||
|
||||
/*
|
||||
* With API resources and transformers, Scribe tries to generate example models to use in your API responses.
|
||||
* By default, Scribe will try the model's factory, and if that fails, try fetching the first from the database.
|
||||
* You can reorder or remove strategies here.
|
||||
*/
|
||||
// With API resources and transformers, Scribe tries to generate example models to use in your API responses.
|
||||
// By default, Scribe will try the model's factory, and if that fails, try fetching the first from the database.
|
||||
// You can reorder or remove strategies here.
|
||||
'models_source' => ['factoryCreate', 'factoryMake', 'databaseFirst'],
|
||||
],
|
||||
|
||||
/**
|
||||
* The strategies Scribe will use to extract information about your routes at each stage.
|
||||
* If you create or install a custom strategy, add it here.
|
||||
*/
|
||||
// The strategies Scribe will use to extract information about your routes at each stage.
|
||||
// If you create or install a custom strategy, add it here.
|
||||
'strategies' => [
|
||||
'metadata' => [
|
||||
Strategies\Metadata\GetFromDocBlocks::class,
|
||||
@@ -387,7 +212,6 @@ INTRO
|
||||
],
|
||||
'urlParameters' => [
|
||||
Strategies\UrlParameters\GetFromLaravelAPI::class,
|
||||
Strategies\UrlParameters\GetFromLumenAPI::class,
|
||||
Strategies\UrlParameters\GetFromUrlParamAttribute::class,
|
||||
Strategies\UrlParameters\GetFromUrlParamTag::class,
|
||||
],
|
||||
@@ -398,9 +222,15 @@ INTRO
|
||||
Strategies\QueryParameters\GetFromQueryParamTag::class,
|
||||
],
|
||||
'headers' => [
|
||||
Strategies\Headers\GetFromRouteRules::class,
|
||||
Strategies\Headers\GetFromHeaderAttribute::class,
|
||||
Strategies\Headers\GetFromHeaderTag::class,
|
||||
[
|
||||
'override',
|
||||
[
|
||||
'Content-Type' => 'application/json',
|
||||
'Accept' => 'application/json',
|
||||
],
|
||||
],
|
||||
],
|
||||
'bodyParameters' => [
|
||||
Strategies\BodyParameters\GetFromFormRequest::class,
|
||||
@@ -414,7 +244,10 @@ INTRO
|
||||
Strategies\Responses\UseApiResourceTags::class,
|
||||
Strategies\Responses\UseResponseTag::class,
|
||||
Strategies\Responses\UseResponseFileTag::class,
|
||||
Strategies\Responses\ResponseCalls::class,
|
||||
[
|
||||
Strategies\Responses\ResponseCalls::class,
|
||||
['only' => ['GET *']],
|
||||
],
|
||||
],
|
||||
'responseFields' => [
|
||||
Strategies\ResponseFields\GetFromResponseFieldAttribute::class,
|
||||
@@ -422,24 +255,15 @@ INTRO
|
||||
],
|
||||
],
|
||||
|
||||
// For response calls, API resource responses and transformer responses,
|
||||
// Scribe will try to start database transactions, so no changes are persisted to your database.
|
||||
// Tell Scribe which connections should be transacted here. If you only use one db connection, you can leave this as is.
|
||||
'database_connections_to_transact' => [config('database.default')],
|
||||
|
||||
'fractal' => [
|
||||
/* If you are using a custom serializer with league/fractal, you can specify it here.
|
||||
* Leave as null to use no serializer or return simple JSON.
|
||||
*/
|
||||
// If you are using a custom serializer with league/fractal, you can specify it here.
|
||||
'serializer' => null,
|
||||
],
|
||||
|
||||
/*
|
||||
* [Advanced] Custom implementation of RouteMatcherInterface to customise how routes are matched
|
||||
*
|
||||
*/
|
||||
'routeMatcher' => \Knuckles\Scribe\Matching\RouteMatcher::class,
|
||||
|
||||
/**
|
||||
* For response calls, API resource responses and transformer responses,
|
||||
* Scribe will try to start database transactions, so no changes are persisted to your database.
|
||||
* Tell Scribe which connections should be transacted here.
|
||||
* If you only use one db connection, you can leave this as is.
|
||||
*/
|
||||
'database_connections_to_transact' => [config('database.default')],
|
||||
];
|
||||
|
||||
+59
-12
@@ -1,21 +1,68 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
'tunnel-url' => env('SENTRY_TUNNEL_URL', '/sentry/tunnel'),
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Allowed Hosts
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the list of target sentry hosts that are allowed to use the tunnel.
|
||||
| It uses the value of 'SENTRY_LARAVEL_DSN' by default.
|
||||
|
|
||||
*/
|
||||
|
||||
// this is required to prevent misuse
|
||||
'allowed-hosts' => env('SENTRY_TUNNEL_ALLOWED_HOSTS', Str::of(env('SENTRY_LARAVEL_DSN'))->after('@')->before('/')->__toString()),
|
||||
|
||||
// this is optional, all project are allowed by default
|
||||
'allowed-projects' => env('SENTRY_TUNNEL_ALLOWED_PROJECTS', Str::of(env('SENTRY_LARAVEL_DSN'))->afterLast('/')->__toString()),
|
||||
'allowed-hosts' => explode(',', env('SENTRY_TUNNEL_ALLOWED_HOSTS', (string) Str::of(env('SENTRY_LARAVEL_DSN'))->after('@')->before('/'))),
|
||||
|
||||
/*
|
||||
* see the readme before disabling this
|
||||
* is only relevant when you use the provided MiddlewareList
|
||||
*/
|
||||
'use-auth-middleware' => env('SENTRY_TUNNEL_USE_AUTH_MIDDLEWARE', true),
|
||||
|--------------------------------------------------------------------------
|
||||
| Allowed Projects
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the list of target sentry projects that are allowed to use the tunnel.
|
||||
| It uses the value of 'SENTRY_LARAVEL_DSN' by default.
|
||||
| If the value is empty, all projects are allowed. Otherwise, it should be a
|
||||
| comma-separated list of project IDs.
|
||||
*/
|
||||
|
||||
'allowed-projects' => explode(',', env('SENTRY_TUNNEL_ALLOWED_PROJECTS', (string) Str::of(env('SENTRY_LARAVEL_DSN'))->afterLast('/'))),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the subdomain where the tunnel will be accessible from. If the
|
||||
| setting is null, the route will reside under the same domain as the
|
||||
| application. Otherwise, this value will be used as the subdomain.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Tunnel url
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the URI path of the tunnel. It is used to define the route that
|
||||
| will be used to proxy the requests to Sentry.
|
||||
|
|
||||
*/
|
||||
|
||||
'tunnel-url' => env('SENTRY_TUNNEL_URL', '/sentry/tunnel'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Route Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These middlewares will be assigned to the tunnel route.
|
||||
|
|
||||
*/
|
||||
|
||||
'middleware' => [
|
||||
'web',
|
||||
],
|
||||
];
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ return [
|
||||
'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),
|
||||
|
||||
// capture release as git sha
|
||||
'release' => is_file(__DIR__.'/.release') ? trim(file_get_contents(__DIR__.'/.release')) : (is_dir(__DIR__.'/../.git') ? trim(exec('git --git-dir '.base_path('.git').' log --pretty="%h" -n1 HEAD')) : null),
|
||||
'release' => readVersion(__DIR__.'/.release', 'git log --pretty="%h" -n1 HEAD'),
|
||||
|
||||
// When left empty or `null` the Laravel environment will be used
|
||||
'environment' => env('SENTRY_ENVIRONMENT'),
|
||||
|
||||
+51
-34
@@ -9,16 +9,16 @@ return [
|
||||
| Default Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default session "driver" that will be used on
|
||||
| requests. By default, we will use the lightweight native driver but
|
||||
| you may specify any of the other wonderful drivers provided here.
|
||||
| This option determines the default session driver that is utilized for
|
||||
| incoming requests. Laravel supports a variety of storage options to
|
||||
| persist session data. Database storage is a great default choice.
|
||||
|
|
||||
| Supported: "file", "cookie", "database", "apc",
|
||||
| "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
|
||||
| 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),
|
||||
|
||||
'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
|
||||
| should be encrypted before it is stored. All encryption will be run
|
||||
| automatically by Laravel and you can use the Session like normal.
|
||||
| should be encrypted before it's stored. All encryption is performed
|
||||
| automatically by Laravel and you may use the session like normal.
|
||||
|
|
||||
*/
|
||||
|
||||
'encrypt' => false,
|
||||
'encrypt' => env('SESSION_ENCRYPT', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session File Location
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the native session driver, we need a location where session
|
||||
| files may be stored. A default has been set for you but a different
|
||||
| location may be specified. This is only needed for file sessions.
|
||||
| When utilizing the "file" session driver, the session files are placed
|
||||
| on disk. The default storage location is defined here; however, you
|
||||
| are free to provide another location where they should be stored.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -72,35 +73,35 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'connection' => env('SESSION_CONNECTION', null),
|
||||
'connection' => env('SESSION_CONNECTION'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the table we
|
||||
| should use to manage the sessions. Of course, a sensible default is
|
||||
| provided for you; however, you are free to change this as needed.
|
||||
| When using the "database" session driver, you may specify the table to
|
||||
| be used to store sessions. Of course, a sensible default is defined
|
||||
| for you; however, you're welcome to change this to another table.
|
||||
|
|
||||
*/
|
||||
|
||||
'table' => 'sessions',
|
||||
'table' => env('SESSION_TABLE', 'sessions'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| While using one of the framework's cache driven session backends you may
|
||||
| list a cache store that should be used for these sessions. This value
|
||||
| must match with one of the application's configured cache "stores".
|
||||
| When using one of the framework's cache driven session backends, you may
|
||||
| define the cache store which should be used to store the session data
|
||||
| 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'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -120,9 +121,10 @@ return [
|
||||
| Session Cookie Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the name of the cookie used to identify a session
|
||||
| instance by ID. The name specified here will get used every time a
|
||||
| new session cookie is created by the framework for every driver.
|
||||
| Here you may change the name of the session cookie that is created by
|
||||
| the framework. Typically, you should not need to change this value
|
||||
| since doing so does not grant a meaningful security improvement.
|
||||
|
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -138,24 +140,24 @@ return [
|
||||
|
|
||||
| The session cookie path determines the path for which the cookie will
|
||||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application but you are free to change this when necessary.
|
||||
| your application, but you're free to change this when necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => '/',
|
||||
'path' => env('SESSION_PATH', '/'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the domain of the cookie used to identify a session
|
||||
| in your application. This will determine which domains the cookie is
|
||||
| available to in your application. A sensible default has been set.
|
||||
| This value determines the domain and subdomains the session cookie is
|
||||
| available to. By default, the cookie will be available to the root
|
||||
| domain and all subdomains. Typically, this shouldn't be changed.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => env('SESSION_DOMAIN', null),
|
||||
'domain' => env('SESSION_DOMAIN'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -177,11 +179,11 @@ return [
|
||||
|
|
||||
| Setting this value to true will prevent JavaScript from accessing the
|
||||
| value of the cookie and the cookie will only be accessible through
|
||||
| the HTTP protocol. You are free to modify this option if needed.
|
||||
| the HTTP protocol. It's unlikely you should disable this option.
|
||||
|
|
||||
*/
|
||||
|
||||
'http_only' => true,
|
||||
'http_only' => env('SESSION_HTTP_ONLY', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -190,12 +192,27 @@ return [
|
||||
|
|
||||
| This option determines how your cookies behave when cross-site requests
|
||||
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||
| will set this value to "lax" since this is a secure default value.
|
||||
| will set this value to "lax" to permit secure cross-site requests.
|
||||
|
|
||||
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
||||
|
|
||||
| Supported: "lax", "strict", "none", null
|
||||
|
|
||||
*/
|
||||
|
||||
'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,36 +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' => env(
|
||||
'VIEW_COMPILED_PATH',
|
||||
realpath(storage_path('framework/views'))
|
||||
),
|
||||
|
||||
];
|
||||
+1
-1
@@ -228,7 +228,7 @@ return [
|
||||
\Cose\Algorithms::COSE_ALGORITHM_ES256, // ECDSA with SHA-256
|
||||
\Cose\Algorithms::COSE_ALGORITHM_ES512, // ECDSA with SHA-512
|
||||
\Cose\Algorithms::COSE_ALGORITHM_RS256, // RSASSA-PKCS1-v1_5 with SHA-256
|
||||
\Cose\Algorithms::COSE_ALGORITHM_EdDSA, // EdDSA
|
||||
\Cose\Algorithms::COSE_ALGORITHM_EDDSA, // EdDSA
|
||||
\Cose\Algorithms::COSE_ALGORITHM_ES384, // ECDSA with SHA-384
|
||||
],
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ return new class() extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
Schema::create(config('auth.passwords.users.table'), function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
@@ -27,6 +27,6 @@ return new class() extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
Schema::dropIfExists(config('auth.passwords.users.table'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('telescope_entries', function (Blueprint $table) {
|
||||
$table->bigIncrements('sequence');
|
||||
$table->uuid('uuid');
|
||||
$table->uuid('batch_id');
|
||||
$table->string('family_hash')->nullable();
|
||||
$table->boolean('should_display_on_index')->default(true);
|
||||
$table->string('type', 20);
|
||||
$table->longText('content');
|
||||
$table->dateTime('created_at')->nullable();
|
||||
|
||||
$table->unique('uuid');
|
||||
$table->index('batch_id');
|
||||
$table->index('family_hash');
|
||||
$table->index('created_at');
|
||||
$table->index(['type', 'should_display_on_index']);
|
||||
});
|
||||
|
||||
Schema::create('telescope_entries_tags', function (Blueprint $table) {
|
||||
$table->uuid('entry_uuid');
|
||||
$table->string('tag');
|
||||
|
||||
$table->primary(['entry_uuid', 'tag']);
|
||||
$table->index('tag');
|
||||
|
||||
$table->foreign('entry_uuid')
|
||||
->references('uuid')
|
||||
->on('telescope_entries')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('telescope_monitoring', function (Blueprint $table) {
|
||||
$table->string('tag')->primary();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('telescope_entries_tags');
|
||||
Schema::dropIfExists('telescope_entries');
|
||||
Schema::dropIfExists('telescope_monitoring');
|
||||
}
|
||||
};
|
||||
@@ -49,3 +49,6 @@ parameters:
|
||||
|
||||
- message: '#Access to an undefined property Illuminate\\Database\\Eloquent\\Model::\$user_id\.#'
|
||||
path: */app/Listeners/WebauthnRegistered.php
|
||||
|
||||
- path: */app/Helpers/helpers.php
|
||||
message: '#Function readVersion\(\) never returns null so it can be removed from the return type\.#'
|
||||
|
||||
+2
-1
@@ -14,9 +14,10 @@
|
||||
<php>
|
||||
<env name="APP_ENV" value="testing"/>
|
||||
<env name="APP_KEY" value="base64:NTrXToqFZJlv48dgPc+kNpc3SBt333TfDnF1mDShsBg="/>
|
||||
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||
<env name="DB_CONNECTION" value="testing"/>
|
||||
<env name="CACHE_DRIVER" value="array"/>
|
||||
<env name="CACHE_STORE" value="array"/>
|
||||
<env name="MAIL_MAILER" value="array"/>
|
||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||
<env name="SESSION_DRIVER" value="array"/>
|
||||
|
||||
@@ -19,4 +19,20 @@
|
||||
<plugins>
|
||||
<pluginClass class="Psalm\LaravelPlugin\Plugin"/>
|
||||
</plugins>
|
||||
|
||||
<issueHandlers>
|
||||
<MissingDependency errorLevel="suppress" />
|
||||
<PossiblyUnusedMethod errorLevel="suppress" />
|
||||
<PossiblyUnusedParam errorLevel="suppress" />
|
||||
<PossiblyUnusedProperty errorLevel="suppress" />
|
||||
<PossiblyUnusedReturnValue errorLevel="suppress" />
|
||||
<ReservedWord errorLevel="suppress" />
|
||||
<UnnecessaryVarAnnotation errorLevel="suppress" />
|
||||
<UnusedClass errorLevel="suppress" />
|
||||
<UnusedClosureParam errorLevel="suppress" />
|
||||
<UnusedForeachValue errorLevel="suppress" />
|
||||
<UnusedMethod errorLevel="suppress" />
|
||||
<UnusedReturnValue errorLevel="suppress" />
|
||||
<UnusedVariable errorLevel="suppress" />
|
||||
</issueHandlers>
|
||||
</psalm>
|
||||
|
||||
+7
-45
@@ -1,55 +1,17 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Contracts\Http\Kernel;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Check If The Application Is Under Maintenance
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If the application is in maintenance / demo mode via the "down" command
|
||||
| we will load this file so that any pre-rendered content can be shown
|
||||
| instead of starting the framework, which could cause an exception.
|
||||
|
|
||||
*/
|
||||
|
||||
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
|
||||
require __DIR__.'/../storage/framework/maintenance.php';
|
||||
// Determine if the application is in maintenance mode...
|
||||
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
|
||||
require $maintenance;
|
||||
}
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader for
|
||||
| this application. We just need to utilize it! We'll simply require it
|
||||
| into the script here so we don't need to manually load our classes.
|
||||
|
|
||||
*/
|
||||
|
||||
// Register the Composer autoloader...
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once we have the application, we can handle the incoming request using
|
||||
| the application's HTTP kernel. Then, we will send the response back
|
||||
| to this client's browser, allowing them to enjoy our application.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$kernel = $app->make(Kernel::class);
|
||||
|
||||
$response = $kernel->handle(
|
||||
$request = Request::capture()
|
||||
)->send();
|
||||
|
||||
$kernel->terminate($request, $response);
|
||||
// Bootstrap Laravel and handle the request...
|
||||
(require_once __DIR__.'/../bootstrap/app.php')
|
||||
->handleRequest(Request::capture());
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+3
-3
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"/app.js": "/app.js?id=613c227dfb4d6e1fc4db1b1a90513610",
|
||||
"/app-dark.css": "/app-dark.css?id=b11fa9a28e9d3aeb8c92986f319b3c44",
|
||||
"/app.css": "/app.css?id=b3ccfbe68f24cff776f83faa8dead721"
|
||||
"/app.js": "/app.js?id=7049e92a398e816f8cd53a915eaea592",
|
||||
"/app-dark.css": "/app-dark.css?id=1ea407db56c5163ae29311f1f38eb7b9",
|
||||
"/app.css": "/app.css?id=de4c978567bfd90b38d186937dee5ccf"
|
||||
}
|
||||
|
||||
@@ -1,32 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" dir="{{ htmldir() }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title inertia>{{ config('app.name', 'Monica') }}</title>
|
||||
|
||||
<title inertia>{{ config('app.name', 'Laravel') }}</title>
|
||||
<link rel="shortcut icon" href="/img/favicon.svg">
|
||||
|
||||
<link rel="shortcut icon" href="/img/favicon.svg">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script type="text/javascript">
|
||||
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia(
|
||||
'(prefers-color-scheme: dark)').matches)) {
|
||||
document.documentElement.classList.add('dark')
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark')
|
||||
}
|
||||
</script>
|
||||
|
||||
@routes
|
||||
@vite('resources/js/app.js')
|
||||
@inertiaHead
|
||||
</head>
|
||||
|
||||
<body class="font-sans antialiased bg-white dark:bg-gray-800 dark:text-gray-300">
|
||||
@inertia
|
||||
</body>
|
||||
<!-- Scripts -->
|
||||
<script type="text/javascript">
|
||||
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia(
|
||||
'(prefers-color-scheme: dark)').matches)) {
|
||||
document.documentElement.classList.add('dark')
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark')
|
||||
}
|
||||
</script>
|
||||
|
||||
@routes
|
||||
@vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])
|
||||
@inertiaHead
|
||||
</head>
|
||||
<body class="font-sans antialiased bg-white dark:bg-gray-800 dark:text-gray-300">
|
||||
@inertia
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,6 +4,17 @@ use App\Domains\Settings\ManageUsers\Api\Controllers\UserController;
|
||||
use App\Domains\Vault\ManageVault\Api\Controllers\VaultController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the bootstrap/app.php file and all of them will
|
||||
| be assigned to the "api" middleware group. Make something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::middleware('auth:sanctum')->name('api.')->group(function () {
|
||||
// users
|
||||
Route::get('user', [UserController::class, 'user']);
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may register all of the event broadcasting channels that your
|
||||
| application supports. The given channel authorization callbacks are
|
||||
| used to check if an authenticated user can listen to the channel.
|
||||
|
|
||||
*/
|
||||
@@ -1,5 +1,11 @@
|
||||
<?php
|
||||
|
||||
use App\Console\Scheduling\Schedule;
|
||||
use App\Domains\Contact\Dav\Jobs\CleanSyncToken;
|
||||
use App\Domains\Contact\DavClient\Jobs\UpdateAddressBooks;
|
||||
use App\Domains\Contact\ManageReminders\Jobs\ProcessScheduledContactReminders;
|
||||
use App\Logging\CleanLogs;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
@@ -10,3 +16,13 @@
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
*/
|
||||
|
||||
Schedule::command('model:prune', 'daily');
|
||||
Schedule::command('queue:prune-batches', 'daily');
|
||||
if (config('telescope.enabled')) {
|
||||
Schedule::command('telescope:prune', 'daily');
|
||||
}
|
||||
Schedule::job(UpdateAddressBooks::class, 'hourly');
|
||||
Schedule::job(ProcessScheduledContactReminders::class, 'minutes', 1);
|
||||
Schedule::job(CleanSyncToken::class, 'daily');
|
||||
Schedule::job(CleanLogs::class, 'daily');
|
||||
|
||||
+2
-3
@@ -143,7 +143,6 @@ use App\Http\Controllers\Auth\AcceptInvitationController;
|
||||
use App\Http\Controllers\Auth\SocialiteCallbackController;
|
||||
use App\Http\Controllers\Profile\UserTokenController;
|
||||
use App\Http\Middleware\HandleInertiaRequests;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
@@ -153,10 +152,10 @@ Route::get('/', function () {
|
||||
return Redirect::route('login');
|
||||
}
|
||||
if (($vaults = Auth::user()->vaults)->count() === 1) {
|
||||
return Redirect::intended(route('vault.show', $vaults->first()));
|
||||
return Redirect::intended(route('vault.show', $vaults->first(), absolute: false));
|
||||
}
|
||||
|
||||
return Redirect::intended(RouteServiceProvider::HOME);
|
||||
return Redirect::intended(route('vault.index', absolute: false));
|
||||
})->name('home');
|
||||
|
||||
// Redirect .well-known urls (https://en.wikipedia.org/wiki/List_of_/.well-known/_services_offered_by_webservers)
|
||||
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Laravel - A PHP Framework For Web Artisans
|
||||
*
|
||||
* @author Taylor Otwell <taylor@laravel.com>
|
||||
*/
|
||||
$uri = urldecode(
|
||||
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
|
||||
);
|
||||
|
||||
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
|
||||
// built-in PHP web server. This provides a convenient way to test a Laravel
|
||||
// application without having installed a "real" web server software here.
|
||||
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
require_once __DIR__.'/public/index.php';
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Tests\Feature\Auth;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use Tests\TestCase;
|
||||
@@ -15,6 +14,8 @@ class AuthenticationTest extends TestCase
|
||||
#[Test]
|
||||
public function login_screen_can_be_rendered()
|
||||
{
|
||||
$this->withoutVite();
|
||||
|
||||
$response = $this->get('/login');
|
||||
|
||||
$response->assertStatus(200);
|
||||
@@ -31,7 +32,7 @@ class AuthenticationTest extends TestCase
|
||||
]);
|
||||
|
||||
$this->assertAuthenticated();
|
||||
$response->assertRedirect(RouteServiceProvider::HOME);
|
||||
$response->assertRedirect('/vaults');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Tests\Feature\Auth;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Auth\Events\Verified;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
@@ -19,6 +18,8 @@ class EmailVerificationTest extends TestCase
|
||||
#[Test]
|
||||
public function email_verification_screen_can_be_rendered()
|
||||
{
|
||||
$this->withoutVite();
|
||||
|
||||
if (! Features::enabled(Features::emailVerification())) {
|
||||
return $this->markTestSkipped('Email verification not enabled.');
|
||||
}
|
||||
@@ -52,7 +53,7 @@ class EmailVerificationTest extends TestCase
|
||||
Event::assertDispatched(Verified::class);
|
||||
|
||||
$this->assertTrue($user->fresh()->hasVerifiedEmail());
|
||||
$response->assertRedirect(RouteServiceProvider::HOME.'?verified=1');
|
||||
$response->assertRedirect('/vaults?verified=1');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
|
||||
@@ -14,6 +14,8 @@ class PasswordConfirmationTest extends TestCase
|
||||
#[Test]
|
||||
public function confirm_password_screen_can_be_rendered()
|
||||
{
|
||||
$this->withoutVite();
|
||||
|
||||
$user = User::factory()->create();
|
||||
|
||||
$response = $this->actingAs($user)->get('/user/confirm-password');
|
||||
|
||||
@@ -17,6 +17,8 @@ class PasswordResetTest extends TestCase
|
||||
#[Test]
|
||||
public function reset_password_link_screen_can_be_rendered()
|
||||
{
|
||||
$this->withoutVite();
|
||||
|
||||
if (! Features::enabled(Features::resetPasswords())) {
|
||||
return $this->markTestSkipped('Password updates are not enabled.');
|
||||
}
|
||||
@@ -47,6 +49,8 @@ class PasswordResetTest extends TestCase
|
||||
#[Test]
|
||||
public function reset_password_screen_can_be_rendered()
|
||||
{
|
||||
$this->withoutVite();
|
||||
|
||||
if (! Features::enabled(Features::resetPasswords())) {
|
||||
return $this->markTestSkipped('Password updates are not enabled.');
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Tests\Feature\Auth;
|
||||
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Laravel\Fortify\Features;
|
||||
use Laravel\Jetstream\Jetstream;
|
||||
@@ -16,6 +15,8 @@ class RegistrationTest extends TestCase
|
||||
#[Test]
|
||||
public function registration_screen_can_be_rendered()
|
||||
{
|
||||
$this->withoutVite();
|
||||
|
||||
if (! Features::enabled(Features::registration())) {
|
||||
return $this->markTestSkipped('Registration support is not enabled.');
|
||||
}
|
||||
@@ -42,6 +43,6 @@ class RegistrationTest extends TestCase
|
||||
]);
|
||||
|
||||
$this->assertAuthenticated();
|
||||
$response->assertRedirect(RouteServiceProvider::HOME);
|
||||
$response->assertRedirect('/vaults');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -780,16 +780,16 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/lodash@npm:^4.14.165":
|
||||
version: 4.14.195
|
||||
resolution: "@types/lodash@npm:4.14.195"
|
||||
checksum: 10c0/6d733276df592614a0943a0053056140398b3c263cdf2557d4301b3a47b07ff561926cb9339a4725acbc7d8766f91ded218df11e0a4288cee369eafb5141d94d
|
||||
version: 4.17.0
|
||||
resolution: "@types/lodash@npm:4.17.0"
|
||||
checksum: 10c0/4c5b41c9a6c41e2c05d08499e96f7940bcf194dcfa84356235b630da920c2a5e05f193618cea76006719bec61c76617dff02defa9d29934f9f6a76a49291bd8f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/resize-observer-browser@npm:^0.1.7":
|
||||
version: 0.1.7
|
||||
resolution: "@types/resize-observer-browser@npm:0.1.7"
|
||||
checksum: 10c0/06c176fc363c10b225148a5ea3fce6f6bedd129c68c462b57b3eecd8882f4eec8fc5a0d2edc7b86617ef9b9d7ebfe7ae04c96fb401c8fd4098db3266e0a5934c
|
||||
version: 0.1.11
|
||||
resolution: "@types/resize-observer-browser@npm:0.1.11"
|
||||
checksum: 10c0/7bb6347b89464da9ba35e89add6764addc8cf31e90abb4b40970bc8332d418215af65da39acf88277c55631b6c5b0f480b2e4c84adb6d5c0b5c81886db20fc9b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1591,11 +1591,11 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"date-fns-tz@npm:^2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "date-fns-tz@npm:2.0.0"
|
||||
version: 2.0.1
|
||||
resolution: "date-fns-tz@npm:2.0.1"
|
||||
peerDependencies:
|
||||
date-fns: ">=2.0.0"
|
||||
checksum: 10c0/31cacb83c675ef8c2cf31d21c298ab6d74c5e975412dd804664d031ac0f2f03ed5bfb2a950fa15a321bbbcb90b833c300823fbceba0133680065a71894cc1170
|
||||
date-fns: 2.x
|
||||
checksum: 10c0/f860dda9e3d38bc99dc325c678cafb94b3a18c12b1fea0e2f4e451396ea6c4cacced683066c669a67ec380f64fdda83aa4c414a207029b647faa2b76b2a5c6e3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user