草庐IT

ingress-nginx-controller

全部标签

php - 如何将我的 Controller 移动到 Laravel 5.2 中的单独包文件夹中?

我使用Laravel5.2构建了一个小型应用程序。我将所有文件放入名为Surveys的文件夹中,该文件夹位于App/Modules/Sur​​veys。“不用担心,我打算将模块移出App文件夹,我只需要让Controller正常工作”目前我的Controller位于App/Http/Controllers/Sur​​veysController我想移动我的Controller文件夹,使其位于App/Modules/Sur​​veys/Controllers/Frontend/SurveysController我如何告诉Laravel将Controller解析出此路径App/Module

php - 作业类不接受从 laravel 中的 Controller 发送的参数

错误:显示App\Jobs\ReorderDatabase::handle()缺少参数1,我需要从Controller传递变量,我不需要使用模型,所以我应该如何进行。我的Controller功能代码在这里publicfunctionpostData(Request$request){$updateRecordsArray=Input::get('order');$this->dispatch(newReorderDatabase($updateRecordsArray));returnResponse::json('Okay');}我的工作RecorderDatabase工作代码是wh

php - 从 laravel 4.2 Controller 运行 Artisan 命令

我正在尝试从Controller执行一些自定义artisan命令,例如Artisan::call('phpartisanMyCustomCommand');但是当我执行的时候它工作正常来自CLI的phpartisanMuCustomCommand。我已经在app/start/artisan.php中注册了命令。甚至Artisan::call('phpartisan--help');也不工作。 最佳答案 你应该从你的Controller运行这样的artisan命令。示例:Artisan::call('migrate:install')

php - nginx 本地网络服务器的所有权和权限

我在设置本地nginx环境时遇到问题。我已经在网上阅读了无数的教程,所有内容似乎都让我的大脑有些困惑。操作系统:OSX10.11.4ElCapitanNginx:1.8.1PHP-FPM:5.5.31目前我的web根目录下的文件目录如下:/webserver/webverver/phpinfo.php/webserver/example/webserver/example/index.php我可以使用curl或在访问localhost的Web浏览器中访问默认的“欢迎使用Nginx”页面。如果我然后浏览我得到文件的索引,但PHP文件将尝试下载而不是执行。如果我尝试访问我在local.ex

php - 添加从 $ 到 $.php 的重写后 nginx CSS 中断

如果我将以下行添加到我的nginx配置中,它将破坏我的网站并且将在没有CSS的情况下运行:location~*^.+.(jpg|jpeg|gif|css|png|js|ico|svg|xml)${access_logoff;expires30d;}location/{try_files$uri$uri/$uri.php=404;rewrite^/(.+)$/$1.phplast;}location~\.php${fastcgi_split_path_info^(.+\.php)(/.+)$;fastcgi_passunix:/var/run/php5-fpm.sock;fastcgi_

php - TYPO3 中的 FlexForm 未显示可切换 Controller 操作中的元素

我无法确定我的可切换Controller操作有什么问题。我正在使用TYPO3v7.6.10extensionkey/Configuration/TCA/Overrides/tt_content.php中的条目:$pluginSignature='simpleblog_bloglisting';$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature]='pi_flexform';\TYPO3\CMS\Core\Utility\ExtensionManagementUtility

php - 在 View laravel 中从 Controller 调用函数

这实际上是一件简单的事情,但由于我是laravel的新手,这让我很麻烦,我有这个功能classHomeControllerextendsController{public$layout='layouts.master';publicfunction__construct(){$this->middleware('auth');}publicfunctionindex(){returnview('landing-page')->with('title','LandingPage')->with('users',User::member()->get());}publicfunctiong

php - getUrlRules - 切换到 Controller

我有一个SearchModule.php具有以下内容:classSearchModuleextendsCWebModule{//functioninit(){}/***@returnarrayПравилароутингадлятекущегомодуля*/functiongetUrlRules(){$customController=(Yii::app()->theme->getName()=='test'?'Test':'').'';returnarray($this->id.'///'=>$this->id.'/'.$customController.'/',$this->id

php - 如何从 PHP 禁用 nginx gzip?

我很想阻止nginx压缩单个PHP请求。我已经有以下内容:@ini_set('zlib.output_compression','Off');@ini_set('implicit_flush',1);header('X-Accel-Buffering:no');根据我所发现的一切,单独使用X-Accel-Buffering应该禁用gzip,但是当我从浏览器加载此页面时,我仍然可以看到标题:Content-Encoding:gzip我正在使用php7-fpm、nginx1.10.1、debian8编辑:我用sleep()做了一个延迟输出的测试。它看起来像header('X-Accel-B

php - Laravel:如何在 Controller 方法执行后重定向

web.php:Route::post('caption/{id}/delete','DetailController@deleteCaption');DetailController.php:publicfunctiondeleteCaption(Request$request,$id){$caption=Caption::findOrFail($id);$caption->delete();//doesn'tdeletepermanentlyreturnresponse(204);}admin.blade.php:id}}'>{{$caption->content}}id}}/de