Created
August 10, 2017 21:59
-
-
Save grafst/b4b4de593b08faf83c997b28f61d214d to your computer and use it in GitHub Desktop.
laravel eloquent query template
This file contains 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
class News extends Eloquent { | |
public function newQuery($excludeDeleted = true) { | |
return parent::newQuery($excludeDeleted) | |
->where(status, '=', 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment