You've already forked lubo_comment_query
组件抽象
This commit is contained in:
43
app/View/Components/Links/UserLink.php
Normal file
43
app/View/Components/Links/UserLink.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components\Links;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class UserLink extends Component
|
||||
{
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
public $plt_id;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
public $mid;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(string $name, $pltId, $mid)
|
||||
{
|
||||
$this->plt_id = $pltId;
|
||||
$this->mid = $mid;
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\View|\Closure|string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('components.links.user_link');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user