Laravel Render a View and Store the Contents in a Variable

Sometimes one may want to load a View with some PHP data passed to it and store it in a variable inside the Controller’s action. This rendered view data might be later passed to another view which is finally loaded and dumped to the user’s screen.

Continue reading “Laravel Render a View and Store the Contents in a Variable”

PHPExcel Set URL Font Styles (Color and Underline)

When creating excel files using PHPExcel, on setting a hyperlink the cell value’s styling is generally not affected. This happens on purpose to give us more control on how we want to format our content. Usually this is how we’d set a hyperlink:

Continue reading “PHPExcel Set URL Font Styles (Color and Underline)”

Fixing Laravel Basic Auth Failure

Today, as I deployed my Laravel application, I received an email from my client mentioning that the basic authentication wasn’t working on the production server. I tested promptly and indeed it wasn’t. This was really strange for me as locally all was well. I got stuck at the problem for quite sometime. Searching on Google made me realize that a lot of people have been facing the same conundrum. But finally as usual, I found out the solution not too late.

Continue reading “Fixing Laravel Basic Auth Failure”