Fix db:seed config, add quickbooks sdk
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
use App\Models\{Country,Currency};
|
||||
|
||||
class CountryTableSeeder extends Seeder
|
||||
@@ -10,17 +11,17 @@ class CountryTableSeeder extends Seeder
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$o = new Country;
|
||||
$o->name = 'Australia';
|
||||
$o->twocode = 'AU';
|
||||
$o->threecode = 'AUS';
|
||||
$o->currency_id = '61';
|
||||
$o->active = TRUE;
|
||||
public function run()
|
||||
{
|
||||
$o = new Country;
|
||||
$o->name = 'Australia';
|
||||
$o->two_code = 'AU';
|
||||
$o->three_code = 'AUS';
|
||||
$o->currency_id = '61';
|
||||
$o->active = TRUE;
|
||||
|
||||
$oo = Currency::where('threecode','AUD')->firstOrFail();
|
||||
$oo = Currency::where('iso_code','AUD')->firstOrFail();
|
||||
|
||||
$oo->countries()->save($o);
|
||||
}
|
||||
}
|
||||
$oo->countries()->save($o);
|
||||
}
|
||||
}
|
@@ -1,22 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
use App\Models\Currency;
|
||||
|
||||
class CurrencyTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$o = new Currency;
|
||||
$o->name = 'Australian Dollars';
|
||||
$o->symbol = '$';
|
||||
$o->threecode = 'AUD';
|
||||
$o->active = TRUE;
|
||||
$o->save();
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$o = new Currency;
|
||||
$o->name = 'Australian Dollars';
|
||||
$o->symbol = '$';
|
||||
$o->iso_code = 'AUD';
|
||||
$o->rounding = 2;
|
||||
$o->active = TRUE;
|
||||
$o->save();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user