<?php

namespace Database\Seeders\Tenant;

use App\Facades\Feature;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Config;

class SeedDefaultFeatures extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        if (tenant()->features()->count() === 0) {
            Feature::setEnabled(tenant(), Config::get('features.default'));
        }
    }
}
