예제 #1
0
 /**
  * @param $name
  *
  * @return Bill|null
  */
 protected function findBill($name)
 {
     /** @var Bill $bill */
     foreach (Bill::get() as $bill) {
         if ($bill->name == $name && $this->user->id == $bill->user_id) {
             return $bill;
             break;
         }
     }
     return null;
 }
예제 #2
0
 /**
  * @param $name
  *
  * @return Bill|null
  */
 protected function findBill($name)
 {
     // account
     $user = User::whereEmail('*****@*****.**')->first();
     /** @var Bill $bill */
     foreach (Bill::get() as $bill) {
         if ($bill->name == $name && $user->id == $bill->user_id) {
             return $bill;
             break;
         }
     }
     return null;
 }