Questions tagged [laravel]
The Laravel framework is an open-sourced PHP web framework that allows developers to create dynamic and scalable web applications. The source code of Laravel is hosted on GitHub and released under the MIT license.
209,458
questions
0
votes
0
answers
11
views
send audio blob file in input file and send form with laravel controller request
I'm having difficulty loading an audio blob into an input file, then sending it to the Laravel controller and saving it in the db, is there a nice way to do this? I ask for your help, thank you very ...
0
votes
1
answer
32
views
how to speed up and optimize mysql search with indexes
I need to optimize performance on a search with lots of strings like Z1719121.
my table structure:
codfabrica => varchar 191 => nullable
codoriginal => varchar 191 => nullable
aplicacao ...
0
votes
0
answers
13
views
Carbon's addMonths is being called 2 times in Livewire
Im building a project in Livewire. Now i need to show an attendance page. So far it is working fine, but it works only for the current months(as it should). My idea is to show the previous and ...
0
votes
0
answers
31
views
How to solve "Unauthenticated" laravel problems
When I use my api in auth:sanctum middleware I got an error.
public function listUserMenus(){
$user = auth()->user();
if ($user) {
$menus = $user->menus();
...
0
votes
0
answers
10
views
Error in Laravel with DataTables after adding Google Translator JS code
I am encountering an issue with a Laravel application i got online, after adding the Google Translator JS code to either the index.php or the resources/views folder, pages with tables are not loading ...
0
votes
1
answer
19
views
route problem when confirming two factor with laravel fortify and inertiajs
I have a TwoFactorConfirm page, where an OTP code input is expected after the 2fa device is set, and a POST request is made to route('two-factor.confirm') provided by Fortify like this:
const { data, ...
0
votes
1
answer
36
views
how to validate select tag with request file
i have a list tag in laravel and error message tag:
{!! Form::select('Order[]', ['NULL' => '', 'o1' => 'order1', 'o2' => 'order2','o3'=>'order3'], null,['class'=>'myform-select']) !!}
...
0
votes
0
answers
28
views
Laravel livewire tags are not interpreted
I have a Laravel project where I normally work between laptop and pc. These days, I installed livewire and make some components, all works fine. I uploaded my code to git and download in my desktop pc,...
0
votes
1
answer
30
views
Defining a Polymorphic Relationship in Laravel with Databases on Different Servers
I'm working on a Laravel project where I have two databases residing on different servers. I'm trying to establish a polymorphic relationship between models where the tables involved are in these ...
-3
votes
1
answer
22
views
maatwebsite/excel": "~2.1.0 is work with laravel 10?
I am using Laravel 10 and importing file using maatwebsite/excel": "~3.1" package
so maatwebsite/excel": "~2.1.0" is works with laravel 10 or not ?
0
votes
1
answer
36
views
How to Define Variables in the SQL and Use it as a Column in other Query?
I have a list of products, each product has different types of discounts, I need to query during products to get products that have specific prices (after calculating all discounts). I chose the below ...
0
votes
1
answer
19
views
How to extract IP address from Spatie\Dns\Records\A object in Laravel
I'm working with Laravel and Spatie DNS Retriever to get the ip address from a domain name.
This is my Controller method:
public function getDomainInfo($domain)
{
$dns = new Dns();
...
0
votes
0
answers
8
views
Laravel Application Exhibits Significantly Higher Resource Usage And Performance Degradation When Dockerized Vs When Running in Host Environment
I am experiencing a notable difference in memory usage and performance degradation between running my laravel application locally with PHP's built-in server or running it with PHP-FPM and Nginx ...
0
votes
1
answer
24
views
Difference between redirect() and to_route() in laravel
What is the difference between to_route and redirect in Laravel? I'm new to Laravel...
return to_route('posts.show', $post_id); ⭕️
return redirect('posts.show', $post_id); ❌
I thought it was ...
0
votes
0
answers
20
views
createToken Function Works Locally but Fails After upload on Cpanel in Lravel
hello world! I have been upload my Laravel project on file Manger in Cpanel , before I do that everything was going well , but after I upload the project and when I make login or new registration ,...
0
votes
0
answers
37
views
video player condition is not working with javascript in mozilla firefox
I am making a video website using Laravel and JS. To play the videos I'm using video tag ().
There are many conditions to play the video. Like: If user is not logged in then video will be paused after ...
0
votes
1
answer
25
views
class not found for DomPDF
I am facing "use of unknown class" error when I am using the alias created for facades :: class in my controller.
$pdf = PDF ::loadView('test', $data);
This line says PDF is unknown class.
...
-1
votes
1
answer
51
views
How to fix wrong Request file routing
i am biginner in laravel,and make a request file by :
php artisan make:request taskRequest
in controller define store function:
public function store(taskRequest $request)
{
}
and in web....
0
votes
1
answer
28
views
Laravel: Form Submission - Custom URL Structure for Route Parameters
I have this form in my laravel project:
<form class="d-flex" method="GET" action="{{ route('client.info.get', ['input' => '']) }}" id="infoForm">
&...
0
votes
0
answers
20
views
Seeking Assistance: "Login with Facebook" Activation Issue in Laravel React Integration
I am working on integrating the "Login with Facebook" feature into my Laravel React website. I have properly configured my application within the Facebook Developer portal, ensuring that the ...
0
votes
0
answers
36
views
How to verify email from pc to mobile
I'm using Laravel's auth package, and I am trying to configure Controllers/Auth/VerificationController.php to try to redirect the user to the homepage. Basically, I will send an email verification ...
-2
votes
1
answer
39
views
The Laravel project stucks an error in php artisan
PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::...
0
votes
0
answers
35
views
How to createElement blade component in Laravel + Javascript?
I have a component called <x-form.base-form-input/>. I am trying to make a new base form input element when button onClick.
The problem I'm facing is when calling createElement(), I must specify ...
-2
votes
0
answers
35
views
Issue with Displaying Video-Containing Pages in Google Search Results
I'm facing a peculiar issue with the SEO of my website, and I hope someone can help me out. Pages that contain videos are properly indexed but not displayed in search results. However, pages without ...
0
votes
1
answer
21
views
Display two tables that has one-to-many relationship
When I click the button to filter the respondent table, I want to show the data to which the respondent belongs in the household table. The household table has a one-to-many relationship with the ...
-2
votes
2
answers
40
views
If i edit my data with photo and if i not selected any photo and press submit button photo field become empty in react context api with axios
I am very tried to solved it. I try every possible way but it behavior like when i edit text data and do not touch image, image part will be empty. but if i only update without touching my data its ...
0
votes
1
answer
53
views
How I can configure my laravel app for make a dynamic layout?
I'm making a Laravel 10 project to try a make a dynamic layout.
My principal layout, is header sticky with a left navbar, the rest of the content is the other blades templates, with @extends('layouts....
-1
votes
0
answers
17
views
Intentando usar webpack.mix.js en lugar de vite para correr js y css [closed]
Estoy trabajando en un proyecto de laravel 10, estaba listo para subir todo a un hosting que mi profesor de programacion me dio. Pero resulta que e hosting no admite vite. El profesor me pidio que ...
0
votes
1
answer
52
views
Why doesn't the policy check work in the middleware?
I have routes
Route::middleware('auth')->group(function (){
//resource controller for products
Route::apiResource("products",ProductController::class);
//additional routes for ...
0
votes
0
answers
26
views
How to obtain default language files in languages other than English
When you want to work with Localization, the Laravel documentation says that we must execute the Artisan lang:publish command to publish the language files and then we can modify them as we wish. ...
1
vote
0
answers
33
views
Laravel replicate works but not inserting into database
I am trying to replicates a record in my database here is my controller
private Receiver $receiver;
public function __construct()
{
$this->receiver = new Receiver();
...
}
$this->...
0
votes
1
answer
28
views
Passing property to nested component not live updating. (Livewire 3)
I'm building a form here with an address area where the user can search for it's postal code if they doesn't know it.
It's structured like this:
A parent CreateUser livewire component with the whole ...
-2
votes
0
answers
17
views
How to fix Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
Illuminate\Foundation\ComposerScripts::postAutoloadDump
Deprecation Notice: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(...
0
votes
1
answer
45
views
Addressing 'Allowed Memory Size' Error When Merging Arrays or Collections"
How can I refactor this code to optimize memory usage while ensuring that the 'order_number' remains unique throughout the list? Additionally, I want to save the final result in a JSONB column without ...
0
votes
0
answers
6
views
Implementing Separate Authentication for React JS Users in Laravel
I am currently working on a project that utilizes Laravel for admin management and API services, while ReactJS handles the user interface. The default Laravel Fortify authentication system is ...
0
votes
0
answers
29
views
Facade vs Laravel Real-time Facade
What is Facade vs Real-time Facades?
Just not getting How is Realtime facade is differnt form facade in laravel as well as its working.
Wondered at Google.com + stackoverflow but unable to get any ...
0
votes
1
answer
31
views
Laravel Impersonate works locally, but not on production server
I'm using lab404's laravel-impersonate package in a Laravel 8 project.
On my localhost, I've had no issues at all. I can impersonate users as expected.
Now that I'm on production and really need it ...
0
votes
1
answer
14
views
Livewire click error on wire:click='function(value)'
Help please, there is a database
there are products there
For example
1 Name
2 Name
3 Name
4 Name
everyone has links <a wire:click="delete({{$item->id}})">Delete</a>
When ...
-1
votes
1
answer
38
views
how to checking resource methode in controller
i am biginner in laravel and writes below code in tasks blade:
<form method="POST" action="{{ route('tasks.store') }}">
<div class="...">
...
0
votes
0
answers
29
views
Inertia js with laravel / Vue3 not all form data is in POST? [closed]
I have a form with 2 file download zones (arrays) in it and a array of input fields. Everything worked fine until i added a extra download zone.
Since i added that extra file download zone not all ...
0
votes
1
answer
23
views
How to catch and show custom error page for some error?
I added "vimeo/laravel": "^5.8" under laravel 10 / filamentphp 3 app for Vimeo support and with free restricted account
I got an error when uploads limit was reached :
Vimeo \ ...
0
votes
1
answer
36
views
Preline Advanced Select Error "Uncaught TypeError: window.$hsSelectCollection is undefined"
I am using Preline UI which is used in my application using the Laravel framework, I have imported HSSelect & preline in the app.js file and when I call an event in the Preline Select ...
-2
votes
0
answers
22
views
I am having 505 internal server error when i try posting with axios [closed]
I am working on a project. And i created an api to post some data.when i tested it on my postman it works perfectly. But when i tried using it with axios on my react js.i am getting 505 internal ...
0
votes
0
answers
35
views
Handling Document Updates without Unique Identifier in Laravel Pivot Table
I'm working on a Laravel project where I'm fetching product data from an API that includes associated documents. The documents are stored in a separate table with a pivot table (product_document) due ...
0
votes
1
answer
29
views
Laravel controller naming conventions on homepage
I have several pages on my web app and my focus will be on these 2 pages, Home and Event Page. On my Homepage, I am fetching events using pagination to fetch the popular events, where on my Events ...
0
votes
0
answers
23
views
How to show detail error from prerender generate on nuxt 3
I want to generate the nuxt project, using nuxt generate command, but in the end show like this
The Problem :
├─ /admin/menu/create (1669ms) ...
0
votes
0
answers
23
views
Card token service not found mercadopago suscription [closed]
estoy usando mercadopago api para suscripciones. al crear el plan se crea de marvilla, pero al suscribir al usuario con el plan me dice: Card token service not found
estoy usando credenciales de ...
0
votes
1
answer
17
views
Livewire v3 resetPage with multiple paginators dont work in search
I have a livewire LawyerComponent component where I have 2 searches on different models. In the view I cannot get the table corresponding to the search to return to page 1 when displaying the results ...
0
votes
0
answers
25
views
A problem with spatie laravel translatable in filament v2
I'm using laravel Filament V2 along with spatie-laravel-translatable-plugin and Filament modular
But i have a problem whenever i change the language dropdown the inputs don't reflect and when i click ...
0
votes
1
answer
17
views
How do you get Algolia Autocomplete to work with Laravel?
On the Algolia Autocomplete Github, the readme says, "The data that populates the autocomplete results are called sources. You can use whatever you want in your sources...". However, what I'...