Many times we need to collect the visitor IP address to track activity and for security reasons. It’s very easy to get the IP address of visitors in PHP. PHP $_SERVER variable provides an easy way to get user IP address. The $_SERVER contains Continue reading PHP :: How to Get IP Address of User
Laravel 7 is now released and includes many new features including Laravel Airlock, better routing speed, custom Eloquent casts, Blade component tags, fluent string operations, a new HTTP client, CORS support, and many more features. Before we jump into the new features Continue reading Laravel 7 is now released!
If you are using array_key_exists() instead of in_array(), believe it or not, it is a good choice you made. array_key_exists() is much faster than in_array(). array_key_exists($key, $array); // ideal in_array( $key, array_keys( $array ) ) // This creates an array Continue reading PHP – array_key_exists() vs in_array()
Eloquent ORM seems like a simple mechanism, but under the hood, there’s a lot of semi-hidden functions and less-known ways to achieve more with it. First example :: Increments and Decrements Instead of this: $article = Article::find($article_id);
You can do Continue reading Eloquent ORM – Increments and Decrements