Package Data | |
---|---|
Maintainer Username: | schulzefelix |
Maintainer Contact: | github@schulze.co (Felix Schulze) |
Package Create Date: | 2016-11-04 |
Package Last Update: | 2020-04-12 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:07:33 |
Package Statistics | |
---|---|
Total Downloads: | 73 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 3 |
Total Forks: | 1 |
Total Open Issues: | 0 |
For information about STAT Search Analytics see https://getstat.com/
This package can be installed through Composer.
$ composer require schulzefelix/laravel-stat-search-analytics
In Laravel 5.5 the package will autoregister the service provider. In Laravel 5.4 you must install this service provider.
// config/app.php
'providers' => [
...
SchulzeFelix\Stat\StatServiceProvider::class,
...
];
In Laravel 5.5 the package will autoregister the facade. In Laravel 5.4 you must install the facade manually.
// config/app.php
'aliases' => [
...
'Stat' => SchulzeFelix\Stat\StatFacade::class,
...
];
You can publish the config file of this package with this command:
php artisan vendor:publish --provider="SchulzeFelix\Stat\StatServiceProvider"
The responses of this packages are combinations of Laravel Collections, objects for each kind of data object and Carbon instances for date fields.
The list methods returns a collection of all projects.
$projects = Stat::projects()->list();
To create a project just pass the name of the project. The response will we a StatProject instance.
$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,
]
*/
To update the name of a project just pass the project ID and the new name. The response will we a StatProject instance.
$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,
]
*/
To delete a project just pass the project ID. The response the project ID.
$project = Stat::projects()->delete(615);
Please see CHANGELOG for more information what has changed recently.
$ vendor/bin/phpunit
Please see CONTRIBUTING and CONDUCT for details.
The MIT License (MIT). Please see License File for more information.