Level 51
You must write
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, when I excute to create my database on CLI php artisan migrate in laravel 5.2 it generate following error on my CLI.
[Error Exception]
The use statement with non-compound name ' IluminateDatabaseShemaBlueprint ' has no effect
one of my table here
<?php
use IlluminateDatabaseSchemaBlueprint;
use IlluminateDatabaseMigrationsMigration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id')->unsigned();
$table->string('username')->unique();
$table->string('email')->unique();
$table->string('password');
$table->string('first_name')->nullable();
$table->string('last_name')->nullable();
$table->string('avatar_url')->nullable()->default(NULL);
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
You must write
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
Please or to participate in this conversation.