-3

[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();
            });
        }
Pierre-Alexandre Moller
  • 2,354
  • 1
  • 20
  • 29
Uzair Khan
  • 70
  • 3
  • 12

1 Answers1

5
$table->('userid')

This is why you get a syntax error. It should probably be $table->integer('userid').

Hkan
  • 3,243
  • 2
  • 22
  • 27