{"id":18746830,"url":"https://github.com/michaelharper/laravel-products-api","last_synced_at":"2026-04-29T09:34:21.256Z","repository":{"id":249306318,"uuid":"831138493","full_name":"michaelharper/Laravel-Products-API","owner":"michaelharper","description":"A simple CRUD and RESTful API web service designed to manage product data.","archived":false,"fork":false,"pushed_at":"2024-08-16T13:14:36.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T20:46:13.709Z","etag":null,"topics":["crud-application","laravel","laravel11x","php","php8","restful-api"],"latest_commit_sha":null,"homepage":"https://michaelharper.net","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaelharper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-19T18:48:45.000Z","updated_at":"2024-08-16T13:14:39.000Z","dependencies_parsed_at":"2024-08-16T14:51:29.058Z","dependency_job_id":null,"html_url":"https://github.com/michaelharper/Laravel-Products-API","commit_stats":null,"previous_names":["michaelharper/laravel-products-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelharper%2FLaravel-Products-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelharper%2FLaravel-Products-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelharper%2FLaravel-Products-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelharper%2FLaravel-Products-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelharper","download_url":"https://codeload.github.com/michaelharper/Laravel-Products-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239629650,"owners_count":19671333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crud-application","laravel","laravel11x","php","php8","restful-api"],"created_at":"2024-11-07T16:27:08.230Z","updated_at":"2025-11-24T00:30:17.149Z","avatar_url":"https://github.com/michaelharper.png","language":"PHP","funding_links":["https://www.buymeacoffee.com/michaelharper"],"categories":[],"sub_categories":[],"readme":"![Laravel Logo](https://laravel.com/img/logomark.min.svg)\n\n# Laravel Products API\n\n## Description\n\nThe Laravel Products API is a RESTful web service designed to manage product data. It allows for the creation, retrieval, updating, and deletion of product information in a database, making it an ideal backend for e-commerce applications.\n\n## Built With\n\n**Laravel v11.16.0** and **PHP v8.3.9**\n\n## Installation\n\nClone the repository to your local machine:\n\n```bash\ngit clone https://github.com/michaelharper/laravel-products-api.git\ncd laravel-products-api\n```\n\nInstall the dependencies:\n\n```bash\ncomposer install\n```\n\nSet up your environment variables:\n\n```bash\ncp .env.example .env\n```\nOpen the .env file and configure your database connection. You can specify either MySQL or SQLite. For MySQL, set the following:\n\n```bash\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=your_database_name\nDB_USERNAME=your_database_username\nDB_PASSWORD=your_database_password\n````\n\nFor SQLite, set the following:\n```bash\nDB_CONNECTION=sqlite\nDB_DATABASE=/path_to_your_database/database.sqlite\n```\n\nAfter configuring the database, generate an application key:\n```bash\nphp artisan key:generate\n```\n\nRun the migrations:\n\n```bash\nphp artisan migrate\n```\n\nStart the server:\n\n```bash\nphp artisan serve\n```\n\n## Usage\n\nTo retrieve a list of products, send a GET request to `/api/products`.\n\nExample request:\n\n```bash\ncurl http://localhost:8000/api/products\n```\n\nExample response:\n\n```json\n[\n  {\n    \"id\": 1,\n    \"name\": \"Product 1\",\n    \"description\": \"This is a product\",\n    \"price\": 99.99\n  },\n  {\n    \"id\": 2,\n    \"name\": \"Product 2\",\n    \"description\": \"This is another product\",\n    \"price\": 89.99\n  }\n]\n```\n\n## API Endpoints\n\nBelow are the available API endpoints for managing products:\n\n- `GET /api/products` - List all products.\n- `POST /api/products` - Create a new product.\n- `GET /api/products/{id}` - Get a specific product by its ID.\n- `PUT /api/products/{id}` - Update a product by its ID.\n- `DELETE /api/products/{id}` - Delete a product by its ID.\n\n## Sample Data\n\nFor testing and development purposes, you can find a sample data CSV with 300 test products in the repository. Access the sample data here: [Sample Product Data](tests/data/sample_product_data.csv).\n\n## Postman Collection\n\nI've included the Postman Collection for testing the Laravel Products API. You can download it here: [Laravel Products API Postman Collection](tests/data/postman_collection.json).\n\n## Support\nIf you find Laravel Products API useful and would like to support its development, consider making a donation:\n\n\u003ca href=\"https://www.buymeacoffee.com/michaelharper\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\nYour contributions help ensure continued development and improvements to the extension.\n\n## License\n\nThis project is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelharper%2Flaravel-products-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelharper%2Flaravel-products-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelharper%2Flaravel-products-api/lists"}