misterdebug / crud-generator-laravel

Create a Laravel 10 CRUD in a few seconds
315 stars 44 forks source link

Fix bug when creating the [Requests] directory under [app/Http] when the path [app/Http/Requests] does not exist #13

Closed hlombroso closed 1 year ago

hlombroso commented 1 year ago

When trying to create the directory [app/Http/Requests], the code $this->getRealpathBase('app'.DIRECTORY_SEPARATOR.'Http'.DIRECTORY_SEPARATOR.'Requests') returns false (since app/Http/Requests does not exist).

The following code will return the correct path $this->getRealpathBase('app'.DIRECTORY_SEPARATOR.'Http').DIRECTORY_SEPARATOR.'Requests'

misterdebug commented 1 year ago

The requests directory should always exists but why not Thanks for you contribution, i will review asap :)

hlombroso commented 1 year ago

I see. With my current setup, the [app/Http/Requests] directory does not seems to be created by default with the command to for creating new Laravel projects. Sample command: composer create-project --prefer-dist laravel/laravel myproject

Composer version: 2.2.4 PHP version: PHP 8.1.11 (cli) (built: Oct 28 2022 03:12:14) (NTS)