Apr 12, 2016
6
Level 1
Laravel CKEDITOR, image upload
Hi guys,
I am new to laravel, I wanted to create an upload image function so CKEDITOR can uplaod images to the server. I've searched on the internet for some tutorials or examples.
I tried this example, but it didn't work.
if (file_exists("img/" . $_FILES["upload"]["name"]))
{
echo $_FILES["upload"]["name"] . " already exists please choose another image.";
}
else
{
move_uploaded_file($_FILES["upload"]["tmp_name"],
"img/" . $_FILES["upload"]["name"]);
echo "Stored in: " . "img/" . $_FILES["upload"]["name"];
}
do you guys have a better example or tutorial.
Please or to participate in this conversation.