ldc-nature-and-respect/app/View/Components/RecipeProductStoerer.php
2022-11-18 12:39:03 +01:00

33 lines
680 B
PHP

<?php
namespace App\View\Components;
use Illuminate\View\Component;
use App\Product;
class RecipeProductStoerer extends Component
{
public $id;
public $product;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct($id)
{
//
$this->product = Product::where('id', $id)->first();
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
*/
public function render()
{
$product = $this->product;
return view('components.recipe-product-stoerer', compact('product'));
}
}