Browse Source

Laravel 5 support

tags/1.0
Maxime Renou 2 years ago
parent
commit
c7cf296d98
  1. 10
      src/ConnectServiceProvider.php

10
src/ConnectServiceProvider.php

@ -3,7 +3,6 @@
namespace Bluesquare\Connect;
use Bluesquare\Connect\Commands\Sync;
use Bluesquare\Connect\View\Components\Button;
use Illuminate\Support\ServiceProvider;
class ConnectServiceProvider extends ServiceProvider
@ -54,9 +53,12 @@ class ConnectServiceProvider extends ServiceProvider
__DIR__.'/../resources/views/connect' => resource_path('views/vendor/connect'),
]);
$this->loadViewComponentsAs('connect', [
Button::class
]);
if (method_exists($this, 'loadViewComponentsAs')) {
// Laravel 7+
$this->loadViewComponentsAs('connect', [
\Bluesquare\Connect\View\Components\Button::class
]);
}
// Commands

Loading…
Cancel
Save