Most voted "laravel-5.5" questions
31 questions
Sort by count of
-
5
votes3
answers436
viewsHow to order the query in the same order as an array used in Wherein?
I would like Laravel to return me a list of products where the ID belongs to this array: [12,5,1,8,16], but sort by id as per array order!* What I have so far: $produtos = Produto::whereIn('id',…
-
3
votes3
answers2003
viewsWhat is the correct way to pass two or more parameters on the route?
I am trying to pass two parameters on the route, however, I get this error: "Route Pattern "/fiche/{id}/client/{id}" cannot Reference variable name "id" more than Once." The route used:…
-
2
votes1
answer248
viewsSplit sum and Count output in the same Query?
The code below works, but I wanted to know how to do it all query, and if the way I’m riding her is really the best way. $query = Avaliar::select(DB::raw('COUNT(id) as contar'), DB::raw('SUM(nota)…
-
2
votes1
answer232
viewsLaravel 5.5 : Wherehas in relationship Many to one
From what I understand in the documentation, to the whereHas it is necessary to have a get at the end of query, but I need to use the first, since I’m picking up the information from a particular…
-
2
votes1
answer1395
viewsHow to send application files to the API
I have an APP in React-Native and an API with Laravel Both are communicating correctly, sending APP data to the API and otherwise correctly Currently to send and receive requests in the APP I use…
-
2
votes1
answer1599
viewsSave files with storeAs out of Storage folder
I have in an API in Laravel for file storage $request->file("file$i")->storeAs('categories', $nameFile) As it is it stores the data correctly in the address…
-
2
votes1
answer1038
viewsRuoting with Laravel and Vuejs
I’m starting with Laravel and Vue and I’m having an absurd difficulty finding something that shows or teaches how to routing using Laravel and vuejs. I want to create a simple SPA app with Laravel…
-
1
votes1
answer710
viewsHow to verify that the user is logged in to Vuejs + Laravel 5.5?
I am following a course of Laravel 5.5 + Vuejs, and putting into practice what is being taught. However, it doesn’t address authentication at the moment, and as I’m structuring the whole project to…
-
1
votes1
answer624
viewsChange variable value of Orange Session
I have a problem with how to change the session variable in Laravel. When the user logs in, some variables are set in the session, one of them is the user name. In a given form, there is the option…
-
1
votes1
answer191
viewsLaravel 5.5: Pick name of each table in select Union
I need to make a select in two tables and join them with the union, until then, but I also need to take the name of the two View. I’ve tried using the getTable() in each select, but it returns me…
-
1
votes0
answers228
viewsHow to create Foreignkey without data with Windows
I’m creating a system and I have two columns: empresas and usuarios. The usuarios.id_empresa makes is the key of empresas.id_empresa, however, some data from the two tables are filled in…
-
1
votes1
answer451
viewsImport js file in vuejs and Laravel template
I am creating a simple application and need to import some specific js and css files on a given page but how do you do that? In my template (Login.Vue) I tried <script>…
-
1
votes1
answer69
viewsHow to create programming logic to disable a button after an action?
Context: The approval data will only be saved if there is a saved amendment, initially the button of 'salvage' should stay disabled. When saving the seam the button 'salvage' is disabled and the…
-
1
votes1
answer370
viewsForm::select Orange
I’m having trouble making one Form:select searching information from the database. How is the Controller; public function create() { return View('internos.create'); } How’s the View; <div…
-
1
votes1
answer638
viewsRedirect and Route on Laravel 5.5, is it possible?
I’m having a beginner’s difficulty here in my training with Laravel 5.5 I just created an update method - Update, public function atualizar(Request $request, $id) { $dados = $request->all();…
-
0
votes1
answer1089
viewsValidation Can you compare 2 fields not to repeat in the database?
I need a if to check 2 values of the register and 2 of the bank, if both are equal should not occur the register. <div class="container-fluid"> <form action="adiciona" method="post" >…
-
0
votes1
answer1753
viewsHow to create a custom Auth controller in Laravel 5.5?
I created a custom Auth controller in Laravel 5.5 with the "store" action inside it, then I authenticated using the method auth->attempt() returning true. So far so good, the problem starts when…
-
0
votes0
answers75
viewsInsert data into a Pivo Laravel table
I have a many to many relationship between items and area, as I do to relate the two within my item_area table in my store method? This is my view <h3>Criar um novo Item</h3> <form…
-
0
votes1
answer179
viewsLaravel 5.5 Collective checkbox
So friends all right with you, I’m starting in Laravel and I’m not getting to solve a problem that should be simple. I have a view which inserts data into db with a form built through the collective…
-
0
votes0
answers2910
viewsSQLSTATE[23000]: Integrity Constraint Violation: 1452 Cannot add or update a Child Row Laravel
Well guys, even though I checked several responses in the forum, I still can’t solve my problem. Schema::create('alunos', function (Blueprint $table) {…
laravel-5.5asked 6 years, 7 months ago user60485 -
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
answer79
viewsLaravel 5.5 Queued?
I’m starting in Laravel, and installed 5.5 and after exceeding this command php artisan make:command MyCommand --queued The error is as follows The "-queued" option does not exist. Reading a little…
-
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
votes1
answer292
viewsRefresh page conflicting between Windows and vuejs
I’m studying the integration between Windows and vuejs, however, when I configure the routes through the Vue-router, when doing a refresh on the page, the Windows does not find the page or so, I…
-
0
votes1
answer156
viewsSomething setInterval style for PHP
Is there a function in PHP that schedules a certain routine? What I would like is to turn the day, in case, 00:00, a script, in php, was fired to perform a certain task. It would be more or less the…
-
0
votes0
answers16
viewsQuery via get with Laravel
How do I pass data via get from a form? When I do Submit, the url is meusite.com/pesquisar?termo=algumtermo&categoria=algumacategoria . How I pass these two parameters termo and categoria to the…
laravel-5.5asked 6 years, 4 months ago Felipe Paz 358 -
0
votes0
answers447
viewsSQLSTATE[HY000] General SQL Server error: Check messages from the SQL Server (Severity 14) (SQL: select * from [product])
I have an application in Laravel connecting in the database in an SQL Server when I will make a query of all products I am getting the error SQLSTATE[HY000] General SQL Server error: Check messages…
-
0
votes2
answers712
viewsTesting if the image exists
I use Intervention in Laravel 5.5 and use its routes with filters to generate images dynamically. I would like to know how I can test in the filter class and the image I passed it exists on the…
-
0
votes0
answers37
viewsMethodnotallowedhttpexception in the pagination Laravel 5.5
I’m having trouble paging the data in the view. When performing the search it returns all the data, but when accessing the pagination link it returns the error "Methodnotallowedhttpexception".…
-
0
votes0
answers24
viewsmysql relations in Laravel 5.5
I’m trying to model with Laravel a database for purchases, in my mysql relations are like this, so I modeled on Laravel, for the associative table "vendor_detail_item" I used "belongstoMany"…
-
0
votes1
answer56
viewsVue.js build error in Laravel
I am getting the following error while saving the app.js file: https://imgur.com/a/akBRZ5D The arches are these: app js.: require('./bootstrap'); window.Vue = require('vue');…