I’m trying to implement Sentry in our application. I’ve used sentry/sdk but got some errors (probably due to some PHP settings), so I’m now trying to switch the transport method. I removed sentry/sdk from my composer.json file and replaced it with sentry/sentry and php-http/guzzle7-adapter. …
Tag: php
Laravel Multilayered groupBy
Assume we have this record: While assuming we have this code in our DummyController: And lastly, assuming we have @foreach ($dummyRecord as $dummy_column_name => $dummy) inside our index.blade, we could display the result as such: But I want to display the relation 4’s record of color as a div inside…
PHP not comparing “#”
I have a simple script where I enter some text on my search bar and PHP echo the first character from the text. My code: $data = strval($_GET[‘u’]); $ss = substr($data, 0,1); if ($ss == “@”)…
How to append connection dynamically in database.php file in laravel
I need to append dynamically connection in the database.php file using PHP code, is it possible or not? Answer It is working for me When I create a new customer then
Can’t figure out a solution to this regex
I have the following list of strings: and the following regular expression which should run on all strings, and if a match is found, return true otherwise, return false. /(?<!hdds)(dtb hdd dtb){1,}(?!shdd)/ As of now, my result set looks something like this: However, for the correct result, would be, to ma…
Fetch json data if json still not created [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 11 months ago. Improve this question This is a sample of my form in php: I take all the values in $_GET and i want to pass them…
Laravel filter relationship data
Code Data return Question: I tried to filtering data that if a relationship “getCauserDetails”, How can I not show the data if the relationship name is only found “test” or should I say null? So on the example output, it displays all the data, but I want to only the data that I filter …
Convert PNG files with transparency to WebP using PHP GD
I have a utility class that loads image files and, among other operations, converts them to other formats. It uses PHP GD. Everything works fine except PNG files that have transparency are done wrong when converting to WebP. The result image has a black background where the transparency should be. This is my …
How can I create bold and italic text etc… Like stackoverflow?
How would I create a post mechanism on my website like stackoverflow with bold text and italic text and other customization like that? Right now my php database has this table for posts : I have stuff for files and text, but I don’t know how I would store the bold/normal text. And how would I take in th…
“php artisan myCommand” handling the post-install-cmd event returned with error code 1
I creaded a console command that will setup the database automatically based on user input and I added that command in post-install-cmd but when i run the composer install command it return error code 1. If i run the command manually like php artisan setupDB it work, I dont know what is the issue. May be I am…