Hi I've been looking around for some kind of how to guide for stored procedures in Laravel but can't find any so far. My issue is basically I have a huge list of parameters that I need to send to the stored procedure called InsertNewApplicant
but I'm not sure how to build the query.
This is all I have so far, I'm not sure where I chose which database to send it to or how to make the connection to that database.
Any help would be greatly appreciated
$result = DB::select('call InsertNewApplicant(?????????????????????????)',
array($firstName, $middleName, $addressLine_1, $addressLine_2, $postCode, $landline, $mobile, $email,
$DOB, $maritalStatus, $industry, $occupation, $jobTitle, $selfEmployed, $selfAssessment, $workHome,
$ownTransport, $companyVehicle, $paySubs, $otherIncome, $printForms, $marketingUs, $marketingOther,
$agreedTNCs, $TNCVersion, $CampaignSource));
Here's my two databases - I need to send this data to the sqlserv database so I'm not sure what to do
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'SECRET'),
'port' => env('DB_PORT', 'SECRET'),
'database' => env('DB_DATABASE', 'SECRET'),
'username' => env('DB_USERNAME', 'SECRET'),
'password' => env('DB_PASSWORD', 'SECRET'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
'engine' => null,
],
'sqlsrv' => array(
'driver' => 'sqlsrv',
'host' => ' AN IP ADDRESS', // Provide IP address here
'database' => 'SECRET',
'username' => 'SECRET',
'password' => 'SECRET',
'prefix' => '',
),