PHP code example of schulzefelix / laravel-stat-search-analytics
1. Go to this page and download the library: Download schulzefelix/laravel-stat-search-analytics 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/ */
schulzefelix / laravel-stat-search-analytics example snippets
// config/app.php
'providers' => [
...
SchulzeFelix\Stat\StatServiceProvider::class,
...
];
// config/app.php
'aliases' => [
...
'Stat' => SchulzeFelix\Stat\StatFacade::class,
...
];
bash
php artisan vendor:publish --provider="SchulzeFelix\Stat\StatServiceProvider"
php
$projects = Stat::projects()->list();
php
$project = Stat::projects()->create('Cheese Cake Factory');
$project->toArray();
/*
[
'id' => 615,
'name' => 'Cheese Cake Factory',
'total_sites' => 0,
'created_at' => 2016-11-01,
'updated_at' => 2016-11-01,
]
*/
php
$project = Stat::projects()->update(615, 'Cheese Cake Bakery');
$project->toArray();
/*
[
'id' => 615,
'name' => 'Cheese Cake Bakery',
'total_sites' => 5,
'created_at' => 2016-11-01,
'updated_at' => 2016-11-03,
]
*/
php
$project = Stat::projects()->delete(615);