Find() with afterFetch() problem

in model I have

public function afterFetch()
  {
       if($this->type == 'type1')
          { die('333');  }
    }

in controller I have

$feeds = Feed::find("type = 'type1'");
 foreach($feeds as $feed){
            die('111');
        }

I get 333 output, what's going on?



36.3k

Hey

It will allway running into the if statenment. Becuse you find data via condition type1, you can take look discussion at https://forum.phalconphp.com/discussion/498/afterfetch-