src/Laito/Controller.php
public function destroy($id = null)
    {
        // Check the ID
        if (!isset($id)) {
            throw new \InvalidArgumentException('Undefined ID', 400);
        }

        // Delete the record
        $result = $this->model->destroy($id);

        // Return results
        return [
            'success' => true,
            'id' => $result
        ];
    }
public function destroy($id = null)
    {
        // Check the ID
        if (!isset($id)) {
            throw new \InvalidArgumentException('Undefined ID', 400);
        }

        // Delete the record
        $result = $this->model->destroy($id);

        // Return results
        return [
            'success' => true,
            'id' => $result
        ];
    }
public function destroy ( $ id = null ) { // Check the ID if ( ! isset ( $ id ) ) { throw new \ InvalidArgumentException ( 'Undefined ID' , 400 ) ; } // Delete the record $ result = $ this -> model -> destroy ( $ id ) ; // Return results return [ 'success' => true , 'id' => $ result ] ; }
Remove the specified resource from storage

@param array $id Resource ID
@return array Response
Remove the specified resource from storage