Error when creating table
diorz38 opened this issue · 2 comments
when i try to create table with comman:
php artisan make:table UserTable --model=User
if got an error.
step that i took:
i clone https://github.com/calebporzio/laracasts-livewire-datatable.git
it had working Livewire on Laravel 6.2
system that i have:
Apache 2.43
PHP 7.4.4
SQLITE
error that i've got:
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master
λ php artisan make:table UserTable --model=App\User -v
BadMethodCallException : Method Illuminate\Filesystem\Filesystem::ensureDirectoryExists does not exist.
at D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Support\Traits\Macroable.php:103
99| */
100| public function __call($method, $parameters)
101| {
102| if (! static::hasMacro($method)) {
> 103| throw new BadMethodCallException(sprintf(
104| 'Method %s::%s does not exist.', static::class, $method
105| ));
106| }
107|
Exception trace:
1 Illuminate\Filesystem\Filesystem::__call("ensureDirectoryExists")
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:245
2 Illuminate\Support\Facades\Facade::__callStatic("ensureDirectoryExists")
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\kdion4891\laravel-livewire-tables\src\Commands\MakeTable.php:20
3 Kdion4891\LaravelLivewireTables\Commands\MakeTable::handle()
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:32
4 call_user_func_array([])
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:32
5 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Container\Util.php:34
6 Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:90
7 Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Object(Closure))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:34
8 Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), [])
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Container\Container.php:590
9 Illuminate\Container\Container::call()
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Console\Command.php:202
10 Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\symfony\console\Command\Command.php:255
11 Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Console\Command.php:189
12 Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\symfony\console\Application.php:934
13 Symfony\Component\Console\Application::doRunCommand(Object(Kdion4891\LaravelLivewireTables\Commands\MakeTable), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\symfony\console\Application.php:273
14 Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\symfony\console\Application.php:149
15 Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Console\Application.php:90
16 Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:131
17 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
D:\MyDocuments\webdev\laravel\laracasts-livewire-datatable-master\artisan:37
what do i wrong?
thx
Never mind, problem solved when updated livewire to v1.0.12
it should be mentioned in readme.md of minimum version on livewire to install this package.
thx anyway
I got this error. At first I thought it was related to not having made any Livewire components and therefore the directory does not exist. But checking the code in tinker
Illuminate\Support\Facades\File::ensureDirectoryExists(app_path('Http/Livewire'));
actually complains that the filesystem command does not exist, not the folder.
For ref, Laravel 5.8