| 1 | <?php |
||
| 7 | class Friendship extends Model |
||
| 8 | { |
||
| 9 | protected $fillable = ['user_id', 'friend_id', 'status']; |
||
| 10 | |||
| 11 | 32 | public function scopeWhereSender($query, $model) |
|
| 15 | |||
| 16 | 32 | public function scopeWhereRecipient($query, $model) |
|
| 20 | |||
| 21 | public function scopeAccepted($query, $val) |
||
| 25 | |||
| 26 | 32 | public function scopeBetweenUsers($query, $sender, $recipient) |
|
| 36 | } |
||
| 37 |