diff --git a/app/Http/Controllers/Publish/IndexController.php b/app/Http/Controllers/Publish/IndexController.php index 2639dbf..aa22100 100644 --- a/app/Http/Controllers/Publish/IndexController.php +++ b/app/Http/Controllers/Publish/IndexController.php @@ -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); diff --git a/database/migrations/2021_06_07_135923_create_dataset_subjects_table.php b/database/migrations/2021_06_07_135923_create_dataset_subjects_table.php index 232afa3..dc87903 100644 --- a/database/migrations/2021_06_07_135923_create_dataset_subjects_table.php +++ b/database/migrations/2021_06_07_135923_create_dataset_subjects_table.php @@ -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