# Class 'App\Product' not found (ok)

C:\xampp\htdocs\blog\app\Product.php

```
<?php
  
namespace App;
  
use Illuminate\Database\Eloquent\Model;
   
class Product extends Model
{
    
}
```

```
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Input;
use Redirect;
use Validator;
use App\Product;
class ProductController extends Controller {
  /**
   * Display a listing of the resource.
   *
   * @return \Illuminate\Http\Response
   */
  public function getPostDetail($id) {
    $post = Product::find($id); //trả về một instance model
    echo '<pre>';
      var_export($post);
    echo '</pre>';
    die();
  }
}
```

![](https://1957079826-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MCBeDUD-PK_RF-YgJRe%2F-MCW6BOnHVPsq3fPmaTB%2F-MCW6vB_C1nXPXMHz6Hy%2FScreenshot_13.png?alt=media\&token=30f41feb-c9c6-4051-b0d4-ed86bd5b78ff)
