amicrud/search
Composer 安装命令:
composer require amicrud/search
包简介
Search for a method, class, or variable in the project using artisan command
README 文档
README
Search for classes, methods, variables, Blade views, and frontend UI code from an Artisan command.
Features
- Search across common Laravel and PHP project files.
- Supports Blade, PHP, JavaScript, TypeScript, Vue, CSS, JSON, YAML, Markdown, XML, and env files by default.
- Works with Inertia applications where UI code lives in
resources/js. - Excludes
vendor,storage,node_modules,.git, and generated build folders by default. - Can optionally replace matched text in all matched files.
- Built with command, action, service, and DTO layers for maintainable package code.
Installation
You can install the package via Composer. Run the following command in your Laravel project:
composer require amicrud/search
Usage
Basic Usage
php artisan amicrud:search UserController
Use quotes when searching strings with spaces:
php artisan amicrud:search 'Create Account'
Search A Specific Path
php artisan amicrud:search Dashboard --path=resources/js
Include Vendor Or Storage
php artisan amicrud:search SomeClass --vendor php artisan amicrud:search failed-job --storage
Search Specific Extensions
php artisan amicrud:search Dashboard --extensions=js,jsx,ts,tsx,vue
Replace Matches
php artisan amicrud:search oldName --replace=newName
Replacement runs once per matched file and updates every occurrence of the keyword in that file.
Testing
Run the test suite with Composer:
composer test
The tests cover searching backend PHP files, Blade views, Inertia frontend files in resources/js, excluded directories, custom extensions, and replacement behavior.
Releasing
If the latest GitHub tag is v1.1.30, the next feature release should be:
git add .gitignore README.md composer.json phpunit.xml src tests
git commit -m "Improve project search architecture"
git tag v1.2.0
git push origin main
git push origin v1.2.0
Use a patch tag such as v1.1.31 only for small bug fixes. Use a minor tag such as v1.2.0 when adding new behavior, like frontend file searching or a new test suite.
Testing
Run the test suite with Composer:
composer test
Run the suite with a text coverage report:
composer test:coverage
Publishing A Release
Create a GitHub repository, then connect and push this package:
git init git add . git commit -m "Initial release" git branch -M main git remote add origin git@github.com:YOUR_USERNAME/search.git git push -u origin main
Create and push a version tag:
git tag -a v1.0.0 -m "Release v1.0.0"
git push origin v1.0.0
For future releases, commit your changes, then create a new semantic version tag such as v1.0.1, v1.1.0, or v2.0.0.
Contributing
Contributions are welcome. Please follow these steps before opening a pull request:
- Fork the repository.
- Clone your fork locally.
- Create a new branch for your change.
- Install dependencies with Composer.
- Make your changes.
- Add or update tests for any behavior you change.
- Run the test suite.
- Open a pull request into the
mainbranch.
git clone git@github.com:YOUR_USERNAME/search.git cd search composer install git checkout -b feature/your-change composer test
Keep pull requests focused, describe what changed, and include any relevant test details.
Support
If you encounter any problems or have questions, please open an issue on the GitHub repository.
License
The AmiCrud package is open-sourced software licensed under the MIT license.
amicrud/search 适用场景与选型建议
amicrud/search 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 238 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 12 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「search」 「laravel」 「artisan」 「inertia」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 amicrud/search 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 amicrud/search 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 amicrud/search 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel package to retrieve data from Google Search Console
Indexed Search Autocomplete - Extends the TYPO3 Core Extension Indexed_Search searchform with an autocomplete feature.
Abstraction Layer to index and search entities
Pimcore 10.x Website Indexer (powered by Zend Search Lucene)
Symfony bundle for Elasticsearch integration with round-robin load balancing
A universal search system for App-UI
统计信息
- 总下载量: 238
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-29