Esempio n. 1
0
 public function ratingTelesecundaria($telesecundaria_id)
 {
     $rating = Model\Mediateca\RatingTelesecundaria::where('user_id', $this->id)->where('telesecundaria_id', $telesecundaria_id)->first();
     if ($rating == null) {
         return 0;
     }
     return $rating->rating;
 }
 public function getRatingTelesecundaria($id)
 {
     $rating = RatingTelesecundaria::where('telesecundaria_id', $id)->where('user_id', Auth::user()->id)->first();
     if ($rating == NULL) {
         print 0;
     } else {
         print $rating->rating;
     }
 }