Laravel repository solution?

assume that data storage drivers can be switched through the configuration file, such as storing the data in mysql, and then changing the configuration file to redis.
currently my pseudo code is as follows:

1: create an interface

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->bind("App\Repositories\Interfaces\CategoryInterface",
            "App\Repositories\Implement\CategoryMysqlRepository");
    }
}

how to change the binding mode to achieve the above purpose. Thank you.

Mar.14,2021

dynamically bind by reading database drivers, such as

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        // key  database.driver  redis/mysql
        $dbDriver = ucfirst(config('database.driver')); 

        $this->app->bind('App\Repositories\Interfaces\CategoryInterface',
            "App\Repositories\Implement\Category{$dbDriver}Repository");
    }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3eaa3-347e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3eaa3-347e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?