look if view_product file is present or not
resources/views/admin/products/view_products.blade.php
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi, m trying to show database records in admin panel and its showing me error: InvalidArgumentException View [admin.products.view_products] not found. any solution to resolve it??
my function is:
public function viewProducts(){
$products = Product::get();
$products = json_decode(json_encode($products));
//echo "<pre>"; print_r($products); die;
return view('admin.products.view_products')->with(compact('products'));
}
Route is:
Route::get('/admin/view-products','ProductsController@viewProducts');
this is form:
<thead>
<tr>
<th>Product ID</th>
<th>Category ID</th>
<th>Product Name</th>
<th>Product Code</th>
<th>Product Color</th>
<th>Price</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@foreach($products as $product)
<tr class="gradeX">
<td>{{ $product->id }}</td>
<td>{{ $product->category_id }}</td>
<td>{{ $product->product_name }}</td>
<td>{{ $product->product_code }}</td>
<td>{{ $product->product_color }}</td>
<td>{{ $product->price }}</td>
<td class="center"><a href="{{ url('/admin/edit-product/'.$product->id) }}" class="btn
btn-primary btn-mini">Edit</a> <a id="delCat" href="{{ url('/admin/delete-
product/'.$product->id) }}" class="btn btn-danger btn-mini">Delete</a></td>
</tr>
@endforeach
show us your resource folder content like
resources
js
scss
views
admin
view_product.blade.php
...
...
Please or to participate in this conversation.