Fenos\Notifynder\Contracts\NotificationDB::find PHP Method

find() public method

Find notification by id.
public find ( $notificationId ) : Illuminate\Database\Eloquent\Collection | Model | static
$notificationId
return Illuminate\Database\Eloquent\Collection | Illuminate\Database\Eloquent\Model | static
    public function find($notificationId);

Usage Example

 /**
  * Find a notification by ID
  *
  * @param $notification_id
  * @return NotificationModel|\Illuminate\Database\Eloquent\Model|static
  * @throws \Fenos\Notifynder\Exceptions\NotificationNotFoundException
  */
 public function find($notification_id)
 {
     $notification = $this->notifynderRepo->find($notification_id);
     if (is_null($notification)) {
         $error = "Notification Not found";
         throw new NotificationNotFoundException($error);
     }
     return $notification;
 }
All Usage Examples Of Fenos\Notifynder\Contracts\NotificationDB::find