jacopo beschi: yet another web guy

Laravel Archive

Laravel Testing Redirect::back()

Created at: Oct/22/2014 jacopo beschi

Hello guys, sometimes in your functional test you need to test a redirect, this is pretty easy to test except for the Laravel Redirect::back() method. I've found out that this is hard to test and the only solution to solve the problem is to fake a HTTP_REFERRER value.

Read on

Introduction to Unit testing with Laravel framework: step1

Created at: Jul/31/2014 jacopo beschi

When i first came into programming i didn't even know what self tested code was and how much it's important for a developer. This article is for developers that want to start unit testing with laravel framework or php in general. Before going into details i'd like to explain you briefly what is unit testing and automated code tests. Automated code tests are programs that verify automatically that your application works as expected. Why self tested code is important? For multiple reasons, the most important is that removes the "fear of change" and for this reason help you refactoring your code and improving it.

Read on

Integrate Laravel And Session in external php application

Created at: Jun/27/2014 jacopo beschi

Hello foks, it's been a while since i didn't write an article. Today i'll explain you how you can integrate Laravel framework 4 (and his session driver) in any other php application. I'm writing this because i had to solve this problem in one of my works and i want to share this with you.

Read on

How to import and export data gracefully with php and laravel

Created at: Apr/10/2014 jacopo beschi

Hello guys, during my career i've come across the problem of importing and exporting data from and to different formats many multiple times. For this reason i want to share with you my general approach to solve this problem. The process of importing and exporting data mainly is just a process of data trasforming; for this reason the import and export operations can be seen as the same of data transformation.

Read on

SOLID Design principles and Php: Dependency inversion

Created at: Mar/11/2014 jacopo beschi

This is the last article about the SOLID principles series. In this article we talk about the D in SOLID: "Dependency inversion". This last part may be the harder to understand for you guys. Before saying the principle we need to explain some definitions: - High level code: the code that is focused on solving a general problem (For example db access) - Low level code: the code focused on solving a particular problem.

Read on