#### Category : laravel-livewire

I’m working with checkboxes in Laravel and Livewire, I have a problem on editing record I can get to checked ids users were selected during record creation. Here is my flow <table> <thead> <tr> <th>#</th> <th>Name</th> <th>Job Title</th> <th>Status</th> <th></th> </tr> </thead> <tbody> @if (isset($members)) @foreach ($members as $key=>$user) <tr> <td>{{++$key}}.</td> <td class="text-capitalize">{{$user->full_name ?? ”}}</td> ..

This is my input <input type="number" value="1" name="qty" wire:model.debounce.50ms="qty" max="100" min="1"> When I enter new input qty will change but I call component which is connected to qty @livewire(‘site.add-cart’, [‘qty’ => $qty ]) But qty do not change in component which is I called , What I can do please give advise… Sourc.. Read more I have a form in modal and I’m using Livewire, what’s really happen is when I submit form everything works correctly but it’s just create duplicate records! first time creates 2 duplicates, second time creates 3 and more and more .. I don’t know how to fix this ! I’d be appreciated for your helps. .. Read more I have a question. I have this component that displays a flash notification. By default is set to show a green checkmark, but I wanted to also include code so I can send a "type" and a "message" variables to the component and be able to either show the green success message or a red .. Read more I am trying to create this filter thing with check boxes. I am trying to toggle the state of the check boxes to be true or false <x-input.checkbox wire:click="$toggle(free_trial)"/> public $free_trial = false; public$free_forever = false; public $pay_per_user = false; public$progressive = false; When I do this approach, I am not sure how ..

Good morning people, everything fine? I have an application in Laravel 8 that uses Livewire components to update screens without having to implement AJAX. I would like to know the easiest way to work with Broadcast (if it exists) using Livewire to update the screen of other users in real time when an action is ..

I’ve been watching a comment livewire tutorial from codecoure. Everything worked fine till a form that will store the comment is not going through. I tried dd, but I get nothing. In the url after the slug it says comment=whateverItyped. i’ve been using this tutorial in a story posting board, but I’m clueless where the ..

I’m Importing a CSV file to a livewire component and trying to run some validation for each row of the file but I’m having problems doing this. It seems that my validation is doing nothing. Here is how my Livewire component looks like: namespace AppHttpLivewireModals; use Validator; use LivewireComponent; use AppHttpTraitsCsv; use AppModelsAccountUser; use LivewireWithFileUploads; ..

I am working on Laravel, Livewire and AlpineJs project, Event can be trigger after validation is passed as shown in code below. But when validation error occurs, code below $this->validate(); will not run. How can I emit event for validation error, so that it can be caught in blade file to show small notification like .. Read more in laravel , i want create form-control with number value when user put some value in form-control : 1.value after 1 or 2 sec send to model or component(livewire) automatic 2. search database 3.if data found , send data to html page and add to list(this list maybe contain 5 or more item) 4. at .. Read more I have laravel and laravel-livewire. Maybe it’s overkill but I wanted to limit results to 10 or so and then have those 10 results filter to new results as the person typed out a name or phone number. The query works perfectly fine if I use just one of the statements. If I get rid .. Read more I tried to fix this but don’t know how public function render() { return view(‘livewire.home’)->extends(‘layouts.app’)->section(‘content’),[ ‘products’ => Product::take(3)->get() ]; It said that the syntax is error, unexpected ‘,’, expecting ‘;’ I’m newbie to Laravel so I couldn’t write the correct syntax. Please let me know. Sourc.. Read more In my very simple Laravel livewire component i have an array and when i try to add another data into that by clicking on a simple for example div i get fresh array with the last inserted data into that and i cant keep this array reference to append something data into that <div wire:click="add(1)"></div> .. Read more this is my function to delete a search record from the database. I expect the DB changes to be rendered without a page refresh. and that’s y I use livewire. but after clicking delete, the page is updated only after refresh. the dd results doesn’t show updated results. public function deleteSearch($search) { $empsearch = Auth::user()->mySearches->find($search); ..

Hi Is it possible to implement stream pdf before download on a livewire blade? because now only downloading cant preview before download. public function invoice() { $customer = new Buyer([ ‘name’ => ‘John Doe’, ‘custom_fields’ => [ ’email’ => ‘[email protected]’, ], ]);$item = (new InvoiceItem())->title(‘Service 1’)->pricePerUnit(2); $invoice = Invoice::make() ->buyer($customer) ->discountByPercent(10) ->taxRate(15) ->shipping(1.99) ->addItem($item); .. Read more When the user clicks the button below, should be directed to the payment page. But nothing happens after the click. I put dd(‘test’);‍ on and saw that there was no problem <button wire:click="payment" class="btn btn-sm btn-round btn-success w-120px"> <span>pay</span> </button> and function payment() { return Payment::purchase( (new Invoice)->amount(1000), function($driver, $transactionId) { // Store transactionId in .. Read more I have a problem with flash messages not showing when using Laravel Livewire. If I use just wire:model and then click the save button everything works fine and the success message is displayed. But if I use wire:model.defer the flash message only works once after the page has been refreshed, so for example, the page .. Read more I have two tables under each over in Livewire component, what I’m trying to do is when I click on one of the roles the second table (permissions table) should refresh with the provided role permissions, one the first and second click it works perfectly but after that the permission table start become longer and .. Read more I am working on an e-commerce platform based on Laravel and Livewire using the bumbummen99 shopping cart. My problem is that I can only add items to the cart, but for some reason I cannot, update(increase or decrease) the quantity, delete an item from the cart. I have no error in the console, no network .. Read more in LiveWire i try to add some value in existing array witch i defined that as a field into component, but when i want to add value in that, i have fresh data after doing this action in other word that cause of clear and setting new value, for example: class Students extends Component { .. Read more First I create a form and wire it to function But it have two button and one button for form submit and other one for reset everything. But if any button press it will submit after run resetcategory() function but after it run submitcategory() i can’t get i use some workaround with if($this->name) but i ..

How to execute the command ‍‍‍‍wire: poll.10000ms in livewire using jQuery code. I check inside the view with jQuery that the input value is not empty and then this command must be executed. is it possible? if (! $(‘#unitValue’).val().length === 0) { //Run wire:poll.10000ms="reUnit" with Jquery code } Sourc.. Read more I am getting this issue, and I don’t understand what I am doing wrong as I did this same exact approach for another component on this site, and works perfectly…. ViewMessages.php public$messages; public function mount($messages) {$this->messages = $messages; } view-messages.blade.php <div class="flex flex-col"> @foreach ($messages as $message) {{$message->content}} @endforeach </div> Everything works and ..

I have two inputs in livewire view. When a value is entered in the first input, a calculation is performed in the component based on the data received from the api and the value in the first input, the result of which is displayed in the second input. Now I want that calculation to be ..

I’m confuse about this. How can I bind my Models to Livewire? I have a livewire component that looks like this: use AppModelsAccount; public Account $account; public function rules() { return [ ‘account.company_name’ => ‘required|unique:accounts|max:255’, ‘account.domain_name’ => ‘required|unique:accounts|max:255’, ‘account.account_name’ => ‘required|unique:accounts|max:255’, ]; } public function save() {$this->validate(); $this->account->save();$this->showCreateModal = false; } public function ..