Search
 
SCRIPT & CODE EXAMPLE
 

PHP

convert image to base64 in laravel

$image = base64_encode(file_get_contents($request->file('image')->path()));
Comment

laravel upload base64 image

$image = $request->image;  // your base64 encoded
        $image = str_replace('data:image/png;base64,', '', $image);
        $image = str_replace(' ', '+', $image);
        $imageName = str_random(10).'.'.'png';
        File::put(storage_path(). '/' . $imageName, base64_decode($image));
Comment

PREVIOUS NEXT
Code Example
Php :: transient wordpress 
Php :: remove gutenberg cpt 
Php :: laravel 9 Route::controller 
Php :: php receive post 
Php :: use font awesome in laravel 8 
Php :: get current authenticated user laravel 
Php :: execute php in terminal 
Php :: laravel drop foreign column 
Php :: get unique array from multidimentional array by value in php 
Php :: foreach ph 
Php :: laravel use variable inside callback function 
Php :: get post by meta value 
Php :: reset password symfony 
Php :: 1.0E-6 to decimal in php 
Php :: login with email and phone laravel 
Php :: laravel eloquent set timestamps values upon seed 
Php :: yii2 clear schema cache 
Php :: wp_login_form wrong password redirect 
Php :: get server ip php 
Php :: new DateInterval 1 hour 
Php :: install phpmyadmin on vagrant homestead on mac 
Php :: why session is not working in laravel 
Php :: wp_list_pluck 
Php :: Generate Unique Random String With Any Character Size | unique random php generator | php unique id generator 
Php :: how to get structure of table in codeigniter 
Php :: php excel to array 
Php :: what does defined di in php 
Php :: move_uploaded_file 
Php :: php catch echo output 
Php :: how to install laravel 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =