Undefined syntax 'string' in RealTimeMessage and RealTimeNotification class.
The error was shown every time I tried to tinker the message. So, I removed the type 'string' from $message variable. And It worked perfectly.
Both class were like this after editing,
class RealTimeMessage implements ShouldBroadcast
{
use SerializesModels;
public $message;
public function __construct($message)
{
$this->message = $message;
}
and
class RealTimeNotification extends Notification implements ShouldBroadcast
{
use Queueable;
public $message;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($message)
{
$this->message = $message;
}
You did an amazing job. Thank you so much for the easiest tutorial possible.
Undefined syntax 'string' in RealTimeMessage and RealTimeNotification class.
The error was shown every time I tried to tinker the message. So, I removed the type 'string' from $message variable. And It worked perfectly.
Both class were like this after editing,
and
You did an amazing job. Thank you so much for the easiest tutorial possible.