FTP getting array of file details such as size using PHP
Using FTP and PHP to get an array of file details such as size and permissions. This uses the ftp_rawlist() method and splits the string into an array for each…
PHP backend web language
Using FTP and PHP to get an array of file details such as size and permissions. This uses the ftp_rawlist() method and splits the string into an array for each…
Creating and using Laravel form requests to create cleaner code, separation and reusability for your requests. This is achieved by making use of the artisan command make:request php artisan make:request…
Improving the default Laravel login and register views in such a simple manner but making a noticeable change in appearance. The default Laravel login view Now let’s update the look…
Laravel validation for checking if a field value exists in the database. The validation rule to use is exists() where you can state the table and column for the value…
Laravel log all database queries with their bindings and execution time in seconds This is done by using the boot method in app/Providers/AppServiceProvider.php public function boot() { DB::listen(function ($query) {…
How to build a conditional based query in Laravel that gets shaped based on conditional statements before finally being executed. In this example below checks are made on if the…
How to split Laravel routes into directories or subfolders for more organisation and to keep the route files smaller. In this example the Article API routes are placed into their…
In Laravel the isDirty method can be used to examine the state of your model and its data to determine if changes have been made and need updating. isDirty will…
A quick and easy method to generate a sitemap file from a PHP PDO select query with a foreach loop to add each URL into the sitemap.xml This is all…
When a model resource is not found in Laravel you get an HTTP 404 not found, however you can also do other actions such as a redirect. Using the missing()…