Fenos\Notifynder\Notifications\NotificationManager::entity PHP Метод

entity() публичный Метод

Set the entity for polymorphic.
public entity ( $name )
$name
    public function entity($name)
    {
        $this->entity = $name;
        return $this;
    }

Usage Example

Пример #1
0
 /** @test */
 function it_retrieve_notification_by_limiting_the_number()
 {
     $this->createMultipleNotifications();
     // set polymorphic to true
     app('config')->set('notifynder.polymorphic', true);
     $notification = $this->createNotification(['extra' => 'Amazing']);
     $notifications = $this->notification->entity($this->to['type'])->getAll($notification->to->id);
     $this->assertCount(1, $notifications);
 }