Skip to content

Commit

Permalink
support laravel 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
klgd committed Sep 2, 2017
1 parent c8bd779 commit c4c0f89
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ Via Composer
$ composer require scolib/laravel-action-log
```

After updating composer, add the ServiceProvider to the `providers` array in `config/app.php`
Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

### Laravel 5.5.*

If you don't use auto-discovery, add the ServiceProvider to the `providers` array in `config/app.php`

```php
\Sco\ActionLog\LaravelServiceProvider::class,
Expand All @@ -28,6 +32,8 @@ If you want to use the facade to logging actions, add this to the `aliases` arra
'ActionLog' => Sco\ActionLog\Facade::class,
```

## Publish config file

Copy the package config to your local config with the publish command:

```php
Expand All @@ -53,6 +59,9 @@ Override the property `$events` in your Model
];
```

> ⚠ Note: Laravel 5.5
> Renamed `$events` to `$dispatchesEvents` ([#17961](https://github.com/laravel/framework/pull/17961), [b6472bf](https://github.com/laravel/framework/commit/b6472bf6fec1af6e76604aaf3f7fed665440ac66), [3dbe12f](https://github.com/laravel/framework/commit/3dbe12f16f470e3bca868576d517d57876bc50af))
All available event

```php
Expand Down
16 changes: 12 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
}
],
"require": {
"php": "~5.6|~7.0",
"php": ">=7.0.0",
"scolib/attributes": "~1.0"
},
"require-dev": {
"laravel/framework": "^5.4",
"laravel/framework": "5.5.*",
"mockery/mockery": "^0.9.9",
"orchestra/database": "^3.4",
"orchestra/testbench": "~3.4",
"phpunit/phpunit": "^5.7||^6.0",
"phpunit/phpunit": "~6.0",
"squizlabs/php_codesniffer": "^3.0"
},
"autoload": {
Expand All @@ -45,7 +45,15 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "1.3-dev"
},
"laravel": {
"providers": [
"Sco\\ActionLog\\LaravelServiceProvider"
],
"aliases": {
"ActionLog": "Sco\\ActionLog\\Facade"
}
}
},
"suggest": {
Expand Down

0 comments on commit c4c0f89

Please sign in to comment.