Most voted "laravel" questions
Laravel is an open-source framework for developing web applications and services with PHP. Before asking consult the official documentation of Laravel.
Learn more…2,777 questions
Sort by count of
-
0
votes1
answer103
viewsClass not found. Namespace and Composer psr-4
Guys I did everything you say in the other questions on the subject, but it didn’t solve my problem. So I opened a new question. My class is not being found. this is my structure: project _app |--…
-
0
votes2
answers83
viewsPHP Lumen - TDD test Image upload does not work in PHP’s Lumen framework
I’m trying to create a test method for uploading images using the PHP framework (Lumen). However I am having problems with the following Uploadedfile method: $request->file('images') it always…
-
0
votes1
answer24
viewsCalculate each subtotal of the table lines and also the total Measured, being the dynamic lines, that is, same id
the goal is to get the subtotals in each row and the totalPedido. It’s happening partially. Two things I’m bothering: 1 - even showing the result in the subtotals, the log keeps displaying the…
-
0
votes1
answer84
viewsLaravel error/ line 24
I have a problem with this file. This error persists only in this line, in most of the files I open from this. I wish I could know what exactly is wrong for me to learn and correct. Of those ssecond…
-
0
votes1
answer32
viewsI’m trying to load the session on the main page with Blade’s directives, but it doesn’t, why?
main.blade.php <!doctype html> Hello, world! @yield('conteudo') <!-- Optional JavaScript --> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script…
-
0
votes1
answer258
viewsRun laradock (Docker and Laravel) with mysql local
I had my Laravel environment working at XAMPP. However, given some needs, I had to switch to Docker. For that, I started using Laradock. However, I only want to run php and apache on Docker and not…
-
0
votes1
answer54
viewsData listing with Laravel
Good night devs! I need some strength! Here’s the thing. I am developing an application using the framework. I have the following models: design and functionality The business rule of the…
-
0
votes0
answers106
viewshow to use an Asset of a package in Laravel without copying to the public folder
I created a package Modular that is already working, However I am barred at the time of using assets. Not using the command php artisan vendor:publish I can’t get access to {{asset…
-
0
votes1
answer58
viewsLaravel when loading a relationship does not appear when returning as json
When trying to load a product’s images are not included when returning Model: class Product extends Model { public function images() { return $this->hasMany(ProductImage::class); } } Controller:…
-
0
votes1
answer54
viewsLeftjoin does not fetch id values - Laravel
I’m using leftJoin to bring data from 2 tables that are linked by a Belongstomany method to my index view. Virtually all data of the two tables appear when I give a dd in my variable, except the $id…
-
0
votes0
answers19
viewsSelecting records for reporting according to month and year
I wish to select the records according to the month and year for the report. Where it will dynamically collect the records of the last months and will be shown in the sum. $ cobrancas = DB :: table…
-
0
votes0
answers55
viewsLaravel save() returns true but does not change anything in the database
I’m trying to do an UPDATE to change my user’s password, the function is returning me SUCCESS, but when I go in the database nothing has changed. I am doing a post via Postman, for the following…
-
0
votes2
answers37
viewsHow to pass method objects that are in different controllers in Laravel?
Good night. What I need is to display the name of the book where your id is (in the Form Book column). And so that I don’t do it in a way outside the convention, I’d like to know the right way to do…
-
0
votes2
answers131
viewsHow to access belongsTo and hasOne in the view? - Relationship 1 - 1 bidirectional
I am with project Laravel 6.0 and have the entity User and address, where user has 1 address, as well as an address belongs to 1 user (bidirectional). The problem is that list all addresses and in…
-
0
votes3
answers781
viewsHow to view the data of the last saved record in the database
how do I display in the view only the data of the last saved record in the database? I can display all the data by calling the All() method in the control, and the good old foreach in the view to…
-
0
votes1
answer45
viewsLaravel Eloquet AND-OR-AND Undefined variable
I have a function in the Repository to list only the employees not dismissed on a certain date use Parametergroup, but the condition does not find the $date parameter of the function, giving the…
-
0
votes2
answers27
viewsAuto-increment not working in Laravel
I’m creating a note control system, which basically contains 3 tables at the moment: Teachers, Materials and Activities. I am at the beginning of the project, in which I only made the teacher…
-
0
votes1
answer81
viewsLaravel returns empty attributes in Edit method
I have another similar route working perfect, I do not know what I missed.. I thank anyone who can help me. Route: Route::get('/itensnfe/{itemnfe}/edit',…
-
0
votes1
answer79
viewsMany Relationship for Many Laravel - For each Blade
I’m starting at the Laravel. I have the following problem. I have three tables with relationship N:N. ctrl_cm_tecnicos ctrl_lista_tecnicos acl_lista_tecnicos The tables relate as follows. I have a…
-
0
votes1
answer189
viewsError 404 in project
I have some settings in the file config/app.php of my project, as: 'base_domain' => 'aplicacao.com.br' 'url' => env('APP_URL', 'https://cliente.aplicacao.com.br') In my route files, I have:…
-
0
votes2
answers66
viewsHow to search for all associations in a relationship tree in Laravel?
I’m having a dilemma. I have tables that relate, like,: internal_clients->Subsidiaries->departments->job_titles->users I also have their respective models. My question is: How do I get…
-
0
votes1
answer25
viewsHow to remove duplicate elements in a multidimensional matrix
Could someone please help me, as I do to remove the elements of the duplicated array taken into account the key "Name", however returning from the duplicated Names which has the longest date <?…
-
0
votes3
answers444
viewshide id passed in url
is the following, in the application I am developing, I have a complaint form where the user does not need is logged in to fill it and make his due complaint, up to there everything right, so he…
-
0
votes1
answer86
viewsDoubt with belongsToMany Standard 7
I have a relationship N:N that’s giving me trouble in returning using the with() follows the example of my two models with problem and the way I call the query. Model product_type public function…
-
0
votes2
answers42
viewsLaravel: Missing field error in SQL even passing field
I am trying to do an update on Laravel with: The second line since code was only added to make sure I could pass the date, as it is already being passed through the form, as I could check using…
laravelasked 4 years, 2 months ago Paulo Martins 390 -
0
votes1
answer20
viewsI’m having trouble leaving a blue button on the side
The problem here is: I am using a foreach to scroll through an array while trying to check $like->id_post === $post->id && $like->id_user === auth()->user()->id if it is to…
-
0
votes0
answers34
viewsUser marking and annotation system
Hello, I’m new to programming and am trying to develop an educational platform for my company. So far, I have the chapters saved in my database as richtext and students will be able to access them…
-
0
votes2
answers50
viewsI created a navbar with a form on the side but when I add several inputs in the form the page loses the background
form view: <div class ="registerUser"> <h1 class="w3-xxlarge ">Cadastro de clientes</h1> <hr style="width: 80%"> <form method="POST" action=""> <h3 class="w3-xlarge…
-
0
votes1
answer436
viewsLaravel - Storage::url() does not return correct url
I started in Windows a little while ago, at the moment the files are being stored inside the Storage folder, but I will use the cloud storage library of google cloud, can create and read files…
-
0
votes3
answers201
viewsTarget class error [Sendmailnewsletter] does not exist
I am a beginner in Latin and I have a difficulty that I cannot solve. You are returning the following error: Target class [SendMailNewsLetter] does not exist. What should I do? I have searched the…
-
0
votes0
answers65
viewsManytomany relationship between three tables
I have the following structure: Action -id -name -type Routes -id -name -controllers User -id -name -email -password -usergroup_id Usergroup -id -name -tenant_id I want to make a relationship where…
-
0
votes0
answers58
viewsHow can I optimize a consultation in Laravel?
I have several linked tables and when I do a query it returns all query: Model: class Apontamento extends Model { public function user() { return $this->hasOne(\App\User::class, 'id', 'user_id');…
-
0
votes0
answers25
viewsLaravel - Problem with JOIN relationship
Dev, I passed my eloquent to JOIN queries, I was having trouble with duplicate lines in my code I was with more than 500 queries executed, with JOIN reduce to 14 queries, but my problem is a…
laravelasked 4 years ago Filipe Silva 1 -
0
votes0
answers47
viewsscroll Infinite in Laravel js+css
Devs, I’m having a problem listing cards, at the moment I’m working with ul and li. i work with css to hide the horizontal scroll: body, html { height: 100%; } div.wrap { height: 100%; overflow:…
laravelasked 4 years ago Filipe Silva 1 -
0
votes1
answer121
viewsHow to generate two pages with DOMPDF in Laravel
I have to generate the PDF of a 'wallet', and I have to put the front and back in the same file. I have the following source to generate the front: $nome = $cliente->nome.'.pdf'; $pdf =…
-
0
votes0
answers59
viewspython requests post application
I am sending data via post to a web application made in Aravel with the CSRF active. This is the form: Note: I edited the _token. !DOCTYPE html> <html lang="en"> <head> <meta…
-
0
votes4
answers1271
viewsError in setting Route Orange 8?
I know it might be a beginner question, but I really can’t solve it, and I put the address in the browser the route works, but when I call from blade doesn’t work. I created a new route and I am…
-
0
votes1
answer29
viewsLavravel cannot find the file to download
I have a routine in the project where I attach documents but I can not in any way that Storage find the same. This is my download method: public function download($id) { $anexo =…
-
0
votes0
answers210
viewsDownload XML issued with Nfephp
I’m using Laravel to return the Xmls issued against my client’s CNPJ. It happens that every time I access the webservice of Sefaz, returns xmls of dates I have already downloaded, and I would like…
-
0
votes0
answers35
viewsadd values to an array in php and play the result in a dynamic table
Good morning Devs, I have a problem that I can not see the solution... Let me explain I have a system here at the company that checks the value of my product with the competitor’s product, a boy…
-
0
votes2
answers51
viewsError trying to save in BD
I am using the React and when I try to save in the database returns me this error: Cannot read property 'protocol' of undefined My code is this: const baseUrl = "http://localhost:8000/api/employee";…
-
0
votes0
answers81
viewsError 500 when submitting a form with validation in ajax and fortify Aravel
I am trying to create a simple registration form in fortify Aravel and using validation with ajax. The form when it is submitted inserts the values into the database as intended, but ends up not…
-
0
votes0
answers26
viewsGet another component variable for editing
I’m using Laravel + vuejs in an application I’m using to study both frameworks. I have a following problem: I am displaying a modal after clicking on "edit" and wanted to get the values that passes…
-
0
votes2
answers64
viewsHow to use a customizable name for the password field in Laravel 8?
I’ve tried everything, but nothing works. I’m pretty sure the reason is that the default name of Attempt "password" does not match the name of the passwordhash column, <?php namespace…
-
0
votes0
answers40
viewsHttp requests the local api in Laravel through mobile APP in Flutter
Good night, I have an API in Laravel that is only running locally through Valet and I am developing a mobile APP in Flutter where I intend to make requests to that same Laravel API. I have already…
-
0
votes0
answers22
viewsCall relationship with WITH no Laravel with SUM()
Good morning, I’m having problems to call the next relationship in Aravel being that it has a Function that makes a sum() and group by and does not have the field of the relation one to one, after…
-
0
votes1
answer341
viewsModal bootstrap to edit entries in Laravel
Hello, I’m a beginner in PHP/Laravel programming and would like to include a modal for the registration and editing of database records. Follow the example: In my index.blade.php I have:…
-
0
votes1
answer39
viewsreturn select "related table" in the Format
Hello my application was developed in Modular and as a complement I am using some components of Vuejs. Let’s get to the problem, I have a client table doing relationship with country. In the same…
-
0
votes1
answer34
viewsLaravel int to 32-bit binary (and vice versa)
In an attempt to create a column with binary 32-bit numbers /** * Run the migrations. * * @return void */ public function up() { Schema::create('teams', function (Blueprint $table) {…
-
0
votes0
answers31
viewsHow do I detect logout when the browser closes or when the session closes (timeout reached, inactivity, etc.) in Laravel 8?
I am trying to change the default behavior of the Illuminate Session Cookiesessionhandler class so that when the Destroy method is invoked it is registered in the database when a user session has…