I am joining 3 tables, property, facilities, and images. A property has many facilities and has many images. On my query its looping the same property how many times it has facilities and images and …
Tag: laravel
How to get room id in laravel broadcast channel.php
Here is my js Here is PersonalChat.php Here is My channels.php I asked my question in my channels.php and PersonalChat.php Again May I say My question is ** How to get room id ** in channels.php and PersonalChat.php Thank you all Sorry for my english skill Answer you can accept param in channel.php like {room…
hasManyThrough – Laravel 5.8
I have database table structure like : ClassRoom id (int) PK name (varchar) ClassTeacherCourse id (int) PK id_classroom (int) FK id_teacher (int) FK id_course (int) FK Course id (int) PK course_name (varchar) Teacher id (int) PK teacher_name (varchar) So far I have code just to call ClassRoom table & Clas…
Laravel Many-to-Many Factory with custom id type
I am using Laravel 8 and trying to make database factories/seeders I am having some issues. I have the following database Schema: Now I am trying to create factories and database seeders but I get an error using the following line to seed: This gives me the following error: Which is if I understand it correct…
Laravel I can’t retrieve requester data using with
I am using this package https://github.com/renoki-co/befriended My issue is trying to get all my friends posts with my post including user’s data, but the problem is the requester data is null. Response As you can see the first object in the array dosen’t include the user data. So what should i do…
Laravel files/folders not showing up in Public directory
I want to integrate TradingView’s charting library in my Laravel project. I have copied the charting_library folder to the Public folder of Laravel. After that, I have referenced the charting_library.min.js file from Blade files in view and the other resources related to it. All js files loads successfu…
ArgumentCountError Too few arguments to function AppHttpControllersShopCartController::addToCart()
So this function is supposed to add the product into a cart, but i’ve been getting the error Too few arguments to function AppHttpControllersShopCartController::addToCart(), 0 passed in C:xampphtdocsnerdSvendorlaravelframeworksrcIlluminateRoutingController.php on line 54 and exactly 1 expected I tried c…
how to extract key and value from json content?
what I have tried is this. Can anyone help me in extracting keys and values like notificationType,bounceType,timestamp etc; It would be great help for me if anyone help me achieving this. Thank you. Answer json_decode decode a string converting it in php data structures: array or object. Check docs for json_d…
laravel 7 keeps adding ‘/public/’ to my api routes
I am trying to make a php curl request to my laravel api Here’s the curl function function CallAPI($method, $url, $data = false) { $curl = curl_init(); switch ($method) { case &…
OneNote error creating a page in Laravel using Microsoft Graph
i’m using Microsoft Graph in my Laravel application. It works perfectly adding events to the user’s calendar, getting events, creating OneNote’s notebook. The problem occurs when i try to add a page, i’m getting the next error: The code i’m using is: The next code works fine: I c…