Done!
To copy use the tool called ssh-copy-id on the terminal as: ssh-copy-id -p 1234 [email protected]
To Control the cache in php 1. Use `set beresp.do_esi = true;` and 2. set ttl for e.g. `set beresp.ttl = 0s;` at backend. 3) On the php template use <esi:include src="/to/path">
Druid Application Test posted 2 years ago
Druid Application Test
Integration Test posted 2 years ago
How to Mock Integration Test
PHP Storm Editor Setting posted 2 years ago
Recommended PHP Storm Editor Settings
Just Using ALTER column on a huge database table to add a new column can bring the database down.
How to assert array Collection of Object with private property against expected json data
Instruction on Upgrading PHP 7.2
We will show you how you can set up database and grant remote access to all or specific server from scratch.
Learn how to install composer locally and execute it from anywhere in just a few steps
This article demonstrates how we can run PHP and Nginx application using Kubernetes. First, we create a deployment object that contains a PHP and Nginx container. And then exposing the application using NodePort and LoadBalancer service. You can use minikube, microk8s or any other tools to run kubernetes in a virtual machine on your local machine.
In GitHub & BitBucket account when you add the new ssh key after deleting the old one, it still gives annoying "Key Already in Use" message - preventing user from adding the newly generated key.
Abstract class represent identity of closely RELATED class. For e.g. car Vehicle abstract class can have a abstract method shared by Car & Bike. Interface on other hand represent Contract or ability of UNRELATED class.
Creating PHP Project Boilerplate
Creating PHP Project Boilerplate
Installing php5-curl package on Linux Ubuntu
Laravel 5.6 Setup posted 6 years ago
Step by step guide to Laravel 5.6 Installation. No long description, just a necessary script to get Laravel 5.6 started.
To upgrade PHP version to 7.2, add repository ppa:ondrej/php, do apt-get update and install php7.2 package.
I get Token Mismatch Exception in Verify Csrf Token at line 53 when submitting the form on Laravel 5, Laravel 5.1, Laravel 5.2, Laravel 5.3, Laravel 5.4 or Laravel 5.5.
Active Record design pattern stores in-memory object data in Relational Database. The interface would consist of function such as insert, update, delete and properties that correspond to a column in database table.
The template method design pattern is an easy one to understand and each one of us has used it on multiple occassions without even realizing it! Let's dig in.
We use strategy pattern when there are multiple ways of achieving a task.
Adapter pattern normalize different interface by bridging a gap between two. This makes it possible to convert one interface to another.
Decorator Pattern allow us to stack on additional behaviour or functionality on a existing one. This means we don't have to resort to unnecessary inheritance and instead extend the behaviour during a runtime.
PHP Xdebug installation on Fedora/CentOS x64
Increase the Innodb_log_file_size to a bigger value. Generally the rule of thumb is to increase the Innodb_log_file_size to 10 times the size of the plugin.
Quite often when you start micro PHP Project you may not know where to start. This basic tutorial shows a quick way of creating PHP project using composer to pull in PHP unit and setting up the Application name.
Once you comment out #Defaults requiretty on /etc/sudoers you get this error if you don't allow user to use command without prompting for password. The fix is easy thought. Allow user to use the command without prompting for password in /etc/sudoers file.
This is generally enforced by having Defaults requiretty in the /etc/sudoers. No panic, there is an easy fix! Comment out #Defaults requiretty on /etc/sudoers
The problem with installing pdftk on Centos 7 is that if has dropped support for libgcj. But you can install to package to install pdftk on centos7.
When running Gulp on laravel root it throws : Gulp-autoprefixer throwing ReferenceError: Promise is not defined. To Fix add require('es6-promise').polyfill(); on top of your gulp.js and run npm install es6-promise
If Laravel is not automatically logging you out, I bet it is because the expire_on_close is set to true. Change it to false and It will work.
Extending the validation class to create a custom validation. 1) Create Custom Validation class that extends Validator class. 2) Boot this custom validation class on your service provider and 3) finally you can use it on your request class.
Laravel 5.3 Cheat Sheet posted 8 years ago
New Laravel 5.3 Cheat Sheet which include: Artisan Commands
Laravel 5.3 Cheat Sheet posted 8 years ago
New Laravel 5.3 Cheat Sheet which include: Artisan Commands
So you want to level up with Laravel? The first step is to install Laravel on our machine. We'll do that installing Composer, pulling in Laravel's helpful installer utility, and then running larave
API could be consumed in many ways in Laravel. For e.g. you can create your own custom API Package to consume API on the remote application. Or there is a better way. This is by using the Guzzle HTTP Client.
API could be consumed in many ways in Laravel. For e.g. you can create your own custom API Package to consume API on the remote application. Or there is a better way. This is by using the Guzzle HTTP Client.
Shows how to create simple custom API within your project that allows external application to consume it.
How to upgrade npm? posted 8 years ago
How to upgrade npm? You can upgrade npm easily by running npm install npm@latest -g on to your terminal
Error: The libsass binding was not found in after upgrading npm using npm install npm@latest -g
Problem: I got bindShared application error after updating from laravel 5.1 to 5.2. SOLUTION: Remove the outdated package illuminate/htm:^5.0 and remove its service provider too. Then replace with "laravelcollective/html": "5.2.*"
To Fix 1. var ElixirGroup = require('laravel-elixir-group'); 2. Add laravel-elixir-group into the package.json 3. Run npm install.
To fix this error in Laravel 5, execute php artisan key:generate command. Then, copy the generated application key and add it into the .env file APP_KEY=xlhF31NeOlibJcoOW9tvZg7TkHcAZI3a.
First method is to Create Test Database > Specify Test Database Connection in Config > Modify phpunit.xml. Second is to create .env.testing and load this environment on TestCase->createApplication()
To copy or duplicate table row without overwriting a existing one, use eloquent replicate() method. This will create a copy of the existing row with a new id.
Consuming my own Laravel API: I have Laravel API made available for external application. But how do I consume this API from my own Laravel Application?
Solution to Problem : Argument 1 passed to Illuminate\Database\Eloquent\Relations\BelongsToMany::formatSyncList() must be of the type array, null given, called in ...
Use this command ln -s <real folder> <link folder> to create symbolic link. With this command <link folder> will actually contain everything <real folder> have.
Solution for: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) or Connection for controluser as defined in your configuration failed while trying to access via phpmyadmin.
You can ignore files locally without polluting the global .gitignore used by everyone else. For this you can modify your .gitconfig file.
Git Cheat Sheet posted 9 years ago
Browse and download summary of Git command line instruction for quick reference. Git is the open source version control system that facilitates GitHub activities on PC.
Git Cheat Sheet posted 9 years ago
Browse and download summary of Git command line instruction for quick reference. Git is the open source version control system that facilitates GitHub activities on PC.
Instead of typing a long command, use a Bash rc (keyboard shortcut) on Linux / Unix / Mac OS X to speed up your day to day task.
If Laravel 5 Event is not firing, you can run php artisan optimize, composer dump autoload and php artisan clear-compiled command.
Sometime you might screw up your phpmyadmin after upgrading Apache or the PHP. This article show you how to remove and reinstall phpmyadmin easily in Ubuntu.
On Updating Ubuntu OS sometime the Unity Desktop doesn't fully load. This short and sweet article shows how to reinstall Ubuntu Unity Desktop without loosing your sleep.
What is new in PHP 7 posted 9 years ago
Find out and learn some of the new features introduced in PHP7 such as Scalar Typehints, return type declarations and more. Also contribute your knowledge on PHP7 on this post.
XML Lint is a command line tool that allows you to format and Parse Badly Formed XML Data. Instruction on installing XMLLint on Linux (Ubuntu, Centos, Fedora, openSUSE) operating system.
When should you denormalize a database and when you shouldn't. Pros and Cons of denormalizing a database. How can performance be optimized by denormalizing a database.
Solution to get rid of Whoops, looks like something went wrong in Laravel 5 and Laravel 5.1.
HTML 5 Cheat Sheet posted 9 years ago
View and Download Supported and Not Supported HTML 5 Tags on your PC, Tablet and Mobile Devices...
Easy, Quick, Concise Laravel 5.1, Laravel 5 and Laravel 4 Cheat Sheet - PHP Artisan, Composer, Routing, Database Schema, Database Indexes, Database Foreign Keys, Database Column Types, Eloquent, Views, SSH, Unit Test and more ...
Easy, Quick, Concise Laravel 5.1, Laravel 5 and Laravel 4 Cheat Sheet - PHP Artisan, Composer, Routing, Database Schema, Database Indexes, Database Foreign Keys, Database Column Types, Eloquent, Views, SSH, Unit Test and more ...
Learn how to increment a comma separated number inside an element using the animate function in JQuery.
Learn how to use setfacl and getfacl to set and view the files and folder permission. Using setfacl will ensure all the files and folder will have a permission specified by setfacl.
Demonstration with example on how to loop through all the elements having a same class on the page
Find out how to copy files and folder from your local computer using linux to remote linux server with different port number other than 80 or 8080.
Solution to get rid of blank page while accessing Laravel Page.
Laravel 123 posted 9 years ago
Laravel Installation Quick Tutorial
Laravel Ajax Route Controller Relationship.
Mutators only work when I create a record and not when I update a record on Laravel.
Solution to fix failed to open stream: Permission denied error on Laravel