• Home
  • About
  • Contact
  • Resume

Login

Remember Me
  • Forgot your password?
  • Home
  • About
  • Contact
  • Resume

Nick Escobedo

  • Home
  • About
  • Contact
  • Resume

PHP

Home
 / 
Programming
PHP
Laravel, PHP, Programming, Testing

How To Write Tests For a Custom Laravel Validation Rule

By Nick Escobedo
January 23, 2020
4 min read
Leave a comment
In Laravel, PHP, Programming, Testing
2222 views
Scenario Our form is expecting user input from a specific field is typed in all capital letters so we have a custom validation rule to check if the input is uppercase. Writing tests for a custom Laravel validation rule is ...
Read more
PHP, Programming

PHP Type Hinting Arrays Using The Splat Operator

By Nick Escobedo
November 6, 2018
3 min read
Leave a comment
In PHP, Programming
4179 views
It’s possible to type hint an array (sort of) in PHP without using a Doc block. Version 5.6 added a splat operator or sometimes called argument unpacking. A splat operator is 3 dots before a parameter. The splat operator allows ...
Read more

Using array_reduce to Transform Data

By Nick Escobedo
January 24, 2018
8 min read
Leave a comment
In PHP
4853 views
First, why we might transform data? If we have raw data from a database and need to send data to an external system or maybe export data. In either case we most likely don’t want to expose database column names ...
Read more

How To Bind An Interface To An Implementation In Laravel

By Nick Escobedo
August 12, 2015
4 min read
5 Comments
In Laravel, PHP, Programming
20306 views
Binding an interface to an implementation promotes good coding practices. As a result the code is less coupled, more maintainable, and testable. Why might someone want to bind an interface using Laravel? To put an abstraction between the application and ...
Read more

Catch An Expected Exception In PHP Unit Test

By Nick Escobedo
January 11, 2015
24 second read
1 Comment
In PHP, Programming, Testing
10507 views
Something I ran into a while back while writing tests. If intentionally testing code for an exception then it is required to add an annotation above the test method.
Read more

Laravel 4 Project On Shared Hosting

By Nick Escobedo
June 23, 2014
1 min read
Leave a comment
In How-To's, PHP, Programming, Tech, Tips
5206 views
Laravel 4 is capable of running on a shared hosting environment. It’s a lot easier than you probably think. Login to your host and go to your home directory. This does not mean your public home directory, they are separate. ...
Read more

PHP Pages Displaying Code And Not Rendering Code

By Nick Escobedo
December 10, 2013
1 min read
Leave a comment
In How-To's, PHP, Tech
5486 views
For some reason my server started displaying code instead of actually processing or rendering the code. After playing around with the server I noticed the php5 module was missing from Apache. If your code is displaying and not rendering you ...
Read more

Mod Rewrite Enabled But Not Working

By Nick Escobedo
December 10, 2013
1 min read
Leave a comment
In How-To's, PHP, Tech
4737 views
If you find that your mod rewrite is enabled, but doesn’t seem to be working you may need to add this little bit of code to your httpd.conf file. AllowOverride All It’s possible your file might have the following: AllowOverride ...
Read more

Xampp Send Email Issues

By Nick Escobedo
January 22, 2013
3 min read
Leave a comment
In How-To's, PHP, Programming
5240 views
After upgrading my xampp installation I had issues sending email. I wrote a small test PHP page and it was saying my emails were being sent, but I never received them. Obviously something was misconfigured. I thought I correctly edited ...
Read more

Build Email Message Dynamically From Submitted Form

By Nick Escobedo
August 8, 2012
2 min read
Leave a comment
In How-To's, HTML, PHP, Tech
4069 views
I wrote some code to dynamically generate an email message based on the names of form elements being sent through post. In this post I’ll describe how it’s done. The foreach loop grabs the keys from the post array. An ...
Read more

Categories

  • Android
  • How-To's
  • HTML
  • Interesting
  • JavaScript
  • Laravel
  • Life Pro Tip
  • Linux
  • Magento
  • Mobile App of the Week
  • PHP
  • Programming
  • Retail
  • Tech
  • Testing
  • Tips
  • Ubuntu
  • Video Games
  • Vue.js
  • Wordpress
  • YouTube
© Copyright 2015, All Rights Reserved Powered by WordPress | Designed by Bdayh