{"id":19176931,"url":"https://github.com/javi-cc/laravel-api-server","last_synced_at":"2025-08-12T02:14:48.887Z","repository":{"id":110763417,"uuid":"288770078","full_name":"JAVI-CC/Laravel-API-Server","owner":"JAVI-CC","description":"Laravel 10 API CRUD and connected to a Mysql database and Api documentation Swagger 3.0","archived":false,"fork":false,"pushed_at":"2024-05-12T18:18:30.000Z","size":16516,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T19:49:33.482Z","etag":null,"topics":["api","api-dropbox","docker","dropbox","dropbox-api","laravel","php8","pusher","pusher-api","pusher-server","railway","sanctum","seeders","swagger","swagger3","testing","upload-files"],"latest_commit_sha":null,"homepage":"https://laravel-api-server.up.railway.app/api/juegos","language":"PHP","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/JAVI-CC.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":"2020-08-19T15:34:48.000Z","updated_at":"2024-05-12T18:09:46.000Z","dependencies_parsed_at":"2024-11-09T10:42:42.665Z","dependency_job_id":null,"html_url":"https://github.com/JAVI-CC/Laravel-API-Server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JAVI-CC/Laravel-API-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAVI-CC%2FLaravel-API-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAVI-CC%2FLaravel-API-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAVI-CC%2FLaravel-API-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAVI-CC%2FLaravel-API-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JAVI-CC","download_url":"https://codeload.github.com/JAVI-CC/Laravel-API-Server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAVI-CC%2FLaravel-API-Server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269987123,"owners_count":24508176,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","api-dropbox","docker","dropbox","dropbox-api","laravel","php8","pusher","pusher-api","pusher-server","railway","sanctum","seeders","swagger","swagger3","testing","upload-files"],"created_at":"2024-11-09T10:31:14.594Z","updated_at":"2025-08-12T02:14:43.874Z","avatar_url":"https://github.com/JAVI-CC.png","language":"PHP","readme":"\u003cp align=\"center\"\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/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://travis-ci.org/laravel/framework\"\u003e\u003cimg src=\"https://travis-ci.org/laravel/framework.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/laravel/framework\"\u003e\u003cimg src=\"https://poser.pugx.org/laravel/framework/d/total.svg\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/laravel/framework\"\u003e\u003cimg src=\"https://poser.pugx.org/laravel/framework/v/stable.svg\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/laravel/framework\"\u003e\u003cimg src=\"https://poser.pugx.org/laravel/framework/license.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cspan\u003eApplication made with Laravel 10 that consists of the creation of a CRUD of a games api that contains the following functionalities:\u003c/span\u003e\n\u003cul\u003e\n  \u003cli\u003eRelationships between different models with polymorphic tables.\u003c/li\u003e\n  \u003cli\u003eContains endpoints of type GET, POST, PUT and DELETE\u003c/li\u003e\n  \u003cli\u003eSome endpoints contain the function of sending files and the files are stored locally.\u003c/li\u003e\n  \u003cli\u003eImplementation of API Dropbox in the \u003ca href=\"https://github.com/JAVI-CC/Laravel-API-Server/tree/dropbox\"\u003edropbox\u003c/a\u003e branch the difference with the master branch is that in the dropbox branch it is configured so that the files that are sent through the api are saved in a shared Dropbox directory instead of a local directory of the project.\u003c/li\u003e\n  \u003cli\u003ePostman collection.json file to import and create use endpoints.\u003c/li\u003e\n  \u003cli\u003eResource file to show the values of some endpoints in a personalized way.\u003c/li\u003e\n  \u003cli\u003eRequests validations.\u003c/li\u003e\n  \u003cli\u003eException handling.\u003c/li\u003e\n  \u003cli\u003eFeature testing.\u003c/li\u003e\n  \u003cli\u003eFactories.\u003c/li\u003e\n  \u003cli\u003eTraits.\u003c/li\u003e\n  \u003cli\u003eMigration file to create all the tables in the database.\u003c/li\u003e\n  \u003cli\u003eFile seeder with +50 games to insert the data into the database.\u003c/li\u003e\n  \u003cli\u003eSeeders are in JSON format\u003c/li\u003e\n  \u003cli\u003eIt is compatible with PHP 8\u003c/li\u003e\n  \u003cli\u003eSearch filters of the games that are inserted in the database.\u003c/li\u003e\n  \u003cli\u003eWebsockets with Pusher.\u003c/li\u003e\n  \u003cli\u003eDocumentation of all the api enpoints with the Laravel Swagger 3.0.\u003c/li\u003e\n  \u003cli\u003eUsers can be registered through the Api and it contains authentication by Sanctum to be able to carry out the action of some endpoints.\u003c/li\u003e\n  \u003cli\u003eThe Api is uploaded in railway \u003ca href=\"https://laravel-api-server.up.railway.app/api/juegos\" target=\"_blank\"\u003ehttps://laravel-api-server.up.railway.app\u003c/a\u003e so that users can use the endpoints without having to download the project.\u003c/li\u003e\n  \u003cli\u003eThe project contains the files to deploy it in Docker.\u003c/li\u003e\n  \u003cli\u003eDemonstration of a \u003cb\u003eLaravel\u003c/b\u003e project on the client interface side using this api \u003ca href=\"https://github.com/JAVI-CC/Laravel-API-Client\" target=\"_blank\"\u003ehttps://github.com/JAVI-CC/Laravel-API-Client\u003c/a\u003e.\u003c/li\u003e\n  \u003cli\u003eDemonstration of a \u003cb\u003eVUE 3 and Quasar Framework\u003c/b\u003e project on the client interface side using this api \u003ca href=\"https://github.com/JAVI-CC/VUE3-API-client\" target=\"_blank\"\u003ehttps://github.com/JAVI-CC/VUE3-API-client\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e \n\n\u003ch3\u003eDemo API\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"https://laravel-api-server.up.railway.app/api/juegos\" target=\"_blank\"\u003ehttps://laravel-api-server.up.railway.app\u003c/p\u003e\n\n\u003ch3\u003eDocumentation API SWAGGER 3.0\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"http://laravel-api-server.up.railway.app/api/documentation\" target=\"_blank\"\u003ehttp://laravel-api-server.up.railway.app/api/documentation\u003c/p\u003e\n\n\u003ch3\u003eLaravel Api client interface\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/JAVI-CC/Laravel-API-Client\" target=\"_blank\"\u003ehttps://github.com/JAVI-CC/Laravel-API-Client\u003c/a\u003e\u003c/p\u003e\n\n\u003ch3\u003eVUE 3 and Quasar Framework Api client interface\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/JAVI-CC/VUE3-API-client\" target=\"_blank\"\u003ehttps://github.com/JAVI-CC/VUE3-API-client\u003c/a\u003e\u003c/p\u003e\n\n\n\u003ch3\u003eHeaders\u003c/h3\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eKey\u003c/th\u003e\n\u003cth\u003eValue\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eAuthorization\u003c/td\u003e\n\u003ctd\u003e{Token provided by Sanctum}\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAccept\u003c/td\u003e\n\u003ctd\u003eapplication/json\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eContent-Type\u003c/td\u003e\n\u003ctd\u003eapplication/json\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003ch3\u003eSetup\u003c/h3\u003e\n\u003cpre\u003e\n\u003ccode\u003e$ composer install \u0026\u0026 php artisan key:generate \u0026\u0026 php artisan migrate --seed\u003c/code\u003e\n\u003c/pre\u003e\n\n\u003chr\u003e\n\n\u003ch3\u003eEndpoints Games:\u003c/h3\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003ePath\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eAuth\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/juegos\u003c/td\u003e\n\u003ctd\u003eGet all the games\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePOST\u003c/td\u003e\n\u003ctd\u003e/api/juegos/\u003c/td\u003e\n\u003ctd\u003eAdd a game\u003c/td\u003e\n\u003ctd\u003eYes\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/juegos/{slug}\u003c/td\u003e\n\u003ctd\u003eGet a game\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePOST\u003c/td\u003e\n\u003ctd\u003e/api/juegos/edit\u003c/td\u003e\n\u003ctd\u003eUpdate a game\u003c/td\u003e\n\u003ctd\u003eYes\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDELETE\u003c/td\u003e\n\u003ctd\u003e/api/juegos/delete/{slug}\u003c/td\u003e\n\u003ctd\u003eDelete a game\u003c/td\u003e\n\u003ctd\u003eYes\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePOST\u003c/td\u003e\n\u003ctd\u003e/api/juegos/filter/search\u003c/td\u003e\n\u003ctd\u003eSearch games\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/juegos/desarrolladoras/{slug}\u003c/td\u003e\n\u003ctd\u003eGet games from a developer\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/juegos/desarrolladoras/show/all\u003c/td\u003e\n\u003ctd\u003eGet list all developers\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/juegos/generos/{slug}\u003c/td\u003e\n\u003ctd\u003eGet games from a genere\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/juegos/generos/show/all\u003c/td\u003e\n\u003ctd\u003eGet list all generes\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/juegos/paginate\u003c/td\u003e\n\u003ctd\u003eGet paginate games\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/juegos/random\u003c/td\u003e\n\u003ctd\u003eGet random games\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003ch3\u003eEndpoints User:\u003c/h3\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003ePath\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eAuth\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003ePOST\u003c/td\u003e\n\u003ctd\u003e/api/auth/register\u003c/td\u003e\n\u003ctd\u003eRegister a user\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePOST\u003c/td\u003e\n\u003ctd\u003e/api/auth/login\u003c/td\u003e\n\u003ctd\u003eLogin a user\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/auth/userinfo\u003c/td\u003e\n\u003ctd\u003eTo view a user information\u003c/td\u003e\n\u003ctd\u003eYes\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGET\u003c/td\u003e\n\u003ctd\u003e/api/auth/check\u003c/td\u003e\n\u003ctd\u003eCheck if user authenticated\u003c/td\u003e\n\u003ctd\u003eNo\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePOST\u003c/td\u003e\n\u003ctd\u003e/api/auth/logout\u003c/td\u003e\n\u003ctd\u003eLog out a user\u003c/td\u003e\n\u003ctd\u003eYes\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDELETE\u003c/td\u003e\n\u003ctd\u003e/api/auth/delete\u003c/td\u003e\n\u003ctd\u003eDelete user authenticated\u003c/td\u003e\n\u003ctd\u003eYes\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003ch4\u003e\u003ca href=\"http://laravel-api-server.up.railway.app/api/documentation\" target=\"_blank\"\u003eAttributes\u003c/a\u003e\u003c/h4\u003e\n\n\u003cbr\u003e\n\n\u003ch2\u003eStart the websockets with Pusher (Optional)\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003e1. In your \u003ca href=\"https://pusher.com/\" target=\"_blank\"\u003ePusher account\u003c/a\u003e create a channel called: \u003cstrong\u003ejuegos-api\u003c/strong\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003cpre\u003e\u003ccode\u003e2. Enter the file: \u003cstrong\u003e.env\u003c/strong\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003cpre\u003e\u003ccode\u003e3. fill in the following credentials:\n\u003cstrong\u003ePUSHER_APP_ID=\u003c/strong\u003e{App Keys in the channel juegos-api app_id}\n\u003cstrong\u003ePUSHER_APP_KEY=\u003c/strong\u003e{App Keys in the channel juegos-api key}\n\u003cstrong\u003ePUSHER_APP_SECRET=\u003c/strong\u003e{App Keys in the channel juegos-api secret}\n\u003cstrong\u003ePUSHER_APP_CLUSTER=\u003c/strong\u003e{App Keys in the channel juegos-api cluster}\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003cbr\u003e\n\n\u003ch2\u003eDeploy to Docker \u003cg-emoji class=\"g-emoji\" alias=\"whale\" fallback-src=\"https://github.githubassets.com/images/icons/emoji/unicode/1f433.png\"\u003e🐳\u003c/g-emoji\u003e\u003c/h2\u003e\n\n\u003ch4\u003eContainers:\u003c/h4\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003enginx:alpine\u003c/span\u003e - \u003ccode\u003e:8000-\u003e80/tcp\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003cspan\u003emariadb:11.2.2\u003c/span\u003e - \u003ccode\u003e:3306\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003cspan\u003ephp:8.2.13-fpm\u003c/span\u003e - \u003ccode\u003e:9000\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch4\u003eContainers structure:\u003c/h4\u003e\n\u003cdiv class=\"highlight highlight-source-shell\"\u003e\u003cpre\u003e├── laravel-server-juegos-api-app\n├── laravel-server-juegos-api-web\n└── laravel-server-juegos-api-db\u003c/pre\u003e\u003c/div\u003e\n\n\u003ch4\u003eSetup:\u003c/h4\u003e\n\u003cpre\u003e\n\u003ccode\u003e$ git clone https://github.com/JAVI-CC/Laravel-API-Server.git\n$ cd Laravel-API-Server\n$ cp .env.example .env\n$ docker-compose up -d\n$ docker compose exec app chmod -R 777 /var/www/storage\n$ docker-compose exec app php artisan key:generate\n$ docker-compose exec app php artisan migrate --seed\n$ docker-compose exec app php artisan test\u003c/code\u003e\n\u003c/pre\u003e\n\n\u003cbr\u003e\n\n\u003cp\u003eIn case you are using your IDE to develop the application and it odes not detect the files it contains within the \u003cstrong\u003evendor folder\u003c/strong\u003e, you have to copy the files from the vendor folder of the container to the host machine with the following command.\u003c/p\u003e\n\n\u003cpre\u003e\u003ccode\u003e$ docker compose cp app:/var/www/vendor .\u003c/code\u003e\u003c/pre\u003e\n\n\u003cspan\u003eOnce you have the containers deployed, you can access the API at \u003c/span\u003e \u003ca href=\"http://localhost:8000\" target=\"_blank\"\u003ehttp://localhost:8000\u003c/a\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavi-cc%2Flaravel-api-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavi-cc%2Flaravel-api-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavi-cc%2Flaravel-api-server/lists"}