[Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected '(', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'
Here is my code
public function up()
{
Schema::create('profile', function (Blueprint $table) {
$table->('userid')->unsigned()->default(0);
$table->string('profile')->default('http://localhost/laravel/public/image/uzair.jpg');
$table->string('about',255);
$table->foreign('userid')->references('id')->on('users')->onDelete('cascade');
$table->timestamps();
});
}
$table->('userid')
This is why you get a syntax error. It should probably be $table->integer('userid')
.