user_id = $user_id; $note->note = $note_text; $note->save(); } public static function addCapabilityNotification($capability,$note_text){ $users = get_users(array( 'capability' => $capability, )); foreach($users as $user){ Notification::addNotification($user->ID, $note_text); } } public static function getAll(){ return Notification::where('user_id',get_current_user_id())->get(); } }