reliese / laravel

Reliese Laravel Model Generator
MIT License
1.49k stars 316 forks source link

Laravel 11 - SQLite Support #274

Closed andreinocenti closed 5 months ago

andreinocenti commented 8 months ago

Hello,

Creating models on a fresh Laravel 11 using code:model and using a SQLite database returns the following error:

php artisan code:models --table=cities 
   BadMethodCallException 

  Method Illuminate\Database\SQLiteConnection::getDoctrineConnection does not exist.

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

  i   Bad Method Call: Did you mean Illuminate\Database\SQLiteConnection::selectFromWriteConnection() ? 

      +20 vendor frames 

  21  artisan:13
      Illuminate\Foundation\Application::handleCommand()
aniketan commented 8 months ago

facing the same issue sqlite

Antonio-pf commented 7 months ago

this is happening the same with postgres

meliani commented 7 months ago

Laravel 11 droped dbal so you need to make some changes in shemas() function, take a look at this thread : https://github.com/reliese/laravel/issues/273

finiteinfinity commented 5 months ago

Resolved by #208

dimatall commented 1 week ago

Still facing this issue with SQLite. Completly fresh Laravel 11 and reliese/laravel 1.3.5.

Changes by https://github.com/reliese/laravel/pull/208 were done for mysql and postgres only.