Here, I found a solution to the above-mentioned question. In the migration table for image.. after this make a seeder and add the following for seeder you may find the tutorial on youtube. now the fetching part is here open your blade file and add the line to it and important thing is that data fetching will be in the loop only.
$table->string('nameofthetable');
public function run()
{
DB::table('products')->insert([
[
'name'=>'Burger',
'price'=>'69',
'gallery'=>"search on google photo you want and open an
new tab and add a link over here to get the thing right ",
'category'=>'western',
'description'=>'A good and delicious burger at just cheaper price',
]
])
}
@foreach ( $products as $item )
<div class="lg:w-1/4 md:w-1/2 p-4 w-full">
<a class="block relative h-48 rounded overflow-hidden">
<img alt="ecommerce" class="object-cover object-center w-full h-full block" src="{{ $item['gallery'] }}">
</a>
<div class="mt-4">
<a class="active" href="{{ url('/detail{}') }}"><h3 class="text-gray-500 text-xs tracking-widest title-font mb-1">{{ $item['name'] }}</h3></a>
<h2 class="text-gray-900 title-font text-lg font-medium">{{ $item['categeory'] }}</h2>
<p class="mt-1">{{ $item['price'] }}</p>
</div>
</div>
@endforeach ()
- i will soon upload my E-commerce project on Github bookmark the below link to stay tuned . https://github.com/Anshu1802