Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tonyjaimep opened this issue Aug 21, 2019 · 9 comments

Comments

@tonyjaimep
Copy link

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
Copy link
Contributor

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

@fulopattila122
Copy link
Contributor

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

fulopattila122 added a commit to artkonekt/laravel-migration-compatibility that referenced this issue Aug 25, 2019
fulopattila122 added a commit that referenced this issue Aug 25, 2019
@fulopattila122
Copy link
Contributor

fulopattila122 commented Aug 25, 2019

@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
Copy link

it is not worked

@fulopattila122
Copy link
Contributor

@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
Copy link

I also have this problem.

@fulopattila122
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

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.

@artkonekt artkonekt deleted a comment from Keanhor2 Nov 26, 2022
@artkonekt artkonekt locked as resolved and limited conversation to collaborators Nov 26, 2022
fulopattila122 added a commit that referenced this issue Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants