Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 2.63 KB

README.md

File metadata and controls

42 lines (36 loc) · 2.63 KB

Simple Laravel CRUD

This a simple demo project, written in PHP/Laravel, that I made as a job selection process challenge. The project requirements were:

  • Use PHP, Laravel and MySQL
  • Basic CRUD of the Brazilian Federal States, containing the State Name and it's short version
  • A history log
  • Authentication and Authorization, including permission management

The implementation:

  • I made the State list public, so anyone accessing the project's home page will be able to view them. Login is required to modify the list
  • For Authorization, I created two independent permissions: manage-states, audit. The first one allow the user to actually use the CRUD. The later allows the user to view the history logs. There's also an admin permission, which is the only one able to manage the users's permissions;
  • I've included three users in the database Seed. On on each "permission level". Cretentials are:

Implementation Details:

  • I chose to use Angular, since the job specs cited the AJAX requests would be a plus;
  • I deliberately chose not to write tests, since this is a very simple demo, and I have other projects to attend to;
  • I also deliberately chose not to write the language files. The code, though, supports localization;
  • Althugh Laravel uses ORM, i've included a MySQL database dump in the database directory;
  • I'm not familiarized with gulp, so I manually added my asses to the public folder

Running the project

  1. Clone the repo and get Composer
  2. Inside the project directory, run composer install
  3. Create a .env file, containing your database details. Laravel includes an .env.example
  4. Inside the project directory, run php artisan migrate --seed
  5. Inside the project directory, run php artisan serve. Voilà

If you have any problems, please feel free to open an Issue

What I used