1. Go to this page and download the library: Download jamesmills/watchable library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
@if ($book->isWatched())
{{ You are watching this book }}
@else
{{ You are NOT watching this book }}
@endif
$book = Book::first();
$book->collectWatchers();
public function pause(Order $order)
{
$this->performAction('paused', $order);
Notification::send($order->collectWatchers(), new OrderPaused($order));
}