- small changes for m : n relation between document and dataset_subjects tables
This commit is contained in:
parent
75b37368e4
commit
b15e832776
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user