<repo_name>inyaJohnson/php-api<file_sep>/app/repo/Animal.php
<?php
/**
 * Created by PhpStorm.
 * User: tujailer
 * Date: 10/18/19
 * Time: 8:35 PM
 */

namespace App\Repo;

interface  Animal{
    public function eat();
}<file_sep>/app/repo/ProductBind.php
<?php
/**
 * Created by PhpStorm.
 * User: tujailer
 * Date: 10/18/19
 * Time: 7:30 PM
 */

namespace App\Repo;

use App\Model\Product;
use App\Model\Review;


class ProductBind extends Product
{
    function reviews(){
        return $this->hasMany(Review::class);
    }

}<file_sep>/routes/web.php
<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
use App\Model\Product;

//Route::get('/', function () {
//    return view('welcome');
//});


Route::get('/', function () {
    $products = Product::find(4)->reviews;
    // dd($products);
    return view('output', ['data' => $products]);
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
