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
answer164
viewsIs it correct to use get/set and other methods in the model of the Laravel?
Example: In the model: public function getProduct() { return $this->where('price',100)->get(); } public function checkProduct($price) { if($price > 100){ return $price; } } On the…
-
0
votes0
answers45
viewsjavascript privileges
I am trying to do a validation for the user: doctor do not have access to the value of the query and other users have access to the value of the query, I manage to do not appear to the doctor, so…
-
0
votes0
answers559
viewsUndefined offset error
I have this mistake and I can’t fix it. ErrorException in VendasController.php line 73: Undefined offset: 0 //The line that is returning this error: 'default_note' => $client[0]->default_note,…
-
0
votes1
answer92
viewsCreate select box with dynamic data
Good morning, I wanted to implement in my project a select box but where the options are the "name" column of another database table, I mean, I am creating an object and it is possible to associate…
-
0
votes1
answer132
viewsChosen does not work with Lockable
I’m trying to use the Bootstrap + Chosen But it just doesn’t work. I’ve done all the Imports and nothing The Times I did so: <link href="{{ asset('css/chosen.min.css') }}" type="text/css"…
-
0
votes2
answers117
viewsConcatenate more values into a value of an input in the Blade form
I Doubt how I can concatenate more values into the same input in the value of a form using Blade. Example: <input type="hidden" name="produto" value="{{ $produto->descricao}}"> I am only…
-
0
votes0
answers92
viewsWhen saving an image to S3 using the AWS Lambda function with PHP, the file is saved as . bin
I have an Laravel app that runs as a Lambda function on AWS. When I upload an image using the S3 driver, the final file is saved with the extension .bin. I used the method storeAs, to set the file…
-
0
votes0
answers53
viewsUpload Angular/Laravel Project to Hostgator Server
I already searched enough and could not run the project on the server (Hostgator). I built the angular application where it is in a js folder (inside the public of the Laravel). I moved the…
-
0
votes1
answer120
viewsTransform query result into Json
I’m trying to convert a result of a database query to json yet every time I make a resquest to get the value of the same the server goes always below and I believe it is because it is a lot of…
-
0
votes1
answer45
viewsCollection:::Orders does not exist - Laravel
starting this topic by saying that I’m new to Laravel, but come on, I’m having a problem with Collection, is giving an error saying that it does not exist and that I made this connection in the…
-
0
votes1
answer327
viewsHow to make a call list with radiobox with the Lockbox?
Hello, I’m a beginner in Lisbon and I’m doing a project for a school whose one of the features of the project is to make a attendance list of students. Where will be listed the students of a…
-
0
votes1
answer180
viewsLaravel-echo-server, Laravel Echo, Redis, Socket.io shows nothing in browser
I’ve set up Laravel Echo, Laravel-echo-server, Radis, Socket.io I’m already three weeks into trying and reading every problem posted here on the stack overflow And the documentation I found on…
-
0
votes1
answer877
viewsredirect()->back() return with variable
I have this form here <form action="{{ route('usuario.update') }}" method="post"> <input id="token" type="hidden" value="{{ csrf_token() }}" name="_token"/> <input type="hidden"…
-
0
votes1
answer31
viewsLimit in Laravel 7
I’m with the following Query in Laravel 7. $itens_carros_melhores_ofertas = Veiculo::where('status', 1) ->orderBy('ano', 'DESC') ->limit(6,9) ->get(); The problem: I need to display the…
-
0
votes1
answer18
viewsCreate eloquent Query in Readable to query that take the longest date of the column and show a vehicle of each
I need to show a vehicle of each (Vehicle), which sort by larger datatime('datetime_write), how do I create this query with eloquent in the Laravel?…
-
0
votes1
answer25
viewsSend CSRF Token Laravel by Node.js - CSRF Token Mismatch Error
Good night! I have an API that was developed in Laravel, and when I am consuming it in NODE.JS with Axios and is returning the CSRF Mismatch Token error So I believe I need to send the Token through…
-
0
votes0
answers16
viewsHow to insert certificate in request?
To get the access token of a payment api I need to send two files, web.key and web.pem (CRT File = File .pem KEY File = File .Key). In Postman works perfectly by adding these certificates, now I…
-
0
votes1
answer33
viewsError making the list
Trying to get Property of non-object: @foreach($civis as $civil) <tr> <td>01</td> <td>{{$civil->matricula}}</td> <td>{{$civil->nome}}</td>…
laravel laravel-5 laravel-eloquent laravel-5.3 laravel-bladeasked 6 years, 10 months ago Jonathan Silva Gomes 21 -
0
votes0
answers21
viewsHow to save a Decode bae64 image to Laravel 8?
I am receiving a several images in Base64 format. I only receive the string. How do I decrypt and save on Laravel 8’s Torage? I’m doing it like this but it makes a mistake: $image1 =…
-
0
votes0
answers18
viewsLaravel 8 is creating a session file for each visitor
With each new visitor to the site, Aravel is creating a new session file in the/Sessions framework folder, even if that user does not create an account or log in or anything like that. Entering a…
-
0
votes1
answer54
viewsProblems when accessing route in Windows to delete using Vue.js
I’m wanting to delete a record, but when accessing the route of the Laravel using the this. $http.delete gives me the error 419 Unknown status Lockable method public function destroy(Request…
-
0
votes1
answer948
viewsHow to control routes using Arable middleware?
I have a system with the following routes '\' '\expenses' '\Register' '\login' '\home' of these routes would like to make available only for user NOT authenticated ' ' and ' login', for this I…
-
0
votes0
answers8
viewsLaravel 5.8 Undefined Offset Error
Good evening, I am trying to run the company project on my PC, several other devs have managed, using the same methods that I, step by step, perfectly, I followed the same and got error, I believe…
-
0
votes0
answers16
viewsProblem with Docker in Laravel project
next... I’m working on a system project in Laravel, I’m having a problem in Docker, I can’t run the application, I have the Docker installed on my machine and I’ve already stopped in the images.…
-
0
votes0
answers9
viewsComponent for creating and registering questions and answers like Google Form
I want to know how you have any question-and-answer component like Google Form. That would have the type options of questions (multiple choice, multiple selection), delete or duplicate the question…
-
0
votes1
answer378
viewsCheck if registration already exists, if there is only link
I want to check if the address has already been registered, if it is already registered I just want to link it to a civilian, but if there is not yet want to register the new address and then link.…
laravel laravel-5 laravel-eloquent laravel-5.3 laravel-bladeasked 6 years, 10 months ago Jonathan Silva Gomes 21 -
0
votes0
answers271
viewsLaravel Foreign key Constraint incorrectly informed
I couldn’t find where the bug is in my Migration, honestly. Can anyone there understand why I’m making the following mistake: SQLSTATE[HY000]: General error: 1005 Can’t create table…
laravelasked 6 years, 10 months ago Gabriel Augusto 530 -
0
votes1
answer136
viewsAfter Variable validation fails, choose a select option
Hello, guys, I have two combos: one states and one cities. When I choose a state, I search the cities via ajax, as follows: $('#estados').on('change', function(e){ console.log(e); var id =…
-
0
votes0
answers522
viewsHow to validate uploading multiple files in the Windows
I have the following validation rule in the controller: $validator = Validator::make($request->all(), [ 'nome' => 'required|max:255', 'valor' => 'required|numeric|min: 0', 'imagens' =>…
-
0
votes0
answers205
viewsHow to use the Chunk method of Laravel Excel?
public function uploadNotaCorte(Request $request, EstadoRepository $estadoRepository) { $error = array(); $path = $request->file('file')->getRealPath(); $notasCorte = Excel::load($path,…
-
0
votes0
answers39
viewsLaravel Eloquent
I’m trying to do this query but the $test variable enters empty in the query but when I print it, I see it exists namespace App\Http\Controllers; use Illuminate\Http\Request; Use App\User; class…
-
0
votes1
answer215
viewsHow to configure routes in Laravel 5.3?
I’m studying more on my own Laravel, and yes I’ve looked at his documentation on routes and I can’t make it work here. I ran a little test: Route::get('/', function () { return view('welcome'); });…
-
0
votes2
answers3707
viewsHow to fill a select with Eloquent?
I’m using the Laravel 5.5 and trying to fill a input select with the Eloquent and using the following code: In the controller: $tipos = Tipo::pluck('nome', 'id'); return…
-
0
votes3
answers701
views(Laravel) How to ignore null values in $request->all()?
I am developing a filter system in which the user may or may not fill in some form fields. In the controller, I’m trying to do a Where as follows: //demais filtros $imoveis = Imovel::where([…
-
0
votes1
answer3486
viewsMake consultation with distinct in Laravel
I have the following table: I need to count the amount of records where the supplier_id is equal to 2 but without repeating the column order_id. In this case it would return 1, since it has two…
-
0
votes3
answers62
viewsFill in 3 selects without repetitions
Good night, In a view I need to fill 3 select without repeats. In the application form in a precise selection process that the student chooses in the first select the first course option, in the…
-
0
votes1
answer1194
viewsHow to access an image that went to my uploads folder via Fileupload
I have a form what makes uploads of images , when I upload , the path is saved in the database by the field path , I recover from the bench this image and play in a array image this.image = data;…
-
0
votes1
answer67
viewsTaking the contents of an image I made from my folder
Good i have a form that uploads images , these images are played in the directory: uploads/{idcampaign}/images/ In my PHP controller how do I access this image and grab your content? public function…
-
0
votes1
answer302
viewsjquery does not work on foreach Blade Standard
jquery script works if put out of foreach, but qd put in it does not work and shows no error in console: <div class="box-indicated"> @foreach($list_indicated as $indicated) <label…
-
0
votes1
answer61
viewsLaravel, problem with Float fields
Hello, I am using Laravel and need to make a select in a table, also create a field that brings the result of a function. my select is like this: return \DB::table("view_pins_ocorrencias")…
-
0
votes1
answer89
viewsLaravel 5.2: Multi authentication always returns false
Is always returning error when making the login, even if the data is correct. I’ve seen several topics about this error, but none solved the problem. CONTROLLER public function cadastro(Request…
-
0
votes1
answer1952
viewsParse error: syntax error, Unexpected '?', expecting Identifier (T_STRING)
I can’t find the error in this file, the debug shows me error on line 46, but I can’t find a solution, some light? <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier…
-
0
votes1
answer95
viewsPerform a related table search on Laravel and page
I would like to search all people of a certain class based on the class code using Laravel: And right after paginate, to make a list. Pupil public function turmas() { return…
-
0
votes2
answers1965
viewsLaravel php auth system
How to authenticate the user login and password in Windows, I’ve been trying for a while but I can’t. Routes Route::get('/login',['uses' => 'loginController@login','as' => 'login']);…
-
0
votes1
answer161
viewsLaravel System Deploy in Xampp
Good afternoon, I have a system created with Laravel 5.5 and I need to climb it with the Xampp. If I access it Url the public directory of Laravel, works, but I need to access the project root. I…
-
0
votes0
answers60
viewsDistant relationship with Laravel 5.5
Guys, I need some urgent help! I have the following situation: Tables: saidas id ... saidas_produto id_saida id_entrada_produto entradas_produtos id id_entrada id_produto ... entradas id ... My…
-
0
votes1
answer2525
viewsMiddleware Laravel Group Authentication
save guys, I want to know how to project my admin route so that the user does not have access to this route but they both have to be authenticated. My routes Route::group(['middleware' =>…
-
0
votes0
answers144
viewsLaravel error that does not find a routine that exists
Giving my system the error below in Laravel 5.4. What may be causing this error? I’ve reviewed and I’ve run the remote: php artisan clear-compiled Follows parts of the code and its classes.…
-
0
votes1
answer529
viewsView password with hash in database, decoded
I’m saving the passwords in the hashed database, and now I want to view it in the view, because when I get the data in the database it still gets hashed when I’m going to display it. Senha:…
-
0
votes0
answers294
viewsProblem importing a class in Laravel 5.5
I am trying to include the class that handles the Request of my form, but it always returns error of not found, however, I have already checked and reversed and the file and the patch are correct. I…