Part 6: Final touches and conclusion

This is the sixth and last article in my blog series "Building A Simple Web Application With YII2".

We are done with the main features of the project, but I want us to clean up our project a little bit in this article.

The full code for this article can be found on my github: https://github.com/mrfola/yii-result-portal-tutorial/tree/article-6

To check the previous article kindly go here: Part 5: Implementing User Result Dashboard in YII

Requirements

In order to get the best from this article, you need to have knowledge of certain things. The details of the requirements can be found here: Building A Simple Web Application With YII2

Delete Unused Views.

There are several pages we are not using in our project (most of which come with YII by default).

Let's delete those pages.

Navigate to views/site.

Delete "about.php" and "contact.php".

Delete Unused Models.

Just like our views, there are several models we are not using in our project (most of which come with YII by default).

Let's delete those models.

Navigate to models.

Delete "ContactForm.php" and "LoginForm.php".

Delete Controller Actions.

Now let's delete some default controller actions that we are not using.

Navigate to controllers/SiteController.php.

You should see "actionContact" that looks like this:

    public function actionContact()
    {
        $model = new ContactForm();
        if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {
            Yii::$app->session->setFlash('contactFormSubmitted');

            return $this->refresh();
        }
        return $this->render('contact', [
            'model' => $model,
        ]);
    }

And "actionAbout" that looks like this:

  public function actionAbout()
    {
        return $this->render('about');
    }

Kindly delete both of them.

Conclusion.

That brings us to the end of this article series.

We have successfully made a school result portal where admin can view and update results, while students can view their own individual results.

When creating this series, I skipped over some complexities, such as students being assigned to class, teachers only updating their subject scores, having a super admin who creates teachers (admin), etc.

Everything I did was to simplify the project enough to make it easy for any beginner in YII to start and complete the project.

But feel free to edit and update the project how you want.

If you have any questions or comments kindly leave them below. Thanks.

Don't forget that the full code for this article can be found on my github: https://github.com/mrfola/yii-result-portal-tutorial/tree/article-6