Backend – Danny Herran https://dannyherran.com A little bit of PHP, MySQL, JavaScript, HTML5 and CSS3 Fri, 06 Sep 2019 17:03:20 +0000 en-US hourly 1 https://wordpress.org/?v=5.1.3 Laravel Fractal pagination with simplePaginate https://dannyherran.com/2019/03/laravel-fractal-simplepaginate/ https://dannyherran.com/2019/03/laravel-fractal-simplepaginate/#respond Fri, 08 Mar 2019 18:29:30 +0000 https://dannyherran.com/?p=845 By default Fractal has native support for Laravel::paginate. Those using simplePaginate() have to resort to either using Fractal Cursors or build their own adapter. In this post, we are going to quickly build an adapter that fully supports Laravel::simplePaginate. This tutorial assumes you are using the amazing Laravel Fractal wrapper provided by the guys at […]

The post Laravel Fractal pagination with simplePaginate appeared first on Danny Herran.

]]>
https://dannyherran.com/2019/03/laravel-fractal-simplepaginate/feed/ 0
This is how you upgrade (or downgrade) the PHP version on EasyPHP for Windows https://dannyherran.com/2015/11/this-is-how-you-upgrade-the-php-version-on-easyphp-for-windows/ https://dannyherran.com/2015/11/this-is-how-you-upgrade-the-php-version-on-easyphp-for-windows/#comments Wed, 18 Nov 2015 14:59:27 +0000 https://dannyherran.com/?p=757 Since August 2015, the EasyPHP developers have moved their modules into a called “Warehouse” in which they will host up to date modules for their famous WAMP server. This Warehouse is now subscription based, and if you want to download a module, say, the latest or an old PHP version, you will need to pay […]

The post This is how you upgrade (or downgrade) the PHP version on EasyPHP for Windows appeared first on Danny Herran.

]]>
https://dannyherran.com/2015/11/this-is-how-you-upgrade-the-php-version-on-easyphp-for-windows/feed/ 2
Seamlessly validate forms and file uploads with CodeIgniter https://dannyherran.com/2014/07/validate-forms-file-uploads-with-codeigniter/ https://dannyherran.com/2014/07/validate-forms-file-uploads-with-codeigniter/#respond Sat, 12 Jul 2014 17:39:57 +0000 https://dannyherran.com/?p=361 The Form Validation class is great to validate simple input fields such as textareas, checkboxes, text fields, etc. But what about file inputs? If you have a mix of text and file inputs, your controller can get messy if you try to validate both. Lets take a look at a neat solution that only involves […]

The post Seamlessly validate forms and file uploads with CodeIgniter appeared first on Danny Herran.

]]>
https://dannyherran.com/2014/07/validate-forms-file-uploads-with-codeigniter/feed/ 0
How to load and use SimplePie 1.3+ with CodeIgniter 2.1+ https://dannyherran.com/2013/06/how-to-load-and-use-simplepie-1-3-with-codeigniter-2-1/ https://dannyherran.com/2013/06/how-to-load-and-use-simplepie-1-3-with-codeigniter-2-1/#comments Wed, 19 Jun 2013 00:10:32 +0000 https://dannyherran.com/?p=382 The famous RSS parser, SimplePie, has changed a few rules in the last couple of versions. The previous methods used to install the library in CodeIgniter are now obsolete. Lets take a look at the new method to get it working in just 5 minutes. 1. Download SimplePie: http://simplepie.org/downloads/ 2. Inside ./application/third_party/ create a new […]

The post How to load and use SimplePie 1.3+ with CodeIgniter 2.1+ appeared first on Danny Herran.

]]>
https://dannyherran.com/2013/06/how-to-load-and-use-simplepie-1-3-with-codeigniter-2-1/feed/ 3
How to force a cache refresh on CSS and JavaScript files with PHP? https://dannyherran.com/2012/12/how-to-automatically-force-a-cache-refresh-on-css-and-javascript-files-with-php/ https://dannyherran.com/2012/12/how-to-automatically-force-a-cache-refresh-on-css-and-javascript-files-with-php/#comments Sun, 30 Dec 2012 18:41:16 +0000 https://dannyherran.com/?p=365 There is your client, complaining that they can’t see the changes you just made to their website. You explain them that they need to delete their browser cache in order to properly visualize the modifications. They said they don’t know how, and this is when you lose your patience and decide for a more radical […]

The post How to force a cache refresh on CSS and JavaScript files with PHP? appeared first on Danny Herran.

]]>
https://dannyherran.com/2012/12/how-to-automatically-force-a-cache-refresh-on-css-and-javascript-files-with-php/feed/ 1
Integrating the jQuery Validation plugin with Twitter Bootstrap https://dannyherran.com/2012/10/integrating-the-jquery-validation-plugin-with-twitter-bootstrap/ https://dannyherran.com/2012/10/integrating-the-jquery-validation-plugin-with-twitter-bootstrap/#comments Mon, 22 Oct 2012 17:37:18 +0000 https://dannyherran.com/?p=354 Twitter Bootstrap has some nice styling for error messages in forms. Using jQuery form validation could come handy and its actually pretty easy to integrate. The question is, how do we use the Bootstrap styling along with jQuery Validation plugin? Read on for more. I actually wanted to: a) All the form errors should be […]

The post Integrating the jQuery Validation plugin with Twitter Bootstrap appeared first on Danny Herran.

]]>
https://dannyherran.com/2012/10/integrating-the-jquery-validation-plugin-with-twitter-bootstrap/feed/ 5
Mobile browser detection for WordPress – embedded is_mobile() function https://dannyherran.com/2012/03/mobile-browser-detection-for-wordpress-embedded-is_mobile-function/ https://dannyherran.com/2012/03/mobile-browser-detection-for-wordpress-embedded-is_mobile-function/#comments Wed, 07 Mar 2012 16:06:53 +0000 https://dannyherran.com/?p=342 Lets face it. Responsive design is here to stay and it is the solution to all of our nightmares regarding mobile web design. For those who are not aware of this technique, I invite you to read my other post where I explain what it is. But lets get to the point. Sometimes we need […]

The post Mobile browser detection for WordPress – embedded is_mobile() function appeared first on Danny Herran.

]]>
https://dannyherran.com/2012/03/mobile-browser-detection-for-wordpress-embedded-is_mobile-function/feed/ 5
Finding unique array combinations with PHP (permutations) https://dannyherran.com/2011/06/finding-unique-array-combinations-with-php-permutations/ https://dannyherran.com/2011/06/finding-unique-array-combinations-with-php-permutations/#comments Thu, 23 Jun 2011 23:08:01 +0000 https://dannyherran.com/?p=302 I was developing a website where people would place horse bets and the system should be able to calculate all the possible permutations based on the user selection. That means: finding all the possible combinations in a two dimensional array. I found a couple of functions but none of them would keep the array keys […]

The post Finding unique array combinations with PHP (permutations) appeared first on Danny Herran.

]]>
https://dannyherran.com/2011/06/finding-unique-array-combinations-with-php-permutations/feed/ 6
Error Validation Class for CodeIgniter Reactor 2.0 https://dannyherran.com/2011/05/error-validation-class-for-codeigniter-reactor-2-0/ https://dannyherran.com/2011/05/error-validation-class-for-codeigniter-reactor-2-0/#comments Wed, 04 May 2011 01:34:48 +0000 https://dannyherran.com/?p=241 CodeIgniter lacks of an error handling class for custom errors. The Form Validation class is very nice for forms, the logs are pretty useful as well, but what happens when we need to handle our own errors?. Currently there is no official solution for this so I decided to take the matter in my own […]

The post Error Validation Class for CodeIgniter Reactor 2.0 appeared first on Danny Herran.

]]>
https://dannyherran.com/2011/05/error-validation-class-for-codeigniter-reactor-2-0/feed/ 3
Exporting your MySQL table data with PHPExcel + CodeIgniter https://dannyherran.com/2011/03/exporting-your-mysql-table-data-with-phpexcel-codeigniter/ https://dannyherran.com/2011/03/exporting-your-mysql-table-data-with-phpexcel-codeigniter/#comments Tue, 08 Mar 2011 17:24:58 +0000 https://dannyherran.com/?p=207 Most of the time my clients need to download data from their database tables. Exporting to CSV is a pain in the rear for users and it leads to confusion (you know the colon and semicolon stuff). Today, I decided to make a very small controller that is portable and efficient for exporting full MySQL […]

The post Exporting your MySQL table data with PHPExcel + CodeIgniter appeared first on Danny Herran.

]]>
https://dannyherran.com/2011/03/exporting-your-mysql-table-data-with-phpexcel-codeigniter/feed/ 29