Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make:theme can't find app.blade.php after creation #37

Open
LauraWebdev opened this issue Jan 23, 2023 · 2 comments
Open

make:theme can't find app.blade.php after creation #37

LauraWebdev opened this issue Jan 23, 2023 · 2 comments

Comments

@LauraWebdev
Copy link

Hey there,

I've created a new laravel project, installed breeze and wanted to install this project for multi-theme support.
After installing and exporting the config, I've tried running make:theme and went through the creation dialog.

After completion, it creates the needed controllers and a folder within /themes but throws an exception in the console that it can't find an app.blade.php within the theme folder.
My theme folder after the command ended:

test-theme
  - js
    - components
      - ExampleComponent.vue
    - app.js
    - bootstrap.js
  - views
  - vite.config.js

The exception in the console:

   ErrorException

  file_get_contents(/var/www/html/themes/test-theme/views/layouts/app.blade.php): Failed to open stream: No such file or directory

  at vendor/qirolab/laravel-themer/src/Presets/Traits/HandleFiles.php:26
     22▕     }
     23▕
     24▕     protected function replaceInFile(string $search, string $replace, string $path): int|bool
     25▕     {
  ➜  26▕         return file_put_contents($path, str_replace($search, $replace, file_get_contents($path)));
     27▕     }
     28▕
     29▕     public function createFile(string $path, string $content = ''): int|bool
     30▕     {

      +17 vendor frames
  18  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()
@LauraWebdev
Copy link
Author

I've also tried reverting the breeze installation and using make:theme without it. Same outcome

@onemoreahmad
Copy link

Maybe you choose not to create views when you answered the dialog.
Anyway, you can just create that file yourself. Inside views folder create /layouts/app.blade.php and copy/paste the content from here https://github.com/qirolab/laravel-themer/blob/master/stubs/resources/Tailwind/views/layouts/app.blade.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants