Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace backend\modules\user\controllers;
- use Yii;
- use backend\modules\user\models\Contact;
- use backend\modules\user\models\SearchContact;
- use yii\web\Controller;
- use yii\web\NotFoundHttpException;
- use yii\filters\VerbFilter;
- use yii\filters\AccessControl;
- // $modelUser = common\models\User::findOne(Yii::$app->user->id);
- // $roles = $modelUser->getRoles();
- /**
- * ContactController implements the CRUD actions for Contact model.
- */
- class ContactController extends Controller
- {
- public function actionCreate()
- {
- $model = new Contact();
- if ($model->load(Yii::$app->request->post()) && $model->save()) {
- return $this->redirect(['view', 'id' => $model->id]);
- } else {
- return $this->render('create', [
- 'model' => $model,
- ]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement