public static function destroyByUuid($uuids)
    {
        // We'll initialize a count here so we will return the total number of deletes
        // for the operation. The developers can then check this number as a boolean
        // type value or get this total count of records deleted for logging, etc.
        $count = 0;

        $ids = is_array($uuids) ? $uuids : func_get_args();

        // We will actually pull the models from the database table and call delete on
        // each of them individually so that their events get fired properly with a
        // correct set of attributes in case the developers wants to check these.
        $key = ($instance = new static)->getUuidKeyName();

        foreach ($instance->whereIn($key, $ids)->get() as $model) {
            if ($model->delete()) {
                $count++;
            }
        }

        return $count;
    }
public static function destroyByUuid($uuids)
    {
        // We'll initialize a count here so we will return the total number of deletes
        // for the operation. The developers can then check this number as a boolean
        // type value or get this total count of records deleted for logging, etc.
        $count = 0;

        $ids = is_array($uuids) ? $uuids : func_get_args();

        // We will actually pull the models from the database table and call delete on
        // each of them individually so that their events get fired properly with a
        // correct set of attributes in case the developers wants to check these.
        $key = ($instance = new static)->getUuidKeyName();

        foreach ($instance->whereIn($key, $ids)->get() as $model) {
            if ($model->delete()) {
                $count++;
            }
        }

        return $count;
    }
public static function destroyByUuid ( $ uuids ) { // We'll initialize a count here so we will return the total number of deletes // for the operation. The developers can then check this number as a boolean // type value or get this total count of records deleted for logging, etc. $ count = 0 ; $ ids = is_array ( $ uuids ) ? $ uuids : func_get_args ( ) ; // We will actually pull the models from the database table and call delete on // each of them individually so that their events get fired properly with a // correct set of attributes in case the developers wants to check these. $ key = ( $ instance = new static ) -> getUuidKeyName ( ) ; foreach ( $ instance -> whereIn ( $ key , $ ids ) -> get ( ) as $ model ) { if ( $ model -> delete ( ) ) { $ count ++ ; } } return $ count ; }
Destroy the models for the given UUIDs.

@param  array|string  $uuids
@return int
Destroy the models for the given UUIDs .