Rapport-Laravel/app/Widgets/VivaCompatitionSchedule.php

28 lines
691 B
PHP

<?php
namespace App\Widgets;
use Arrilot\Widgets\AbstractWidget;
use App\Http\Requests\LambdaRequest;
class VivaCompatitionSchedule extends AbstractWidget
{
/**
* The configuration array.
*
* @var array
*/
protected $config = [];
/**
* Treat this method as a controller action.
* Return view() or other content to display.
*/
public function run()
{
$response = LambdaRequest::signedrequest('get', 'competition', 'contest/list' );
//echo '<pre>'; print_r($response); exit;
return view('widgets.viva_compatition_schedule', ['title' => $this->config['title'], 'schedules' => $response->data->items] );
}
}