Hi @ Shadow, Still the same issue, Every other field (including the slug I just added) saves except the image field.
This is my Seeder table that saves completely while sending from the form skips the image.
$t1 = 'Cashpira Payments';
$t2 = 'Sanatech Global';
$t3 = 'Sifen Technologies';
$r1 = [
'business_name' => $t1,
'slug' => str_slug($t1),
'tagline' =>'Inspiring innovations',
'about' => 'Payment Solutions Company',
'business_logo' => asset('uploads/cashPiraBrand.jpg'),
'category_id' => 1,
'city_id' => 1,
'location' => '4 Trnity House, Mabushi, Abuja',
'business_email' => '[email protected]',
'business_phone' => '07045321122',
'service_one' => 'Payments Solutions',
'service_two' => 'Mobile Money Transfer Solutions',
'service_three' => 'Tax Solutions'
];
$r2 = [
'business_name' => $t2,
'slug' => str_slug($t2),
'tagline' =>'Promoting Indigeous Solutions',
'about' => 'Oil and Gas Company',
'business_logo' => asset('uploads/sanatech.jpg'),
'category_id' => 4,
'city_id' => 2,
'location' => '43 Woji Housing Estate, Port Harcourt',
'business_email' => '[email protected]',
'business_phone' => '07055321127',
'service_one' => 'Electrification',
'service_two' => 'Telecoms Installation',
'service_three' => 'Power Solutions'
];
$r3 = [
'business_name' => $t3,
'slug' => str_slug($t3),
'tagline' =>'Powering Ideas and Innovation',
'about' => 'Technology Company',
'business_logo' => asset('uploads/sifenBrand.jpg'),
'category_id' => 5,
'city_id' => 1,
'location' => '43 Woji Housing Estate, Port Harcourt',
'business_email' => '[email protected]',
'business_phone' => '07067721129',
'service_one' => 'Smart Power Solutions',
'service_two' => 'Smart Software Applications',
'service_three' => 'Business Innovation'
];
Basic::create($r1);
Basic::create($r2);
Basic::create($r3);
my Controller
if($request->hasfile('business_logo'))
{
$file = $request->file('business_logo');
$extension = $file->getClientOriginalExtension(); // getting image extension
$filename =time().'.'.$extension;
$file->move('uploads/logos/', $filename);
}
$basic = Basic::create([
'business_name' => $request->business_name,
'tagline' => $request->tagline,
'about' => $request->about,
'location'=>$request->location,
'business_email' => $request->business_email,
'business_phone' => $request->business_phone,
'business_logo' => 'uploads/logos/'. $filename,
'service_one' => $request->service_one,
'service_two' => $request->service_two,
'service_three' => $request->service_three,
'slug' => str_slug($request->business_name)
]);
$basic->save();
return redirect()->back()->with('success', 'Page created successfully.');
and in my view I have,
Business Logo
I quite appreciate your kind assistance.