# andFilter

```php
andFilter([
    'relational-table' => "additonal-where-parameters"
])

// using the andFilter to filter the relational-table "tbl_task"
Route::get('/get-user-task', function () {

    $userid = Auth::user('id');
    $projectCode = 'J6K5L4MB21';

    $tasks = DB()->selectLoop("*","tbl_task_member", "projectCode = '$projectCode' and user_id = '$userid'")
        ->andFilter([
            "tbl_task" => "status = 2 and priority_stats = 2"
        ])
        ->with([
            "tbl_task" => ['task_id', 'task_id'],
            "roles" => ['user_id', 'id']
        ])->get();

    dd($tasks);

});
```

![image](https://user-images.githubusercontent.com/37282871/197660115-7a7811cc-4347-463c-a5aa-09c13aac2ef3.png)
