This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

gfactor
gfactor

How does octobercms handle defer binding from components? I tried using the code below (which worked for image file type) to achieve the same result for the normal text input field but it did not work.

    $avatar = new File;
    $avatar->fromPost(Input::file('image'));
    $avatar->save();

    $user->avatar()->add($avatar);

This is what i have for the text fields:

    $start_date = new File;
    $start_date->fromPost(Input::file('start_date'));
    $start_date->save();

    $end_date = new File;
    $end_date->fromPost(Input::file('end_date'));
    $end_date->save();

    $user->dates()->add($start_date, $sessionKey);
    $user->dates()->add($end_date, $sessionKey);

The deferred binding worked very well from the controller. But then the code above does not return anything.

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.