PHP code example of marshmallow / statistics-numerics
1. Go to this page and download the library: Download marshmallow/statistics-numerics 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/ */
marshmallow / statistics-numerics example snippets
php artisan statistics:install
namespace App\Http\Controllers;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Marshmallow\Statistics\Http\Statistics\Controllers\StatisticsController as StatisticsBaseController;
class MyOwnStatisticsController extends StatisticsBaseController
{
public function salesToday ()
{
return (new \Marshmallow\Statistics\Statistics\Number)->title('Verkoop vandaag')
->color('green')
->value(Orders::get()->count());
}
}