artkonekt / user

MIT License
2 stars 5 forks source link

BadMethodCallException : Method Illuminate\Database\Schema\Blueprint::intOrBigIntBasedOnRelated does not exist. #2

Closed tonyjaimep closed 5 years ago

tonyjaimep commented 5 years ago

Following the vanillo installation guide, when running php artisan migrate I came across this error:

   BadMethodCallException  : Method Illuminate\Database\Schema\Blueprint::intOrBigIntBasedOnRelated does not exist.

  at <project_dir>/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php:102
     98|      */
     99|     public function __call($method, $parameters)
    100|     {
    101|         if (! static::hasMacro($method)) {
  > 102|             throw new BadMethodCallException(sprintf(
    103|                 'Method %s::%s does not exist.', static::class, $method
    104|             ));
    105|         }
    106| 

  Exception trace:

  1   Illuminate\Database\Schema\Blueprint::__call("intOrBigIntBasedOnRelated")
      <project_dir>/vendor/konekt/user/src/resources/database/migrations/2016_12_18_121118_create_profiles_table.php:17

  2   CreateProfilesTable::{closure}(Object(Illuminate\Database\Schema\Blueprint))
      <project_dir>/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:166

  Please use the argument -v to see more details.

I tried looking at the laravel API docs for Blueprint and effectively, the intOrBigIntBasedOnRelated method does not exist.

Will try my hand at a fix

Using Laravel 5.8.33 and PHP 7.3

fulopattila122 commented 5 years ago

Can you paste here the output of php artisan concord:modules -a please?

fulopattila122 commented 5 years ago

Thanks for the report, I've found the problem. Fix is coming within an hour.

fulopattila122 commented 5 years ago

@tonyjaimep To fix your Vanilo installation, update the following packages via composer:

composer update konekt/user konekt/laravel-migration-compatibility vanilo/order

This should update the user module to v1.2.1 and the migration compatibility one to v1.0.1. After the upgrade you can continue the Vanilo installation procedure by re-running the migrations:

php artisan migrate

Please let me know if it worked or not.

aslansinan commented 3 years ago

it is not worked

fulopattila122 commented 3 years ago

@aslansinan because you got an error message of "X"; while you were trying "Y"; while having user module at version "Z"; and migration compatibility at version "A"; Laravel at version "B"; PHP at version "C".

Keanhor2 commented 1 year ago

I also have this problem.

fulopattila122 commented 1 year ago

I also have this problem.

Is package auto-discovery turned off in your project? https://laravel.com/docs/9.x/packages#opting-out-of-package-discovery

Keanhor2 commented 1 year ago

Hello brother this is my error at below when I try to migrate database and I also turned off the package but it still not work. Do you have other solutions? thanks in advance


Migrating: 2014_10_12_000000_create_users_table

BadMethodCallException

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

at vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php:113 109▕ */ 110▕ public function __call($method, $parameters) 111▕ { 112▕ if (! static::hasMacro($method)) { ➜ 113▕ throw new BadMethodCallException(sprintf( 114▕ 'Method %s::%s does not exist.', static::class, $method 115▕ )); 116▕ } 117▕

• Bad Method Call: Did you mean Illuminate\Database\Schema\Blueprint::string() ?

1 database/migrations/2014_10_12_000000_create_users_table.php:35 Illuminate\Database\Schema\Blueprint::__call()

  +4 vendor frames 

6 database/migrations/2014_10_12_000000_create_users_table.php:44 Illuminate\Support\Facades\Facade::__callStatic()

fulopattila122 commented 1 year ago

Don't turn off the package auto-discovery, it must be turned on. The error above tells me your Laravel application suffered weird modifications.

I can't tell for sure where it is coming from, but as far as I see, the application setup is wrong. Thus it's not the error of this library.

I suggest starting over from scratch creating the application if that's possible.