Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Add fields to models #11

Closed
leorossi opened this issue Jun 22, 2016 · 1 comment
Closed

Add fields to models #11

leorossi opened this issue Jun 22, 2016 · 1 comment

Comments

@leorossi
Copy link
Contributor

Hi
First of all I am not very expert of Laravel, so please be kind :)
I'm trying to extend the Page model, adding a category_id which will refer to a new model I am going to create.
I found the quickest way is to add to the quarx.forms.page config and the form was rendered successfully. But then how I can interact with the model, to allow the new field to be stored (and retrieved) ? What is the best practice here?

Thanks!

@mlantz
Copy link
Member

mlantz commented Jun 22, 2016

Yeah I had been using the fillable on the models which meant you wouldn't be able to add more fields. I've switched it now to guarded so you can add any fields you want.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants