輔助方法:https://docs.laravel-dojo.com/laravel/5.2/helpers
1. static方法
use Request; public static function test(Request $request) { $data= Request::all(); }
2. 一般方法
use Illuminate\Http\Request; public static function test(Request $request) { $age = \Request::input('age'); $data = $request->all(); }
3.輔助方法
use Illuminate\Http\Request; public static function test(Request $request) { $data= request()->all(); }
沒有留言:
張貼留言