laravel-livewire

Is there a proper way to wire up Trix editor with Livewire?

◇◆丶佛笑我妖孽 提交于 2021-02-18 17:10:54
问题 When wiring together Trix editor content with Livewire, I am stumbling into problems. I believe that the issue is that when Livewire receives content from Trix, the content is swapped out and Trix becomes disabled. Is there a better way? What I have done, that works, is as follows. At the moment, the page is the redirected to itself in order to reboot Trix (defeating the whole point of Livewire, but it's being used for other things too). <div> <input id="newCommentTextTrixContent" type=

Sending laravel livewire event from child to parent gives fingerprint error

假如想象 提交于 2021-02-11 15:06:34
问题 Im getting this error when sending an event from child to parent container. I am using wire:key as recommended but get the JS error Cannot read property 'fingerprint' of null . Any ideas what I am doing wrong? Please see example below. Container class Container extends Component { public $listeners = [ 'submit' ]; public function render() { return view('livewire.container'); } public function submit() { //dd("The child says wow - it works!"); } } with view <div> <h1>Im the container</h1>

Sending laravel livewire event from child to parent gives fingerprint error

匆匆过客 提交于 2021-02-11 15:06:00
问题 Im getting this error when sending an event from child to parent container. I am using wire:key as recommended but get the JS error Cannot read property 'fingerprint' of null . Any ideas what I am doing wrong? Please see example below. Container class Container extends Component { public $listeners = [ 'submit' ]; public function render() { return view('livewire.container'); } public function submit() { //dd("The child says wow - it works!"); } } with view <div> <h1>Im the container</h1>

How to refresh the component after the queue job is finished?

匆匆过客 提交于 2021-02-09 11:12:34
问题 I have a table products and job_statuses using this package: laravel-job-status There is a column in job_statuses called status the package made this column finished once the queue job is finished! So I created a column in products table called job_status_id (relation with job_statuses) just to save the job status id in the products table to see if this job is finished! Simply I created a component using Livewire for just refresh single product when the job finished refresh the component:

How to refresh the component after the queue job is finished?

狂风中的少年 提交于 2021-02-09 11:12:00
问题 I have a table products and job_statuses using this package: laravel-job-status There is a column in job_statuses called status the package made this column finished once the queue job is finished! So I created a column in products table called job_status_id (relation with job_statuses) just to save the job status id in the products table to see if this job is finished! Simply I created a component using Livewire for just refresh single product when the job finished refresh the component:

Livewire multiple wire:click, first one works, rest do not

若如初见. 提交于 2021-02-05 11:22:06
问题 I am putting together a CRUD app using livewire and my issue is with wire:click on the different buttons. I have a create modal come up and the wire:click in that modal works perfectly. However the edit and delete buttons on the main page do not fire off when clicked. The only way I can get the edit button to fire is if it is the only button with wire:click on the page. These two buttons are inside a @foreach loop for each organization. This loop builds out the table <button class="btn btn-sm

Make a separate livewire component to delete an array of users along with traits

对着背影说爱祢 提交于 2021-01-29 15:45:00
问题 Description I have a "belongsToMany" eloquent relationship between users and roles. I have created a trait for bulk actions, so I'm able to delete users in bulk. Now what I need to do here is, I need to make a separate livewire component to delete users in bulk. But the problem here is that the trait which is being used in Livewire/Backend/UserController needs rowsQuery property, which is present in the UserController and as whenever the users are selected to be deleted, it calls the

Laravel LiveWire Pagination issue

岁酱吖の 提交于 2021-01-29 15:35:39
问题 I am new to LiveWire and trying to build simple app with Laravel , jetstream and livewire My application get data from DB and show in Table with Pagination. every thing is working fine but issue is when i click on any page I got URI '?page=2' I dont want to see this URI in Url my blade is also simple as bellow <x-app-layout> <x-slot name="header"> </x-slot> <div class="py-2"> <div class="mx-auto sm:px-2 lg:px-2"> <div class="bg-white overflow-hidden shadow-xl sm:rounded-lg"> <div class="flex

How can I create dynamic public properties and data via a parent component to a child component in livewire / laravel?

孤街浪徒 提交于 2021-01-29 12:48:05
问题 In a Laravel 8 application I have two components. Input.php and Form.php Input.php <?php namespace App\Http\Livewire\General; use Livewire\Component; class Input extends Component { public $name; public $model; public $label; public function render() { return view('livewire.general.input'); } } input.blade.php <div class="mt-3"> <label for="{{ $name }}" class="sr-only" > $label </label> <input wire:model="{{ $model }}" id="{{ $name }}" placeholder="{{ $label }}" autocomplete="off" class="w

How to send data colected with Laravel Livewire to Fortify?

≡放荡痞女 提交于 2021-01-28 18:35:14
问题 I'm not familiar with Vue.js at all, so found a good replacement using Livewire. The challenge that I've got to solve is to have a user friendly registration on my website using Fortify + Livewire. The registration process is a multistep one and depends on the choices that the user makes it will load the relative fields. So far I set up the Fortify views by adding in the FortifyServiceProvider.php file the following code: Fortify::loginView(function () { return view('auth.login'); }); Fortify