1 Star 2 Fork 0

ivone/laravel-n2search

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
N2SearchProvider.php 959 Bytes
一键复制 编辑 原始数据 按行查看 历史
ivone 提交于 2022-07-08 10:57 +08:00 . * update Job
<?php
/**
* Desc:
* Author: Ivone <i@ivone.me>
* Date: 2022/6/29
* Time: 14:18
*/
namespace N2Search;
use Illuminate\Support\ServiceProvider;
class N2SearchProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
// 发布配置文件
$this->publishes([
__DIR__.'/../config/N2Search.php' => config_path('N2Search.php'),
]);
$this->app->singleton(JiebaTokenizer::class, config("N2Search.php"));
}
/**
* Register the application services.
*/
public function register()
{
// Automatically apply the package configuration
$this->mergeConfigFrom(__DIR__.'/../config/N2Search.php', 'N2Search');
$this->app->singleton(N2Search::class, function () {
return new N2Search(config('N2Search'));
});
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/ivonee/laravel-n2search.git
git@gitee.com:ivonee/laravel-n2search.git
ivonee
laravel-n2search
laravel-n2search
master

搜索帮助