コード例 #1
0
 public function validateCode($code)
 {
     $discount = Parent::where('code', $code)->first();
     if ($discount) {
         return $discount;
     }
     return false;
 }
コード例 #2
0
 public function validateMembership($id)
 {
     $membership = Parent::where('membership_id', $id)->first();
     if ($membership) {
         return $membership;
     }
     return false;
 }
コード例 #3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $parent = Parent::where('userId', Auth::user()->id)->first();
     return view('parent')->with('parent', $parent);
 }