Skip to content

Tag: php

PHP MySqli show result for similar terms (Keyword)

Let me explain fast what i want to do! I want to show similar rows from my database by a PHP term. I have a table called “games” and a column called “title” that titles are looks like “Rockstar – GTA V”. So i want to remove all words after dash and use new string as k…

How do I create a eloquent Polymorphic relation

I have a two eloquent models model User and Retailer. I want to create a new model “Task” where there there should be a field “added_by” which can denote either a user or a retailer. How can I create the migration for Task so that there is a field that can denote either user or retaile…

how could I link my HTML project to laravel? [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 last year. Improve this question I’m trying to create a webpage using laravel but there’s not a lot of info online …

Why is the following SQL Query returning an empty result?

I have the following table structures: 1 – Course(course_id, course_nam, language, course_price, create_date, average_rating, category, course_description, certifica_price, course_creator_id) 2 – Student(student_id, wallet) 3 – Discount(discount_id, discounted_course_id, allower_course_creat…

laravel ignore return redirect()

hi guys i’m trying to redirect user to bank but laravel is ignoring my return redirect in here i’m calling pay() in zarinpal class : at the end of redirectToBank() user must redirect to bank but it is ignoring redirect and is returning $order in cheackout() Answer I think that the redirect returns…

How to find value?

I make this associative array with PHP. Now by using array_rand() function => The Output is: [0] => a [1] => b This output shows me only the key of the array. But I want to see the value too. How can I find the value of this array using array_rand()? Answer Use the keys to access the original array

Visual Studio Code 1.56 PHP Validation not work

When I upgraded the VS Code from version 1.55 to version 1.56 the inline PHP validator stopped working (onType). I downgraded to 1.55 and everything works. Has anyone had this problem and how can I activate PHP validation in version 1.56? I tried HTML and JavaScript, this two validators works fine. Answer PRo…