This is an Airbnb cloning thesis project in the UNIVO Web Programming Prespecialization, where this project uses Laravel technologies on the Back-end side.
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, powerful, and provides tools required for large, robust applications.
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, Laracasts can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
Backend
Basic Command Examples
API/V1/Countries
Is the location where the files are created.
API: Indicates that it is a resource of type api.
V1: Indicates the version.
Countries: Indicate the name of the resource.
-
The model is declared in the singular and the migration will be created in the plural (English), the other resources are declared in the singular.
-
Create a model with m for migration and f for factory and s for seeder -mfs php artisan make:model API/V1/Country -mfs.
-
Create a controller php artisan make:controller API/V1/CountryController --api and --api for the API resource controller.
-
Create a resource to transform individual models php artisan make:resource API/V1/Country/CountryResource.
-
Create a collection. If you want to customize the resource collection response php artisan make:resource API/V1/Country/CountryCollection.
-
create a "request form" for validation and authorization rules in the store to save data php artisan make:request API/V1/Country/StoreCountryRequest.
-
create a "request form" for the validation and authorization rules in the store to update the data php artisan make:request API/V1/Country/UpdateCountryRequest.
php artisan make:model API/V1/Country -mfs
php artisan make:controller API/V1/CountryController --api
php artisan make:resource API/V1/Country/CountryResource
php artisan make:resource API/V1/Country/CountryCollection
php artisan make:request API/V1/Country/StoreCountryRequest
php artisan make:request API/V1/Country/UpdateCountryRequest
Installation and execution
git clone https://github.com/jmrz97/airbnb.git
cd airbnb
cp .env.example .env
composer install
create a local databse according to your prefer name, then
database = airbnb
php artisan key:generate
php artisan migrate
php artisan storage:link
Installation of the routes
the paths in the aironb.postman_collection.json file will be updated very soon.
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
The Laravel framework is open-sourced software licensed under the MIT license.