Support the ongoing development of Laravel.io →
Views Blade
Last updated 2 years ago.
0

Is a little problem with your code logic.

You are calling the utilityfunction() and this function return a view, but you are not returining this value in the other functions, so the other functions are ending without return nothing (are procedures :P).

Basically to solve this:

class Controller {
    Controllerfunction1() { return $this->utilityfunction(); }
    Controllerfunction2() { return $this->utilityfunction(); }
    utilityfunction() { return view('articleview') }
}

It will return the view in all the cases.

Hope it works.

Best wishes.

Last updated 9 years ago.
0

Thanks a lot Juan. I was for some reason thinking that view itself will render the response... thanks...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.