defaultStringLength(191); // Enable on delete cascade for sqlite connections if ($db->connection() instanceof SQLiteConnection) { $db->statement($db->raw('PRAGMA foreign_keys = ON')); } // Add some custom validation rules $validator->extend('path.valid', static function ($attribute, $value): bool { return is_dir($value) && is_readable($value); }); } /** * Register any application services. */ public function register(): void { if ($this->app->environment() !== 'production') { $this->app->register(TinkerServiceProvider::class); } } }