Skip to content
Advertisement

Custom validator for email doesn’t throw exception when validating an invalid email address on a Spatie DTO object

I’m currently working on an integration with a third party API for an application, for which I’m using Spatie’s data transfer object library. I’m currently looking to set up validation for some fields, and have run into an issue. I’ve written the following validator attribute, to validate that a string contains an email address: And it’s used in this DTO

Display all images one by one laravel

On the backend side, my pictures are loaded normally, but I have problems with displaying them on the front My Model I am trying to display all the images on the page like this My page.blade.php But I am getting an error: Undefined variable: $images I need to declare this variable with an array of pictures somewhere on the client

Create Json array from mysql data

I need a bit of help, i have this code: which is returning and i need to return like this: Could someone helping me? I search everywhere but i don’t see how to adjust array to get needed structure Answer You’re adding an extra array layer with the []. Change the code to this:

Issue with DocuSign sending Envelopes

I recently changed my DocuSign integration to use the JWT OAuth flow. To achieve this I have a few classes. OAuth Client Signature Client Service Then, in my constructors where I want to use it I’m doing Finally, I use it like so But I get an error that reads DocuSigneSignClientApiException: Error while requesting server, received a non successful HTTP

Filter API response with PHP

Not sure what issue was with first pastebin code, here is another attempt. I am connecting to Vimeo Live API, in doing so the response is huge > 500kb in total – I have an example with only one object here -> there are over 20 it returns. I have a better idea of what Im doing in JS than

laravel relationship not loading

I’ve got a Product and a Category models: In my controller, I’m retrieveing all products and wanted to return the category object the product belongs to in the response, so I’m doing: and my resource looks like: but the response I’m getting is: I tried loading the relationship differently: but the result is the same. It seems that the relationship

the_field – ACF not working in ‘while’ loop

Main string of code (that doesn’t work): <span class=”price-in-kune”><?php the_field(‘tariff_price_kn’) ?> kn</span> The ways i tried to solve this problem: put insted of the_field(‘tariff_price_kn’) – echo(‘hi’) – the code worked add $post_id -> the_field(‘tariff_price_kn’, $post_id) $currencyKune = get_field(‘tariff_price_kn’); And then echo $currencyKune P.S 3) i don’t know exactly where should i put $currencyKune = get_field(‘tariff_price_kn’), so i put it before

Advertisement