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
votes0
answers127
viewsLaravel Project works in one location and does not work in another
Good evening, I am with a project being done in the Standard 5.8 and I have a certain problem, in short the project works in my work, but does not work at home. The point is, the project opens and…
-
0
votes0
answers41
viewsAuthentication routes not defined, Standard 5.7
I can’t access the route http://localhost/login directly and nor http://localhost/logout. Route::get('/', function () { if(Auth::check()) { return redirect('/dashboard'); } else { return…
-
0
votes1
answer113
viewsError adding column in table 'users' Standard
Used make:auth and changed the table 'users', but whenever I try to register a user I come across this error: BadMethodCallException Method Illuminate\Validation\Validator::validateMatricula does…
-
0
votes1
answer48
viewsState/City Combos: AJAX does not return cities
Good evening, everyone! I’m learning jQuery/Ajax and I’m trying to do the famous title combo, but the city combo is blank. I was able to test even the part that arrives in AJAX and, apparently, the…
-
0
votes1
answer221
viewsClass does not exist CORS Standard
I’m trying to implement a Cors middleware on the Laravel, but you’re saying my class doesn’t exist: "message": "Class App Http Middleware CORS does not exist", "Exception": "Reflectionexception",…
-
0
votes0
answers61
viewsPassing variable to view and capturing
I have tried several ways to capture the variable I pass to the view, but without success. Controlle public function destroy($id) { $retornoDestroy = $this->qpae->find($id); $delete =…
-
0
votes1
answer984
viewsObtain approach radius from a geographical coordinate
I have a PHP application that gets the latitude and longitude of an address, using the Google Maps API. The idea is to delimit a "tolerance" distance around this point to later validate whether the…
-
0
votes1
answer123
viewsProblem with JOIN in Laravel
I have a little problem when performing a Join. Basically I had made this code and it was working, but I had the need to change the primary key of the table 'products' to 'code'. After that, even…
-
0
votes1
answer42
viewsController show method intercepting route without parameter
Hello, in my system I have a model Photogallerycategory that has a self relationship. To make my life easier in the create (controller Resource) method, I added a parameter to receive the parent…
-
0
votes0
answers225
viewsChange login password in the Standard
I am trying to change the login password of the user in Windows, to log in I use Auth::atempt and as a parameter email and password, this password does not exist in my users table. Where does the…
-
0
votes0
answers23
viewses.json contains an invalid Laravel JSON structure
I have the file es.json: { "You are not allowed to do this": "No se te permite hacer esto", "Error uploading the image": "Error al subir la imagen", "Something went wrong, please contact support":…
-
0
votes1
answer162
viewsTo sort a list by options select vuejs
Good evening, I already asked this question, but I will try to improve it, I am developing in Aravel Vue and I just need to play the sorting function for the option within select, it is something…
-
0
votes1
answer113
viewsCalculate total quantity, price and discount and total totals
cannot create the total result of Quantity * value_unitario - discount, and also the sum of these totals, of the table that is related. Model public function servico() { return…
-
0
votes2
answers538
viewsHow to pass parameters from Component to vuex in an Laravel and vuejs project?
I am using in my project Vuex with modules and Axios to work with the API created in Laravel, how to pass parameters in an edition of a data recovered from an API I have my Store export default {…
-
0
votes1
answer57
viewsError inserting data with Mysql and Laravel
I have a table called "item" in which I need to enter data, but for some reason does not process the Insert. I’m new to backend so I don’t know if there is any restriction on the table that prevents…
-
0
votes1
answer41
viewsCalculation of two BD fields in a function
Good Afternoon, to calculate the budget of my works I use a query in my controller ode makes the sum of the fields , being few records there is no problem but if there are 500, 1000 records this…
-
0
votes1
answer266
viewsClone inputs by changing the id of each cloned item
My code is not working, I need to clone All items that are inside the origin div and change the id of each item. I’ve tried several ways but I haven’t been able to solve the problem. Would anyone…
-
0
votes0
answers52
viewserror generating angular build /material
When I turn the serve appears this error and does not load my components is displaying the following error that I can not solve: -Console- main.ts:13 Error: No base href set. Please provide a value…
-
0
votes1
answer68
views"The command 'migrate:Fresh' does not exist." in a unit test (phpunit) in Laravel
I am creating unit tests on my system using Sqlite (in memory), but whenever I try to run them, they return the error: 1) Tests\Unit\UserTest::testUserCreate…
-
0
votes1
answer93
viewsPagination Laravel
I want to filter a page by category and create her pagination.. Here is the route Route::get('/category/{id}',[ 'uses' => 'FrontEndController@category', 'as' => 'category.single' ]); The…
-
0
votes2
answers236
viewsPASSING PARAMETERS VIA JSON ON LARAVEL
Good morning Everybody. I’m brand new in PHP and need a help with an api implementation. I basically have a midleware that does a get or post on a third party’s api. Then, a user gets a get at a url…
-
0
votes1
answer73
viewsHow to apply filters in a belongsToMany relation in Laravel 5.8?
I have a table posts, a table categorias and a pivot table categoria_post, where a post may be associated with many or no category. In my model categoria and post I have the methods respectively…
-
0
votes0
answers173
viewsjQuery $ is not a function/is not set
Good morning, you guys. I’ve been trying to solve this for some time but without success. It seems that jQuery is not being loaded or assigned in $, jQuery. Below are some snippets of code to…
-
0
votes0
answers851
viewsI cannot run the command "php Artisan Storage:link"
Is there any way to execute this command on a server like hostgator? on my pc I can only with administrative rights, but in connection with hostgator it is not possible to appear the following error…
-
0
votes1
answer115
viewsHow to save the ID of a autocomplete field in the table with Laravel?
Good morning, guys, how are you? I have a problem here, I created a view and a form for this view, in this form have some fields that autocomplete with data from some tables, the question now, is…
-
0
votes0
answers485
viewsPassword reset
Good morning, you guys, I’m a beginner in the Laravel, I have the following problem: I’m using Adminlte template, I don’t know if this has anything to do with the problem. I believe I have made all…
laravelasked 5 years, 5 months ago Fernando Batista 1 -
0
votes1
answer44
viewsProblem with select in my controller
Hello, I’m making Join between two table to display the user name in the view, but this giving the following error: Call to a member function select() on string My controller: $postagens =…
laravelasked 5 years, 5 months ago spider tek 57 -
0
votes1
answer228
viewsInstallation in Laravel project gives error
I am following the IT Specialization classes (https://www.youtube.com/watch?v=iPTxznidNHo&list=PLVSNL1PHDWvR3PeLXz6nvBkDhv1IQk4wP&index=1), but when I do the installation of my Windows in…
-
0
votes1
answer145
viewsError while trying to create a Migration in the Laravel
I just created a new project in Laravel, but when creating a Migration, there is an error in the database. I have tried to create a new database or use an existing one, but the problem remains.…
-
0
votes0
answers31
viewsHeroku can’t find my email view file
I have a Windows application hosted in Heroku, this application has a function that sends an email to a user using a Windows that is inside the Resources/views/emailrecruitment folder.: public…
-
0
votes0
answers93
viewsImage is not rendering in email
I am sending email with Aravel, the image img src that I send by email is sent by frontend: When uploading an image the image variable src is assigned to the image: handleInputChange(e) { var file =…
-
0
votes0
answers275
viewsMethod Illuminate Database Eloquent Collection::emails does not exist
I’m trying to use "Sync" to feed a table that relates email to a person’s registration. This table I created and intend to feed contains the registration id and email id. To feed it, I will use the…
-
0
votes1
answer129
viewsLaravel Intervention Imageserviceprovider not found
I’m facing a problem with the lib Intervention/Image where I really have no idea what might be going on and how to solve, the research I did on the internet has led me to nothing but the…
-
0
votes2
answers74
viewsArtisan Command - Foreach Laravel - Count affected lines
I created a command in Laravel to run at a certain time and now I need to get the result only of the affected lines. The method I used makes a count of the entire loop. $count = 0; foreach…
-
0
votes0
answers12
viewsShow Indirect Indications below Direct
How do I Show My Direct Referrals Indirect? In the case of the image, this is my Direct Nominee but below it there are some Indirect. No way I’m able to solve, Someone to give a light? Follow an…
-
0
votes0
answers57
viewsField with different value than expected with Laravel and php
I have a field in the bank of up to 50 characters where I save the access key of a receipt, but when I search the information it brings me a totally different number, what happens?…
-
0
votes1
answer25
viewsRestrict Only Lessons from a Course via Laravel Controller
Well, even I don’t know how to ask properly why it’s been less than a week since I started studying Laravel. Please, I ask for everyone’s understanding! My case is the following: I have a table of…
-
0
votes0
answers282
viewsLaravel + DOMPDF - How do I count the number of pages in a report after downloading?
I saw several examples on the Internet but nothing that I can adapt to my code or that works. Example in the footer wanted to display like this. Page:1/30, 2/30 and so on, man controller is like…
-
0
votes1
answer26
viewsLaravel Sqlite migrate error
When running the Migrate command it gives this error: code of the first migrate: ` public function up() { Schema::create('contatos', function (Blueprint $table) { $table->bigIncrements('id');…
-
0
votes2
answers1754
viewsError Class 'app Course' not found
I’m with this mistake when listing all courses in a CRUD in Laravel "Class 'app Course' not found" Since there is this class, I will show in codes and images... Controller code: <?php namespace…
-
0
votes2
answers141
viewsError Methodnotallowedhttpexception in Routecollection.php line 218
My route Route::put('equipes/insereAluno/{equipe}',['as'=>'equipes.insereAluno','uses'=>'EquipesController@insereAluno']); My side. {!!…
-
0
votes0
answers179
viewsHow to view multiple content on @Yield from Laravel’s Blade template system?
Well, I have a site in progress in the programming language of Laravel. In my welcome.blade.php I created a @yield so-called sides After the creation of that yield, created the folders in my…
-
0
votes1
answer301
viewsLaravel - how to save if there is a change in the model
Good afternoon guys, I have a problem which is as follows would like to know if Laravel has any method to check if any changes were made before saving the model Example. table users, if the user…
-
0
votes1
answer30
viewsHow to validate Insert with relationship
I have three tables, one of the types of vehicles: car, motorcycle. A table of brands: Honda, Ferrari Another associative, called tag_type_vehicle. The Honda brand for example, has cars and…
-
0
votes1
answer331
viewsReturn messages through exceptions
Hello, I generated a doubt regarding the most "elegant" way for my method to display a message to the user. I’m using the following blade in order to return messages, but it does not return…
-
0
votes1
answer38
viewsError exporting to excel
This below is my controller. public function atletaExport(AtletaModalidadeRequest $request){ $alunosModalidade =…
-
0
votes1
answer116
viewsCreate an accessible variable in all controllers that use the same middleware
I’m creating an EAD application, and I need all controllers that use Middleware Students to receive from the middleware itself, the variable with the user data I tried to define the variable in the…
-
0
votes0
answers135
viewsError saving Standard 5.8
I have two related tables at the time of saving is accusing the following SQL error: "SQLSTATE[HY000]: General error: 1364 Field 'id_data' doesn’t have a default value (SQL: Insert into users…
-
0
votes1
answer126
viewsBreak mPdf page using view
I am using mPdf generating the pdf directly through a view because using the methods via php I could not make the css of my page work properly $pdf = \PDF::loadView('contrato', array('desconto'…
-
0
votes1
answer55
viewsQuery using Eloquent multiple fields
all right? I would like a help from you to put together a more "elegant" consultation at Laravel. I currently have the following scenario. I need to check if a client is already registered in my…