laravel-nomadic icon indicating copy to clipboard operation
laravel-nomadic copied to clipboard

Exception thrown on creating migrations to create tables

Open asaad-modus opened this issue 5 years ago • 1 comments

Command

php artisan make:migration CreateNewTable

Will throw the following exception

   Illuminate\Contracts\Filesystem\FileNotFoundException  : File does not exist at path /m360/c360/webroot/vendor/chrishalbert/laravel-nomadic/src/stubs/create.stub

  at /m360/c360/webroot/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:41
    37|         if ($this->isFile($path)) {
    38|             return $lock ? $this->sharedGet($path) : file_get_contents($path);
    39|         }
    40| 
  > 41|         throw new FileNotFoundException("File does not exist at path {$path}");
    42|     }
    43| 
    44|     /**
    45|      * Get contents of a file with shared access.

  Exception trace:

  1   Illuminate\Filesystem\Filesystem::get("/m360/c360/webroot/vendor/chrishalbert/laravel-nomadic/src/stubs/create.stub")
      /m360/c360/webroot/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php:103

  2   Illuminate\Database\Migrations\MigrationCreator::getStub("new_table")
      /m360/c360/webroot/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php:55

It seems that this stub file is missing laravel-nomadic/src/stubs/create.stub

asaad-modus avatar Oct 14 '19 13:10 asaad-modus

FWIW I found that if I copied blank.stub to create.stub and update.stub (within the same directory) the exception did not occur and make:migration seems to run properly

twoodard-edr avatar Nov 07 '22 23:11 twoodard-edr