【laravel】call_user_func_array在框架的使用

简介: 【laravel】call_user_func_array在框架的使用

总结:也就是在框架里面我们只能使用call_user_func_array(),要回调的函数必须要返回一个类给他

我这里是在同一个类里面的,所以就用new UserController,如果是调用其他类的回调函数就实例化其他类名称

在之前的我们写原生的时候可以直接使用

image.png屏幕快照 2022-05-13 下午11.54.49.png屏幕快照 2022-05-13 下午11.54.56.png


相关文章
|
5月前
|
编译器 C语言
__builtin_return_address()函数的使用方法
__builtin_return_address()函数的使用方法
48 1
|
10月前
|
PHP
thinkphp报错Call to undefined method app\index\controller\Index::fetch()
thinkphp报错Call to undefined method app\index\controller\Index::fetch()
99 0
|
测试技术 PHP
PHP:laravel自定义Model报错:$table must not be defined/$table must be string
PHP:laravel自定义Model报错:$table must not be defined/$table must be string
103 0
|
存储 Go vr&ar
[GO专栏-5]GO中5 分组声明与array, slice, map
[GO专栏-5]GO中5 分组声明与array, slice, map
198 0
[GO专栏-5]GO中5 分组声明与array, slice, map
|
PHP
【PHP】call_user_func_array() 内置函数
【PHP】call_user_func_array() 内置函数
83 0
【PHP】call_user_func_array() 内置函数
|
缓存 中间件 API
【laravel】 Unable to prepare route [api/user] for serialization. Uses Closure.
【laravel】 Unable to prepare route [api/user] for serialization. Uses Closure.
529 0
【laravel】 Unable to prepare route [api/user] for serialization. Uses Closure.
|
Python
Flask - 访问返回字典的接口报错:The view function did not return a valid response. The return type must be a string, tuple, Response instance, or WSGI callable, but it was a dict.
Flask - 访问返回字典的接口报错:The view function did not return a valid response. The return type must be a string, tuple, Response instance, or WSGI callable, but it was a dict.
1423 0
Flask - 访问返回字典的接口报错:The view function did not return a valid response. The return type must be a string, tuple, Response instance, or WSGI callable, but it was a dict.
|
前端开发 JavaScript Java
前端培训-中级阶段(32)-set、map、proxy、symbol、reflect、generator
前端最基础的就是 HTML+CSS+Javascript。掌握了这三门技术就算入门,但也仅仅是入门,现在前端开发的定义已经远远不止这些。前端小课堂(HTML/CSS/JS),本着提升技术水平,打牢基础知识的中心思想,我们开课啦(每周四)。
123 0
前端培训-中级阶段(32)-set、map、proxy、symbol、reflect、generator
如何使用代码获得一个function module的Where Used List
如果要获得一个function module的Where Used List,我们通常用的办法是使用ABAP workbench里提供的功能。
113 0
如何使用代码获得一个function module的Where Used List