This commit is contained in:
merdan 2022-02-24 17:21:44 +05:00
parent 298edeb037
commit 0573f5acc8
5 changed files with 6 additions and 42 deletions

View File

@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddWeightPriceToMarketplaceSellersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('marketplace_sellers', function (Blueprint $table) {
$table->decimal('weight_price')->unsigned()->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('categories', function (Blueprint $table) {
$table->dropColumn('weight_price');
});
}
}

View File

@ -1,10 +1,7 @@
[
{
"country_id":1,
"name":"Турция"
},
{
"country_id":2,
"name":"Туркменистан"
}
]

View File

@ -1,10 +1,6 @@
[
{
"country_id":1,
"name":"Turkiýa"
},
{
"country_id":2,
"name":"Türkmenistan"
}
]

View File

@ -5,14 +5,17 @@ namespace Sarga\Shop\Database\Seeders;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Seeder;
class CountriesTableSeeder extends Seeder
class CountryStatesTableSeeder extends Seeder
{
public function run()
{
DB::table('countries')->delete();
DB::table('country_states')->delete();
$countries = json_decode(file_get_contents(__DIR__ . '/../../Data/countries.json'), true);
$states = json_decode(file_get_contents(__DIR__ . '/../../Data/states.json'), true);
DB::table('countries')->insert($countries);
DB::table('country_states')->insert($states);
}
}

View File

@ -16,7 +16,7 @@ class DatabaseSeeder extends Seeder
$this->call(SLocalesTableSeeder::class);
$this->call(SCurrencyTableSeeder::class);
$this->call(ChannelTableSeeder::class);
$this->call(CountriesTableSeeder::class);
$this->call(CountryStatesTableSeeder::class);
$this->call(StatesTableSeeder::class);
$this->call(CountryStateTranslationSeeder::class);