Laravel 5 support

This commit is contained in:
Maxime Renou 2020-05-13 13:15:20 +02:00
parent 771be10e9a
commit c7cf296d98
1 changed files with 6 additions and 4 deletions

View File

@ -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'),
]);
if (method_exists($this, 'loadViewComponentsAs')) {
// Laravel 7+
$this->loadViewComponentsAs('connect', [
Button::class
\Bluesquare\Connect\View\Components\Button::class
]);
}
// Commands