GuavaCZ/filament-knowledge-base

[Bug]: syntax error (Connection: , SQL: create table "flatfile_documentations" ())

Closed this issue · 1 comments

What happened?

the first time i installed this package i got this error ( in my existing filament project )


Generating optimized autoload files
Class ParsedownExtraTest located in ./vendor/erusev/parsedown-extra/test/ParsedownExtraTest.php does not comply with psr-0 autoloading standard. Skipping.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Symfony\Component\Finder\Exception\DirectoryNotFoundException

  The "/home/yuki/Documents/GitHub/filamentDccpAdmin/docs/en" directory does not exist.

  at vendor/symfony/finder/Finder.php:646
    642▕             } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) {
    643▕                 sort($glob);
    644▕                 $resolvedDirs[] = array_map($this->normalizeDir(...), $glob);
    645▕             } else {
  ➜ 646▕                 throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir));
    647▕             }
    648▕         }
    649▕
    650▕         $this->dirs = array_merge($this->dirs, ...$resolvedDirs);

      +6 vendor frames

  7   [internal]:0
      Guava\FilamentKnowledgeBase\Models\FlatfileDocumentation::bootSushi()
      +14 vendor frames

  22  [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}() 

and then i tried making a empty folder /docs/en/ on the project directory and run composer dumpautoload
but then i got this error

  
     Generating optimized autoload files
Class ParsedownExtraTest located in ./vendor/erusev/parsedown-extra/test/ParsedownExtraTest.php does not comply with psr-0 autoloading standard. Skipping.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

 Illuminate\Database\QueryException

SQLSTATE[HY000]: General error: 1 near ")": syntax error (Connection: , SQL: create table "flatfile_documentations" ())

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:813 


im using mariadb as my database
and i have no idea where can i fix this
im interested in trying this filament plugin cuz
cuz its very helpfull on my project

but i cant use it cuz now i have no idea how to fix this

How to reproduce the bug

i just tried to install the package like normally then those errors showed up

Package Version

1.9.0

PHP Version

8.3

Laravel Version

11

Which operating systems does with happen with?

Linux

Notes

i tried on a fresh install laravel and it worked but im investigating if someof my other packages are incompatible

I appreciate for anyone finding the solution to this

You may refer to this #40

I resolved it by adding $fillables.