for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @link https://github.com/roboapp
* @copyright Copyright (c) 2016 Roboapp
* @license [MIT License](https://opensource.org/licenses/MIT)
*/
namespace roboapp\crud;
* Actions performs restoration of the soft deleted record.
* This action supports [roboapp/softdelete](https://github.com/roboapp/softdelete) extension.
*
* @see https://github.com/roboapp/softdelete
* @author iRipVanWinkle <[email protected]>
* @since 1.0
class Restore extends BaseAction
{
* Restore model
* @param mixed $id ID of the model to be restored.
* @return mixed
public function run($id)
$model = $this->getModel($id);
if ($model->restore()) {
$this->addSuccessFlash();
}
return $this->redirect($model);