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> ..

Read more

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 ..

Read more

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; ..

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); ..

Read more

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

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 ..

Read more

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 ..

Read more

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 ..

Read more