Thanks for your interest in joining Computan. Please work on this assignment that consists of 4 parts.
- The Admins should be in a separate database table like "admins"
- The admins should be authenticated by Auth middleware
- The User must not be able to login in Admin Panel with its credentials present in "users" table
- The Admin must be able to login with "User Name" and "Email" both
- User must be able to upload and read a CSV file
- Dump all the records into database
- The records must not be duplicated
- CSV columns:
- ID
- Name
- Phone
- Address
- Get records from the API https://api.publicapis.org/entries
- Save all the records into database
- The records must not be duplicated in case we send multiple API calls
- In case a page doesn't exist, the User must be routed to 404
- In case of a Fatal Error then it must route to 404 Page
- In case an exception occur then the Admin must receive an email at [email protected]
- Create a Job that will send Email to all Active Users in database
- Active User can be retrieved by is_active column in users Table
- Allow 3 Exceptions and then the job must fail
- Create unit tests: https://phpunit.de/
- Follow Laravel's standards: https://laravel.com/docs/9.x/contributions#coding-style, https://www.php-fig.org/psr/psr-1/ and https://www.php-fig.org/psr/psr-2/
- Provide deployment info to get your code running and all assets needed like SQL dump for example.
- Follow the usual workflow of: feature branch (prefix with your initials and then feature name) - PR -> develop branch - PR -> main branch.
- Please use latest Laravel version.
- Please use mySQL only as the database backend.
- Please use latest PHP.
- Download or clone the project and Run
composer install
npm install
npm run dev
php artisan migrate:fresh --seed
(to have a fresh empty database tables)
create .env from .env.example
- Admin login http://localhost/project-url/admin Userame: admin or [email protected] password: password
- User login http://localhost/project-url/login create new account http://localhost/project-url/register
Download or clone the project Run
composer install
npm install
npm run dev
php artisan migrate:fresh --seed
(to have a fresh empty database tables)
create .env from .env.example
php artisan test
php artisan queue:work or php artisan queue:listen
make sure you add a valid email address to relieves the test email.