for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TopviewDigital\LangSwitcher\Console;
use Illuminate\Console\Command;
use TopviewDigital\LangSwitcher\Model\LangSwitcher;
class InstallCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $signature = 'lang-switch:install';
* The console command description.
protected $description = 'Install the language switcher tables accoding to config';
* Install directory.
protected $directory = '';
* Execute the console command.
* @return void
public function handle()
$this->initDatabase();
}
* Create tables and seed it.
public function initDatabase()
$this->call('migrate');
LangSwitcher::firstOrCreate(['class' => 'Auth', 'method' => 'user', 'middleware' => 'web']);