LinkStack/app/View/Components/Modal.php
Julian Prieber 951df23c91 Laravel 9
Update to Laravel 9

Commit for the upcoming from-end update.
2022-11-08 16:11:59 +01:00

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);
}
}