All Questions
15 questions
0
votes
2
answers
326
views
Table row is not removed using Livewire
I have a dynamic row created, and I want to remove the row but only the data from that row is removed and the input fields are not updated. I am using Livewire in this for creating the row and ...
0
votes
2
answers
71
views
Populate a flat array with a dynamic number of values from each row of a result set
I have 2 tables one is category that has subcategories and I want to fetch the records and put in a single array. I have implemented this code:
public function searchItem(){
$categories = ...
0
votes
0
answers
303
views
Issue when adding an item to a public Livewire property in Laravel
I've encountered an unusual issue while working on a Livewire component in Laravel. In my component, I have a public variable called $this->temp_items, which is an instance of Illuminate\Support\...
-2
votes
2
answers
108
views
Update a column value in a row with a qualifying id column value
How I update data in push_array data in livewire or laravel see the array data below.
[
["id" => 0, "input_Data" => "Up to 15 Groups / Month"],
["id&...
1
vote
1
answer
45
views
laravel php array grouping using anather array value
I have a problem with array group. Could you please help me to solve this problem. I want to group acording to the $group array value. For a Example, first Group 01 items & second Group 02 items ...
0
votes
0
answers
358
views
How To Initiate Multiple Properties In Livewire On mount() Method
Does anyone know how to initiate these properties to "Data is not set yet." simultaneously without initiating each of them in an array?
class HomeroomClass extends Component
{
...
0
votes
2
answers
486
views
livewire array inputs how to fix?
my component livewire
public $images = [];
public function rules()
{
return [
'images.*.name' => 'required|max:255',
];
}
blade.php
<div id=&...
1
vote
1
answer
322
views
Livewire encountered corrupt data when trying to hydrate the [data-table] component, when trying to send closure to livewire component
I tried to send some closure to the livewire component inside a nested array but it produce this error:
Livewire encountered corrupt data when trying to hydrate the [data-table] component. Ensure ...
0
votes
0
answers
492
views
Livewire sum input array and display on page
I have a simple form with an array input of hours. As user types in the hours into each (or some) of the hours inputs i'd like to sum those and show in a div on the page. What happens, however, is ...
2
votes
1
answer
725
views
How to order an array by bool values in laravel livewire
I have an array, I want to order that array by "is_available" key, (true first)
I'm using laravel 8 and a livewire component
0 => array:12 [▼
"id" => 1
"name&...
0
votes
1
answer
2k
views
Submitting data in a Livewire child view using its <form> in the parent view
I have a parent view edit.blade.php which has a form. The form has a @livewire() for edit-step.blade.php, the child component.
edit-step.blade.php has a foreach loop that renders the input fields. At ...
-1
votes
3
answers
322
views
How to convert String Array to php Array?
How to convert Sting Array to PHP Array?
"['a'=>'value one','key2'=>'value two']"
to
$data=['a'=>'value one','key2'=>'value two'];
Please let me know if anyone knows of any ...
0
votes
0
answers
47
views
Laravel - pass array variable to route [duplicate]
I need to pass array variable to my route, so on the next page I could use that array for project purposes.
This is my dd array:
array:1 [▼
0 => array:12 [▼
"id" => 1
"...
0
votes
1
answer
1k
views
Multi-Dimensional array accessing in livewire and laravel
I am trying to get the values from my checkboxes which are multi dimensional. what i tried is as shown in code but i am getting empty array . Kindly help please
<input type="checkbox" checked ...
1
vote
1
answer
2k
views
How to render html from a @foreach loop in a textarea
Using Laravel 8 livewire, I need to render a list of name ($list) on per line in a textarea.
I do this
<div class=" border border-red-800 rounded-lg mt-8 p-4 w-full bg-green-300">
&...