PHP code example of claraleigh / autotweet-for-laravel
1. Go to this page and download the library: Download claraleigh/autotweet-for-laravel 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/ */
claraleigh / autotweet-for-laravel example snippets
public function via(object $notifiable): array
{
return [TwitterChannel::class];
}
public function toTwitter($notifiable): TwitterMessage
{
$post = (new TwitterStatusUpdate(
__('Come see visit profile :url ❤️', ['url' => 'https://google.com/'])
));
// Optional: Add an image to the tweet
$post->withImage('path/to/image.jpg');
return $post;
}