Added TaxTableSeeder

This commit is contained in:
Deon George 2021-06-30 14:39:33 +10:00
parent 61396c9cda
commit d7ef04fc25
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
3 changed files with 30 additions and 0 deletions

View File

@ -9,4 +9,7 @@ class Tax extends Model
protected $table = 'ab_tax';
const CREATED_AT = 'date_orig';
const UPDATED_AT = 'date_last';
protected $dates = ['date_orig','date_last'];
public $dateFormat = 'U';
}

View File

@ -16,6 +16,7 @@ class DatabaseSeeder extends Seeder
$this->call([
CurrencyTableSeeder::class,
CountryTableSeeder::class,
TaxTableSeeder::class,
LanguageTableSeeder::class,
SiteTableSeeder::class,
UserTableSeeder::class,

View File

@ -0,0 +1,26 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\Tax;
class TaxTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$o = new Tax;
$o->id = 1;
$o->country_id = 61;
$o->description = 'GST';
$o->rate = 0.1;
$o->save();
}
}