Created
December 21, 2016 16:36
-
-
Save cronoh/1b3114e4e95ed6a0353724f408ce23f6 to your computer and use it in GitHub Desktop.
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
$variable = static::where('name', $name) | |
->whereHas('widget', function ($q) use ($widget) { | |
$q->where('name', $widget); | |
}) | |
->first(); | |
return $variable ? : false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment