skip to Main Content

livewire array inputs how to fix? – Laravel

my component livewire public $images = []; public function rules() { return [ 'images.*.name' => 'required|max:255', ]; } blade.php <div id="images"> @foreach($images as $index => $image) <div class="card" wire:key="image-field-{{$images[$index]['id']}}"> <img src="{{$images[$index]->original_url}}" class="card-img-top" alt="{{$images[$index]->name}}" /> <input type="text" name="item-{{$index}}-name" id="item.{{$index}}.name" wire:model="images.{{$index}}.name" />…

VIEW QUESTION

Find entry in JSON (Kraken.com uncommon JSON format) – PHP

I need to find if a string exists in JSON Kraken.com retrieved file: I get it this way: $sURL = "https://api.kraken.com/0/public/OHLC?pair=ETHAED&interval=5&since=". strtotime("-1 day"); $ch = curl_init(); $config['useragent'] = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0'; curl_setopt($ch, CURLOPT_USERAGENT, $config['useragent']); curl_setopt($ch,…

VIEW QUESTION

PHP merge array by "depth"?

I have an array like this: [ { "function_1": { "element": { "error": "0", "msg": "test" } } }, { "function_1": { "element_2": { "error": "0", "msg": "test" } } }, { "function_2": { "element": { "error": "0", "msg": "test"…

VIEW QUESTION
Back To Top
Search