Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save riyuk/3c50efa88e89dccac13aa95fe4dc840d to your computer and use it in GitHub Desktop.
Save riyuk/3c50efa88e89dccac13aa95fe4dc840d to your computer and use it in GitHub Desktop.
<?php
public static function motd()
{
$excludedMonsters = Monster::where(function($query) {
$query->where('awakens_from', 'NOT LIKE', '%Angelmon%')
->where('awakens_from', 'NOT LIKE', '%Rainbowmon%')
->where('awakens_from', 'NOT LIKE', '%Imperfect%')
->where('awakens_from', 'NOT LIKE', '%(Attack)%')
->where('awakens_from', 'NOT LIKE', '%(Support)%');
});
return $excludedMonsters->whereNotNull('article')->whereNotNull('awakens_from')
->inRandomOrder()->first();
}
@tianvay
Copy link

tianvay commented Jun 25, 2018

Frage: Müsste es nicht andWhere heißen?
Hab grad ein Dark King Angelmon bekommen, sollte eigentlich nicht vorkommen dürfen.

@riyuk
Copy link
Author

riyuk commented Jun 25, 2018

Haste recht :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment