Documentation

DynamicSelect extends Component

DynamicSelect Laravel Blade Component

A dynamic select input component that fetches options from a specified route. Supports customizable labels, hints, and placeholder text for enhanced user experience.

Features:

  • Dynamic option loading from a given route
  • Customizable labels and hints
  • Placeholder support
  • Form validation integration
  • Livewire real-time updates
  • Bulma CSS framework integration
  • Mobile-friendly responsive design
Tags
author

V360

version
1.0.0
since
2024-07-10
example

Table of Contents

$child  : string
$class  : string
$hint  : string|null
$icon  : string|null
$id  : string
$label  : string|null
$name  : string
$options  : mixed
$placeholder  : string|null
$route  : mixed
$value  : string|null
__construct()  : mixed
Create a new component instance
render()  : View|string
Get the view / contents that represent the component.

Properties

Methods

__construct()

Create a new component instance

public __construct(string $name, mixed $route, string $child[, mixed $options = [] ][, string|null $value = null ][, string|null $id = null ][, mixed $label = null ][, string|null $classes = null ][, string $placeholder = 'Select' ][, string|null $hint = null ][, string|null $icon = null ]) : mixed
Parameters
$name : string
$route : mixed
  • route name or array with route name and parameters
$child : string
  • child key in the response data
$options : mixed = []
  • options for the select, can be an array or a Collection
$value : string|null = null
  • selected value
$id : string|null = null
  • HTML id attribute
$label : mixed = null
  • label for the select, can be a string or false to hide it
$classes : string|null = null
  • additional CSS classes for the select
$placeholder : string = 'Select'
  • placeholder text for the select
$hint : string|null = null
  • hint text to display below the select
$icon : string|null = null
  • icon to display in the select
Return values
mixed

render()

Get the view / contents that represent the component.

public render() : View|string
Return values
View|string

Search results