Let's create a simple form to capture leads in PHP and send them to Vicidial using:
- Laravel (PHP framework)
- Composer (PHP package manager)
- Vicidial (One of the best call contact center software in the world)
php installed (version 8+)
composer installed (version 2.5+)
Vicidial installed or vicidial server
In the terminal, run the following command:And you should see something like this:We will need a package to connect Laravel and vicidial, and for this, we will use masterfermin02/vicidial-api-wrapper:Now we are ready to start coding.Code the applicationThere are two steps to code the application:
Config the Vicidial API connection.
Create the web form on our Laravel app.
routes/web.phpAnd add this code:Go to your controller and add this code:The index method will be called when the user goes to this URL `/` we will need to create this view `pages.vicidial.admin.lead` on the resources folder:
Create pages, vicidial, and admin folders.
Create a file named lead.blade.php