public function update(Listener $listener, $id)
    {
        $model = LogsLoginDevices::query()->findOrFail($id);
        $form  = new DeviceForm($model);
        if (!$form->isValid()) {
            return $listener->deviceUpdateFailedValidation();
        }
        $model->name = Input::get('name');
        if (!$model->save()) {
            return $listener->deviceUpdateFailed();
        }
        return $listener->deviceUpdateSuccess();
    }
public function update(Listener $listener, $id)
    {
        $model = LogsLoginDevices::query()->findOrFail($id);
        $form  = new DeviceForm($model);
        if (!$form->isValid()) {
            return $listener->deviceUpdateFailedValidation();
        }
        $model->name = Input::get('name');
        if (!$model->save()) {
            return $listener->deviceUpdateFailed();
        }
        return $listener->deviceUpdateSuccess();
    }
public function update ( Listener $ listener , $ id ) { $ model = LogsLoginDevices :: query ( ) -> findOrFail ( $ id ) ; $ form = new DeviceForm ( $ model ) ; if ( ! $ form -> isValid ( ) ) { return $ listener -> deviceUpdateFailedValidation ( ) ; } $ model -> name = Input :: get ( 'name' ) ; if ( ! $ model -> save ( ) ) { return $ listener -> deviceUpdateFailed ( ) ; } return $ listener -> deviceUpdateSuccess ( ) ; }
on update device name

@param Listener $listener
@param mixed $id
@return \Illuminate\Http\RedirectResponse
on update device name