I created a very simple query but the laravel builder added additional query which I will like to remove.
\DB::enableQueryLog();
App\Proj::whereNotNull('deleted_at')->paginate(20);
dd(\DB::getQueryLog());
The query that came out of it is as follows:
select * from `projs` where `deleted_at` is not null and `projs`.`deleted_at` is null
To get a good result, the query needed is:
select * from `projs` where `deleted_at` is not null
Without the 'and ...' in the query result statement.