3

需要一些帮助,请。

我按照教程Laravel 5.3 中的新增功能:Laravel Passport ( https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/13 ) 一步一步地操作,我遇到了这个错误:

RequestException.php 第 107 行中的 ServerException:服务器错误:POST http://latest.dev/oauth/token导致500 Internal Server Error响应:SQLSTATE [42S02]:未找到基表或视图:1146 表“consumer.oauth_clients”不存在(SQL:从 `oa 中选择 *(截断。 ..)

消费者开发者

使用 Illuminate\Http\Request;

路线::get('/', function () {

    $query = http_build_query([
        'client_id' => 4,
        'redirect_uri' => 'http://consumer.dev/callback',
        'response_type' => '代码',
        '范围' => '',
    ]);
    return redirect('http://latest.dev/oauth/authorize?'.$query);
});

Route::get('/callback', function(Request $request) {
    $http = 新的 GuzzleHttp\Client;

    $response = $http->post('http://latest.dev/oauth/token', [
        'form_params' => [
            'grant_type' => 'authorization_code',
            'client_id' => 4,
            'client_secret' => 'a8OifFPH38rMi1I6vjmV3O8XD55hAk2FG4f95j9W',
            'redirect_uri' => 'http://consumer.dev/callback',
            '代码' => $request-> 代码,
        ],
    ]);
    返回 json_decode((string) $response->getBody(), true);
});
4

1 回答 1

0

Run the following command

php artisan serve

and replace the URL links to new URLs created by the artisan serve command.
And try again - then it will work.

于 2017-02-10T17:03:43.707 回答