Php

Declaration of TestCase::setUp() must be compatible

If you are getting an error while testing in laravel as  PHP Fatal error: Declaration of Tests\TestCase::setUp() must be compatible with Illuminate\Foundation\Testing\TestCase::setUp():.... in th [...]

VMWare shared folder as apache vhost

Step 1. Find the apache user and group id as id -u apache id -g apache Step 2: open vmware-tools files add apache user to the shared folder as sudo vim /etc/init.d/vmware-tools Step 3: Update [...]

Don't just create the Model, implement Repository Pattern

Think a scenario where your application uses MySQl database, and you need to switch to a different DB,that means are you going to rewrite your database logic again?. Thanks to Laravel Repository Patte [...]

IIS redirect

[...]

Custom error page in Laravel

Step 1. Create a view resources\views\exceptions\404.blade.php Step 2. Add the following code in App\Exceptions\Handler.php /** * Render an exception into a response. * * @param \Illuminate\Ht [...]

Regular Expression Special Character

\ the backslash escape character. The backslash gives special meaning to the character following it. For example, the combination "\n" stands for the newline, one of the control characters. The com [...]

Geoplugin Class

/* This PHP class is free software: you can redistribute it and/or modify the code under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 o [...]

SSL operation failed with code 1. OpenSSL Error

file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Try to run the following command [...]

How to install Laravel

We can install Laravel by Laravel Installer or through composer. Laravel Installer First we have to download the Laravel Installer.In order to do that open your terminal and type composer g [...]

How to install composer

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. Windows Installer The instal [...]