在laravel中的公共文件夹中获取图像路径

I'm making direction using this method to upload my image

 mkdir(public_path().'/website/'.$path,0777, true);

It's supposed to create it on the root folder (Public_html) , but i found it created on new folder with name (public ) , so now i can't get the path of the image using this code

 <img src="{{url('public/website/'.$file->path.$file->file)}}"  />

how to get the correct path of the image or even create the folder on the public_html root path ?

I didn't tested it but... did you have tried this way?

mkdir(public_path('/website/'.$path),0777, true);

To me, if I'm not wrong your problem could be only a matter of writing.

Try this to get image

 <img src="<?php echo public_path().'/website/'.$path.$file->file;  ?>"  />
you can use public_path(); function in laravel 
or
<img src="{{ public_path().'/website/'.$file->path.'/'.$file->file;}}"  />
or
<img src="/website/{{$file->path.$file->file}}"  />

You try this to get your image content

  <img src="<?php echo asset('/').'public/'.$path.$file->file;  ?>"  />

See Here for more info

You can use laravel helper function asset for eg. $url = asset('img/photo.jpg'); then you will get full path with public directory. $url return www.your.domain.com/public/img/photo.jpg