The Ultimate Guide to PHP Functions

php functions

Functions are what make our code tick. At the end of the day, we’d like our code to actually do something. The function is what makes this happen, it is the verb, the call to action. The building blocks of all great programs are functions. In PHP there are thousands of built in functions, along with the ability to define your own. Since functions are so important to our everyday programming, this tutorial will serve as the ultimate guide to PHP functions.…

Custom Helper Functions in Laravel

Custom Helper Functions in Laravel

In creating our PHP String Helper Functions, we were able to define four useful string helper functions to use in our projects. Recall we had a split_string() function, a find_between() function, a find_all() function, and a delete() function. They’re really cool and helpful for quick and dirty string manipulation. Let’s say we want to make use of these functions in Laravel, how can we do that?…

PHP String Helper Functions

php string helper functions

PHP is incredibly powerful right out of the box, even if you aren’t using any frameworks. We need to be fluent with the language itself as well as the frameworks we might like to use. Using the built in functions of the language we can create our own functions, or wrapper functions, of the built in ones. Sometimes this helps with just being able to more closely match your desired workflow.…

Laravel Validation

Laravel Validation

In our last episode when we worked with the Laravel Form Class, we were able to add some great functionality to our small RESTful blog application. We saw how the Laravel Form Class made it easy to bring forth forms with great power and efficiency. We also used the great Twitter Bootstrap Framework to spice up the looks just a little bit. There is something we need to add though to the forms we have created and that would be Validation.…

Laravel Form Class

Laravel Form Class

Getting the beginnings of our RESTful application up and running was a big accomplishment for us! At this point, we’d like to jump into Laravel Forms and learn how Laravel handles form operations so that we can easily create or delete a blog post from our web interface, rather than populating our database via the mysql console, phpMyAdmin, or some other means. Let’s get our form on!…