How to override ChannelTableSeeder?
-
I created a new them and want to make it the default one.
In Webkul\Core\Database\Seeders\ChannelTableSeeder there is an initialization for the defualt themeDB::table('channels')->insert([ 'id' => 1, 'code' => 'default', 'theme' => 'velocity', 'hostname' => config('app.url'), 'root_category_id' => 1, 'default_locale_id' => 1, 'base_currency_id' => 1, ]);
I want to override that to my custom them
-
But why do you need to override this?
You can do it from here,
https://github.com/bagisto/bagisto/blob/bba78d13a185b4c6ca47a7de803ff8bbde7fd352/config/themes.php#L4 -
@devansh-webkul Thanks for replying, I have created new theme and want it to be default.
I also tried to update app/config/themes.php but It Also read velocity as a default theme. I created new seeder under app/database/seeders and run it after default seeders and it worked well, but I don't know if this is the right solution -
Every time when you have done any changes in the config, then run,
php artisan optimize
It can be easily done from the config as the default. But if you want like at the time of installation default then your approach is right.