【发布时间】:2016-09-05 00:51:52
【问题描述】:
我创建了一个用户模型和用户控制器
而我的模型 User.php 是
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Aws\DynamoDb\DynamoDbClient;
class User extends \Aws\DynamoDb\DynamoDbClient
{
protected $table = 'users';
protected $fillable = array('email');
protected $primaryKey = 'user_id';
}
当我在 UserController
中创建对象时public function postSignUp(Request $request)
{
$user = new User();
它说 $user = new User();(line30) 有 error
传递给 Aws\AwsClient::__construct() 的参数 1 必须是类型 数组,没有给定,调用 C:....\laravel\app\Http\Controllers\UserController.php 在第 30 行并定义
谢谢!!
【问题讨论】:
标签: php laravel amazon-web-services model controller