PHP code example of bavirtual / laravel-ipboardapi
1. Go to this page and download the library: Download bavirtual/laravel-ipboardapi 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/ */
bavirtual / laravel-ipboardapi example snippets
namespace App\Console\Commands;
use Illuminate\Console\Command;
use BAVirtual\IPBoardApi\LaravelIPB;
class UpdateNews extends Command
{
protected $laravelIpb;
public function __construct(LaravelIPB $laravelIpb)
{
$this->laravelIpb = $laravelIpb;
parent::__construct();
}
public function handle()
{
$request = [
'forums' => 24,
'sortBy' => 'date',
'sortDir' => 'desc'
];
$announcements = $this->laravelIpb->getTopics($request);
...
}
}