public function createAction()
    {
        if ($this->request->isPost()) {

            $profile = new Profiles([
                'name' => $this->request->getPost('name', 'striptags'),
                'active' => $this->request->getPost('active')
            ]);

            if (!$profile->save()) {
                $this->flash->error($profile->getMessages());
            } else {
                $this->flash->success("Profile was created successfully");
            }

            Tag::resetInput();
        }

        $this->view->form = new ProfilesForm(null);
    }
public function createAction()
    {
        if ($this->request->isPost()) {

            $profile = new Profiles([
                'name' => $this->request->getPost('name', 'striptags'),
                'active' => $this->request->getPost('active')
            ]);

            if (!$profile->save()) {
                $this->flash->error($profile->getMessages());
            } else {
                $this->flash->success("Profile was created successfully");
            }

            Tag::resetInput();
        }

        $this->view->form = new ProfilesForm(null);
    }
public function createAction ( ) { if ( $ this -> request -> isPost ( ) ) { $ profile = new Profiles ( [ 'name' => $ this -> request -> getPost ( 'name' , 'striptags' ) , 'active' => $ this -> request -> getPost ( 'active' ) ] ) ; if ( ! $ profile -> save ( ) ) { $ this -> flash -> error ( $ profile -> getMessages ( ) ) ; } else { $ this -> flash -> success ( "Profile was created successfully" ) ; } Tag :: resetInput ( ) ; } $ this -> view -> form = new ProfilesForm ( null ) ; }
Creates a new Profile
Creates a new Profile