Skip to content

Updating Form #20

Closed
Closed

Description

@saikiranvarma

while updating how can i upload new image.

while updating form when i upload new image causing errors
code:
$input = array_except(Input::all(), '_method');
$validation = Validator::make($input, Owner::$rules);

    if ($validation->passes())
    {
        $owner = $this->owner->find($id);
        $owner->update($input);

        return Redirect::route('owners.show', $id);
    }

Activity

  1. tabennett commented on Nov 29, 2013

    @tabennett
    Contributor

    The Input::all() method doesn't contain uploaded file data. You'll have to access the uploaded file from Input::file() and set the attachment property (whatever that may be) on the model. There are various examples of this throughout Stapler's documentation.

  2. saikiranvarma commented on Nov 30, 2013

    @saikiranvarma
    Author

    hi tabennett thank you for reply.
    My issue is solved . Problem is in the view file i am using {{{ $owner->owner_logo }}}
    which is an object it requires string.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions