Giter Site home page Giter Site logo

levifarley / example-quiz Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 142 KB

A simple and modern example quiz built to demonstrate Eloquent model relationships understanding and general Laravel competency.

Shell 0.94% PHP 97.89% JavaScript 0.23% Blade 0.94%

example-quiz's Introduction

Example Quiz

PHP 8 | Laravel 9 | Bootstrap 5

Prerequisites

You must have Docker installed on your machine

Installation

Copy the environment file: cp .env.example .env

# Install Laravel Sail/dependencies
docker run --rm \
    -u "$(id -u):$(id -g)" \
    -v $(pwd):/var/www/html \
    -w /var/www/html \
    laravelsail/php81-composer:latest \
    composer install --ignore-platform-reqs

# Start/setup application
./vendor/bin/sail up -d
./vendor/bin/sail artisan key:generate
./vendor/bin/sail artisan migrate --seed

The application may be accessed via your browser at http://localhost

General logic flow

Question: If you were going on a vacation, what car would you choose?

User selects Manufacturer -> Car model -> Color -> (submit) => Thank you message

The quiz submission sends POST request via ajax to /api/submit route that uses the appropriate service to handle the submission

Pest

./vendor/bin sail bin pest --coverage

Example output:

PASS  Tests\Unit\ExampleTest
✓ that true is true

PASS  Tests\Feature\ExampleTest
✓ the application returns a successful response

Tests:  2 passed
Time:   0.14s

Cov:    58.62%

example-quiz's People

Contributors

levifarley 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.