Removed redundant items, upgraded to laravel 5.6

This commit is contained in:
Deon George
2018-04-10 21:23:13 +10:00
parent 33658e37a3
commit f9e3b2927a
588 changed files with 35299 additions and 90438 deletions

View File

@@ -3,12 +3,9 @@
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use App\Models\Currency;
class CreateTableCurrencies extends Migration
{
private $convert = 'App\Models\Old\Currency';
/**
* Run the migrations.
*
@@ -16,7 +13,6 @@ class CreateTableCurrencies extends Migration
*/
public function up()
{
Schema::dropIfExists('currencies');
Schema::create('currencies', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
@@ -24,17 +20,6 @@ class CreateTableCurrencies extends Migration
$table->string('threecode',3);
$table->boolean('active');
});
if ($this->convert)
foreach (($this->convert)::all() as $o)
{
$oo = new Currency;
$oo->name = $o->name;
$oo->symbol = $o->symbol;
$oo->threecode = $o->three_digit;
$oo->active = $o->three_code == 'AUS' ? TRUE : FALSE;
$oo->save();
}
}
/**