File tree 2 files changed +20
-1
lines changed
2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class CreateScormTables extends Migration
22
22
// scorm_model
23
23
Schema::create($tableNames['scorm_table'], function (Blueprint $table) {
24
24
$table->bigIncrements('id');
25
- $table->morphs ('resource');
25
+ $table->nullableMorphs ('resource');
26
26
$table->string('title');
27
27
$table->string('origin_file')->nullable();
28
28
$table->string('version');
Original file line number Diff line number Diff line change 9
9
class ScormModel extends Model
10
10
{
11
11
12
+ /**
13
+ * The attributes that are mass assignable.
14
+ *
15
+ * @var array
16
+ */
17
+ protected $ fillable = [
18
+ 'id ' ,
19
+ 'resource_id ' ,
20
+ 'resource_type ' ,
21
+ 'title ' ,
22
+ 'origin_file ' ,
23
+ 'version ' ,
24
+ 'ratio ' ,
25
+ 'uuid ' ,
26
+ 'entry_url ' ,
27
+ 'created_at ' ,
28
+ 'updated_at ' ,
29
+ ];
30
+
12
31
/**
13
32
* Get the parent resource model (user or post).
14
33
*/
You can’t perform that action at this time.
0 commit comments