は、すべての指示に従っ... https://laravel.com/docs/5.3/upgrade#upgrade-5.3.0- ルートの問題:: 5.1から5.3にアップグレードする接頭辞
は今、私は
BadMethodCallException in Macroable.php line 74:
Method prefix does not exist.
in Macroable.php line 74
at Router->__call('prefix', array('api')) in Facade.php line 237
at Facade::__callStatic('prefix', array('api')) in RouteServiceProvider.php line 58
at RouteServiceProvider->mapApiRoutes() in RouteServiceProvider.php line 32
at RouteServiceProvider->map()
at call_user_func_array(array(object(RouteServiceProvider), 'map'), array()) in Container.php line 508
at Container->call(array(object(RouteServiceProvider), 'map')) in RouteServiceProvider.php line 69
at RouteServiceProvider->loadRoutes() in RouteServiceProvider.php line 30
at RouteServiceProvider->boot() in RouteServiceProvider.php line 23
at RouteServiceProvider->boot()
at call_user_func_array(array(object(RouteServiceProvider), 'boot'), array()) in Container.php line 508
at Container->call(array(object(RouteServiceProvider), 'boot')) in Application.php line 769
at Application->bootProvider(object(RouteServiceProvider)) in Application.php line 752
at Application->Illuminate\Foundation\{closure}(object(RouteServiceProvider), '16')
at array_walk(array(object(EventServiceProvider), object(RoutingServiceProvider), object(AuthServiceProvider), object(CookieServiceProvider), object(DatabaseServiceProvider), object(EncryptionServiceProvider), object(FilesystemServiceProvider), object(FoundationServiceProvider), object(PaginationServiceProvider), object(SessionServiceProvider), object(ViewServiceProvider), object(NotificationServiceProvider), object(AppServiceProvider), object(AuthServiceProvider), object(ConfigServiceProvider), object(EventServiceProvider), object(RouteServiceProvider), object(DatabaseServiceProvider), object(BraintreeServiceProvider), object(BroadcastServiceProvider), object(FlashServiceProvider), object(ExcelServiceProvider), object(CashierServiceProvider), object(EntrustServiceProvider), object(AnalyticsServiceProvider), object(JWTAuthServiceProvider), object(ApidocsServiceProvider), object(ServiceProvider), object(GeoIPServiceProvider), object(PdfServiceProvider), object(LaravelPhoneServiceProvider)), object(Closure)) in Application.php line 753
at Application->boot() in BootProviders.php line 17
at BootProviders->bootstrap(object(Application)) in Application.php line 203
at Application->bootstrapWith(array('Illuminate\Foundation\Bootstrap\DetectEnvironment', 'Illuminate\Foundation\Bootstrap\LoadConfiguration', 'Illuminate\Foundation\Bootstrap\ConfigureLogging', 'Illuminate\Foundation\Bootstrap\HandleExceptions', 'Illuminate\Foundation\Bootstrap\RegisterFacades', 'Illuminate\Foundation\Bootstrap\RegisterProviders', 'Illuminate\Foundation\Bootstrap\BootProviders')) in Kernel.php line 254
at Kernel->bootstrap() in Kernel.php line 145
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117
at Kernel->handle(object(Request)) in index.php line 52
- を取得しています作曲・ダンプを実行しました-autoload
- 作曲家の更新を実行しました(最新のものから最大のものを取得するだけです)
- 他に何ができますか?
RouteServiceProviderのコードは、laravelの正確なコピーです。 なぜロードされていないのか分かりません!メソッドは認識されませんが、私はそれをルータクラスで見ることができます。
{ "名前": "laravel/laravel"、 "説明": "Laravelフレームワーク"、 "キーワード": "フレームワーク"、 "laravel"]、 "ライセンス":「MIT " "タイプ": "プロジェクト"、 "必要":{ "laravel /フレームワーク": " 5.3 "、 "laravelcollective/htmlの": "〜5.0"、 "laracasts /フラッシュ":" 〜1.3 "、 " maatwebsite/excel ":"〜2.1 "、 " guzzlehttp/guzzle ":"〜6.2 "、 " doctrine/dbal ":"〜2.5 "、 " laravel/cashier ":"〜7.0 "、 " league/flysystem-aws 「barrivdh/laravel-ide-helper」:「^ 2.2」、 「blueimp/jquery-file-upload」:「-s3-v3」:「〜1.0」、 「zizaco/entrust」:「1.7.0」、 「barryvdh/: "^ 9.14"、 "ipunkt/laravel-analytics": "^ 1.3"、 "braintree/braintree_php": "^ 3.21"、 "tymon/jwt-auth": "0.5。 " "f2m2/apidocs": "〜2.0"、 "barryvdh/laravel-CORS": "0.8 *"、 "pulkitjalan/geoipの。": "〜2.4"、 " AWS/AWS-sdk- php-laravel ":"^3.1 "、 " vsmoraes/laravel-pdf ":"^1.0 "、 " propaganistas/laravel-phone ":"^2.8 "、 " activecampaign/api-php ":"〜2.0 " }、 "-DEV必要":{ "はPHPUnit/PHPUnitの": "〜4.0"、 "PHPSpecの/ PHPSpecの": "〜2.1"、 "ozankurt/repoist": "^ 1.0"、 " symfony/dom-crawler ":"〜3.1 "、 " symfony/css-selector ":"〜3.1 " }、 " autoload ":{ "クラスマップ":[ "データベース" ]、 "PSR-4":{ "APP \": "アプリケーション/" } }、 "オートロード-DEV":{ "クラスマップ":[ "テスト/ TestCase.php" ] }、 "スクリプト":{ "ポストルートパッケージをインストール":[ "PHPの-rの\" file_exists( 'ENV')||コピー( '。env.example'、 '。ENV '); \ "" ]、 "ポスト作成プロジェクト-CMD":[ "PHPの職人キー:インストール後-CMD" は、 ]を "生成":[ 「を照らし\財団\ ComposerScripts ::ポストインストール " "PHPの職人最適化" ]、 "更新後-CMD":[ "を照らし\ファンデーション\ ComposerScripts :: postUpdate"、 "PHPの職人最適化" ] }、 " コンフィグ":{ " preferred-install ":" dist " } }
RouteServiceProvider
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* 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.
*
* @return void
*/
public function boot()
{
//
parent::boot();
}
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}
iはプレフィックスとミドルウェアの呼び出しをスワップして、このエラーを得た別のテスト...
SWAPPED ORDER
protected function mapApiRoutes()
{
Route::middleware('api')->prefix('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
ERROR
FatalThrowableError in Router.php line 859:
Type error: Too few arguments to function Illuminate\Routing\Router::middleware(), 1 passed in /var/www/vhosts/camp-native/API-v.2-master/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 237 and exactly 2 expected
in Router.php line 859
at Router->middleware('api') in Facade.php line 237
at Facade::__callStatic('middleware', array('api')) in RouteServiceProvider.php line 58
at RouteServiceProvider->mapApiRoutes() in RouteServiceProvider.php line 32
at RouteServiceProvider->map()
at call_user_func_array(array(object(RouteServiceProvider), 'map'), array()) in Container.php line 508
at Container->call(array(object(RouteServiceProvider), 'map')) in RouteServiceProvider.php line 69
at RouteServiceProvider->loadRoutes() in RouteServiceProvider.php line 30
at RouteServiceProvider->boot() in RouteServiceProvider.php line 23
at RouteServiceProvider->boot()
at call_user_func_array(array(object(RouteServiceProvider), 'boot'), array()) in Container.php line 508
at Container->call(array(object(RouteServiceProvider), 'boot')) in Application.php line 769
at Application->bootProvider(object(RouteServiceProvider)) in Application.php line 752
at Application->Illuminate\Foundation\{closure}(object(RouteServiceProvider), '16')
at array_walk(array(object(EventServiceProvider), object(RoutingServiceProvider), object(AuthServiceProvider), object(CookieServiceProvider), object(DatabaseServiceProvider), object(EncryptionServiceProvider), object(FilesystemServiceProvider), object(FoundationServiceProvider), object(PaginationServiceProvider), object(SessionServiceProvider), object(ViewServiceProvider), object(NotificationServiceProvider), object(AppServiceProvider), object(AuthServiceProvider), object(ConfigServiceProvider), object(EventServiceProvider), object(RouteServiceProvider), object(DatabaseServiceProvider), object(BraintreeServiceProvider), object(BroadcastServiceProvider), object(FlashServiceProvider), object(ExcelServiceProvider), object(CashierServiceProvider), object(EntrustServiceProvider), object(AnalyticsServiceProvider), object(JWTAuthServiceProvider), object(ApidocsServiceProvider), object(ServiceProvider), object(GeoIPServiceProvider), object(PdfServiceProvider), object(LaravelPhoneServiceProvider)), object(Closure)) in Application.php line 753
at Application->boot() in BootProviders.php line 17
at BootProviders->bootstrap(object(Application)) in Application.php line 203
at Application->bootstrapWith(array('Illuminate\Foundation\Bootstrap\DetectEnvironment', 'Illuminate\Foundation\Bootstrap\LoadConfiguration', 'Illuminate\Foundation\Bootstrap\ConfigureLogging', 'Illuminate\Foundation\Bootstrap\HandleExceptions', 'Illuminate\Foundation\Bootstrap\RegisterFacades', 'Illuminate\Foundation\Bootstrap\RegisterProviders', 'Illuminate\Foundation\Bootstrap\BootProviders')) in Kernel.php line 254
at Kernel->bootstrap() in Kernel.php line 145
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117
at Kernel->handle(object(Request)) in index.php line 52
私は今もまったく同じ問題に直面していますが、私は5.1から5.2にアップグレードしましたが、少しのパッチでうまくいきました。その後5.3にアップグレードしなければなりませんでした。 。あなたのためにどんな運? – BlackBurn027