This is a sample implementation of the Corbado web-js package and Corbado PHP SDK being integrated into a web application built with PHP Laravel.
app/Http/Controllers
: contains the controllers for handling HTTP requestsconfig
: contains the configuration filesdatabase/migrations
: contains the database migration files, including our custom user tablepublic
: contains the publicly accessible files, such as assetsresources/views
: contains the Blade templatesroutes/web.php
: contains the route definitions.env
: environment variables configuration file
Please follow the steps in Getting started to create and configure a project in the Corbado developer panel.
You need to have PHP and Composer installed to run it.
Use the values you obtained in Prerequisites to configure the following variables inside an .env
file you create in the root folder of this project:
CORBADO_PROJECT_ID=pro-XXX
CORBADO_API_SECRET=corbado1_XXX
CORBADO_FRONTEND_API=https://${CORBADO_PROJECT_ID}.frontendapi.cloud.corbado.io
CORBADO_BACKEND_API=https://backendapi.cloud.corbado.io
You can find an example in the .env.example
file.
Run
composer install
to install all dependencies.
Finally, you can run the project locally with
php artisan serve