polyfony-inc / polyfony

Polyfony is an intuitive, light and powerful PHP micro-framework
GNU General Public License v3.0
10 stars 1 forks source link

Cast ->get('count_'id') to integer #311

Open ghost opened 3 years ago

ghost commented 3 years ago

Currently this doesn't work because ->get returns a string

public function countRequests() :int {
        return Requests::_select(['count'=>'id'])
            ->where(['id_site'=>$this->get('id')])
            ->first()
            ->execute()
            ->get('count_id');
    }