mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2024-12-11 17:59:48 +01:00
951df23c91
Update to Laravel 9 Commit for the upcoming from-end update.
41 lines
756 B
PHP
41 lines
756 B
PHP
<?php
|
|
|
|
namespace App\View\Components;
|
|
|
|
use Illuminate\View\Component;
|
|
|
|
class Modal extends Component
|
|
{
|
|
public $title = '';
|
|
public $id = '';
|
|
/**
|
|
* Create a new component instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct($title, $id = '')
|
|
{
|
|
$this->title = $title;
|
|
$this->id = $id;
|
|
}
|
|
|
|
/**
|
|
* Get the view / contents that represent the component.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View|\Closure|string
|
|
*/
|
|
public function render()
|
|
{
|
|
return view('components.modal');
|
|
}
|
|
|
|
public function getModalIdString(): string
|
|
{
|
|
if ($this->id != '') {
|
|
return $this->id;
|
|
}
|
|
|
|
return "model" . rand(1111, 9999);
|
|
}
|
|
}
|