src/Services/FormMaker.php
public function cleanupIdAndTimeStamps($collection, $timestamps, $id)
    {
        if (!$timestamps) {
            unset($collection['created_at']);
            unset($collection['updated_at']);
        }

        if (!$id) {
            unset($collection['id']);
        }

        return $collection;
    }
public function cleanupIdAndTimeStamps($collection, $timestamps, $id)
    {
        if (!$timestamps) {
            unset($collection['created_at']);
            unset($collection['updated_at']);
        }

        if (!$id) {
            unset($collection['id']);
        }

        return $collection;
    }
public function cleanupIdAndTimeStamps ( $ collection , $ timestamps , $ id ) { if ( ! $ timestamps ) { unset ( $ collection [ 'created_at' ] ) ; unset ( $ collection [ 'updated_at' ] ) ; } if ( ! $ id ) { unset ( $ collection [ 'id' ] ) ; } return $ collection ; }
Cleanup the ID and TimeStamp columns.

@param array $collection
@param bool  $timestamps
@param bool  $id

@return array
Cleanup the ID and TimeStamp columns .