I want a way to send POST from a PHP site to another one built with Laravel (the second one) to return a JSON value! The PHP site (I use jQuery to send this POST): $(‘#get_link_form’).on(‘submit’, …
Tag: php
How to restrict a user to only see their own profile
I have a view (resources/view/front/auth/profile.blade.php) and my route in file web.php is: My problem is that when a user logs in and gets redirected to their own profile page (http://exmaple.com/profile/2), he/she can change the URL to http://exmaple.com/profile/3 and see other users’ profile. I want…
Redirecting all domains to a single https domain
I recently bought a hosting plan which provides three domains. Since there is only one version of my website, the idea is to redirect all the domains to one single domain ( I think this is also more …
Laravel Resource Collection deletes my array keys
I have a resource-collection to get all my dialogues. Because the frontend is already coded (by another person), I want to return all of those as an object, with the dialogue_id of the database as …
mailgun send email to multiple users
i have the following mailgun.php file: define(‘MAILGUN_URL’, ‘https://api.eu.mailgun.net/v3/my_domain’); define(‘MAILGUN_KEY’, ‘xxxxxxxxx’); function sendmailbymailgun($to,$toname,$mailfromnane,$…
Search is not working although item exists in DB
I am using laravel 6 : need user to find records by search bar, but it shows No Available Records enter image description here this in my model:Category model: public function scopeWhenSearch($query,…
Call to a member function addEagerConstraints() on string
I want to calculate the average of the column of nested morph relation. Model Function public function trader_ratings() { return $this->morphMany(TraderRatings::class, ‘rateable’) ->…
XPath do not retrieve some content
Im a a newbie trying to code a crawler to make some stats from a forum. Here is my code :
modals showing blank after ajax call
I am developing a page in php that has multiple dynamic modals for displaying pdf files in the page itself with respective title and author names. All the data comes from a database designed in MySQL. …
How can I connect my entity field to the same entity?
I added to my entity “Category” a field “parentcategory” to be able to connect a category to another category: class Category { /** * @ORMId() * @ORMGeneratedValue() * @ORMColumn(type=”…