Category: PHP Frameworks
In Laravel how to redirect to 404 page on accessing post route
In Laravel, when a user directly accesses a post route then an exception page is shown. How to show a 404 page instead? To fix this issue : Firstly, you need to create an error page in view folder of
CakePhp 3.x | Send Email using SMTP
To send an email in cakephp use Email class of Cakephp 3. In app.php under config folder, add a new entry in the table EmailTransport. For example here ‘mail’. Specify host, port, username and password in it: ‘EmailTransport’ => [
PHP | Show star rating (empty or filled stars)
Sometimes situation arises when we have to show the ratings on our site like user rating of all the products available on our site. Then we have to first get the rating from where we have it like sometimes it
Upgrade to php 5.6 and apache 2.2 to apache 2.4.17 in ubuntu 12.04
These are the steps to upgrade to PHP 5.6: Add the PPA containing version 5.6 of php for Ubuntu 12.04: sudo apt-add-repository ppa:ondrej/php5-5.6 sudo apt-add-repository ppa:ondrej/php5 Run these command in terminal to upgrade php : sudo apt-get update If everything
Eclipse | Enable Php Support for extra features
In Eclipse (Luna Service Release 2 (4.4.2), jump to method definition is available for Java and other languages. But sometimes, it gets disabled for PHP. For example ,if eclipse crashes. So to enable this, first you have to select the
Capture Screenshot of a Webpage from its URL in PHP
Generally, Google PageSpeed Insights API is used to measure the performance of a web page but you can also use Google PageSpeed Insights API to get a screenshot of the website from URL. In this post, we will show you
Configure PHPMYADMIN to connect to different servers
Here are the steps to set up PHPMYADMIN to connect to database servers located at different ip addresses: 1. Open config.inc.php located in C:\xampp\phpMyAdmin directory in windows and located in /etc/phpmyadmin directory in Ubuntu. 2. Add the below written code
CakePHP | Date format translation using internationalization
In Cakephp, To translate the application language into another, we use internationalization and localization. To display the correct translated date string on change of locale, we need to use right classes. use Cake\I18n\I18n; use Cake\I18n\Time; I18n::Locale(‘es’’); // es locale is
SQL Transaction in Cakephp 3
SQL transaction in Cakephp 3 is a series of statements working in a logical order to handle database errors and ensure data integrity. There are four main methods being used in Sql transaction in Cakephp 3. 1. Initialize the statement
