Namespace blade component

This commit is contained in:
2020-10-02 02:57:58 +05:00
parent adab915ff8
commit 0ad44d2a13
4 changed files with 66 additions and 27 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace App\View\Components;
use Illuminate\View\Component;
class NamespaceComponent extends Component
{
public $name;
public $color;
public $key;
public $description;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct($name,$color, $key, $description)
{
$this->name = $name;
$this->color = $color;
$this->key = $key;
$this->description = $description;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\View\View|string
*/
public function render()
{
return view('components.namespace-component');
}
}