Thoughts about coding and books

Laravel 5 unit testing Form and TokenMismatchException in Middleware

While unit testing in Laravel 4 you were able to turn off filters including CSRF check in testing environment. However in the Laravel 5 CSRF check has been move into the middleware and I have not yet found the way to turn CSRF check off easily. As TokenMismatchException will happen when testing controllers that are processingRead more about Laravel 5 unit testing Form and TokenMismatchException in Middleware[…]

PHP locale not working in Ubuntu

I was working with Laravel 4 and trying to format Carbon object dates according to locale. However App::setLocale(‘et_EE’) did not have any effect. Going lower level and setting setlocale(LC_ALL, ‘et_EE’) did not change locale either. Carbon uses under formatLocalized method PHP strftime so issue relates to this also. Some have suggested to use utf8_encode(strftime(“%A, %d deRead more about PHP locale not working in Ubuntu[…]

Laravel Redirect:to is ignored and not working

I was implementing Paypal with Laravel framework and when it came to performing redirect then it did not happen no matter what I tried. I tried in controller something like header(‘Location: https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=’ . urlencode($token)); and Redirect::to(‘https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=’ . urlencode($token)); Turned out that manual is best friend like always and you have to use Redirect::to only inRead more about Laravel Redirect:to is ignored and not working[…]

Laravel and PayPal “You do not have permissions to make this API call”

I discovered great new PHP framework Laravel. When trying it out I implemented Laravel Paypal bundle which was supposed to make the integrating it very simple. (Un)fortunately it was not so out of the box. Firstly the Paypal bundle is just a wrapper to make it easier using it in Laravel. You still have toRead more about Laravel and PayPal “You do not have permissions to make this API call”[…]