Skip to content
This repository was archived by the owner on Jun 1, 2019. It is now read-only.

Commit 07382e8

Browse files
committed
Update README.md
1 parent aedd28d commit 07382e8

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

README.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[![License](https://poser.pugx.org/spatie/googlesearch/license.png)](https://packagist.org/packages/spatie/googlesearch)
44

5+
This package provides a very easy to use solution to log the activities of the users of your website or web application. All the activities will be logged in a db-table. Optionally the activities can also be logged against the default Laravel Log Handler.
56

67
## Installation
78

89
This package can be installed through Composer.
9-
1010
```js
1111
{
1212
"require": {
@@ -16,7 +16,6 @@ This package can be installed through Composer.
1616
```
1717

1818
This service provider must be registered.
19-
2019
```php
2120

2221
// app/config/app.php
@@ -28,15 +27,12 @@ This service provider must be registered.
2827
```
2928

3029
You'll also need to publish and run the migration in order to create the db-table.
31-
3230
```
3331
php artisan migrate:publish spatie/activitylog
3432
php artisan migrate
3533
```
3634

3735
Activitylog also comes with a facade, which provides an easy way to call it.
38-
39-
4036
```php
4137

4238
// app/config/app.php
@@ -47,29 +43,24 @@ Activitylog also comes with a facade, which provides an easy way to call it.
4743
)
4844
```
4945

46+
Optionally you can publish the config file of this package.
47+
```
48+
php artisan config:publish spatie/activitylog
49+
```
5050

51+
The configuration will be written to ```app/config/packages/spatie/activitylog```. The options provided are self explanatory.
5152

5253

5354
## Usage
5455

5556
```php
5657

57-
Geocoder::getCoordinatesForQuery('Infinite Loop 1, Cupertino');
58-
5958
/*
60-
This function returns an array with keys
61-
"lat" => 37.331741000000001
62-
"lng" => -122.0303329
63-
"accuracy" => "ROOFTOP"
59+
The log-function takes two parameters:
60+
- $text: the activity you wish to log.
61+
- $user: optional can be an user id or a user object.
62+
if not proved the id of Auth::user() will be used
63+
6464
*/
65-
```
66-
67-
The accuracy key can contain these values:
68-
- 'ROOFTOP'
69-
- 'RANGE_INTERPOLATED'
70-
- 'GEOMETRIC_CENTER'
71-
- 'APPROXIMATE'
72-
73-
You can read more information about these values [on the Google Geocoding API Page](https://developers.google.com/maps/documentation/geocoding/ "Google Geocoding API")
7465

75-
When an address is not found accuracy will contain 'NOT_FOUND'
66+
Activity::log('Some activity that you wish to log');

0 commit comments

Comments
 (0)