Closed dillingham closed 2 years ago
@dillingham I was not properly able to understand this, but review this PR and share your thoughts if this is what we want?
@mitulgolakiya basically it allows the developer to have a different format
Field::make('product_line', 'productLine')
means the import file can have product_line
as the column header
but the model has a productLine()
relationship
In filters we do the same thing.
Filter::make('is_not_paused', 'isActive')->scope()
means a public query string parameter is_not_paused
will collect a value
and will be passed to isActive
the scope method.
But without both parameters..
Filter::make('active')->scope()
This would be active
the query string parameter and scopeActive()
the method
Lets replace this work around I added here with a internal key matching this section in filter.php.. the first parameter being the public facing key, in filters thats the url parameter, and the internal key being the relationship name.. sometimes they are the same but when the format is different.. the extra parameter is useful.