trix_rich_texts table is not affected
AhmedRamadan30 opened this issue ยท 13 comments
hey @AhmedRamadan30 so you are facing two problems as follow :
- first one is the rich text editor isn't shown
- second one is when storing you find the table is empty
right ?
Hey! I have the exact same issue. Everything works like a charm except storing into database.
@mhansen-upscale can you show me a screenshot of your Model that uses HasTrixRichText
@mhansen-upscale try to remove $fillable . and use $guarded = [];
great, that worked, thanks. Whats wrong with fillable at this point?
@mhansen-upscale i think nothing wrong . can you try to add content-trixFields to the fillable and check it too
perfect, works as well!
cool . @AhmedRamadan30 i think the fix for your issue is same as approve .
either set $guarded = []; . or add the field to fillable
I tried all solutions,
1 - protected $guarded = [];
2 - protected $fillable = ['title', 'post-trixFields'];
3 - protected $fillable = ['title', 'content-trixFields'];
4 - protected $guarded = [];
protected $fillable = ['title', 'post-trixFields'];
after all, the trix_rich_texts
table does not store a new record
@AhmedRamadan30 have you tried to do dd(request()->all()) inside the controller and see how the data look like
Thanks, I found the problem, I typed the model name incorrectly (I typed Event instead of Post) and that's because I made a separated project to test Trix. and in the original project, the model name was "Event"