Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

madprabh's avatar

Method Illuminate\Database\Schema\Blueprint::image does not exist.

For some reason I keep getting this error. Although it worked in my other laptop.

Method Illuminate\Database\Schema\Blueprint::image does not exist.

My code

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
class MaterializationController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function createSchema($asset_id, $survey_name, $SurveyDBJson, $database_connection, $schema_name)
    {
        try {
            //return $SurveyDBJson->collapse();
            $tableName=$this->getTableNameForCreation($survey_name);
            $SchemaExists=$this->checkSchemaExistence($database_connection, $schema_name);
            if (!$SchemaExists[0]->count)
            {
                $SchemaExists=$this->createPrivateSchema($database_connection, $schema_name);
            }
            $TableExists=$this->checkTableInSchemaExistence($database_connection, $tableName, $schema_name);
            if (!$TableExists[0]->count)
            {
                $TableExists=$this->createTableInSchema($database_connection, $schema_name, $tableName, $SurveyDBJson);
            }
            return $TableExists;
            return $SchemaExists;
        }
        catch (\Exception $e)
        {
            return $e->getMessage();
        }
        //
    }

Anyone know what might be happening.

0 likes
2 replies
madprabh's avatar

@sr57 Sorry I just got this fixed. The problem was I was using an invalid data type in my migration file. Thanks for looking into this though.

Please or to participate in this conversation.