Replies: 6 comments
-
Hi @tchapi, You are using the correct structure. When creating a model, only fillable fields should be sent through the underlying SQL query, so I suspect that you might have |
Beta Was this translation helpful? Give feedback.
-
Well I checked and I have not :
What other thing might I have overlooked ? |
Beta Was this translation helpful? Give feedback.
-
Hi, any hints for me regarding this issue by any chance ? |
Beta Was this translation helpful? Give feedback.
-
Hi @tchapi , As @ifox mentioned, However, since you haven't put I would recommend you try using Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hello @yanhao-li and thanks for your answer. I will try |
Beta Was this translation helpful? Give feedback.
-
Ok I think I found the culprit : https://github.com/laravel/framework/blob/5.8/src/Illuminate/Database/Console/Seeds/SeedCommand.php#L62-L64 When running the I've checked by Am I missing something ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
I'm trying to seed my database by using Twill's ModuleRepository methods.
For instance, I can do this :
But if I try to seed a sluggable model, it fails :
with :
Column not found: 1054 Unknown column 'slug' in 'field list' ...
which is pretty normal since the column is in another table.It looks like the "slug" key should be in the
getReservedFields()
function of theModuleRepository
, no?I think I'm using the correct array structure since this is what the
afterSaveHandleSlugs($object, $fields)
function of theHandleSlugs
trait expect to have to create or update the slug afterwards.Thanks for your help !
BR
Beta Was this translation helpful? Give feedback.
All reactions