Add Lazy Loading prevention to app when testing

This commit is contained in:
philipp lang 2024-12-24 21:20:13 +01:00
parent da567e0a73
commit d41f24fdea
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@
namespace App\Providers;
use App\Form\Models\Form;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Facades\Blade;
@ -30,6 +31,7 @@ class AppServiceProvider extends ServiceProvider
app()->extend('media-library-helpers', fn ($p) => $p->put('form', Form::class));
Blade::componentNamespace('App\\View\\Mail', 'mail-view');
Model::preventLazyLoading(!app()->isProduction());
}
/**