Tag Code Example

Simplest way to reduce the page number links in Laravel

Recently and currently(Laravel 5.6) Laravel is using Bootstrap-4 and they've updated all their views accordingly, and when you want to use Laravel's pagination feature you may have a bit of a problem in the mobile world as there are too many page links to be shown in an esthetic way on a mobile screen.

So you can do a lot of things to resolve this problem but the simplest way available is to change the view which defines the links listening.
First, we need to publish that view, this will force L...

View full article

Fast way to set up a form with PHPMailer and Ajax

PHPMailer is a popular library for sending emails as the project of the title suggests. In GitHub, the readme file has a nice example of a basic setup, but today I'll give you a similar simple example using jQuery, Swal( Sweet alert ).

So first this is the PHP script that should respond to an ajax request (for example a file named smail.php):

<?php error_reporting(0); // Import PHPMailer classes into the global namespace // These must be at the top of your script, not inside a function use PHPM...
View full article

Ionic 2 overwrite back button function my way

I guess that most APP developers would not prefer a crude exit of their APP when the back button was pressed, and as you may already know using ionic you can register a callback on the back button pressed event. That is pretty straightforward, but what comes in the registered callback is mostly a matter of preference, but nevertheless, this method that I lately used works on the newest 3.1.1 Ionic version.
I will explain in just two phrases, what is the expected behavior:

The first thing that it...

View full article

How to implement a CAPTCHA for Google Forms

Is it possible to make a random captcha for a google form? You may search and find on google groups and other sources a hard no to this question but, in fact, there is one method that I made that works pretty well. Unfortunately, there are some catches with the method that I am about to show you, but until we get to that, we first have to ensure that we can meet a requirement that this method has. This primary requirement is an URL/server that can generate dynamically a captcha image from a gi...

View full article