I am using laravel lumen to make API. I have to convert and save blade file in image and have to send image path in api.
How to do that? I am not getting idea. I tried by below code-
how to convert view file in image and return in api in laravel
But not working.
What I am doing wrong? Or any other solution?
Related
In Laravel, I am trying to create a pdf file from an API response PDF data string. How can i create and save PDF in storage directory physically in Laravel.
Check the image below:
In this image i hit an API and got a response in variable data->labelDataPdf . I want to create a pdf file using this string value.
Try this package, it implements a popular PHP library (http://www.fpdf.org/) for pdf generation in Laravel
I am trying to upload images to S3 using laravel livewire file upload, everything works fine in development, but after deployment on staging or production, I still can upload some images but others ( mostly taken with Iphone ) are giving 422 error, I can upload them after cropping them. How can I solve this issue? I am using Heroku.enter image description here
enter image description here
Okay, I solved this by adding FILESYSTEM_DRIVER=s3 into config vars in productions.
Using laravel 5.8 . Have the below img tag in the mail blade template . logo image exists in the directory. Laravel code times out when it encounters the below statement. Logo seems to be not appearing in the email if i have the url directly in the image tag.
Is there any time out settings i need to do in laravel 5.8 for the embed to work? When i test the below in my local system it works. Integrated with aws ses.
embed(url('/assets/img/logo/logo-2.png')) }}">
Using public_url() function fixed the issue. Also keep logo size minimal for email.
I created a little API using Laravel, my doubt is where I should locate the images in the project and given a concrete API call how I return a URL to an image stored in my project?
You should return your image path like:
First things is retrieve/static located the images folder path in the project.And then retrieve name of image from database using query. Finally Concatenating name of image which is stored in DB.
http://yourSite.com/folderPath.$imageName
Because when upload images, We have added only name of images not full URL.
Hello can anyone help me with this problem in laravel?
In local server when I upload image it is working but in live server it is not working because of this problem:
[2015-05-22 10:38:23] production.ERROR: exception 'Intervention\Image\Exception\NotWritableException'
with message
Can't write image data to path (/var/www/vhosts/domain-name/httpdocs/mainsource/img/courses/1432291103.jpg)
and if i create a folder inside mainsource img/courses image will be saved but doesn't show in the page.
Also i have the same folder img/courses in public from which also my courses page reads images and shows images.