Level 4
thank yeah all for your help i final found the solution
gracias amigo
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
the answer was this i changed the $file variabe to this $graphics
public function store(Request $request)
{
$this->validate($request, [
'name' => 'required|min:3',
'time' => 'required|min:3',
'description' => 'required|min:10',
'file' => 'required|file|max:2048'
]);
if (Auth::check()) {
$upload = $request->file('file');
$path = $upload->store('public/storage/graphics');
// here is where i changed
$graphics = Graphic::create([
'name' => $request->name,
'time' => $request->time,
'description' => $request->description,
'file_title' => $upload->getClientOriginalName(),
'file' => $path,
'user_id' => Auth::user()->id
]);
return view('post.graphics.payment', ['graphics' => $graphics]);
}
}
Please or to participate in this conversation.