我已经下载了peak,对它进行了配置,并将其推送到了我的vps服务器中。当我执行“composer update”时,会显示以下消息:
Illumb\Foundation\Composer脚本::postUpdate php artisan optimize php致命错误:调用/var/www/html/app/Http/routes中未定义的函数get()。php在线3
[Symfony\Component\Debug\Exception\FatalErrorException]调用未定义的函数get()
脚本php artisan optimize处理返回的更新后cmd事件,错误代码为255
这是我的EventServiceProvider和RouteServiceProvider:
<?php
namespace App\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use
Illuminate\Foundation\Support\Providers\EventServiceProvider as
ServiceProvider;
class EventServiceProvider extends ServiceProvider {
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'new.game' => [
'App\Handlers\Events\NewGameHandler',
],
];
/**
* Register any other events for your application.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/ public function boot()
{
parent::boot();
}
}
<?php
namespace App\Providers;
use Illuminate\Routing\Router; use
Illuminate\Foundation\Support\Providers\RouteServiceProvider as
ServiceProvider;
class RouteServiceProvider extends ServiceProvider {
/**
* This namespace is applied to the controller routes in your routes file.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/ public function boot()
{
parent::boot();
}
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
{
$router->group(['namespace' => $this->namespace], function ($router) {
require app_path('Http/routes.php');
});
}
}
我如何安装这个网站与工匠?
而不是
Route::group(['middleware' => 'auth'], function () {
post('/addplaceloot', ['as' => 'addplaceloot', 'uses' => 'LootController@addplaceloot']);
get('/myloothistory', ['as' => 'loot.myhistoryloot', 'uses' => 'LootController@myhistoryloots']);
get('/deposit', ['as' => 'deposit', 'uses' => 'GameController@deposit']);
});
试试看
Route::group(['middleware' => 'auth'], function () {
Route::post('/addplaceloot', ['as' => 'addplaceloot', 'uses' => 'LootController@addplaceloot']);
Route::get('/myloothistory', ['as' => 'loot.myhistoryloot', 'uses' => 'LootController@myhistoryloots']);
Route::get('/deposit', ['as' => 'deposit', 'uses' => 'GameController@deposit']);
});
这是我的路线。php
get('/login', ['as' => 'login', 'uses' => 'SteamController@login']);
get('/', ['as' => 'index', 'uses' => 'GameController@currentGame']);
get('/about', ['as' => 'about', 'uses' => 'PagesController@about']);
get('/history', ['as' => 'history', 'uses' => 'PagesController@history']);
get('/store', ['as' => 'store', 'uses' => 'PagesController@store']);
get('/top', ['as' => 'top', 'uses' => 'PagesController@top']);
get('/game/{game}', ['as' => 'game', 'uses' => 'PagesController@game']);
get('/loot/{loot}', ['as' => 'loot', 'uses' => 'LootController@lootgame']);
get('/donate', 'DonateController@GDonateDonate');
post('ajax', ['as' => 'ajax', 'uses' => 'AjaxController@parseAction']);
get('/chat', ['as' => 'chat', 'uses' => 'ChatController@getchat']);
get('/pay', ['as' => 'pay', 'uses' => 'PagesController@pay']);
get('/statuspay', ['as' => 'statuspay', 'uses' => 'PagesController@statuspay']);
get('/fail', ['as' => 'fail', 'uses' => 'PagesController@fail']);
get('/loot', ['as' => 'loot', 'uses' => 'LootController@listloot']);
get('/newloot', ['as' => 'newloot', 'uses' => 'LootController@newloot']);
post('/online', 'online@onlineadd');
get('/get_giveaway_users', ['as' => 'get_giveaway_users', 'uses' => 'GiveawayController@get_giveaway_users']);
get('/get_giveaway_count', ['as' => 'get_giveaway_count', 'uses' => 'GiveawayController@get_giveaway_count']);
get('/giveaway', ['as' => 'giveaway', 'uses' => 'PagesController@giveaway']);
get('/loothistory', ['as' => 'loot.historyloot', 'uses' => 'LootController@historyloots']);
get('/testim', ['as' => 'addplaceloot', 'uses' => 'LootController@addplaceloot']);
get('/testim2', ['as' => 'addplaceloot', 'uses' => 'LootController@newloot']);
get('/getloot/{loot}', ['as' => 'getloot', 'uses' => 'LootController@getloot']);
//get('/resetloottest', ['as' => 'resetloottest', 'uses' => 'LootController@resetloottest']);
get('/getlootuser/{loot}', ['as' => 'getlootuser', 'uses' => 'LootController@getlootuser']);
Route::group(['middleware' => 'auth'], function () {
post('/addplaceloot', ['as' => 'addplaceloot', 'uses' => 'LootController@addplaceloot']);
get('/myloothistory', ['as' => 'loot.myhistoryloot', 'uses' => 'LootController@myhistoryloots']);
get('/deposit', ['as' => 'deposit', 'uses' => 'GameController@deposit']);
get('/deposit_client', ['as' => 'deposit_client', 'uses' => 'GameController@deposit_client']);
get('/profile/{user}', ['as' => 'profile', 'uses' => 'PagesController@user']);
get('/settings', ['as' => 'settings', 'uses' => 'PagesController@settings']);
post('/settings/save', ['as' => 'settings.update', 'uses' => 'SteamController@updateSettings']);
post('/add_message', ['as' => 'chat', 'uses' => 'ChatController@add_message']);
post('/delete_message', ['as' => 'chat', 'uses' => 'ChatController@delete_message']);
post('/ban_user', ['as' => 'chat', 'uses' => 'ChatController@ban_user']);
get('/winner', ['as' => 'admin', 'uses' => 'admin@winner', 'middleware' => 'access:admin']);
get('/givemoney', ['as' => 'admin', 'uses' => 'admin@givemoney', 'middleware' => 'access:admin']);
get('/myhistory', ['as' => 'myhistory', 'uses' => 'PagesController@myhistory']);
get('/myinventory', ['as' => 'myinventory', 'uses' => 'PagesController@myinventory']);
post('/myinventory', ['as' => 'myinventory', 'uses' => 'PagesController@myinventory']);
post('/shop/buy', ['as' => 'shop.buy', 'uses' => 'ShopController@buyItem']);
get('/shop', ['as' => 'shop', 'uses' => 'ShopController@index']);
get('/shop/history', ['as' => 'shop.history', 'uses' => 'ShopController@history']);
get('/shop/admin', ['as' => 'shop.admin', 'uses' => 'ShopController@admin', 'middleware' => 'access:admin']);
get('/logout', ['as' => 'logout', 'uses' => 'SteamController@logout']);
post('/addTicket', ['as' => 'add.ticket', 'uses' => 'GameController@addTicket']);
post('/getBalance', ['as' => 'get.balance', 'uses' => 'GameController@getBalance']);
get('/api/addusers', ['as' => 'addusers', 'uses' => 'GiveawayController@addusers']);
get('/support', ['as' => 'support.index', 'uses' => 'SupportController@support']);
get('/support/{ticket}', ['as' => 'ticket', 'uses' => 'SupportController@ticket']);
});
Route::group(['prefix' => 'api', 'middleware' => 'secretKey'], function () {
//get('/newBet', 'GameController@newBet');
get('/online', 'online@online');
get('/lastwinner', 'GameController@lastwinner');
get('/checkOffer', 'GameController@checkOffer');
get('/newBet', 'GameController@newBet');
post('/setGameStatus', 'GameController@setGameStatus');
post('/setPrizeStatus', 'GameController@setPrizeStatus');
post('/getCurrentGame', 'GameController@getCurrentGame');
post('/haventescrow', 'GameController@haventescrow');
post('/getWinners', 'GameController@getWinners');
post('/getPreviousWinner', 'GameController@getPreviousWinner');
post('/newGame', 'GameController@newGame');
get('/shop/newItems', 'ShopController@addItemsToSale');
post('/shop/setItemStatus', 'ShopController@setItemStatus');
get('/loot/newItems', 'LootController@newloot');
post('/loot/setItemStatus', 'LootController@setLootStatus');
});
我正在学习Laravel教程,遇到了一个“调用未定义函数”错误。到目前为止,我有20个测试和28个断言,只有这个测试失败。我找不到我的打字错误。请告诉我我还需要添加哪些源代码。我是拉雷维尔的新手。 一定是打错了,但我找不到。 ReadThreadsTest.php web.php Channel.php ThreadController.php Thread.php
问题内容: 当我要实现Authorize.net付款网关时。但是,我收到此错误: 调用未定义的函数curl_init() 请让我知道其中有什么问题。 问题答案: 如果您使用的是Windows: 转到您的php.ini文件,并从以下行的开头删除标记: 保存文件后, 必须 重新启动HTTP服务器软件(例如Apache),然后才能生效。 对于Ubuntu 13.0及更高版本,只需使用已解包的软件包。在终
问题内容: 我刚刚将脚本切换到其他服务器。在以前的服务器上,它可以完美地工作,现在,我将它们切换到其他服务器上,我无法理解问题。 我不确定是否有帮助,但这是相关的代码。 PHP版本是:PHP 5.3.2 问题答案: 从文档开始,在PHP 5.4.0发行之前: 仅当PHP作为Apache模块安装时才支持此功能。 PHP 5.4.0和更高版本无条件支持此功能。 所述文档还包括替换功能,这些功能通过逐步
我正在OSX El Capitan和Apache服务器上运行最新版本的PHP(目前为5.6.22)。 我正在尝试使用PostgreSQL数据库,实际上,昨天已经成功了,但在我重写了httpd之后。conf文件和默认文件(我想这就是问题所在)我收到了以下消息: 调用中未定义的函数pg_connect()。。。 问题是我没有改变php。ini文件。如果我运行phpinfo();我得到了etc/php。
我对->有问题(例如) 我的代码: 浏览器错误: 错误:在第11行调用/applications/mamp/htdocs/bootstrap/pagination.php中未定义的函数mysqli_result()
我正在尝试将一个Laravel5.7项目转换为8,仍在调试,但无法解决这个特殊问题。 当我运行该项目时,出现“调用未定义函数App\Http\Controllers\get\u option()”错误。 我试过: 将helpers.php位置提供程序更改为控制器 这是App\Http\Controllers\MainpageController中的错误源: 这是app/Providers/help