Is there a reason why the fromRequest method creates a new instance of self() rather than static() this means if you extend the class you have to then also override this function in order for it to return the extended class.
There may well be a "best practice" or use-case for this behaviour I'm not thinking of, but thought I'd question it as it struck me a little odd :)
https://github.com/spatie/laravel-query-builder/blob/9b7bf9123a66ddd38e0e2e9c1138b69c2325b11a/src/QueryBuilderRequest.php#L32
Is there a reason why the
fromRequest
method creates a new instance ofself()
rather thanstatic()
this means if you extend the class you have to then also override this function in order for it to return the extended class.There may well be a "best practice" or use-case for this behaviour I'm not thinking of, but thought I'd question it as it struck me a little odd :)