Last active
December 21, 2017 18:30
-
-
Save nikhilj1/09547ae299d2971a81e65060de716141 to your computer and use it in GitHub Desktop.
Student isValid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Student extends Model { | |
public function scopeIsValid($query, $name,$dob){ | |
return (!empty($query->where('name', $name)->where('dob',$dob)->get())?true:false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment