Skip to content

Commit 4be3c41

Browse files
support for laravel 4 and 5
1 parent 65a5809 commit 4be3c41

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##Stream Laravel
2-
[![Build Status](https://travis-ci.org/peachepe/stream-laravel.svg?branch=master)](https://travis-ci.org/peachepe/stream-laravel)
2+
[![Build Status](https://travis-ci.org/GetStream/stream-laravel.svg?branch=master)](https://travis-ci.org/GetStream/stream-laravel)
33

44
This package helps you create activity streams & newsfeeds with Laravel and [GetStream.io](https://getstream.io).
55

src/GetStream/StreamLaravel/StreamLaravelServiceProvider.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ class StreamLaravelServiceProvider extends ServiceProvider {
1818
*/
1919
public function boot()
2020
{
21-
// $this->registerResources();
22-
23-
$this->loadViewsFrom(__DIR__.'/../../views', 'stream-laravel');
24-
25-
$this->publishes([
26-
__DIR__.'/../../config/config.php' => config_path('stream-laravel.php'),
27-
__DIR__.'/../../views' => base_path('resources/views/vendor/stream-laravel'),
28-
]);
21+
if (method_exists($this, 'publishes')) {
22+
$this->loadViewsFrom(__DIR__.'/../../views', 'stream-laravel');
23+
24+
$this->publishes([
25+
__DIR__.'/../../config/config.php' => config_path('stream-laravel.php'),
26+
__DIR__.'/../../views' => base_path('resources/views/vendor/stream-laravel'),
27+
]);
28+
} else {
29+
$this->package('get-stream/stream-laravel');
30+
}
2931
}
3032

3133
/**
@@ -36,7 +38,9 @@ public function boot()
3638
public function register()
3739
{
3840

39-
$this->registerResources();
41+
if (method_exists($this, 'publishes')) {
42+
$this->registerResources();
43+
}
4044

4145
$this->app['feed_manager'] = $this->app->share(function($app)
4246
{

0 commit comments

Comments
 (0)