php - Get the specified record and filter laravel eloqouent -


below code records 'department' equal 'admin' (working):

$notification = notification::where('department', '=', "admin")->get(); 

now want records 'department' equal 'admin' while excluding records 'department' equal 'all'. ideas, clues achieve using laravel's smart eloqouent?

hope !! use and phrase in query include department = all

laravel query builder , in query


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -