【发布时间】:2019-06-27 16:22:31
【问题描述】:
我将我的网站从本地主机移动到共享主机,一切都很好,但是当我将文件直接上传到 public_html 时我需要:像这样 public_html/存储/ 我尝试使用类似的东西:
symlink('/home/abdoweb/bmcelarave/storage/app/public', '/bmce/public_html/storage')
问题依然存在。
我的控制器:
public function addcategory(Request $request){
$title = $request->input('category_name');
$image = $request->file('category-image');
$name = $image->getClientOriginalName();
$image->move(storage_path().'/app/public/category',$name);
$data[] = $name;
$query= DB::table('category')->insert(
[
'title' => $title,
'image' => $name,
"created_at" => Carbon::now()
]);
if($query){
return redirect('categories');
}
}
我的文件夹:
home/abdoweb/{bmcelaravel}
核心 laravel:
home/{bmce}
谢谢。
【问题讨论】:
标签: laravel laravel-5 eloquent laravel-5.5