1. PHP / Говнокод #24900

    −1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    public static function findById($id)
        {
            $model = self::where('id', $id)->get();
    
            $count = $model->getIterator()->count();
            if($count > 0) {
                return $model->getIterator()->current();
            }
    
            return false;
        }

    Laravel Eloquent Model

    Запостил: pb92, 11 Октября 2018

    Комментарии (7) RSS

    Добавить комментарий