February 16, 2020 — Sometimes, you might want to convert some of the request parameters to boolean. For instance, take a checkbox field. Unless and until, it hasn’t been checked it won’t be passed through to the request. In such a case, it would be beneficial to convert such inputs to boolean.
February 10, 2020 — Traits in PHP is a way of re-using the code. Basically, Traits are assistive copy-paste mechanism provided by the language itself. Using Traits, developers can reduce the limitations of single inheritence based languages such as PHP. I have written a dedicated article about it if you want to check it out.
view-js.blade.php which wraps the JS code within
<script> tag and a CSS blade file called
view-css.blade.php which wraps the CSS code within
<style> tag. And all you want to do is add these to an another blade file called
January 31, 2020 — Exception handling is an essential part of the software development workflow. It is used to handle the runtime errors so that the normal flow of the application can be maintained.
January 30, 2020 — Laravel’s Blade is a great templating system that blends with Laravel’s ecosystem very well. Setting some data to the view is a breeze and rendering those data into the template is ever so easy. For instance, if you would like to share some data from a controller’s action to a view, you’d do like so.
January 29, 2020 — Sometimes, you might want to attach additional attributes to the original request that has made to the Laravel application. For instance, you want to put your own check in the middleware to see if the user is permitted to access the page or not, and pass that “check” by attaching it as an additional attribute to the request.
January 28, 2020 — Music had always played a important role throughout the evolution of the mankind. Programming is certainly no different.
January 26, 2020 — There’s this little trick in PHP that I got to know about today. The trick basically is, you can loop through all the class properties having the “public” visibility just by iterating over the class object using loop construct such as
January 24, 2020 — Working on an application which received user signups and let’s suppose it’s built on top of PHP, you want to validate that the email the user enters is valid. Sure, you’ll check that the email entered is a “syntactically” valid one by using one of these methods.
January 23, 2020 — When designing UI elements such as zebra strips in the tables, you’d need to identify if the loop iteration is even or odd and based on that you’d set the backgroud color of the row.
Download my eBook
(Includes PHP 8.1, 8.2, and 8.3)
Follow me everywhere