Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FilterControl doesn't work when using eloquent relationship #202

Open
collinjc opened this issue Mar 1, 2019 · 0 comments
Open

FilterControl doesn't work when using eloquent relationship #202

collinjc opened this issue Mar 1, 2019 · 0 comments

Comments

@collinjc
Copy link

collinjc commented Mar 1, 2019

When adding a filter control to a grid pulling columns from a related table using an eloquent relationship, only filters using the primary table function. When filtering data based on the related table, no data is filtered. Data returned in the grid is otherwise properly linked.

Filter invocation:
$customerfilter = new FilterControl('CustomerAddresses.AddressID', FilterOperation::OPERATOR_EQ, $input->option('CustomerAddresses.AddressID')),

Eloquent model:
namespace App;

use Illuminate\Database\Eloquent\Model;

class Addresses extends Model
{
protected $connection = 'sqlsrv';
protected $table = 'dbo.Addresses';
public function CustomerAddresses()
{
return $this->hasOne('App\CustomerAddresses', 'AddressID', 'ID');
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant