예제 #1
0
 public function getResidenceInfo($confId, $resId)
 {
     if (!Entrust::can(PermissionNames::ConferenceRoomEdit($confId))) {
         return response("", 403);
     }
     $result = Residence::where("conferenceID", $confId)->find($resId);
     if (!isset($result)) {
         return response("", 404);
     }
     return $result;
 }
예제 #2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // set default timezone for date() functions to UTC
     date_default_timezone_set('UTC');
     $now = date('Y-m-d H:i:s');
     // the current day and time
     $last_day_of_month = '2016-02-04 00:00:01';
     $blatsha = Resident::where('username', 'blatsha')->first();
     $N12thSt = Residence::where('nickname', 'Lucky Garden Gambling Place')->first();
     DB::table('bills')->insert([['resident_id' => $blatsha->id, 'residence_id' => $N12thSt->id, 'name' => 'Verizon bill', 'amount' => null, 'due_date' => $last_day_of_month, 'description' => 'Verizon bill for cable and internet', 'active' => 0], ['resident_id' => $blatsha->id, 'residence_id' => $N12thSt->id, 'name' => 'Gas bill', 'amount' => null, 'due_date' => $last_day_of_month, 'description' => 'PGW gas bill', 'active' => 0]]);
 }