Sometimes we only need to validate records before inserting operations in CakePHP. In the case of bulk insertion and CSV records validation, it’s very difficult to validate individual fields of bulk records.
array (‘validate’ => ‘only’) parameter will do exactly that for us.
Logs are files that keep a registry or records of events, processes, messages that occur in the operating system or any software that runs.
Laravel provides the robust logging services that allow the user to log messages to file.
Laravel uses the Monolog library Read more…
Below are the steps to integrate Firebase with Laravel 6.x
To integrate Firebase with Laravel we first need a Laravel project. Create a new Laravel project using the given composer command.
composer create-project –prefer-dist laravel/laravel firebase
Regular expressions use arithmetic operators like +,^,- and create complex expressions that can help to validate IP address, email address, telephone no, etc. They save our coding time.
Some of built-in PHP regular expressions are:
Preg_replace- perform pattern match on a string and returns true if Read more…
How to convert PDF to image file using PHP?
Before installing PDF to Images package, firstly you need to install two PHP extensions
Imagick and Ghostscript.
Step 1: Install Imagick
sudo apt-get install php-imagick
Step 2: Restart Apache
In the second step Read more…
What is MVC?
The MVC is a very frequent web development architectural framework or application designing model which contains three main components the Model, the View and the Controller each of them performs different functions assigned to them.
It helps us to avoid complexity by dividing the application Read more…
First of all, install FFmpeg in your composer. Perform the steps below to install it on Ubuntu:
composer require pbmedia/laravel-FFmpeg
Start by updating the packages list:
$ sudo apt update
– Next, install FFmpeg by typing the following command:
$ sudo apt install FFmpeg
– To check FFmpeg is Read more…
How to use CakePHP 2.* Hash::combine method to reformat associative and find results array?
Sometimes we do a lot in the code to reformat find query results, to remove the table name (for example, User, Article, etc) from the array and sometimes use one of the column Read more…
How to create a new laravel app with initial setup and get everything up and running?
To create your first Laravel app, you will require some prerequisites and here is what you will need to have installed:
WebServer; I am using Apache ( For Windows and macOS, I Read more…
Events are one of the many powerful features of the Laravel. The event basically means the thing that happens or takes place, especially the one that is important. So, in Laravel’s case, events are triggered when some condition is met like most websites have authentication Read more…
CakePHP uses a two-layered approach to validation:
It determines basic validity. It ensures that the data types, size, and format of data are correct. When we call newEntity() or patchEntity() methods, validations are triggered. For example, checking if an email address Read more…
Methods of Debugging by dumping information
These methods are used for debugging in PHP. We can see the variable values in human-readable form on the console and can find errors in case there are issues due to variables incorrect values. print_r() and var_dump() are used Read more…
Collections in C#
Arrays are useful for creating and working with a fixed number of strongly typed objects.
Problem with Arrays:
1. Fixed length
2. Insert similar data type elements
Collections are used to create and Read more…
Progress Bar For Large Uploads Using AJAX/PHP
When large files are being uploaded, a server at the back takes time to upload the same file. Users have to wait irrespective of knowing, whether the file is even being uploaded or not and how much Read more…
How to set the values of Metadata(Column fields) of Sharepoint Documents
Here is the code in C# which helps you to change the metadata field values of Sharepoint Files.
//This manager class can be used to obtain a SharePointContext object
OfficeDevPnP.Core.AuthenticationManager authMgr = new Read more…
Paytm gateway integration in PHP
Paytm is a very popular way to make payments these days. To integrate Paytm in our site we need to follow the given steps –
Step 1. First, we need to create an account at https://business.paytm.com/ and get our Read more…
Fill a PDF form using C# console application
We will be using the SyncFusion Package to fill out the PDF Form Fields. To add SyncFusion to your project follow these steps :
1. Go to Tool -> NuGet Package Manager -> Manage NuGet Packages For Solution
2. Then search Read more…
Showing Deletion Confirmation box in Laravel datatables
Datatables are the finest way to show the larger number of records to the user on a single page as it provides so many features like sorting, pagination, etc. Sometimes we need to provide the facility to edit or Read more…
How to deploy the laravel project on Shared hosting server
On shared Environment:
Step 1: Push the code to Production Server.
I’m assuming that your project is running perfectly on your localhost and now you are ready to push it to Read more…
how to download file from s3 disk in Laravel
What is AWS S3?
Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. S3 helps you securely upload and download your data with Read more…