Code Monkey home page Code Monkey logo

laravel-quiz-app's Introduction

Laravel 8 Quiz Application Tutorial

As a participant in this comprehensive tutorial series, I can attest to the immense value it offers. The Laravel 8 Quiz Application, housed in this repository, was developed as part of an instructional journey on the YouTube channel Codeigniter Hoca. The intent of this series is to shepherd developers from a foundational level to a stage where they can confidently tackle professional project development with Laravel 8.

Creating the Quizzer application from scratch served as a practical test of my understanding, challenging me to apply my knowledge while also demonstrating how to utilize Laravel's latest packages and features such as Fortify, Jetstream, and Validation Request methods.

The learning didn't stop there. The course delved into more advanced topics, including file uploads, question management, quiz result calculations, and developing an analysis system. I was introduced to a variety of Laravel tools and libraries like Eloquent ORM, Carbon, and Eloquent Sluggable, broadening my Laravel expertise.

The series also emphasized the importance of debugging techniques and the creation of additional features for a more robust application. As a developer, this course has been instrumental in honing my Laravel skills and equipping me with the know-how to build real-world applications. I highly recommend it to any developer looking to expand their Laravel proficiency.

Getting Started

To get started with the Laravel 8 Quiz Application, follow the steps outlined below.

Clone the Repository

First, clone this repository to your local machine by running the following command in your terminal:

https://github.com/fvarli/laravel-quiz-app.git

Install Dependencies

Next, navigate to the project root directory and install the dependencies by running the following command in your terminal:

cd laravel-quiz-app

composer install

npm install

Configure Environment Variables

Copy the .env.example file to create a new .env file which Laravel uses to manage environment variables:

cp .env.example .env

Update the .env file to match your database credentials:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

Generate a new application key with the following command:

php artisan key:generate

Run Database Migrations and Seeders

Next, run the migrations which will create the necessary tables in your database:

php artisan migrate

To fill these tables with some dummy data for testing, you can run the database seeders:

php artisan db:seed

Start the Application

Finally, start the development server by running the following command in your terminal:

php artisan serve

You can now access the application at http://localhost:8000.

Authentication

To get started with the application, you will need to register a new user account or login with an existing one.

The Laravel 8 Quiz Application is now set up and ready to go! Remember, if you're stuck at any point, feel free to refer back to the lesson breakdown for guidance.

Lesson Breakdown

  • Lesson 1: Setting up Laravel 8 and required programs including WampServer, composer, Laravel 8, and npm installations.

  • Lesson 2: Installing Jetstream for authentication and registration, and setting up Bootstrap through npm for front-end styling.

  • Lesson 3: Implementing Middleware to differentiate between admin and normal users, securing admin pages.

  • Lesson 4: Utilizing Laravel's Migration, Seed, and Factory features to create the quiz table, and using the Faker library for demo data.

  • Lesson 5: Introducing the Resource Controller for the quiz table to handle CRUD operations, and incorporating Font Awesome into the project via npm.

  • Lesson 6: Creating a form for the quiz creation process, and integrating jquery via npm for date selection.

  • Lesson 7: Validating form data using request validation, and handling error messages. Storing quizzes in the database.

  • Lesson 8: Implementing quiz update feature, and customizing 404 error messages.

  • Lesson 9: Deleting quizzes using the destroy method.

  • Lesson 10: Transitioning to question operations for quizzes, creating Migration, Seed, and Factory for the question table, and populating it with demo data.

  • Lesson 11: Resource Controller for question table and data listing. It implemented a listing feature for the questions of a particular quiz. It is established a connection between two resource controllers.

  • Lesson 12: File upload operations and question creation. It started the process of question creation. It prepared our page, benefiting from Bootstrap, to create a new question for a quiz. Subsequently, if desired, is posted the file to the controller along with the choices related to our question. It is explored how to upload images in Laravel 8.

  • Lesson 13: Question update operations and Relational queries. It is utilized all the advantages of Laravel's ORM. Through the relationships it is established, it easily updated the questions related to a quiz.

  • Lesson 14: Question deletion and quiz innovations with Carbon library. Moreover, it incorporated the new features it added on the quiz update page. It is also added new fields to our tables. It is enhanced the display of dates with the Carbon library.

  • Lesson 15: Query Builder, data filtering operations, and ORM search. Using Laravel's Query Builder, it is listed our quiz table according to the filters chosen by the user. It is performed data filtering operations, also known as Laravel 8 ORM Search.

  • Lesson 16: Eloquent sluggable, quiz listing, and quiz detail page. It is displayed the quizzes in the system to the users. It is set up as a slug library for the quiz. For this, it is installed the eloquent sluggable library in our project and performed redirection to the quiz details page.

  • Lesson 17: Quiz entry page for users to enter quizzes in the system and test their knowledge.

  • Lesson 18: Migration, Seed, and Factory operations for answers table for users to enter quizzes in the system and test their knowledge.

  • Lesson 19: Quiz result calculation and result table. It is developed functions to calculate the number of correct and incorrect answers of users who enter quizzes in the system and the score they received from the exam. Additionally, it is created a table to store the results.

  • Lesson 20: Extracting quiz analysis data that generates results based on the answers given by users who enter quizzes in the system.

  • Lesson 21: Top 10 list and quiz analysis system that generates results based on the answers given by users who enter quizzes in the system.

  • Lesson 22: Personal ranking information, writing a small add-on that shows the user's rank in the quiz they entered.

  • Lesson 23: Quiz results page and nested relationships On this page, it is displayed which questions the user answered correctly and which ones they answered incorrectly.

  • Lesson 24: Bonus⚡ What percentage of participants answered correctly? It is made the project more fun and instructive with an algorithm that calculates the percentage of correct answers to questions by participants. It is utilized relationships like hasMany and belongsTo in the process.

  • Lesson 25: Bug fixes and additions. In addition, it is added new features for our homepage. It is prepared a hide/unhide status based on the 'finished at' state of the quizzes.

  • Lesson 26: Administration panel adjustments. It is presented a page that provides information about users who have participated in the quiz, and it is carried out their operations.

Acknowledgments

Special thanks to the instructor at YouTube Codeigniter Hoca channel for providing this comprehensive Laravel 8 tutorial series.

laravel-quiz-app's People

Contributors

fvarli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.