/**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $table1 = $this->option('table1');
     $table2 = $this->option('table2');
     $fields = $this->option('fields');
     if ($fields) {
         $fields = explode(',', $fields);
     } else {
         $fields = '*';
     }
     $op = new Operation(compact('table1', 'table2', 'fields'));
     $op->save();
     $op->getDiffProcessor()->intoTempTable($op->id);
     $this->info("Diff #{$op->id} ready.");
 }
Exemple #2
0
 public function getMake()
 {
     $table1 = Input::get('table_1');
     $table2 = Input::get('table_2');
     $fields = Input::get('fields');
     if ($fields) {
         $fields = explode(',', $fields);
     } else {
         $fields = '*';
     }
     $op = new Operation(compact('table1', 'table2', 'fields'));
     $op->save();
     $op->getDiffProcessor()->intoTempTable($op->id);
     return Redirect::action('Nayjest\\DbDiff\\Controller@getShow', [$op->id]);
 }