承接 laravel-enso/searchable 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laravel-enso/searchable

Composer 安装命令:

composer require laravel-enso/searchable

包简介

Global searchable registry for Laravel Enso

README 文档

README

License Stable Downloads PHP Issues Merge Requests

Description

Searchable provides the global command-palette style search registry used by Laravel Enso.

The package exposes a single search endpoint, a facade-backed registry for searchable models, and a finder service that resolves results according to configured attributes, scopes, permissions, and optional Scout providers.

It is intended for Enso applications that need cross-module quick search with permission-aware routes and grouped results.

Installation

Install the package:

composer require laravel-enso/searchable

Run the package migrations:

php artisan migrate

Optional publishes:

php artisan vendor:publish --tag=searchable-config
php artisan vendor:publish --tag=searchable-factories

Features

  • Global api/core/searchable/index endpoint.
  • Facade-backed searchable model registry.
  • Finder service that supports local query matching or Scout search providers.
  • Permission-filtered route actions based on the authenticated user's role.
  • Support for route params, custom labels, scopes, permission groups, and nested relation attributes.

Usage

Register searchable models from any package by extending the package search service provider:

public $register = [
    Product::class => [
        'group' => 'Product',
        'attributes' => ['name', 'internal_code', 'part_number'],
        'label' => 'internal_code',
        'permissionGroup' => 'products',
    ],
];

The finder returns grouped results with resolved route params and only the route actions the current user is allowed to execute.

API

HTTP routes

  • GET api/core/searchable/index

Core services

  • LaravelEnso\\Searchable\\Services\\Search
  • LaravelEnso\\Searchable\\Services\\Finder

Behavior:

  • stores registered searchable model definitions
  • executes Scout search when searchProvider is configured
  • otherwise executes filter-based database search
  • filters available actions by role permissions

Depends On

Required Enso packages:

Contributions

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

统计信息

  • 总下载量: 51.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固