- small changes for m : n relation between document and dataset_subjects tables

This commit is contained in:
Arno Kaimbacher 2021-06-07 18:15:26 +02:00
parent 75b37368e4
commit b15e832776
2 changed files with 2 additions and 2 deletions

View File

@ -482,7 +482,7 @@ class IndexController extends Controller
// $dataKeyword = new Subject($keyword);
// $dataset->subjects()->save($dataKeyword);
$keyword = Subject::firstOrCreate(
['value' => $keyword['value']],
['value' => $keyword['value'], 'language' => $keyword['language']],
$keyword
);
$dataset->subjects()->attach($keyword);

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDatasetSubjects extends Migration
class CreateDatasetSubjectsTable extends Migration
{
// php artisan make:migration create_dataset_subjects_table --table=dataset_subjects --create=dataset_subjects
// php artisan migrate