I have a problem when I try to create new User with User::create[] method.
I read Laravel create method this problem, but it does not help me:
Below is my User model:
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
protected $fillable = [
'name', 'email', 'password','phone','rating'
];
protected $hidden = [
'password', 'remember_token',
];
}
Here, my controller code:
public function create() {
$input = Request::all();
User::create[$input];
return $input;
}
PhpShtorm shows me this notification:
Constant create not found in ...
How can I fix it, and create new user?
User::create($input);create is not an array it is a method.