public static function hasCredit($unitId) { $units = Units::where('id', $unitId)->first(); return $units->credit <= 0; }
public function getStatus() { $unit = Units::where('id', 1)->first(); return View::make('users.report', array('unit' => $unit)); }