Develop a simple real estate application with Laravel and Vue.js.
The task is separated into two subtasks.
- The first task is to create the admin panel where the user can filter and add a new real estate item. The app should be implemented with Vue.js on the frontend and Laravel on the backend. Points:
- Listing the real estate entries (2 points)
- Showing details of a real estate entry (2 points)
- Filtering the real estate entries based on criteria (2 points)
- Adding a new real estate entry that uses an API endpoint – see below (2 points)
- Bonus task: Add validation to the form for adding new real estate entries (2 points)
- The second task is to create an API backend which we will expose all the real estate data to other applications. We need these endpoints:
- listing real estate entries with possibility to filter based on criteria – like in the UI (2 points)
- listing countries (2 points)
- listing developers (2 points)
- adding a real esate entry (2 points)
- retrieving details of a real estate entry (2 points)
- Please make an example cURL request or export a Postman/Insomnia collection so we're able to test the API
- Bonus task: write an integration test for a single API endpoint (2 points)
In total you can receive 22 points for completing this task.
See the running application we expect you to build here: https://youtu.be/wEdtx1H284U
It's critical that you provide clear instructions on running the code, so we can test it. If that's at all different from the instructions below
The default database configuration for running locally is already configured, so just run:
docker-compose up
After running the docker compose setup you should run the commands below to set up the project.
docker-compose exec app composer install
# needed for generating application app key
docker-compose exec app php artisan key:generate
docker-compose exec app php artisan optimize
docker-compose exec app php artisan migrate
docker-compose exec app npm install
docker-compose exec app chmod -R 777 storage
docker-compose exec app php artisan db:seed
login: [email protected]
password: secret
touch database/test.sqlite
docker-compose exec app vendor/bin/phpunit
Is in repo https---github.com-jedrzejczak-laravel-vue-real-estate.postman_collection.json
- there should be unit tests for ListSearch (now ListIndexTest tests it)
- adding new List item should be realized via some service
- some data are unnecessarily exposed via api
- code formatting (eslint, prettier)
- clear form after adding item
- clear filters after adding item
- error handling
- validation (api returns validation messages, but frontend does nothing with it)
- remove unused files created by laravel
- frontend tests
- loaders / spinners
public function boot()
{
\Schema::defaultStringLength(191);
}
or update MySQL to at least v5.7.7
source: https://laravel-news.com/laravel-5-4-key-too-long-error
@maksymilian-majer removes some Laravel test classes, so I added them from https://github.com/laravel/laravel/tree/5.4/tests