classes/Input/Search.php
public function makeSoftDeletesCondition($controller)
    {
        if (!$controller->withTrashed()) return [];
        return [
            'deleted_at' => [
                'type' => 'select',
                'label' => 'status',
                'options' => [
                    'exists' => 'exists',
                    'deleted' => 'deleted'
                ],
                'query' => function($query, $condition, $input) {

                    // If not deleted...
                    if (($input == 'exists' && $condition == '=') ||
                        ($input == 'deleted' && $condition == '!=')) {
                        $query->whereNull('deleted_at');

                    // If deleted...
                    } else if (($input == 'deleted' && $condition == '=') ||
                        ($input == 'exists' && $condition == '!=')) {
                        $query->whereNotNull('deleted_at');
                    }
                },
            ]
        ];
    }
public function makeSoftDeletesCondition($controller)
    {
        if (!$controller->withTrashed()) return [];
        return [
            'deleted_at' => [
                'type' => 'select',
                'label' => 'status',
                'options' => [
                    'exists' => 'exists',
                    'deleted' => 'deleted'
                ],
                'query' => function($query, $condition, $input) {

                    // If not deleted...
                    if (($input == 'exists' && $condition == '=') ||
                        ($input == 'deleted' && $condition == '!=')) {
                        $query->whereNull('deleted_at');

                    // If deleted...
                    } else if (($input == 'deleted' && $condition == '=') ||
                        ($input == 'exists' && $condition == '!=')) {
                        $query->whereNotNull('deleted_at');
                    }
                },
            ]
        ];
    }
public function makeSoftDeletesCondition ( $ controller ) { if ( ! $ controller -> withTrashed ( ) ) return [ ] ; return [ 'deleted_at' => [ 'type' => 'select' , 'label' => 'status' , 'options' => [ 'exists' => 'exists' , 'deleted' => 'deleted' ] , 'query' => function ( $ query , $ condition , $ input ) { // If not deleted... if ( ( $ input == 'exists' && $ condition == '=' ) || ( $ input == 'deleted' && $ condition == '!=' ) ) { $ query -> whereNull ( 'deleted_at' ) ; // If deleted... } else if ( ( $ input == 'deleted' && $ condition == '=' ) || ( $ input == 'exists' && $ condition == '!=' ) ) { $ query -> whereNotNull ( 'deleted_at' ) ; } } , ] ] ; }
Make soft deletes condition if the controller supports trashed records.
Returns an array so it can be easily merged into exisitng configs.

@param  Controller\Base $controller
@return array
Make soft deletes condition if the controller supports trashed records . Returns an array so it can be easily merged into exisitng configs .