如何在Laravel 5.5中运行存储过程?

时间:2018-04-18 07:46:57

标签: stored-procedures laravel-5

我已经尝试过:
return \DB::select('EXEC notes');
return \DB::select('CALL notes');

运行上述代码时出现的错误是:
Packets out of order. Expected 1 received 18. Packet size=101 (SQL: CALL notes())

我做了一个查询:
SELECT @@global.max_allowed_packet
它返回1073741824

增加max_allowed_pa​​cket并没有解决问题。

还有其他办法吗?

1 个答案:

答案 0 :(得分:0)

$notes = DB::select(
    'call notes'
);