{"id":15188718,"url":"https://github.com/afperdomo2/curso-api-laravel","last_synced_at":"2026-02-27T11:15:19.110Z","repository":{"id":175174111,"uuid":"653442445","full_name":"afperdomo2/curso-api-laravel","owner":"afperdomo2","description":"Curso de API REST con Laravel (Platzi)","archived":false,"fork":false,"pushed_at":"2023-07-31T01:38:39.000Z","size":387,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T14:49:11.932Z","etag":null,"topics":["laravel8"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afperdomo2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-06-14T04:13:59.000Z","updated_at":"2023-06-17T04:56:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e53a970-ef63-4a44-8618-2bb6e2345e11","html_url":"https://github.com/afperdomo2/curso-api-laravel","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"325f8b63dabb17b30e979f6811cb5066b7c7792d"},"previous_names":["afperdomo2/curso-api-laravel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/afperdomo2/curso-api-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afperdomo2%2Fcurso-api-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afperdomo2%2Fcurso-api-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afperdomo2%2Fcurso-api-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afperdomo2%2Fcurso-api-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afperdomo2","download_url":"https://codeload.github.com/afperdomo2/curso-api-laravel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afperdomo2%2Fcurso-api-laravel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29892074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["laravel8"],"created_at":"2024-09-27T19:41:09.615Z","updated_at":"2026-02-27T11:15:19.085Z","avatar_url":"https://github.com/afperdomo2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://laravel.com\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg\" width=\"400\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n## API Rest con Laravel\n\nCurso de Platzi\n\n### Ejecutar servidor de desarrollo\n```sh\nphp artisan serve\n```\n\n### Ejecutar las Migraciones y los Seeders\n```sh\nphp artisan migrate --seed\n```\n\n# API Documentation - Laravel Routes\n\n## Introduction\nThis document provides a detailed description of the endpoints available in the Laravel API. The API serves as a platform for managing posts, and it supports multiple versions. Authentication is required to access certain endpoints.\n\n## Authentication\nThe API uses Sanctum for authentication. To access protected endpoints, clients must include a valid authentication token in the request headers.\n\n## Version 1 Endpoints\n\n### Retrieve all posts\n- URL: `/v1/posts`\n- Method: `GET`\n- Description: This endpoint allows users to retrieve a list of all posts in version 1.\n- Authentication: Required (using Sanctum token)\n- Response: A JSON array containing post objects with their respective details.\n\n### Retrieve a single post\n- URL: `/v1/posts/{id}`\n- Method: `GET`\n- Description: This endpoint retrieves a specific post from version 1 based on its `id`.\n- Authentication: Required (using Sanctum token)\n- Response: A JSON object containing the post details.\n\n### Delete a post\n- URL: `/v1/posts/{id}`\n- Method: `DELETE`\n- Description: This endpoint allows users to delete a post in version 1 based on its `id`.\n- Authentication: Required (using Sanctum token)\n- Response: A JSON object with a `message` indicating the successful deletion.\n\n## Version 2 Endpoints\n\n### Retrieve all posts v2\n- URL: `/v2/posts`\n- Method: `GET`\n- Description: This endpoint allows users to retrieve a list of all posts in version 2.\n- Authentication: Required (using Sanctum token)\n- Response: A JSON array containing post objects with their respective details.\n\n### Retrieve a single post v2\n- URL: `/v2/posts/{id}`\n- Method: `GET`\n- Description: This endpoint retrieves a specific post from version 2 based on its `id`.\n- Authentication: Required (using Sanctum token)\n- Response: A JSON object containing the post details.\n\n## User Login\n\n### User Login\n- URL: `/login`\n- Method: `POST`\n- Description: This endpoint allows users to log in and obtain an authentication token.\n- Request Body: A JSON object containing `email` and `password` fields.\n- Response: A JSON object containing the authentication token and user details.\n\n#### Example Request Body:\n```json\n{\n    \"email\": \"user@example.com\",\n    \"password\": \"secret_password\",\n    \"name\": \"ex: tablet|pc|android|iphone\"\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafperdomo2%2Fcurso-api-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafperdomo2%2Fcurso-api-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafperdomo2%2Fcurso-api-laravel/lists"}