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
answer127
viewsUpdate of data from Laravel user table
I’m trying to perform an update, the successful json Sponse is returned, but when I consult the database is not changing the data. I tried to: Route::put('alteraDadosPerfil/{id}',…
-
0
votes0
answers1048
viewsTable rows do not break when finishing the page - PDF gift & Laravel
Guys, I have a table with a very large number of lines and when I PDF this HTML page with domPDF does not skip to the next page. I tried some tutorials here, only it didn’t work very well. Follow…
-
0
votes1
answer1265
viewsCall stored Procedure in the Laravel using SQL Server with OUTPUT
I’m trying to call a stored file by Laravel 5.5 but I’m not getting it. I’m using SQL Server. Follow the stored Precedent: declare @CodigoRet int exec Generator 'LancaContaContabil', @Codigo =…
-
0
votes1
answer199
viewsKeep data already filled in the form
When bringing the form for the user to fill, I need that, if the data already exists in the database, it brings me the form filled with the possibility of the user "edit", but always creating a new…
-
0
votes0
answers603
viewsDoubt Installation of Laravel and PHP 7.0 Wampserver
I’m having a doubt. It is the first time I install Laravel and for this, I followed the tutorial of the following forum Tableless. So far so good, the installation is ok, but when creating the first…
-
0
votes1
answer61
viewsproblems using Laravel Frameworks
I’m following a video lesson to understand how the vue, but this video lesson is on top of a project PHP, I know little about PHP. I did as the video below; 1 - CRUD en LARAVEL & Vuejs -…
-
0
votes1
answer49
viewsHow to Work with Events in Laravel?
Hello I am currently working with an access verification project. I need that when the person has access granted by the system triggers a sound "successfully authorized passage", my question is I…
laravelasked 5 years, 6 months ago Beatriz Carlos 45 -
0
votes3
answers1426
viewsPass a variable from one function to another Laravel PHP?
Hello someone could help me? I’m having trouble passing function parameters to another. I don’t know if I’m doing it right, I’m new to PHP. public function verificarCondutor(Request $request) {…
-
0
votes1
answer109
viewsWhat is the relationship problem in these tables?
I’m using the Laravel and would like to make a relationship of table of municipios containing the estado_id. The estado_id will be related to the estado_id of table of estados. Just when executing…
-
0
votes2
answers426
viewsInterpretation of Tags with HTML
I am programming using the Laravel framework and normally to use PHP within HTML use double keys {{ $variavel }} When I should interpret the HTML inside this variable I use {!!$variavel!!} I didn’t…
-
0
votes1
answer198
viewsUse variables external to Route do Laravel 5 to send to view
Hi, I’m working with Laravel, and in my Routes file, I would like to leave created a variable that I want to use in all routes, like this: /Routes/web.php $foo = "ola mundo"; Route::get('/',…
-
0
votes3
answers558
viewsDisplay only part of the text in an Html page
I would like to display only part of a String that contains a text. Make a "Click to read more", I tried with substr but since I don’t know what character a word ends in, he cuts the text in the…
-
0
votes0
answers39
viewsMysql - What would be the pure sql query that would be equivalent to Laravel Sync in a pivot table?
When I work with Laravel in a pivot table where we have only the fields user_id and post_id we use something similar to $user->posts()->sync([3,4]) and the pivot table will be updated with…
-
0
votes1
answer23
viewsError with Laravel being used with API
I have an application in vuejs that requests for Windows on localhost, but when I put both on the server (each one on a server) it is not possible to request. This error appears:…
laravelasked 5 years, 6 months ago Pedro Henrique 423 -
0
votes1
answer1328
viewsCheck if it is authenticated
I have the function authenticate which checks whether the e-mail and password entered match those of the users table. The code is working, but after checking which email and password check, I…
-
0
votes1
answer96
viewsWhy does DELETE give error?
I have the following function in jquery which gives the delete in the record. It even deletes the record but does not go to the success, he goes to the error. Why will it be? function…
-
0
votes1
answer618
viewsHow to perform a Migration in Laravel, without excluding the other tables
I’m new to both Laravel and Stack, recently I’m building a system and in the process I forgot to put a Migration. Usually I put the remote php artisan migrate:refresh, however all the data that were…
-
0
votes1
answer150
viewsHow to popular an input autocomplete from a select data in the Standard
I’m developing an application where I came across a bit complicated, I have a select and would like to change the autocomplete of a input according to the item chosen in this select. Below is the…
-
0
votes0
answers167
viewsDifficulty organizing/controller structure in Laravel
I’m having trouble structuring my controller Arquivocontroller. Main points of difficulty: Select that repeats in different methods I am restricting the search for the logged-in user ID, it would be…
-
0
votes1
answer460
viewsHow to Upload Shared Server Api
I’m having a hard time climbing my shared server-enabled api. My frontend is angular, I gave an ng build --Prod and through Filezilla transferred to the folder public_http on the hostgator server.…
-
0
votes2
answers112
viewsPaging with twbsPagination plugin giving problem
Well I made a pagination with the twbsPagination plugin, it works perfectly, but it does not list the amount of elements per page. What did I do wrong? I wanted you to list 4 elements per page. Look…
-
0
votes1
answer572
viewsCreate id field with Datatable Jquery Checkbox
I have the following datatable: function retorna_cliente() { $(".mostra_clientes .table").dataTable({ "bDestroy": true }).fnDestroy(); $('.mostra_clientes .table').DataTable({ "pageLength": 4,…
-
0
votes2
answers251
viewsCors error with Larable 5.1
Personal I am having problems with the CORS in my application Aravel 5.1, when I make a request via RESTLET it returns without problems. However, if the same request is made via AJAX it generates…
-
0
votes1
answer35
viewsError in password reset request
What can I do to correct the following error, which appears when I request Reset Password system user: Argument 2 passed to Illuminate\Translation\Translator::getFromJson() must be of the type…
-
0
votes0
answers280
viewsAuthentication and Sweet Alert - Laravel
Someone could help me, I have a tremendous doubt, I have researched so much and I have not found the solution. The scenario is as follows. I created a basic project with auth through php Artisan…
-
0
votes1
answer788
viewsHow to run a Function in cron job?
I wonder how and what is the best way to do a cron job, if I write it as a direct Function in cron? I’d like to do it every day at 6:00. public function atualizarpontuacao(){ $palpites =…
-
0
votes1
answer53
viewsLaravel error when creating serves
Hello, I’m having problems creating the serve in the Server with the command (php Artisan serves) it presents this error. The project is created inside the php folder of Xampp, because I could not…
-
0
votes0
answers165
viewsOld() with array - Laravel
Good, I’m trying to recover the value with old() but I can’t because of the variable $i. I have an input like this: @for ($i = 0; $i < 10; $i++) <input type="text" name="tempos[]"…
-
0
votes1
answer432
viewsLaravel 5.8 - Create custom validations to use on a Formrequest?
I would like to create some custom validations and call them inside the FormRequest as per image:…
-
0
votes2
answers286
viewsDynamic URL in the Laravel
I’m working on a website project for writers. In this project there are 12 genres within the table "categories", for example: Poems, Acrostics, Chronicles, etc. I’m having trouble creating the…
-
0
votes0
answers461
viewsLaravel Problem with passing parameters to Controllers
then I have a pertinent problem. I need to create a link to the.Edit controller to edit of course a value in the database. I’ve tried pretty much everything. But I keep getting an error:…
-
0
votes1
answer82
viewsmiddleware redirecting to login screen
good afternoon everyone! I have the route below: Route::get('produtos', 'ProdutosControlador@index')->middleware('auth:api'); well it happens that using Postman I am trying to access and for any…
-
0
votes0
answers624
viewsError connecting a postegresql bank to Laravel
I’m having a problem using Laravel with postgresql on Linux, when trying to connect with the database it says it does not find the postgresql driver, I have already enabled postgresql in php.ini so:…
-
0
votes1
answer970
viewsHow to solve this problem in Datatables?
I have a problem with Datatables that is keeping me awake. I have the following code. It even shows the datatable but the table functions don’t work. Next doesn’t even show the Prev. If I remove the…
-
0
votes2
answers202
viewsParameters in JOB Laravel class 5.8
Error passing variable as parameter in constructor of an Laravel job Too few arguments to function App\Jobs\ImportDocumentJob::__construct (), 0 passed in…
-
0
votes3
answers87
viewsI cannot pass Methods as Parameter in PHP
I have the following code <?php namespace App\Http\Controllers; use Illuminate\Http\Request; class DatesController extends Controller { //Função que calcula o inicio e o fim da semana a partir do…
-
0
votes0
answers61
viewsAngular 2 - Template?
In a structure like this: <header></header> <main> div1: <router-outlet></router-outlet> div2: <router-outlet></router-outlet> div3:…
-
0
votes2
answers3284
viewsCreate project in Laravel in previous version
When I create a project in Laravel this comes in version 5.5, however I am following a tutorial and error code to run. I believe it is because the tutorial is used version 5.2 of Laravel. I decided…
-
0
votes1
answer169
viewsLaravel 5.8 - validation of multiple ex.video files
I’m using Multiple to insert more than one file, but I’m not able to validate the size and format when one or more videos is inserted. form: <input type="file" name="anexo3[]" class="form-control…
-
0
votes1
answer3813
viewsHow to resolve this 'Undefined variable' error when accessing a view in Laravel 5.1?
My problem is this: I uploaded the data to the banner view, which is included in the main view, this in turn is expanded in the home view, is working well. But when I try to access another view…
-
0
votes1
answer15
viewsCapture ID eloquently on JOIN
Good afternoon everyone, I have the following appointment: $acordo = tb_acordo::join('users', 'users_id', '=', 'users.id') ->join('tb_status_acordos', 'tb_status_acordos_id', '=',…
-
0
votes0
answers52
viewsHow do I make a check box "checked" when I enter values in 2 fields dynamically?
How do I make checkboxes mark when the user enters values in the two fields? <td class="col-xs-2 col-sm-2 col-md-2 col-lg-2" ><input type="number" max="20" min="0" size="1" maxlength="2"…
-
0
votes1
answer656
viewsHow to configure the webpack file in Laravel?
I’m following several tutorials as you can see below; At 9 minutes and 45 seconds of video. Using Vue.js in an Laravel application At 8 minutes and 12 seconds of video. 1 - CRUD en LARAVEL &…
-
0
votes1
answer902
viewsI can’t connect the vuejs in the Laravel
See the page: <!doctype html> <html lang="{{ app()->getLocale() }}"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta…
-
0
votes1
answer256
viewsFind element of the intermediate table using Laravel
I’m developing a system that has an N:N relationship situation and need to create a third table. The relationship is between Product and Coloured. inside the Product Model, I put this function:…
-
0
votes0
answers27
viewsWhat to do with the authentication token when it arrives at the front?
I’m developing a site with Laravel on the server (API) and angular on the front. To authenticate a user in the system, I recover the credentials (email and password) and, if the user exists and the…
-
0
votes0
answers62
viewsCurl does not work with Artisan serve?
Currently my friend is having the same problems I had when trying to use Curl to consume the API, serving the application with php Artisan serves. Is there a limitation that does not allow the use…
-
0
votes1
answer68
viewsName a given id field inside a @foreach
<?php counter = 0 ?> @foreach($buildings as $building) <?php $var1 = counter; $counter = counter + 1; ?> <input type="checkbox" id="campo{{counter}}"…
-
0
votes1
answer48
viewsWhy does the Crosstab function not work in Windows? Using Postgresql
I built a query that has a Crosstab, in the database manager works perfectly and gives no error, but when I run this query inside my project that is in Laravel, it explodes an error saying that the…
-
0
votes1
answer3392
viewsMissing required Parameters for [Route]
I’m having trouble pinpointing the route because of the two parameters it has. Route::prefix('auction')->namespace('Auction')->name('auction.')->group(function() {…