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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Updating the make commands to use a custom views path #34060

Merged
merged 1 commit into from Aug 31, 2020
Merged

[7.x] Updating the make commands to use a custom views path #34060

merged 1 commit into from Aug 31, 2020

Conversation

arcanedev-maroc
Copy link
Contributor

@arcanedev-maroc arcanedev-maroc commented Aug 29, 2020

This PR fix an issue when using a custom folder structure. In my case, the views folder is located in the base path.

This can be achieved by setting the custom views folder in config file:

<?php

// config/view.php

return [

    //...

    'paths' => [
        base_path('views'), // Instead of the default: resource_path('views')
    ],

    //...
];

When running commands like:

php artisan make:component CustomComponent
php artisan make:mail InvoicePaid --markdown=mails.invoice.paid
php artisan make:notification InvoicePaid --markdown=notifications.invoice.paid

It creates the resources/views/{new-blade-files} instead of views/{new-blade-files}

NOTE: Let me know if i've missed a console commad that generates blade files 馃憤

Old PR: #34050

This is related to (component, mail, notification) make commands
@driesvints
Copy link
Member

@arcanedev-maroc please post the explanation of this PR in the main comment and don't link through to a different pr/issue. Thanks.

@arcanedev-maroc
Copy link
Contributor Author

@driesvints Done

@taylorotwell taylorotwell merged commit cdf19b0 into laravel:7.x Aug 31, 2020
@arcanedev-maroc arcanedev-maroc deleted the fixing-custom-views-folder branch August 31, 2020 13:46
@arcanedev-maroc
Copy link
Contributor Author

@driesvints Thank you for your assistance

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

Successfully merging this pull request may close these issues.

None yet

3 participants