Hi Laracasts Community, I need some help. I have never used dependent dropdowns but I am open to learning.
I have a form with different departments that are selected by a normal select input. When I select let's say, the accounts department on the select, another input (multi-select to be precise) should appear and list all members who belong to that department so that I may share with them information (e.g. a message to their phones)
Kindly help.
@Sinnbeck Yes, now what happens in the case where the first select input has to get different system users i.e. Accountants, Officials, Janitors, and Marketers, how do I load that, then use the tips you suggested?
Hi @sinnbeck and @snapey, I need your help, below is my Livewire Component.
<?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\Accountant;
use App\Models\Janitor;
use App\Models\Marketer;
class Officials extends Component
{
public $title;
public $message;
public $accountants;
public $marketers;
public $janitors;
public function render()
{
$accountants= Accountant::all();
$janitors= Janitor::all();
$marketers= Marketer::all();
return view('livewire.officials', compact('accountants', 'janitors', 'marketers'));
}
}
The help I need is this; when I click on the blade where the value is, let's say, accountant, I want an input field to appear and it has the names of the accountants so that I can select either a few or all, to send them the message.