Laravel - 亚马逊产品 Api 包裹不工作
Laravel - Amazon Product Api package not working
在 Laravel 中,我收到以下错误,
(1/1) ReflectionException
Class App\Http\Controllers\amazonApi does not exist
AmazonController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AmazonController extends Controller
{
public function amazonApi() {
$product = Amazon::lookup('B004VLKY8M')->json();
dd($product);
}
}
web.php
Route::get('/', function () {
return view('welcome');
});
Route::get('/api','amazonApi@AmazonController');
有人可以帮忙吗?
将路线更改为:
Route::get('/api', 'AmazonController@amazonApi');
在 Laravel 中,我收到以下错误,
(1/1) ReflectionException
Class App\Http\Controllers\amazonApi does not exist
AmazonController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AmazonController extends Controller
{
public function amazonApi() {
$product = Amazon::lookup('B004VLKY8M')->json();
dd($product);
}
}
web.php
Route::get('/', function () {
return view('welcome');
});
Route::get('/api','amazonApi@AmazonController');
有人可以帮忙吗?
将路线更改为:
Route::get('/api', 'AmazonController@amazonApi');