Laravel 9 Web App - Our client José Gustavo, passionate about soccer and technology, wants to have an application that simulates the soccer leagues in his neighborhood, called My League.

Last update: May 3, 2022

Laravel 9 Web App

Proposta da Aplicação

Nosso cliente José Gustavo, apaixonado por futebol e tecnologia, deseja ter uma aplicação que simule os campeonatos de futebol do seu bairro, chamada Meu Campeonato.

Para isso, considere um sistema eliminatório que inicia-se nas quartas de final:

  • oito times participam do campeonato;
  • o perdedor de cada jogo é eliminado do campeonato;
  • na primeira fase (quartas de final) quatro jogos são sorteados, sendo que cada time joga apenas uma vez;
  • na segunda fase (semifinais) dois jogos são sorteados, sendo que cada time joga apenas uma vez;
  • os perdedores das semifinais disputam o 3º lugar;
  • a final é disputada pelos vencedores das semifinais, definindo o 1º e 2º lugar do campeonato;
  • em caso de empate, considere como vencedor o time com a maior pontuação (acumulada desde o início do campeonato):
    • para cada gol marcado, o time recebe 1 ponto;
    • para cada gol sofrido, o time perde 1 ponto;
  • em caso de novo empate, considere como vencedor o time que foi inscrito primeiro no campeonato;
  • o placar de cada jogo pode ser gerado randomicamente pelo back-end ou por uma rotina em Python, como detalhado no tópico a seguir.

Placar do jogo

O placar de cada jogo pode ser gerado por uma rotina em Python, com o código apresentado abaixo.

import random
print(random.randrange(0, 8, 1))
print(random.randrange(0, 8, 1))
# Exemplo de output:
# 0
# 2

O back-end deve executar o script acima, capturar seu output e utilizá-lo como resultado de cada uma das partidas.

Setup Inicial

  • Criar banco MysQl: db_meucampeonato

  • Criando Aplicação em Laravel 9

# Para criar a nossa aplicação de nome Meu-campeonato, com composer instalado em sua máquina, execute:
$ composer create-project laravel/laravel Meu-campeonato

Iniciando a Aplicação

# Para iniciar a aplicação em localhost, execute:
php artisan serve

Criando Controllers

# Para criar os controllers de estatísticas, classificação e partidas execute:
$ php artisan make:controller StandingsController
$ php artisan make:controller ClassificationsController
$ php artisan make:controller GamesController
# Controller já com pré-definições de 'CRUD' do laravel
$ php artisan make:controller ChampionshipsController --resource

Criando Migrations

# Para criar a migration referente aos times execute:
$ php artisan make:migration create_teams_table
# Após montar as migrations, para executar a criação no banco, execute:
$ php artisan migrate

Criando Models

Para criar os models de partida e partida, execute:
$ php artisan make:model Team
$ php artisan make:model Game

Criando Table Seeder

# Para criar o table seeder, execute:
$ php artisan make:seeder TeamsTableSeeder

Como Rodar o Projeto

# Criando as tabelas no banco MySql:
$ php artisan migrate
# Caso queira criar times na tabela do banco MySql, sem precisar inserir manualmente no formulário, execute:
$ php artisan db:seed
# Iniciando o Projeto
$ php artisan serve

GitHub

https://github.com/alissonthx/Laravel-9-Web-App
You might also like...

Unified sample web app. The easy way to learn web frameworks.

Unified sample web app. The easy way to learn web frameworks.

Notejam The easy way to learn web frameworks Do you know framework X and want to try framework Y? The easy way to start with a new framework is to com

May 4, 2022

Kyle is a web application built with Laravel for web developers and small companies to efficiently track and stay on top of yearly expenses related to services

Kyle is a web application built with Laravel for web developers and small companies to efficiently track and stay on top of yearly expenses related to services

Kyle Kyle is a web application built with Laravel for web developers and small companies to efficiently track and stay on top of yearly expenses relat

May 28, 2019

TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application

TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application

TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, uploading, editing and managing files and folders online via web browser. The Application runs on PHP 5.5+, It allows the creation of multiple users and each user can have its own directory and a build-in support for managing text files with cloud9 IDE and it supports syntax highlighting for over 150+ languages and over 35+ themes.

May 22, 2022

OroCRM is an open source Client Relationship Management (CRM) application

OroCRM is an open source Client Relationship Management (CRM) application that allows to create a 360° view of your customers across multiple channels, organize the sales pipeline, manage account and contact information, communicate with customers, run marketing campaigns and track campaign performance.

May 16, 2022

Roundcube Webmail is a browser-based multilingual IMAP client with an application-like user interface.

Roundcube Webmail roundcube.net ATTENTION This is just a snapshot from the GIT repository and is NOT A STABLE version of Roundcube. It's not recommend

May 27, 2022

Scrumwala: Your very own Scrum, Agile project management web app - built with Laravel

Scrumwala: Your very own Scrum, Agile project management web app - built with Laravel

Scrumwala Your very own Scrum/Agile web app built with Laravel Features Create and manage projects with plan and work views Group issues in a project

Apr 20, 2022

Laravel web app for signing up for community service opportunities

Community Service A Laravel web app for registering for service opportunities. Installation Make sure the following are installed on your system: Node

Mar 6, 2019

A mini social media like web app built using Laravel 8 & Vue JS 3

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Feb 1, 2022

Web app to share your favorite photos, made with laravel

Web app to share your favorite photos, made with laravel

Kuro Photos Web app to share your favorite photos, made with laravel. This web app was made for educationals purposes only. I enjoyed so much learning

Apr 5, 2022
The objective of this project is to manage The Website Manga, this site permits to Client to show, read and download Manga with the possibility to react, vote, and save his data.
The objective of this project is to manage The Website Manga, this site permits to Client to show, read and download Manga with the possibility to react, vote, and save his data.

The objective of this project is to manage The Website Manga, this site permits to Client to show, read and download Manga with the possibility to react, vote, and save his data.

Jan 24, 2022
A fully responsive and dynamic web app to present all products for a start-up called Zarafah
A fully responsive and dynamic web app to present all products for a start-up called Zarafah

A fully responsive and dynamic web app to present all products for a start-up called Zarafah. Made of HTML, CSS, TailwindCss, Vanilla JavaScript, AlpineJS, Laravelphp, Laravel Breeze, Jotform Api for forms submissions and Mailchimp Api for Newsletter.

May 18, 2022
A learning management system (LMS) is a software application or web-based technology used to plan, implement and assess a specific learning process.

vidyaprabodhan-gov-php-project A learning management system (LMS) is a software application or web-based technology used to plan, implement and assess

Dec 23, 2021
Genealogy (Silsilah) application to record our family members.
Genealogy (Silsilah) application to record our family members.

Genealogy Application Development in progress In development progress, any changes of table structure will be updated directly to corresponding migrat

Nov 27, 2021
Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!

We design an innovative CRM system that is dedicated for large and medium sized companies. We dedicate it to everyone who values open source software,

May 24, 2022
The forum is a base for our Youtube tutorial series on "how to build a forum"

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

May 8, 2022
amadeus-ws-client: PHP client for the Amadeus GDS SOAP Web Service interface
 amadeus-ws-client: PHP client for the Amadeus GDS SOAP Web Service interface

amadeus-ws-client: PHP client for the Amadeus GDS SOAP Web Service interface This client library provides access to the Amadeus GDS SOAP Web Service i

May 17, 2022
This prj we have two NODEMCU ( ESP8266) and two RFID_RC522 and some rfid tags we used ARDUINO IDE on NODEMCU and running server with XAMPP
This prj we have two NODEMCU ( ESP8266) and  two RFID_RC522 and some rfid tags we used ARDUINO IDE on NODEMCU and running server with XAMPP

This prj we have two NODEMCU ( ESP8266) and two RFID_RC522 and some rfid tags we used ARDUINO IDE on NODEMCU and running server with XAMPP

Mar 29, 2022
RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one
RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one

RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one. It can be used on webservers or as a stand-alone application in CLI mode.

May 27, 2022
Damn Vulnerable Web Application (DVWA) is a PHP/MySQL web application that is damn vulnerable.

Damn Vulnerable Web Application (DVWA) is a PHP/MySQL web application that is damn vulnerable. Its main goal is to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and to aid both students & teachers to learn about web application security in a controlled class room environment.

May 20, 2022