Writing Unit Test at PHP Laravel
It is important for us to write unit test if we want the codes we developed in a software project to deploy production with the least bugs. Especially if we are going to work in corporate and enterprise companies, we
How to Integrate and Use Xdebug with Visual Studio Code Editor on Docker at PHP Projects
When we develop software projects, most of our time is spent finding bugs. We usually use functions like var_dump(), echo, print_r() to find errors in PHP. Instead, we can run the step-by-step code in the code editor as in other
__invoke() Magic Method in PHP
There are various magic methods that will make our work easier in PHP. Magic methods begin with two underscores(__construct, __invoke). In this post, I will explain the __invoke() magic method and its usage, which is frequently used in PHP. __invoke()
Full Tutorial To Restrict or Block Ip Address To Prevent Hacking In Laravel
There may be malicious users using our applications on the web. These users may either annoy other visitors or want to crash the application using our forms (like SQL injection…). By detecting the ips of such visitors, we can block
Upload Multiple Files/Images with Drag and Drop Using DropzoneJS in Laravel
User experience is given great importance in web applications today. Filling out forms is a boring activity for users. That’s why it’s the application developer’s job to make it easy to fill out forms. In this post, I will explain
Printf, print, echo, sprintf, vprintf, vfprintf, vsprintf Statements in PHP
There are many ways to output string expressions in PHP. In this post, I will explain the expressions echo, print, printf, sprintf, vprintf, vfprintf, vsprintf, which seem to be similar to each other but have various differences, and how they
Magic Constants in PHP
PHP has predefined constants that come with various extensions. Knowing these constants allows us to use PHP more effectively. 1.) __LINE__ Returns the line number where it is used. 2.) __FILE__ Returns the file path and filename. 3.) __DIR__ Returns
Creating Custom Laravel Blade Directive in Laravel 8
Laravel, one of the most used web frameworks in the world and developed with PHP, comes with Blade template engine. The directives developed for specific purposes such as @section, @yield, @parent, @json, which come as predefined in Blade, provide great
PHP 8 New Features
Many new features have come to PHP over the years. With these new features, PHP has become a more powerful, modern, stable and faster language. In this post, I will explain the new features that come with PHP 8. PHP
How to Integrate ckeditor5 in Web Aplications with Custom Plugins
Ckeditor is the most used text editor in web applications. In this post, I will explain how to use CKeditor5 in web applications we develop (laravel, codeigniter … in PHP, Django, Flask … in Python). Customizing the toolbar and integrating