Skip to content
Advertisement

Tag: laravel

How validate an array with a dot in key name ? (Laravel)

How can I validate this array in laravel validation: I tried to use this, but it does’t working: How can I solve? I want to note that: I have no choice to change the name “price.value”. Answer As you cannot change the name price.value you have to escape the dot since in Laravel array validation a dot means a nested

update only single element while sharing same class

I have below jquery which shows an image preview from file input. The above code is working well, but the problem is it updates all img elements using the same class screenshot blade ANy suggestion to update only specific img element while using same class ? Answer Just update your readURL function like this: I solved it for you on

Get model with N child items grouped by field

Table looks like this: How to get 3 or less items for each item_id with most likes? So for my example output should looks like this: Answer Since MySQL 8.0 you can use window function row_number Test Mysql window functions Laravel DB query

Get empty result api firebase [FCM]

I’ve saved some of my mobile registration_codes that are connected with my development environment of Firebase. Once I send a manual notification by the api I receive empty feedback from Firebase himself. After debugging I found that the notification has not been send. What’s wrong with my call, because the call I make is the same in the examples and

Store multiple fields in JSON column (Nova CMS)

I have a posts table that has a json column “read_more_section”. And I want to store on that column the information regarding some fields on the NOVA CMS (title, description, label and link). Do you know how to properly do that in Nova? To store what is entered in these 4 fields in the json column “read_more_section”? Answer You could

Advertisement