1,869 questions
0
votes
1
answer
67
views
Laravel Polymorphic Relations And Has Many Through
Tried to find a solution, but couldn't find a similar problem.
I have two classes: Product and TempProduct. Both inherit from BaseProduct.
BaseProduct doesn't have a table name defined, but Product ...
0
votes
0
answers
38
views
Can't listen to event for Laravel Websocket in Live Chat Application using Laravel 9
I am trying to implement live chat module in my SaaS module. I am using BeyondCode's Laravel Websockets package for this. This package uses php-pusher and installs it automatically when we install ...
1
vote
0
answers
85
views
Laravel app does not generates .jpg or .png photo as background image
I am developing a Laravel application on Windows OS. Among other things, the application needs to generate reports, including a background image within them. I am using the barryvdh/laravel-dompdf PDF ...
0
votes
0
answers
30
views
Laravel 9, a specific cookie gets immediately deleted right after i create it
We are trying to build a filter system for a list of wines, so we built a step-by-step wizard to set the right filtering.
In order to do so, inside the controller that effectively filters wines called ...
1
vote
1
answer
59
views
Laravel losing session when file extension in URL
I have a weird bug in my Laravel application where, when I use a file extension in the URL, the application is logging out automatically.
After investigating I noticed it only happens when using valid ...
0
votes
1
answer
91
views
Laravel 9 Bug? Changing config/mail.markdown.theme does not work. Still loads default from vendor published folder
So editing the config/mail.php during launch time to let each user have their own mail template:
Config::set('mail.markdown',[
[
'theme' => 'domain.com',
'paths' =&...
0
votes
0
answers
44
views
Working with Laravel email and laravel query
Laravel SMTP issue: data displays correctly in controller but not in blade email view.
I'm working on sending emails using SMTP in Laravel. I'm able to retrieve and verify the correct data in my ...
0
votes
1
answer
49
views
Laravel - How to use Mockery to mock service bindings?
I have the following class:
class Testclass
{
public WebshopappApiClient $client;
public function __construct(Webshop $webshop)
{
$this->client = app()->make(...
2
votes
2
answers
85
views
MongoDB filter on same object in array
I have object with column chars with such data:
{
"chars": [
{
"count": 1,
"color": "red"
},
{
"count": 2,
"...
1
vote
0
answers
202
views
How to Directly Set SMTP Credentials in Laravel Mailer Without Using Config Values?
I'm working on a Laravel project where I need to send emails with different SMTP credentials for each email. Instead of setting these credentials in the configuration files, I want to directly pass ...
0
votes
1
answer
128
views
Trying to get data from Odoo using PHP/Laravel-9 using XMLRPC
I am able to authenticate but when trying to get data it's giving me an error
This is the error I am getting.
I am using Laravel version 9.46, check using via php artisan -v
<?php
namespace App\...
1
vote
2
answers
1k
views
Laravel Middleware error: Argument #1 ($content) must be of type ?string, Illuminate\Routing\Redirector given
I have this middleware in my project, that sometimes, gives me some problems on my live server, and I don't know why, but just sometimes, and not all the times that it is triggered. This is the error:
...
0
votes
0
answers
170
views
how to add cors origin in public folder laravel
Access to font at 'http://127.0.0.1:8000/webfont.woff' from origin 'http://localhost:8001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource....
-1
votes
1
answer
86
views
Deploy laravel 9 on ionos apache2 Ubuntu 22.04.4
your text
I'm trying to deploy a laravel site on ionos VPS. When i launch my site on the browser, i've got this error:
your text
My .htaccess:
# enable gzip compressing for the following mime-types
&...
0
votes
1
answer
777
views
How to config redis replication in laravel?
I use redis replication(one master with port 6379, two slave with port 6380, 6381), I've not found anything in the laravel doc for config redis replication.
I use below config(from gpt's answer), but ...
0
votes
0
answers
63
views
Send tansactional email using Mailchimp in Laravel after order purchased
Send Email To Customer as soon as he purchase the product. Here is the code sample
$response = Http::withHeaders([
'Authorization' => 'Basic ' . base64_encode('apikey:' . env('...
0
votes
0
answers
34
views
Tinker returning special characters when fetching html data containing ' and " in mysql DB
We have a Laravel 9 application running in AWS ECS in two different environments i.e., production and staging. For a few tables we have some html data stored in text column type. In production ...
0
votes
0
answers
37
views
How to store landing page URL in existing logic for tracking UTM parameters?
I'm working on a function that tracks UTM parameters and source details for users visiting my website. The function retrieves UTM source, term, and campaign from the request object and stores them in ...
0
votes
0
answers
26
views
how i pass data session from page 1 to page 2
im new in laravel 9 and i cant complet this test
web.php
Route::get('contact', 'App\Http\Controllers\controllerPage@contact');
Route::post('contact', 'App\Http\Controllers\controllerPage@saveData');
...
0
votes
0
answers
61
views
Troubleshooting Laravel 9 and Ajax form data not saving to database
I cannot save the form data using Laravel 9 and Ajax. The city_name, longitude, and latitude come from the JSON file, so when I choose a city, its longitude and latitude get dynamically filled up. I ...
1
vote
1
answer
138
views
Laravel 9 how to filter item in $with result? [duplicate]
I have this piece of code that filters only companies that have some customerRewards related to and belonging to some customer. The whereHas() filter works fine, but the result of customerRewards from ...
0
votes
0
answers
28
views
v-if in a nested v-for is rendering in development but not in production
v-if in a nested v-for is rendering in development but not in production. I recently deployed to a shared host and the conditional v-if is not rendering. Initially I used v-show and that did not help.
...
0
votes
0
answers
965
views
wire click livewire method responds slowly when there are other methods that have larger processing data
I'm using livewire v2. I have a problem when calling a method in livewire feels slow because another method has a large data process, for example I have 2 methods. the first method is called ...
-1
votes
1
answer
392
views
How to use php8 enum types in Laravel where conditions?
I have a php8 enum type
enum OperationTypes: string
{
case PointsAdd = 'points-add';
}
I need to be sure how to properly use it in Laravel database querybuilder.
For example:
Model::where('type', ...
2
votes
2
answers
477
views
How to make Laravel attribute cast get only one value?
My website incorporates multilingual functionality, allowing content to be displayed in various languages. To facilitate this, language-specific data is stored in the MySQL database within JSON fields....