Exemplo n.º 1
0
 public static function add(User $user, Bank $bank, $address, $name, $account)
 {
     if (UserBank::where('user_id', $user->id)->exists()) {
         $is_lock = 0;
     } else {
         $is_lock = 1;
     }
     return UserBank::saveData(['bank_id' => $bank->id, 'user_id' => $user->id, 'address' => $address, 'name' => $name, 'bank_name' => $bank->name, 'account' => $account, 'status' => 1, 'is_lock' => $is_lock]);
 }
Exemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy()
 {
     $id = Request::input('num');
     $r = UserBank::where('id', $id)->delete();
     return success('删除成功');
 }