Skip to content

Fix setting an attachment attribute on model - #6

Merged
tabennett merged 2 commits into
CodeSleeve:developmentfrom
bonzai:fix-setting-an-attachment
Sep 20, 2013
Merged

tabennett merged 2 commits into
CodeSleeve:developmentfrom
bonzai:fix-setting-an-attachment

Conversation

@bonzai

@bonzai bonzai commented Sep 19, 2013

Copy link
Copy Markdown
Contributor

Right now we can only set the attachment attribute directly on a model (despite documentation says):

$model->attachment = Input::file('attachment');

But it should be possible to set it using fill() or setAttribute() methods:

$model->setAttribute('attachment', Input::file('attachment'));

// or

$model = new Model(['attachment' => Input::file('attachment')]);

// or

$model->fill(['attachment' => Input::file('attachment')]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants