skip to Main Content

Laravel 11 – Auto discovery of event listeners inside a custom directory

Before Laravel 11, I used to bind listeners to events inside the AppProvidersEventServiceProvider provider class, for example: <?php namespace AppProviders; use AppEventsMyEvent; use AppListenersMyListener; use IlluminateFoundationSupportProvidersEventServiceProvider as ServiceProvider; use IlluminateHttpClientEventsResponseReceived; class EventServiceProvider extends ServiceProvider { /** * The event to…

VIEW QUESTION

Bootstrap 5.3 events not working in jQuery .on event

This is such an odd issue. I've never had any issues like this before... Here is my dropdown... $('#mydropdown').on('show.bs.dropdown', function() { console.log('hit 1'); }); $(document).on('show.bs.dropdown', '#mydropdown', function() { console.log('hit 2'); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"/> <div class="dropdown" id="mydropdown">…

VIEW QUESTION

Laravel – Livewire dispatching event modal with a dynamic content

Im trying to show the user the times when he's available by days and display them in a modal. public function searchAvailability(){ $this->validate(); $doctor = Doctor::where('id',$this->selectedDoctor)->first(); $doctorTimes = DoctorTime::where('doctor_id',$this->selectedDoctor)->get(); $parsedDate = Carbon::parse($this->selectedDate); $dayName = $parsedDate->format('l'); if ($parsedDate->isFuture()) { foreach($doctorTimes as…

VIEW QUESTION
Back To Top
Search