From b89badc34cfb2498e8ab0cf66aafac6d571ad57a Mon Sep 17 00:00:00 2001 From: barryatswisnl Date: Tue, 6 Feb 2018 12:16:46 +0100 Subject: [PATCH 1/2] add package discovery to composer.json (Laravel 5.5+) --- composer.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3a85997..8bcca43 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,6 @@ } ], "minimum-stability": "stable", - "autoload": { "psr-4": { "Swis\\LaravelFulltext\\": "src/" @@ -30,5 +29,12 @@ "psr-4": { "Tests\\": "tests/" } + }, + "extra": { + "laravel": { + "providers": [ + "Swis\\LaravelFulltext\\FulltextServiceProvider" + ] + } } } From fb2a5118dd6815df39a526532a8eb1880383edec Mon Sep 17 00:00:00 2001 From: vblinden Date: Wed, 9 May 2018 18:25:58 +0200 Subject: [PATCH 2/2] Updated README to mention you need to add service provider when on Laravel 5.4 or lower. --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3883a2f..64d3cc0 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,10 @@ This package creates a MySQL fulltext index for models and enables you to search ## Installation 1. Install with composer ``composer require swisnl/laravel-fulltext``. -2. Install service provider ``Swis\LaravelFulltext\FulltextServiceProvider::class,`` in ``config/app.php`` -3. Publish migrations and config ``php artisan vendor:publish --tag=laravel-fulltext`` -4. Migrate the database ``php artisan migrate`` +2. Publish migrations and config ``php artisan vendor:publish --tag=laravel-fulltext`` +3. Migrate the database ``php artisan migrate`` + +> Only if you are on Laravel 5.4 or lower will you need to install the service provider ``Swis\LaravelFulltext\FulltextServiceProvider::class,`` in ``config/app.php`` ## Usage