How to call SQL Server Stored procedure in Laravel?
Hi,
I can't call SQL Server Stored Procedure from Laravel. Coming errors.
Please help me anyone???
How to call SQL Server Stored procedure in Laravel?
Hi,
I can't call SQL Server Stored Procedure from Laravel. Coming errors.
Please help me anyone???
You can easily call stored procedure in laravel in two ways
class CheckController extends Controller
{
public function callProcedure()
{
// Calling Stored Procedure from MySQL
$alluser = DB::select('call getalluser()');
return $alluser;
}
}
class CheckController extends Controller
{
public function callProcedure($id)
{
// Calling Stored Procedure from MySQL
$specificuser = DB::select('call getspecificuser(?)',array($id));
return $specificuser;
}
}
You can refer the following article for better understanding How to call stored procedure in laravel