Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How to override ChannelTableSeeder?

    General Discussion
    2
    4
    234
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      AN-Varit last edited by

      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 theme

      DB::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

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        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

        A 1 Reply Last reply Reply Quote 0
        • A
          AN-Varit @devansh-webkul last edited by

          @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

          1 Reply Last reply Reply Quote 0
          • devansh-webkul
            devansh-webkul last edited by devansh-webkul

            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.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post