increments('id'); $table->timestamps(); $table->string('url'); $table->string("name"); $table->string('devurl')->nullable(); $table->text('aboutus')->nullable(); $table->json('address')->nullable(); $table->string('description')->nullable(); $table->string('email'); $table->string('phone')->nullable(); $table->string('fax')->nullable(); $table->string('logo')->nullable(); $table->string('favicon')->nullable(); $table->string('theme'); }); if ($this->convert) foreach (($this->convert)::all() as $o) { $oo = new Site; $oo->url = rtrim($o->url,'/'); $oo->name = $o->site_details['name']; $oo->email = $o->site_details['email']; $oo->address = ['address1'=>$o->site_details['address1'],'address2'=>$o->site_details['address2'],'city'=>$o->site_details['city'],'state'=>$o->site_details['state'],'postcode'=>$o->site_details['pcode']]; $oo->phone = $o->site_details['phone']; $oo->fax = $o->site_details['fax']; $oo->theme = 'metronic-fe'; $oo->devurl = 'http://graytech'; $oo->save(); } } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('sites'); } }