src/Seeders/TenantStatusSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $this->tenantStatus->unguard();
        $this->values()->each(
            function ($record, $key) {
                $this->tenantStatus->firstOrNew(
                    [
                        $this->tenantStatus->getKeyName() => $key,
                    ]
                )->fill($record)->save();
            }
        );
        $this->tenantStatus->reguard();
    }
public function run ( ) { $ this -> tenantStatus -> unguard ( ) ; $ this -> values ( ) -> each ( function ( $ record , $ key ) { $ this -> tenantStatus -> firstOrNew ( [ $ this -> tenantStatus -> getKeyName ( ) => $ key , ] ) -> fill ( $ record ) -> save ( ) ; } ) ; $ this -> tenantStatus -> reguard ( ) ; }
Run the database seeds.
Run the database seeds .