2017-10-18 54 views
0

我想在Laravel 5.5中整合vinkla/instagram。Vinkla Instagram在Laravel 5.5和顯示一些錯誤

我使用的PHP版本是7.0。

但它顯示出一些錯誤。我嘗試以下步驟:


1.Run composer require vinkla/instagram

2.Added服務提供商config/app.php

Vinkla\Instagram\InstagramServiceProvider::class 

3.Added到config/app.php別名

'Instagram' => Vinkla\Instagram\Facades\Instagram::class 

當我運行一些命令(php artisan vendor:publishcomposer dump-autoloadphp artisan config:clearphp artisan cache:clear),它顯示了以下錯誤: enter image description here

Class 'Vinkla\Instagram\InstagramServiceProvider' not found. 

我該如何解決呢?謝謝。

回答

0

我看着vinkla/instagram包,我沒有看到最新的幾個版本的InstagramServiceProvider(此時的最新版本是7.0.0

InstagramServiceProvider文件(支持Laravel)

最新版本爲4.2.0

您可以通過運行

composer require vinkla/instagram:4.2.0


安裝該版本

更新:

我與7.0.0版本的vinkla/instagram

composer require vinkla/instagram 

測試,這將使你的Instagram用戶 「傑裏·賽恩菲爾德」 飼料

Route::get('instagram', function(Request $request) { 
    // Create a new instagram instance. 
    $instagram = new \Vinkla\Instagram\Instagram(); 

    // Fetch the media feed. 
    $feed  = $instagram->get('jerryseinfeld'); 

    // return json 
    return $feed; 
}); 

隨着7.0.0版,你需要刪除

服務提供商

Vinkla\Instagram\InstagramServiceProvider::class 

和別名

'Instagram' => Vinkla\Instagram\Facades\Instagram::class 

config/app.php

0

請注意:由於版本8.0.0公共提要取出Link