I have two project or url
First url like this :
http://myshop.dev/
Second url like this :
http://backend.myshop.dev/
If the second url, I upload image it will save the image file here :
http://myshop.dev/img/image1.jpg
Both projects use the same database
My code to upload image on the second project like this :
public function __construct(...)
{
...
$this->path = './img';
}
...
public function store(...) {
...
$filename = Input::file('photo')->getClientOriginalName();
...
Input::file('photo')->move($this->path, $filename);
...
}
It works
If I upload image it will save the image in backend-myshop\public\img
But, I want to uploaded image not saved there. But in my first project
So, I want the image file saved here : myshop\public\img
How can I do it?