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
-
1
votes1
answer261
viewsPHP 7 Syntax error, question mark before specifying the parameter
I developed a website on Laravel using the version PHP 7.2, when I climbed to the server (that is using version 7.0 of PHP) I noticed that I was giving a syntax error in the following line public…
-
1
votes1
answer3131
viewsHow to do Inner Join with Laravel?
I am studying Laravel and I’m not getting it make/understand how to do join and present the data. All students who are in a class with the names, class code and description of the final situation.…
-
1
votes1
answer1800
viewsHelp with error Trying to get Property of non-object Laravel
I have a relationship, where I try to get the name of a teacher, I can return his id, but when I try to return the name it gives me the message Trying to get Property of non-object My code is like…
-
1
votes1
answer364
viewsError creating new Laravel project
I am trying to create my first Laravel project, I am using Ubuntu 16.04 LTS and while trying to create my new project it shows the following error: Composer create-project --prefer-dist Standard/app…
-
1
votes2
answers681
viewsError: Trying to get a Property of non-object
I am running the following iteration and getting the error Trying to get Property of non-object, being the code: @if(isset($propostas)) @foreach($propostas as $p) <tr>…
-
1
votes3
answers587
viewsHow can I sort a result in Laravel with a custom attribution from my model?
My real table is very large, so I will use this example I found on the internet to make it easier to explain my problem (source). Table fields: first_name last_name email password created_at…
-
1
votes1
answer1108
viewsCompress image when uploading with Expandable
I wonder if anyone has any idea how to proceed to compress image while uploading, as the image is getting too large. The routine I’m currently using is the one below: public function…
-
1
votes1
answer178
viewsHow to add password exchange notification in Laravel?
For security reasons, in one of the applications I am building, whenever the user’s password is changed this must be notified. To meet this goal I override the method resetPassword class…
-
1
votes0
answers671
viewsHow to change the value of a php variable using Javascript or Ajax?
Contextualization When registering a project by default (default) Status of Documentation is pending as a result of this configuration project tabs are not visible. If the user changes the Status of…
-
1
votes1
answer247
viewsHow to include files in a View based on the Laravel Route?
I created a view inicio.blade.php where I put all the code that repeats on all pages and created other views that extend this view. I created the routes for the views by setting a name for them this…
-
1
votes1
answer66
viewsError url $feed->id
Hello, I am working on a system with feed scheme. Clicking on "Edit" appears the following error: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer:…
-
1
votes0
answers105
viewsHelp to pick up ajax input with Laravel
I need to take the input city of the form below, use in $input['city'] but does not take. Uf $input['Uf'] takes, below the code. <select name="uf" id="uf" class="form-control"> <option…
-
1
votes0
answers85
viewsLaravel 5.4 Passport - Authentication 3rd party login
I have this system that I developed. It is developed in reactjs + Redux + sagas in frontend and RESTFUL API in backend in Laravel. BUT in the company in which I work there is a requirement that the…
-
1
votes0
answers308
viewsCRUD - LARAVEL 5.6
I am developing a CRUD and in my controller I have create function: public function create() { $neighborhood = new Neighborhood(); $city = new City(); return view( view: 'admin.cities.create',…
-
1
votes1
answer941
viewsJquery-Ajax Orange Query 5.5
I can’t get the ajax consult on Laravel5.5. Query form: <form action="ConsultaEmpresa" method="get" name="FormConsultaEmpresa" id="FormConsultaEmpresa"> {{ csrf_field() }} <input…
-
1
votes2
answers750
viewsHow to use with on the return of a DB::Select - Laravel
To get the information, is being using a DB::RAW thus: That’s in the Repository. Already in Controller, I would like to use the with to bring the relationships made in the Model: But the DB::select…
-
1
votes1
answer1135
viewsUndefined error Property
I’m getting the following error by clicking on permissions, button that directs to this controller: Error: Undefined Property: App Http Controllers Rolescontroller::$role Controller: <?php…
-
1
votes0
answers189
viewsImproving Modeling in an Order System
I developed a food ordering system, but I have doubts whether the way I modeled the database is the best in terms of performance and longevity (how the system was to behave with a lot of data). I…
-
1
votes1
answer737
viewsSave various data in Laravel
I have the following formula in my Blade, and now I want to save the data of each row in my database. How to save this data in Laravel? for ($i = 0; $i < 12; $i++){ var minhaData =…
-
1
votes1
answer1300
viewsForm select with Laravel
I have this code working, but I wonder if there would be a more elegant way to write the following code in the view, through the Laravel formats: <div class="row"> <div class="col-xs-12…
-
1
votes1
answer34
viewsAngularjs function is not respecting the condition!
I have this function, which takes two parameters, however, when I pass the different name, it falls into the if in the same way. $scope.deleteCategory = function(id, nome) { if(nome == 'Despesas…
-
1
votes1
answer345
viewsHow to pass a variable parameter to jquery
Well, I have a button that when clicked should open another page, by clicking via Ajax the results of the bank. The problem is I have to pass an id through that button for the Ajax request. Making…
-
1
votes0
answers134
viewsHow to validate select Multiple?
Context I need to validate the multiple checkbox. It is necessary to validate the second checkbox. Doubt Where and how do these validations? In php or Java? Logic of Validation Codes: Locality…
-
1
votes0
answers101
viewsFormat pdo_connection mssql
I am using Laravel 5.6 in Ubuntu 16 and I am trying to connect it in mssql 2012. I am using the db_lib library as this is project requirement. When I try to connect this error: PDOException :…
-
1
votes0
answers39
viewsHow to add a data insertion interval in the database with Laravel?
I am having the following problem, any button in my project that leads the user to insert some information in the database, if it is pressed several times quickly (without giving time for the page…
-
1
votes1
answer34
viewsCode reduced to Insert
Say you have the following fields in the users table: ID,NOME,USUARIO,LOGIN and SENHA For me to enter a record in the table I do the following $usuario = new Usuario(); $usuario->nome = 'Carlos…
-
1
votes0
answers84
viewsUpload image to Laravel does not work on web server
When trying to upload an image to Laravel on a web server it is not generating the image. When using $request->hasFile('image') even if the image is being sent but if I run the same project on…
-
1
votes2
answers97
viewsAngularjs and Laravel edit modal
I am trying to make a Modal to edit my data, using Angularjs and Laravel as backend, but when I call a function in my ng-Ubmit(), it is not invoked. This is my modal <div class="modal fade"…
-
1
votes1
answer34
viewsIdentify type of operation with javascript
How can I identify, when the click is "From:" "To:"? I have a code to add a value from a database field, to another field, follow the example: HTML: <div class='row justify-content-center'>…
-
1
votes0
answers56
viewsProblem with sending data via ajax and Laravel
Good afternoon, I’m having trouble sending data via ajax, returns the code 200 but returns Syntaxerror: Unexpected end of JSON input But I don’t think it’s even enough on the controller <input…
-
1
votes1
answer169
viewsHow to use make:request Laravel to clear the controller
Laravel 5.5 I am using the validations as follows, directly in the controller $this->validate($req,[ 'nome' => 'required|min:10', 'cpf' => 'required|size:14', 'agencia' => 'required',…
-
1
votes2
answers60
viewsHow can I ensure that my API will only be used for the features I want it to use?
Hello, I have the following question. I have an application that will be used by several companies, each company will have a number of employees (users only company) and I have common users…
-
1
votes1
answer609
viewsLaravel - view does not work
I’m in trouble: I’m editing a site and Laravel’s view is only working on / and when I put another guy http://localhost/blog/public/Termos she gives as if she had not found codig routes:…
laravelasked 6 years, 5 months ago Cyber Hacker 469 -
1
votes0
answers146
viewsProblem using Route::Resource on production server
I’m making a system using the Laravel 5.6 I climbed to a server I have and access this externally But I’m having problems when the route uses the resouce, for example: Route::resource('materiais',…
-
1
votes1
answer136
viewsCondition for table relationship in the Standard
I have the following tables of my system, products, Provider and product_provider, have the following structures: Schema::create('products', function(Blueprint $table) { $table->increments('id');…
laravelasked 6 years, 5 months ago Renne Galli 121 -
1
votes0
answers314
viewsThe requested URL / was not found on this server
My .htacces <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond…
-
1
votes0
answers281
viewsLaravel: Access Relationship Attributes
I have the tables products, images, products_images. The table products_images has a foreign table key products and images. When I will list the products and the names of the images that are in the…
-
1
votes1
answer696
viewsRedirect after login Standard 5.5
Good morning, I’m using Laravel’s standard authentication scafold, and repurposing the structure by overriding the methods I need for you to behave the way I want you to. I customized the default…
-
1
votes0
answers44
viewsFullcalendar can’t make the call
Good evening to everyone I’m using the template limtless in my application But I’m not able to use the part of Fullcalendar I’m trying to use this calendar: Internationalization but I can’t make his…
-
1
votes4
answers450
viewsLaravel "delete does not exist."
I’m making a mistake when I try to erase an element of my bank. All other insert actions are working. . i have an action button that should pay for an exam of my table Only it appears that the…
laravelasked 6 years, 4 months ago Carlos Eduardo do Carmo Junior 23 -
1
votes1
answer287
viewsReturn array within json
I have the following function in Laravel/QueryBuilder public function getEstudante(Request $request) { $estudante = DB::table('estudantes_identificacao')…
-
1
votes1
answer41
viewsForm disfigures DIV
Div doesn’t stand side by side after I insert the {!! Form:: Inside the div Row, the div COL are broken, one below the other instead of side to side. Is it possible to solve this ? or it’s normal…
-
1
votes1
answer72
viewsLaravel Image Intervention does not save extension
The image Intervention does not save the image extension either in the database or in the folder where the saved files are located. but I want it to be recorded, follow the code to see if I’m doing…
-
1
votes1
answer222
viewsValidation does not return array with errors
I’m trying to use the validation of the Laravel to validate a form, but I’m not getting the array of errors Controller use Illuminate\Http\Request; class Curriculos extends Controller { public…
laravelasked 6 years, 3 months ago Luhan Salimena 323 -
1
votes1
answer78
viewsEloquent does not return the same results as SQL
I have that code SQL which when running straight into the bank works normal, but I had to convert it to the format of the Larable. It runs, but returns no results. Where am I wrong? It seems that…
-
1
votes1
answer109
viewsRelationship count in Laravel 4
In Laravel 4, we do not have the method present in Laravel 5.2 >= called withCount. That one withCount is responsible for adding to SELECT the counting of items related to the current entity. For…
-
1
votes1
answer344
viewsProblems sending form in modal bootstrap
Hello, I am sending a form that is in a modal inside a page, however the modal simply does not send, it is in a page that is a return of an ajax (a search in the case), I do not know if it…
-
1
votes1
answer547
viewsNo such file or directory (SQL: select * from 'Companies')
I’m trying to make my first API with Laravel/PHP. I’m trying to test with the php Artisan Tinker: var_dump( App\Company::all() ); However, I do receive: Illuminate/Database/Queryexception with…
-
1
votes1
answer96
viewsError 1054 Orange
I’m having a problem with paging, when I change the page, it gives a 1054 error Controller public function lista(Request $request) { $pessoasQuery = pessoas::query(); foreach ($request->all() as…
-
1
votes1
answer845
viewsError when exporting Excel using Maatwebsite / Laravel-Excel
The excel export works well up to 10000 records but above that it returns me the error: "127.0.0.1 is Currently Unable to Handle this request. HTTP ERROR 500" Someone’s had that problem before?…