Add support for dedicated eloquent builders and type/doc parameter support. (#1089)

* Add support for generating helpers for external eloquent builders

* Extract external builder methods generator to its own method and add an option to toggle this feature

* Check if we are using the default name of the eloquent builder

* Add tests with snapshots for external eloquent builder feature

* Refactor codegs

* Allow for type hinting

* Update test

* Run cs fix

* Update readme

* Use getName for parameter instead of relying on __toString()

* Do not use str_contains and use built in php method
This commit is contained in:
Kaloqn
2020-12-04 07:36:08 +01:00
committed by GitHub
parent b3a79fe6c1
commit db53e8e2b5
11 changed files with 631 additions and 2 deletions
+11
View File
@@ -62,6 +62,17 @@ return [
'write_model_magic_where' => true,
/*
|--------------------------------------------------------------------------
| Write Model External Eloquent Builder methods
|--------------------------------------------------------------------------
|
| Set to false to disable write external eloquent builder methods
|
*/
'write_model_external_builder_methods' => true,
/*
|--------------------------------------------------------------------------
| Write Model relation count properties