Ich habe ein Problem, wenn ich versuche, neue Benutzer mit User::create[]
Methode zu erstellen.Laravel :: Create Methode
Ich las Laravel create method dieses Problem, aber es hat mir nicht helfen:
Unten ist mein User-Modell:
<?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',
];
}
Hier, mein Controller-Code:
public function create() {
$input = Request::all();
User::create[$input];
return $input;
}
PhpShtorm zeigt mir Diese Mitteilung:
Konstante create not found in ...
Wie kann ich es beheben und einen neuen Benutzer erstellen?
'User :: create ($ input);' erstellen ist kein Array es ein Verfahren ist. –
http://i.imgur.com/b7cGcKo.png –
@HakanSONMEZ bitte fügen Sie hinzu, was Sie in der Antwort erwähnen, weil es richtige Antwort. –