Supported Versions: PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8
Computes the difference of arrays
array_diff(array $array, array ...$arrays): array
            return [

                
'pending_jobs' => $batch->pending_jobs 1,

                
'failed_jobs' => $batch->failed_jobs,

                
'failed_job_ids' => json_encode(array_values(array_diff(json_decode($batch->failed_job_idstrue), [$jobId]))),

            ];

        });
    public function diff($items)

    {

        return new static(
array_diff($this->items$this->getArrayableItems($items)));

    }
        if (is_array($id)) {

            if (
count($result) !== count(array_unique($id))) {

                throw (new 
ModelNotFoundException)->setModel(

                    
get_class($this->model), array_diff($id$result->modelKeys())

                );

            }
    public function withoutEagerLoad(array $relations)

    {

        
$relations array_diff(array_keys($this->model->getRelations()), $relations);



        return 
$this->with($relations);

    }
    public function removeObservableEvents($observables)

    {

        
$this->observables array_diff(

            
$this->observablesis_array($observables) ? $observables func_get_args()

        );

    }
    {

        
$attributes is_array($attributes) ? $attributes func_get_args();



        
$this->hidden array_diff($this->hidden$attributes);



        if (! empty(
$this->visible)) {

            
$this->visible array_merge($this->visible$attributes);
        try {

            
$callback();

        } finally {

            static::
$ignoreOnTouch array_values(array_diff(static::$ignoreOnTouch$models));

        }

    }
        $current $this->getCurrentlyAttachedPivots()

                        ->
pluck($this->relatedPivotKey)->all();



        
$detach array_diff($currentarray_keys(

            
$records $this->formatRecordsList($this->parseIds($ids))

        ));
            $fired $this->getFiredEvents($events);



            
$this->assertEmpty(

                
$eventsNotFired array_diff($events$fired),

                
'These expected events were not fired: ['.implode(', '$eventsNotFired).']'

            
);

        });
            $dispatched $this->getDispatchedJobs($jobs);



            
$this->assertEmpty(

                
$jobsNotDispatched array_diff($jobs$dispatched),

                
'These expected jobs were not dispatched: ['.implode(', '$jobsNotDispatched).']'

            
);

        });
        $value is_array($value) ? $value : [$value];



        return empty(
array_diff($value$headers[$key]));

    }
    protected function checkForAlternateVerbs($request)

    {

        
$methods array_diff(Router::$verbs, [$request->getMethod()]);
        }



        if (isset(
$options['except'])) {

            
$methods array_diff($methods, (array) $options['except']);

        }



        return 
$methods;
        $only = ['index''show''store''update''destroy'];



        if (isset(
$options['except'])) {

            
$only array_diff($only, (array) $options['except']);

        }



        return 
$this->resource($name$controllerarray_merge([
    protected function removeFromOldFlashData(array $keys)

    {

        
$this->put('_flash.old'array_diff($this->get('_flash.old', []), $keys));

    }