1
0
Fork 0

Initial Commit

This commit is contained in:
Henrik Hautakoski 2020-10-03 16:07:18 +02:00
commit 9b22323711
36 changed files with 7164 additions and 0 deletions

View file

@ -0,0 +1,36 @@
<?php
namespace App\Console\Commands;
use App\Models\Word;
use Illuminate\Console\Command;
class AddWordCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'addword {word} {type}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Add a word to the database';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$row = new Word;
$row->value = $this->argument('word');
$row->type = $this->argument('type');
$row->save();
}
}