{"id":18298523,"url":"https://github.com/fusionauth/fusionauth-quickstart-php-laravel-api","last_synced_at":"2026-05-01T19:34:32.866Z","repository":{"id":203293605,"uuid":"709266049","full_name":"FusionAuth/fusionauth-quickstart-php-laravel-api","owner":"FusionAuth","description":"Demo application for the Laravel API quickstart","archived":false,"fork":false,"pushed_at":"2026-04-21T23:01:30.000Z","size":122,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-04-22T01:10:31.275Z","etag":null,"topics":["api","authentication","fusionauth","jwt","laravel","login","php"],"latest_commit_sha":null,"homepage":"https://fusionauth.io/docs/quickstarts/quickstart-php-laravel-api","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/FusionAuth.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":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-24T11:21:23.000Z","updated_at":"2026-04-21T23:01:33.000Z","dependencies_parsed_at":"2023-12-26T23:27:43.437Z","dependency_job_id":"556c40ff-0d50-4364-bb77-a1afe3f68c0a","html_url":"https://github.com/FusionAuth/fusionauth-quickstart-php-laravel-api","commit_stats":null,"previous_names":["fusionauth/fusionauth-quickstart-php-laravel-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FusionAuth/fusionauth-quickstart-php-laravel-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-quickstart-php-laravel-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-quickstart-php-laravel-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-quickstart-php-laravel-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-quickstart-php-laravel-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FusionAuth","download_url":"https://codeload.github.com/FusionAuth/fusionauth-quickstart-php-laravel-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-quickstart-php-laravel-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32510808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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","authentication","fusionauth","jwt","laravel","login","php"],"created_at":"2024-11-05T15:06:16.875Z","updated_at":"2026-05-01T19:34:32.847Z","avatar_url":"https://github.com/FusionAuth.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quickstart: Laravel API with FusionAuth\n\nThis repository contains a Laravel API that works with a locally-running instance of [FusionAuth](https://fusionauth.io/), the authentication and authorization platform.\n\n## Setup\n\n### Prerequisites\nYou will need the following things properly installed on your computer.\n\n- [PHP 8.1+](https://www.php.net): This quickstart was built using PHP 8.1 and tested with PHP 8.2 as well. It may work on different versions of PHP, but it has not been tested. \n- [Composer](https://getcomposer.org/) to install PHP dependencies.\n- [Docker](https://www.docker.com): The quickest way to stand up both FusionAuth and Laravel. Ensure you also have [docker compose](https://docs.docker.com/compose/) installed.\n- (Alternatively, you can [Install FusionAuth Manually](https://fusionauth.io/docs/v1/tech/installation-guide/)).\n\n### FusionAuth Installation via Docker\n\nThe root of this project directory (next to this `README`) are two files: [a Docker compose file](./docker-compose.yml) and an [environment variables configuration file](./.env). Assuming you have Docker installed on your machine, you can stand up FusionAuth up on your machine with:\n\n```sh\ndocker compose up -d\n```\n\nThe FusionAuth configuration files also make use of a unique feature of FusionAuth, called [Kickstart](https://fusionauth.io/docs/v1/tech/installation-guide/kickstart): when FusionAuth comes up for the first time, it will look at the [Kickstart file](./kickstart/kickstart.json) and mimic API calls to configure FusionAuth for use when it is first run.\n\n\u003e **NOTE**: If you ever want to reset the FusionAuth system, delete the volumes created by docker-compose by executing `docker-compose down -v`.\n\nFusionAuth will be initially configured with these settings:\n\n* Your client Id is: `e9fdb985-9173-4e01-9d73-ac2d60d1dc8e`.\n* Your client secret is: `super-secret-secret-that-should-be-regenerated-for-production`.\n* Your admin username is `admin@example.com` and your password is `password`.\n* Your teller username is `teller@example.com` and your password is `password`.\n* Your customer username is `customer@example.com` and your password is `password`.\n* The FusionAuth instance is located at `http://localhost:9011/`.\n\nYou can log into the [FusionAuth admin UI](http://localhost:9011/admin) and look around if you want, but with Docker/Kickstart you don't need to.\n\n### Complete Laravel API\n\nThe `complete-application` directory contains a minimal Laravel app configured to authenticate with locally running FusionAuth.\n\nInstall the dependencies via Composer:\n\n```shell\ncd complete-application\ncomposer install\n./vendor/bin/sail up -d\n```\n\nThe app is now serving two api endpoints:\n - [http://localhost/api/make-change](http://localhost/api/make-change) - this endpoint calculates the change to make from a given total.\n - [http://localhost/api/panic](http://localhost/api/panic) - this endpoint simulates notifying the police of an incident.\n\nYou can log in with a user preconfigured during Kickstart, `teller@example.com` with the password of `password`, by calling:\n\n```sh\ncurl --location 'http://localhost:9011/api/login' \\\n--header 'Authorization: this_really_should_be_a_long_random_alphanumeric_value_but_this_still_works' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"loginId\": \"teller@example.com\",\n  \"password\": \"password\",\n  \"applicationId\": \"e9fdb985-9173-4e01-9d73-ac2d60d1dc8e\"\n}'\n```\n\nYou can take the token from the response and then call one of the endpoints listed above by calling:\n\n```sh\ncurl --cookie 'app.at=\u003cyour_token\u003e' 'http://localhost/make-change?total=5.12'\n```\n\nor\n\n```sh\ncurl --cookie 'app.at=\u003cyour_token\u003e' --request POST 'http://localhost/panic'\n```\n\n### Further Information\n\nVisit https://fusionauth.io/docs/quickstarts/quickstart-php-laravel-api for a step-by-step guide on how to build this Laravel API from scratch.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-quickstart-php-laravel-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusionauth%2Ffusionauth-quickstart-php-laravel-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-quickstart-php-laravel-api/lists"}