Overriding default table name in Laravel modelYou can use custom table in Laravel by overriding protected $table property of Eloquent. Below is sample usesclass User extends Eloque ...
Eloquent cursor()
The cursor method allows you to iterate through your database records using a cursor, which will only execute a single query. When processing large amounts of d ...
Fixing Permission denied Error in LaravelSometime you got Permission denied error in Laravel. The error was caused because Laravel tries to write something to the file system and i ...
Advantages to using route method spoofing in LaravelAs HTML forms does not supports PUT, PATCH or DELETE request. So, when defining PUT, PATCH or DELETE routes that are called from ...
How to sanitize input data in declarative manner in Laravel
Laravel 5 contains a couples of middlewares. In Laravel 5.4 two new middlewares are introduced for Sanitizing inputs in ...
How to get excerpt from string in Laravel PHPSimple PHP method/function to create excert in Laravel/**
* Get excerpt from string
*
* @param String $str String to get an exce ...
Non-static method illuminate\http\request::all() should not be called statically
This issue was generated when we are calling a non-satic method of IlluminateHttpRequest class , T ...
Secure .Env File In Laravel
If your are a developer and developing any app on Laravel or Symfony then you certainly is familiar with a file named as .env file which is presen ...
While installing a PHP package via composer two ways of downloading a package i.e source and dist . For stable version of packages by default composer will use dist.The source is a ...
Simple function to Upload a Base 64 image in Laravel
public function createImageFromBase64(Request $request){
$file_data = $request->input('company_logo'); ...