sql, // [ // 'bindings' => $query->bindings, // 'time' => $query->time // ] // ); // }); Relation::morphMap([ 'invoices' => Invoice::class, 'proposals' => Proposal::class, ]); Blade::if('env', function ($environment) { return config('ninja.environment') === $environment; }); Schema::defaultStringLength(191); /* Handles setting the correct database with livewire classes */ if (Ninja::isHosted()) { Livewire::addPersistentMiddleware([ SetDomainNameDb::class, ]); } /* Ensure we don't have stale state in jobs */ Queue::before(function (JobProcessing $event) { App::forgetInstance('truthsource'); }); app()->instance(TruthSource::class, new TruthSource()); // Model::preventLazyLoading( // !$this->app->isProduction() // ); Mail::extend('gmail', function () { return new GmailTransport(); }); Mail::extend('office365', function () { return new Office365MailTransport(); }); Mailer::macro('postmark_config', function (string $postmark_key) { Mailer::setSymfonyTransport(app('mail.manager')->createSymfonyTransport([ 'transport' => 'postmark', 'token' => $postmark_key ])); return $this; }); Mailer::macro('mailgun_config', function ($secret, $domain) { Mailer::setSymfonyTransport(app('mail.manager')->createSymfonyTransport([ 'transport' => 'mailgun', 'secret' => $secret, 'domain' => $domain, 'endpoint' => config('services.mailgun.endpoint'), 'scheme' => config('services.mailgun.scheme'), ])); return $this; }); ParallelTesting::setUpTestDatabase(function ($database, $token) { Artisan::call('db:seed'); }); } }