public function deleteById($model, $id)
    {
        if ($id instanceof Collection)
            $id = $id->toArray();

        $method = 'unlink';

        $result = $this->call($model, $method, [$id]);

        return $this->makeResponse($result, 0);
    }
public function deleteById($model, $id)
    {
        if ($id instanceof Collection)
            $id = $id->toArray();

        $method = 'unlink';

        $result = $this->call($model, $method, [$id]);

        return $this->makeResponse($result, 0);
    }
public function deleteById ( $ model , $ id ) { if ( $ id instanceof Collection ) $ id = $ id -> toArray ( ) ; $ method = 'unlink' ; $ result = $ this -> call ( $ model , $ method , [ $ id ] ) ; return $ this -> makeResponse ( $ result , 0 ) ; }
Remove a record by Id or Ids.
returns true except when an error happened.

@param string $model
@param array|Collection|int $id
@return true|string
Remove a record by Id or Ids . returns true except when an error happened .