Questionnaire app with text and yes/no questions created in PHP/Laravel 9, Jquery and Bootstrap.
Server start
php artisan serve
!! Only admin can create questionnaire - after running migrations it's necessary to register a user in a traditional manner and then in database add true value (1) in 'Admin' field !!
Admin user can create and edit questionnaries with yes/no and text questions. In admin view there's list of recent entries that can be managed and a summary of every poll.
Standard user views.
Admin user views. Smaller components in /components such as adding new questionnaries and scripts for them.
Main app layout. Smaller components in /components such as navigation.
Controller with logic for guest user.
Controller with logic for standard logged user.
Controller with logic for admin user.
In standard Laravel user migration there's added boolean column 'Admin' with default false value.
Main file with admin authorization logic.
In user model there's isAdmin() function, that checks if given user has 'true' value in 'Admin' column in database.
In 'protected $routeMiddleware' there's a new line that registers admin middleware.