Find out wich fantasy character you are by taking our quest!
- You can clone this repo and open it with your favourite code-editor.
- Clone the project and set up your DB. Run: php artisan serve php artisan migrate:fresh --seed (gives you our DB).
- Visit the localhost in your browser.
- Enjoy!
Code review written by Hanna Rosenberg & Sofia Dersén
- General - It would be nice with some data in the database seeder to be able to run the application.
- CharactersController - CharactersController is expecting a post-request, but are using both $_POST and $_GET
- Don’t forget that validation is a requirement in the assignment.
- CharactersController – If the secret password is wrong, there is an echo. Maybe this would work better as an error?
- Book.blade.php & BookController - Book.blade.php with associated controller could be renamed to quiz.blade.php and QuizController for more clarity.
- General - The application has four lint-errors.
- Book.blade.php - Try to avoid using
in book.blade.php and style it with margins in CSS instead. - BookController - (‘id’, ‘=’ , $book_id) could be written (‘id’, $book_id) instead for shorter code.
- General - The code would be easier to follow with some comments.
- Book.blade.php - It doenst seem like the questions $question_two and $questionthree is in use. Maybe they can me removed for shorter code.
- Character Gallery Controller - Instead of $ GET you can use find()=>segment()
- General - When the codereview is written there are’nt any tests for the routes.
- General - Don’t forget that validation is a requirement in the assignment.
- CharacterGalleryController - CharactersControllerGallery is expecting a post-request, but are using $_GET.
- General - Good idea with a quiz! But more questions than one would'nt hurt.
- Character.gallery.blade – Alt text for the accessibility.
- General - Maybe you can rename gallery.blade.php to bookgallery.blade.php (and its controllers) for the user to not get confused. It's easy to mix it up with the CharacterGallery.
- General - Don’t forget Route model binding in your routes.
- CharacterController - Where you get the post-request “secret” you could add a validation (this =>validate($request)
- ReadMe - Don’t forget to add information to your README-file!
