Reputation: 4282
I would like to use Laravel Searchy
github here in my RegisterController.php
using Laravel 5.4
I followed this :
Add the service provider to the providers array in Laravel's ./config/app.php
file:
TomLingham\Searchy\SearchyServiceProvider::class
Add the Alias to the aliases array in Laravel's ./config/app.php
file if you want to have quick access to it in your application:
'Searchy' => TomLingham\Searchy\Facades\Searchy::class
Class searchy does not exist
namespace App\Http\Controllers\Auth;
use Searchy;
class RegisterController extends Controller {
public function example () {
Searchy::search('companies')->fields('name')->query('test')->getQuery()->limit(1)->get();
}
}
What should I do to be able to use it ?
Upvotes: 1
Views: 286
Reputation: 5092
Add This In Top of Your File
use TomLingham\Searchy\SearchBuilder;
OR
Try This In Composer
php artisan vendor:publish
Upvotes: 1