vendredi 4 janvier 2019

LaravelBackpack 5.5: MassAssignmentException Add [date_times] to fillable property to allow mass assignment on [App\Models\Fbpage]

I created laravelbackpack fbtracking project. When I add database migration data I got error as "LaravelBackpack 5.5: MassAssignmentException Add [date_times] to fillable property to allow mass assignment on [App\Models\Fbpage]."

Here is my laravel code 01- Database table migration

enter code here
public function up()
{
    Schema::create('fbpages', function (Blueprint $table) {
        $table->increments('id');
        $table->date('date_times');
        $table->string('fb_names');
        $table->double('fb_likes');
        $table->timestamps();
    });
}

02- Model "Fbpage"

enter code here

class Fbpage extends Model { use CrudTrait;

protected $table = 'fbpages';
// protected $primaryKey = 'id';
 public $timestamps = false;
// protected $guarded = ['id'];
protected $fillable = [];
// protected $hidden = [];
 protected $dates = ['created_at', 'updated_at', 'deleted_at', 'date_times'];}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire