Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public function init()
  2. {
  3. // get username from url
  4. $username = $this->property('username'); //matt
  5.  
  6. // pass username to scope
  7. Gallery::applyUser($username)->get();
  8. }
  9.  
  10. // return results that match username
  11. public function scopeApplyUser($query, $username)
  12. {
  13. return $query->where('username', $username);
  14. }
  15.  
  16. Missing argument 2 for MyVendorGalleryModelsGallery::scopeApplyUser()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement