A lot of things
This commit is contained in:
@@ -19,7 +19,8 @@ class CategorySelector extends Component
|
||||
public function __construct(
|
||||
public string $section,
|
||||
public array $selected = [],
|
||||
public bool $required = true
|
||||
public bool $required = true,
|
||||
public bool $news = false
|
||||
)
|
||||
{
|
||||
$this->categories = Category::query()
|
||||
@@ -36,6 +37,6 @@ class CategorySelector extends Component
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.category-selector');
|
||||
return $this->news === true ? view('components.news-category-selector' ) : view('components.category-selector');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user