✨ Allow the user to modify the query and exported fields.#114
✨ Allow the user to modify the query and exported fields.#114GautierDele wants to merge 4 commits intoSpartnerNL:1.2from
Conversation
|
Nice! I'll have a closer look soon. Takes for the contribution! |
patrickbrouwers
left a comment
There was a problem hiding this comment.
Thanks again for your contribution. AlterateQuery is currently not functioning. Also left some remarks about naming.
| $this->handleOnly($this->request); | ||
| $this->handleHeadings($query, $this->request); | ||
|
|
||
| if (!is_null($this->alterateQuery)) { |
| * | ||
| * @return $this | ||
| */ | ||
| public function exportFields(array $fields) |
There was a problem hiding this comment.
I'm not sure about this naming. This seems it would still refer to the Nova fields, while it skips it and uses the model attributes directly.
Maybe exportAttributes
| */ | ||
| public function exportFields(array $fields) | ||
| { | ||
| $this->exportFields = $fields; |
There was a problem hiding this comment.
\is_array($fields) ? $fields : \func_get_args()
| * | ||
| * @return $this | ||
| */ | ||
| public function alterateQuery(callable $callable) |
There was a problem hiding this comment.
Can you change this to tapQuery so it's more inline with Laravel-like naming
| /** | ||
| * @var callable|null | ||
| */ | ||
| protected $alterateQuery; |
There was a problem hiding this comment.
I made callbackQuery to follow laravel naming
| */ | ||
| public function alterateQuery(callable $callable) | ||
| { | ||
| $this->alterate = $callable; |
There was a problem hiding this comment.
Should have been $this->alterateQuery, currently not working
|
Hey @GautierDele can you have a look at my remarks? |
|
@patrickbrouwers Yeah sorry for the delay, i'll try my best to close this the quicker possible |
|
@patrickbrouwers sorry for the delay, i'm currently underwater 😅 Please feel free to provide feedback on this ! Gautier |
|
@patrickbrouwers any time to treat this ? |
Hello,
I saw this feature was a lot requested so I implemented it.
Feel free to give return and modify it to your need !
Thanks,
Gautier