Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Xethron\MigrationsGenerator\Syntax; |
||
22 | public function run(array $fields, $table, $connection = null, $method = 'table') |
||
23 | { |
||
24 | $table = substr($table, strlen(\DB::getTablePrefix())); |
||
25 | $this->table = $table; |
||
26 | if (!is_null($connection)) $method = 'connection(\''.$connection.'\')->'.$method; |
||
27 | $compiled = $this->compiler->compile($this->getTemplate(), ['table'=>$table,'method'=>$method]); |
||
28 | return $this->replaceFieldsWith($this->getItems($fields), $compiled); |
||
29 | } |
||
30 | |||
69 |