Getting GET “?” variable in laravel

前端 未结 8 809
夕颜
夕颜 2020-12-16 08:41

Hello I\'m creating API using REST and Laravel following this article.

Everything works well as expected.

Now, I want to map GET request to recognise variabl

8条回答
  •  -上瘾入骨i
    2020-12-16 09:47

    In laravel 5.3 $start = Input::get('start'); returns NULL

    To solve this

    use Illuminate\Support\Facades\Input;
    
    //then inside you controller function  use
    
    $input = Input::all(); // $input will have all your variables,  
    
    $start = $input['start'];
    $limit = $input['limit'];
    

提交回复
热议问题