misterdebug / crud-generator-laravel

Create a Laravel 10 CRUD in a few seconds
312 stars 43 forks source link

ErrorException mkdir(): Invalid argument While Creating CRUD from terminal #16

Closed stitpragya22 closed 1 year ago

stitpragya22 commented 1 year ago

php artisan make:crud post1 "title:string, content:text" Created Controller: Post1s Created views directory: post1s Created View: index.blade.php Created View: create.blade.php Created View: show.blade.php Created View: edit.blade.php

ErrorException

mkdir(): Invalid argument

at C:\laragon\www\example-app\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:631 627▕ if ($force) { 628▕ return @mkdir($path, $mode, $recursive); 629▕ } 630▕ ➜ 631▕ return mkdir($path, $mode, $recursive); 632▕ } 633▕ 634▕ /* 635▕ Move a directory.

1 C:\laragon\www\example-app\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:631 mkdir("")

2 C:\laragon\www\example-app\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:338 Illuminate\Filesystem\Filesystem::makeDirectory()

stitpragya22 commented 1 year ago

I think it's near to Model creation. BUt not know how to solve it.

stitpragya22 commented 1 year ago

Something near here

/* *****

                                    MODEL

    ************************************************************************* */

    if(!File::exists($this->pathsAndNamespacesService->getRealpathBaseModel()))
        File::makeDirectory($this->pathsAndNamespacesService->getRealpathBaseModel());

    // we create our model
    $this->createRelationships([], $namingConvention);
misterdebug commented 1 year ago

Hi @stitpragya22, do you have your requests directory already created? If not, create it and it will be okay :) Or check this : https://github.com/misterdebug/crud-generator-laravel/pull/13

misterdebug commented 1 year ago

fixed thanks to @hlombroso

stitpragya22 commented 1 year ago

thank you for reply but I not get what is problem. does it is solved ? and which directory should I create it creates views folder , and I think Controler and Models are in existing folders only. kindly explain , thanks.

misterdebug commented 1 year ago

Just update the package and it'll be okay :)

stitpragya22 commented 1 year ago

thank you very much..