I am developing a social network website and one of the functions is followed and unfollow that get you to follow/unfollow another user on the website, I want to know how to make Laravel go back to the profile page after the follow or unfollow happened, is there is a way that I can redirect to the profile con…
Insert a Json object in MongoDB from Laravel 7
I need upload a image to Google storage and insert the below JSON object with the gcs image path in MongoDB. The image is successfully getting uploaded in GCS, but I am not able to get the image url of the image and also not able to update the path in mongoDB. JSON object format Can anyone help me to
Using both Laravel and non-laravel-PHP
I am trying to make Laravel work with a non-laravel script. I need Laravel to handle only routes that are set in the web.php file, and allow anything else that’s not defined to be handled by my non-…
Sentry Transport errors
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. …
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…
Get most recent posts from specific category
?php $args = array( ‘numberposts’ => 10, ‘order’=> ‘ASC’, ‘orderby’ => ‘title’ ); $postslist = get_posts( $args ); foreach ($postslist as $post) : setup_postdata($post); ?> <div&…
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…