Namespace blade component
This commit is contained in:
36
app/View/Components/NamespaceComponent.php
Normal file
36
app/View/Components/NamespaceComponent.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user