orchestral / canvas

Code Generators for Laravel Applications and Packages
https://packagist.org/packages/orchestra/canvas
MIT License
187 stars 12 forks source link

When running make:view the view is scaffolded inside the vendor folder #32

Closed creode-dev closed 5 months ago

creode-dev commented 5 months ago

Description:

Running the make:view command in the context of a package with a published canvas file, puts the view inside the following folder:

vendor/bin/canvas make:view

 ┌ What should the view be named? ──────────────────────────────┐
 │ career                                                       │
 └──────────────────────────────────────────────────────────────┘

   INFO  View [vendor/orchestra/testbench-core/laravel/resources/views/career.blade.php] created successfully.

Steps To Reproduce:

  1. Create a new package in Laravel I'm using this skeleton by Spatie and require canvas.
  2. Run vendor/bin/canvas preset package to generate the attached canvas.yml file.
  3. Run the vendor/bin/canvas make:view command and provide a name.
  4. The generated view file goes inside the vendor folder rather than the packages resources folder.
preset: package

namespace: Creode\LaravelCareers
user-auth-model: App\Models\User

paths:
  src: src
  resource: resources

factory:
  path: database/factories

migration:
  path: database/migrations
  prefix: ''

console:
  namespace: Creode\LaravelCareers\Console

model:
  namespace: Creode\LaravelCareers\Models

provider:
  namespace: Creode\LaravelCareers\Providers

testing:
  namespace: Creode\LaravelCareers\Tests