Configuring and using multiple databases in Laravel

Step by step guide to display wordpress posts in Laravel 5.4

Configuring and using multiple databases in Laravel | Fetching WordPress posts in Laravel | Creating Global scopes in Laravel Models laravel 5 multiple databases | laravel model database laravel 5.2 multiple databases laravel 5 dynamic database connection laravel dynamic database connection | laravel change default database connection laravel change database connection laravel multiple db connections […]

Read More

Understanding Application or directory structure in laravel 5.4

Understanding Application Structure of Laravel 5.4 Framework

laravel 5 folder structure laravel 5.4 folder structure laravel 5.4 directory structure laravel folder structure best practices laravel 5 application structure laravel folder structure Laravel provides clean and easy to understand, configurable application directory Structure. After installing Laravel successfully in root folder you will find below directories or files that are used to create small […]

Read More

Uploading a Base 64 image in laravel 5.4

Function to create an image from base64 format in Laravel 5.4

Uploading a Base 64 image in laravel 5.4 //Function to save a base64 image in laravel 5.4 public function createImageFromBase64(Request $request){ $file_data = $request->input(‘company_logo’); //generating unique file name; $file_name = ‘image_’.time().’.png’; @list($type, $file_data) = explode(‘;’, $file_data); @list(, $file_data) = explode(‘,’, $file_data); if($file_data!=””){ // storing image in storage/app/public Folder \Storage::disk(‘public’)->put($file_name,base64_decode($file_data)); } }

Read More

Sanitize Request in laravel 5.4

Laravel 5.4: Sanitize Request Input by using Sanitizing Middleware

Laravel 5 contains a couples of middlewares.In Laravel 5.4 two new middlewares are introduced for Sanitizing inputs in requests.They are TrimStrings ConvertEmptyStringsToNull . Both middlewares are very usefull in order to sanitize requests. TrimStrings Middleware This middleware is used to remove all white spaces of inputs of request. ConvertEmptyStringsToNull: This middleware convert all blanks requests […]

Read More

Reading writing and deleting a File from disk or filesystem in Laravel 5

An Introduction To Laravel’s FileSystem Laravel uses Frank de Jonge PHP Package For managing Filesystem.Laravel provides simple drivers to manage local filesystem, Amazon S3, and Rackspace Cloud Storage.You can easily switch between these filesystems with no change in API’s. Configuration Laravel makes Filesystem configuration is an easy task, the configuration of filesystem is located at […]

Read More