jeudi 4 février 2016

Laravel 5.2 call of non-static Query Builder methods like static methods

I am digging deep into Laravel 5.2 architecture. I noticed one thing that there is no static method of some functions, like insert, update in the Illuminate\Database\Query\Builder class yet we access it like

The function's signature inside this class is

public function insert(array $values){}

And we access it like

DB::insert($data)

I have read in the documentation about facades. But in the documentation it is written that class must extend with Illuminate\Support\Facades\Facade but the Builder class doesn't extend with Facade also. Any help?

How is done?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1nIzhrD
via IFTTT

Aucun commentaire:

Enregistrer un commentaire