I have a controller where I want to combine data from multiple tables with parallel structures. What I want to end up with in the end is one object I can return from the controller so I can parse it …
Tag: laravel
JSONP with Laravel
Browser sends JSONP requets to Laravel, Laravel returns the results to browser. In the brower console, I get the warning: I believe this is due to improper headers in the JSONP response? How should this warning be fixed? PHP Response::JSON($result) will return the usual JSON response I believe, not the JSONP variant with the callback function name wrapping around the
How to Set Variables in a Laravel Blade Template
I’m reading the Laravel Blade documentation and I can’t figure out how to assign variables inside a template for use later. I can’t do {{ $old_section = “whatever” }} because that will echo “whatever” and I don’t want that. I understand that I can do <?php $old_section = “whatever”; ?>, but that’s not elegant. Is there a better, elegant way