I have a problem whenever I try to set-up a virtual host using apache on Debian 10. I am trying to set-up virtual host on the address products.crud. So the directory structure is var/www/products.crub/…
Include image on wordpress site and update site when image gets overwritten
I’m designing a WordPress Site right now, and want to include a webcam to give users the possibility to see the live weather. Therefore a picture from the webcam is uploaded to the wordpress webspace …
How to inject a specific cache pool?
In my Symfony 5 application I want to use different caches for different tasks and of course for different environments. e.g. my configuration looks like this: framework: cache: pools: …
Problem with preg-replace: function replaces whole string instead of only part of it
I have one unsolved case. I need to highlight some $search text from $sentence. $result=preg_replace(“/p{L}*?”.preg_quote($search).”p{L}*/ui”, “<strong style='color:…
Middleware auth keep logging me out? Edit: RedirectIfAuthenticated logging me out?
Fairly new to Laravel and tried to make a Login page. Edit 2: Tried to use Guard and when I’m redirected to RedirectIfAuthenticated it seems somehow the auth()->check() or Auth::check() return false at handle function here’s my RedirectIfAuthenticated.php The Auth was able to store the user, but it keeps logging me out when I’m going to HomeController where it had
Laravel 8: How to insert unique data from the DB
I need to insert some unique content into the DB using Laravel 8. Here is my code: As you can see the field numbers should stored unique numbers but I have some duplicated Hex values and I don’t want to store them at the DB. So how can I insert UNIQUE values into the DB. Note that I have already
jQuery find element with class name which is added dynamically
I have a navigation which is listed dynamically with PHP. The html : The highlighted the tags are listed dynamically I have a JS script, when we click on the navbar element then we add .selected class to the tag. When the page is loaded the first tag has .selected class. I need a JS code to find the data-prop
Laravel: withCount auth()->user() relationship
I my laravel (7.x) application. I have to models User and UserReferral with hasMany relationships. User.php class User extends Authenticate implements MustVerifyEmail { public function referrals() …
Display data from database using and tags
The main goal I try to get is, the correct display data from the database, let me try to explain with the code. This is my form code for now: <form action="" id="omnivaform" …
Increasing the conditions in IF statement with loop PHP, Diagonal Check
I have homework to do this program in PHP, that take a matrix and the keywords, so it can find them in the matrix diagonally: So this is how the first matrix looks, there are many with different keywords, here for instance keywords are “beef” and “pork”. So I made a program for an input that looks like these 2