common/repositories/ContactUsRepository.php
/**
    * delete checked messages from storage.
    * @return new resourses from storage.
    */
delete checked messages from storage.
@return new resourses from storage.
delete checked messages from storage . @return new resourses from storage .
public function deleteChecked($data){
        $ids = [];
        foreach ($data as $item) {
            if($item['bool'] === true){
                array_push($ids, $item['id']);
            }
        }
        return \Yii::$app->db->createCommand()
        ->delete('contact_us_messages', array('in', 'id', $ids))
        ->execute();
    }
public function deleteChecked ( $ data ) { $ ids = [ ] ; foreach ( $ data as $ item ) { if ( $ item [ 'bool' ] === true ) { array_push ( $ ids , $ item [ 'id' ] ) ; } } return \ Yii :: $ app -> db -> createCommand ( ) -> delete ( 'contact_us_messages' , array ( 'in' , 'id' , $ ids ) ) -> execute ( ) ; }
delete checked messages from storage.
delete checked messages from storage .