lundi 15 août 2016

What is the difference between of these two classes in laravel 5?

I have a question what is the diffrence between \Illuminate\Http\Request and the Request classes in laravel 5. I've use the \Illuminate\Http\Request class for some ajax based thing in blade form.When using \Illuminate\Http\Request shows an error,

Non-static method Illuminate\Http\Request::ajax() should not be called statically, assuming $this from incompatible context

This is the codeblock what I've used

  Route::post('org_tree',function(\Illuminate\Http\Request $request)
    {
         if(Request::ajax())
            {

            }
   });

What is the reason for that?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire