public function store($listener, array $input)
    {
        $role = $this->model;
        $form = $this->presenter->form($role);
        if (!$form->isValid()) {
            return $listener->storeValidationFailed($form->getMessageBag());
        }
        try {
            $this->saving($role, $input, 'create');
        } catch (Exception $e) {
            Log::warning($e);
            return $listener->storeFailed(['error' => $e->getMessage()]);
        }
        return $listener->storeSucceed($role);
    }
public function store($listener, array $input)
    {
        $role = $this->model;
        $form = $this->presenter->form($role);
        if (!$form->isValid()) {
            return $listener->storeValidationFailed($form->getMessageBag());
        }
        try {
            $this->saving($role, $input, 'create');
        } catch (Exception $e) {
            Log::warning($e);
            return $listener->storeFailed(['error' => $e->getMessage()]);
        }
        return $listener->storeSucceed($role);
    }
public function store ( $ listener , array $ input ) { $ role = $ this -> model ; $ form = $ this -> presenter -> form ( $ role ) ; if ( ! $ form -> isValid ( ) ) { return $ listener -> storeValidationFailed ( $ form -> getMessageBag ( ) ) ; } try { $ this -> saving ( $ role , $ input , 'create' ) ; } catch ( Exception $ e ) { Log :: warning ( $ e ) ; return $ listener -> storeFailed ( [ 'error' => $ e -> getMessage ( ) ] ) ; } return $ listener -> storeSucceed ( $ role ) ; }
Store a role.

@param  object  $listener
@param  array   $input

@return mixed
Store a role .