File: //var/www/ivs.kaunokolegija.lt/laravel/app/View/Components/Modal/CreateFormModal copy.php
<?php
namespace App\View\Components\Modal;
use Closure;
use Illuminate\View\Component;
use Illuminate\Contracts\View\View;
class CreateFormModal extends Component
{
/**
* Create a new component instance.
*/
public function __construct(
public $compName,
public $route,
public $title = null,
public $fieldsLink,
public $action = 'store',
public $useModal = false
)
{
$this->title = $this->title ?? trans('global.add');
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.modal.create-form-modal');
}
}