Fix db:seed config, add quickbooks sdk
This commit is contained in:
parent
047693f6cd
commit
7e503eb1bc
@ -22,6 +22,7 @@
|
||||
"laravel/socialite": "^3.0",
|
||||
"laravel/tinker": "^1.0",
|
||||
"leenooks/laravel": "0.*",
|
||||
"quickbooks/v3-php-sdk": "^5.0",
|
||||
"spatie/laravel-demo-mode": "^2.2",
|
||||
"spatie/laravel-failed-job-monitor": "^3.0",
|
||||
"spatie/laravel-sitemap": "^5.2",
|
||||
|
649
composer.lock
generated
649
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CurrencyChangeThreecode extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('ab_currency', function (Blueprint $table) {
|
||||
$table->renameColumn('three_digit','iso_code');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('ab_currency', function (Blueprint $table) {
|
||||
$table->renameColumn('iso_code','three_digit');
|
||||
});
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user