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

[8.x] Fixed component class view reference #32132

Merged
merged 2 commits into from
Mar 27, 2020

Conversation

innoflash
Copy link
Contributor

@innoflash innoflash commented Mar 27, 2020

Just an small fix here. So php artisan make:component FormError works so good straight out of the box. This PR however is aimed to fix the locating of the view (blade file) in the Component class for views that are kept inside subfolders in the views/components folder.

When you run php artisan make:component Errors/Sub1/FormError all the files are created in the right places but currently in the FormError@render()

    public function render()
    {
        return view('components.form-error');
    } 

instead of

    public function render()
    {
        return view('components.errors.sub1.form-error');
    }

Currently you will have to visit the component class to make a fix.

Cheers

@innoflash innoflash force-pushed the fix-componet-class branch from 06571c9 to dc38442 Compare March 27, 2020 12:56
@taylorotwell taylorotwell merged commit 169cbe8 into laravel:master Mar 27, 2020
@innoflash innoflash deleted the fix-componet-class branch March 27, 2020 14:28
@GrahamCampbell GrahamCampbell changed the title [7.x] Fixed component class view reference [8.x] Fixed component class view reference Mar 29, 2020
@GrahamCampbell
Copy link
Member

This was merged into the wrong branch. Should have been 7.x. @driesvints @taylorotwell

@innoflash innoflash restored the fix-componet-class branch March 29, 2020 15:24
GrahamCampbell pushed a commit that referenced this pull request Mar 29, 2020
* fixed component class view reference

* Update ComponentMakeCommand.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
@innoflash innoflash deleted the fix-componet-class branch March 29, 2020 16:22
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.

4 participants