PHP code example of prateekbhujel / larapost

1. Go to this page and download the library: Download prateekbhujel/larapost 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/ */

    

prateekbhujel / larapost example snippets


use SocialSync\Facades\SocialMedia;

$results = SocialMedia::post()
    ->content('Release update from LaraPost')
    ->platforms(['facebook', 'twitter'])
    ->publish();

use SocialSync\Facades\SocialMedia;

$results = SocialMedia::post()
    ->content('Tomorrow morning post')
    ->platforms(['facebook'])
    ->scheduleFor(now()->addHours(12))
    ->publish();
bash
php artisan vendor:publish --tag=larapost-config
php artisan vendor:publish --tag=larapost-migrations
php artisan vendor:publish --tag=larapost-views
php artisan migrate
bash
php artisan larapost:add-account facebook
php artisan larapost:add-account twitter
php artisan larapost:add-account linkedin