Skip to content
This repository was archived by the owner on Sep 26, 2026. It is now read-only.
This repository was archived by the owner on Sep 26, 2026. It is now read-only.

Can't get Laravel 5 to recognize Bosnadev\Database\Schema\Blueprint #14

Description

@RyanSimon

I'm having an issue getting migrations to work with this package.

The problem seems to be a class loading issue, but I'm not 100% sure. Here's what my migration file looks like:

use Bosnadev\Database\Schema;
use Bosnadev\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class TestMigration extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('test', function(Blueprint $table)
        {
            $table->engine = "InnoDB";

                $table->increments('id');
            $table->uuid('public_uid');
            $table->uuid('private_uid');

            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('test');
    }
}

Here's the error I get when trying to migrate:

[ErrorException]                                                                                                                                                                              
  Argument 1 passed to TestMigration::{closure}() must be an instance of Bosnadev\Database\Schema\Blueprint, instance of Illuminate\Database\Schema\Blueprint given, called in /Users/mydir/LaravelProjects/laravel5/vendor/illuminate/database/Schema/Builder.php on line 132 and defined

I'm hoping other users, or @mirzap might be able to help me troubleshoot this issue. Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions