public function validateBulkModelField($field, $modelClass, $bulkField, $column = 'id')
    {
        $this->validateValidity(
            $field,
            function ($uniqueAdvertIds) use ($modelClass, $column) {
                $uniqueAdverts = $modelClass::query()->inWhere($column, $uniqueAdvertIds)->execute();
                return count($uniqueAdvertIds) == $uniqueAdverts->count();
            },
            $bulkField
        );
    }
public function validateBulkModelField($field, $modelClass, $bulkField, $column = 'id')
    {
        $this->validateValidity(
            $field,
            function ($uniqueAdvertIds) use ($modelClass, $column) {
                $uniqueAdverts = $modelClass::query()->inWhere($column, $uniqueAdvertIds)->execute();
                return count($uniqueAdvertIds) == $uniqueAdverts->count();
            },
            $bulkField
        );
    }
public function validateBulkModelField ( $ field , $ modelClass , $ bulkField , $ column = 'id' ) { $ this -> validateValidity ( $ field , function ( $ uniqueAdvertIds ) use ( $ modelClass , $ column ) { $ uniqueAdverts = $ modelClass :: query ( ) -> inWhere ( $ column , $ uniqueAdvertIds ) -> execute ( ) ; return count ( $ uniqueAdvertIds ) == $ uniqueAdverts -> count ( ) ; } , $ bulkField ) ; }
Validate bulk model fields
@author Adeyemi Olaoye <yemi@cottacush.com>
@param $field
@param $modelClass
@param string $bulkField
@param string $column
Validate bulk model fields