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
answers49
viewsDoubt about eloquent with Laravel
Eai guys, I’m setting up a management system of football clubs just to practice and in that came a question, I have the following eloquent: $matches = DB::table('ut_tickets AS TIC')…
-
0
votes1
answer1777
views"Expected Response code 220 but got an Empty Response" when sending email
I am trying to send an email using the Standard. I tried something like: api.php: Route::get('emailAnimalEncontrado', function () { $data = array( 'name' => 'Novo animal encontrado em Franca.…
-
0
votes1
answer130
viewsUndefined variable in the Variable when trying to send email
I need to send email to more than one person, for that I created a repeat structure for, but I’m getting that my variable is undefined. I tried something like: public function avisarAnjos(Request…
-
0
votes1
answer455
viewsthrow new Methodnotallowedhttpexception($others); Laravel 5.7 Sending HTML form
When creating the update in Laravel this giving the error. protected function methodNotAllowed(array $others) { throw new MethodNotAllowedHttpException($others); } View {!! Form::model(array('route'…
-
0
votes0
answers115
viewsProblem with modal in Laravel and Vue.js
Hello to all of you! I am working with a CRUD application in Windows and Vue.js and at the moment I am facing the following problem I created a modal to update a table, the modal does the…
-
0
votes0
answers84
viewsLaravel Controller add content?
I’m new and I’d like some help, I have a controller carrying out a consultation. Controller $user = $this->user->find('1'); view('index', compact('user')); View @forelse ($user as $u)…
-
0
votes2
answers95
viewsValidate fields within separate Ivs in a single form
Within a single form I have 3 divs, that change as the user clicks on próximo. But for the user to be able to click próximo the mandatory fields of div which is currently being shown must be filled.…
-
0
votes2
answers105
viewsProblems with return api in Laravel
I’m riding the return of father and daughter categories through a foreach, but the return is coming in the front-end as a object and not a array and what should I do in Laravel to the front-end make…
-
0
votes0
answers45
viewsHow to use cursor() with associated data in Laravel?
$arrayCarros = []; $model = new Carros(); $carros = $model->with('montadoras')->cursor(); foreach($carros as $carros) { array_push($arrayCarros, $carro->toArray()); } Running the above…
-
0
votes1
answer131
viewsCreate tag select by checking Jquery Checkbox
I don’t know if what I’m thinking is viable. I have a form that dynamically creates several checkboxes with the dates of the month. However, I need when the user checks one of these dates to create…
-
0
votes1
answer107
viewsRequest via FTP and return file via HTTP
I am developing a blog and would like to use resources from another server via FTP. In order to share some of these files in my posts I imagined that it would be possible to connect the FTP within…
-
0
votes1
answer1097
viewsErrorexception Array to string Conversion
Hello, I’m starting a test project of my knowledge, I’m having problem in the variable line $response = $validate->$data; before I created the Rules was working normal, I tried help on the…
-
0
votes2
answers63
viewsBest way to select a specific column that is within a Function ($query)
I have a query where I have several relationships between different tables, which would be the best way to select a specific column that is within the Function($query) in that case the rule of…
-
0
votes0
answers67
viewsCompare Database Data with AJAX Result
I make a request AJAX in view and a survey on database. I need to compare the results of the two and if an item is equal I want to print a result in a div $.ajax({ type: "GET", data: {number:…
-
0
votes0
answers41
viewsI have updated the version of Laravel 5.2 to 5.6 and I am having problems with the requests via ajax that receives a return Sponse()->json
I have a system running normally in Laravel 5.2, but I need resources that only have the most current versions of the framework. With this I updated it to version 5.6 and I am having problems with…
-
0
votes1
answer166
viewsSUM operation doubling query value - Laravel
I am with a query that is with some problem in which I cannot identify. I need to bring up the additional sum and journey. The problem is that when I add in the bank the value of the journey and no…
-
0
votes0
answers24
viewsDoubt Laravel + Ajax
I have the following table below, with a listing, there is a TD, which the user can choose between yes and no, html tag option, would like to know how to make the change from yes to no or…
-
0
votes2
answers122
viewsLaravel query two tables, not showing if id are equal
I have two related tables in the database: Students and student_schedules. At some point, I want to list all the Students that NAY are in student_schedules. I tried to do it like this, but it didn’t…
-
0
votes2
answers580
viewsLaravel Update multiple lines of an array
I’m trying to update several lines at once, where I get the information from an array But so far I have not had much success, despite the attempts, not updating, and returning result 0 the code is…
-
0
votes1
answer672
viewsI can’t open project in Laravel
I have a project in Laravel that after I formatted the computer I can no longer open it. The following steps have been performed: Installation of XAMPP and change the default path to the project…
-
0
votes1
answer535
viewsSearch records between two dates using the eloquent of the Standard
I need to search the bank records between two dates. example: $emprestimos_material_qtd = MultimeiosDetalheEmprestimo:: where('recursoId', 2) ->where('dataDevolucao', null)…
-
0
votes3
answers653
viewsList 3 tables in Laravel
I have 3 tables: contratos, contratos_empresas and empresas In the system there is a form for registration of contracts, in this form there is a select Multiple (that allows to select several…
-
0
votes1
answer309
viewsRelate two tables through another
I have 3 tables, processos, empresas and processos_empresas. table structure: processos: - id empresas: - id - nome_empresa processos_empresas: - processo_id - empresa_id Brief explanation of how…
-
0
votes1
answer54
viewsProblems with Laravel Charts, always class error not found!
Gentlemen, I’m using the Laravel 5.7 and the following problem Class 'ConsoleTVs\Charts\Facades\Charts' not found I did his installation correctly: composer require consoletvs/charts added in the…
-
0
votes1
answer149
viewsDoubt in the use of the lavacharts library in Laravel consulted Mysql
Gentlemen, I am using the Google library to Lavacharts, but I have the following result: On my controller I’m doing so: $graf = new Lavacharts; $valor = $graf->DataTable(); $valores =…
-
0
votes1
answer73
viewsFile not found error while moving image in Laravel
I’m trying to move an image that’s located inside storage/temp for storage/app/public/erro_log with the method Storage::move();, but I get the error of File not found, even if the image is at the…
-
0
votes2
answers1940
viewsDeploy Laravel application
I’m having trouble getting my application up to production environment. I tried several times as I find in step by step and documentation, but the error persists. Current scenario: I moved the…
-
0
votes1
answer441
viewsLaravel design error 5.7
My project started presenting the error below when I run any command php artisan ...: $ php artisan --version PHP Fatal error: Uncaught ReflectionException: Class config does not exist in…
-
0
votes1
answer177
viewsData were not changed in the database - Standard 5.7 eloquent
Good afternoon guys, I’m trying to do an update but the values entered in the fields not saved in the database, follow files to check. Index.blade.php @extends('layouts.app') @section('content')…
-
0
votes0
answers204
viewsForeach nestled with Blade in Laravel
I need to display in a report three nested information and the idea is to display releases of a balance sheet, this balance sheet belongs to a plan of accounts and the plan of accounts belongs to a…
-
0
votes1
answer54
viewsLaravel Query Builder - problem with two Join
Currently I have a query that takes the posts and searches through Join some user data $posts = \App\Post::join('users', 'users.id', '=', 'posts.author_id') ->select('posts.id', 'posts.title',…
-
0
votes1
answer131
viewsError with password protection in the Windows
I am creating a system with Laravel, and using only his api. API code: Route::get('/teste', function (Request $request) { $nick = '@mesa0'. rand(11, 50); $number = '0'. rand(11, 50); $password…
-
0
votes1
answer973
viewsReturn message to user
I would like if this error when logging in to return a message to the user In my view login.blade.php is like this div class="login-form"> <form action="{{ route('logar') }}" method="post">…
-
0
votes1
answer76
viewsError while displaying Laravel Relationship data
Gentlemen, I am creating a relationship between 3 tables, the product that takes category values and sessions, but this always returning me the following error: Trying to get Property of non-object…
-
0
votes1
answer23
viewsError searching for Description in another related table
Error: Trying to get property of non-object View @foreach ($titulos as $titulo) <tr> <td>{{ $titulo->id }}</td> <td>{{ $titulo->titulo_tipos->description…
-
0
votes1
answer34
viewsSelect an option and send ID
Good morning friends. I have a question.. need that in a view I select an option that contains the name of the driver but need that in the controller I receive the ID of that driver and not the…
-
0
votes1
answer45
viewsFill a select by clicking the previous select
My php code public function getCadastro(Request $request) { $redes = Rede::lists('nome','id'); $municipios = Municipio::select('nome', 'id')->pluck('nome','id')->all(); $municipios_id =…
-
0
votes1
answer454
viewsLaravel keeps missing the session
Hello I have a system developed in Laravel 5.6 that keeps missing the session When I log in: private $prefix = ''; public function __construct(){ $this->prefix = env('APP_NAME')."_"; }…
-
0
votes2
answers10099
views'npm' is not recognized as an internal or external command, a operable program or a batch file
Good evening! I have this problem. I have tried some things I found on the net but nothing has worked so far. npm is installed ([email protected] C: Program Files nodejs node_modules npm) and PATH (C:…
-
0
votes3
answers298
viewsCreate table in Mysql using Laravel
I need to create a table with Laravel using the migrate command, the table would currently only have id. Normally two tables would be created, one with the name of the database I put containing the…
-
0
votes1
answer63
viewsHow can I recover the value of a variable sent per myVar date and use in the checkbox?
index.blade.php <table> @foreach($masters as $master) <tr> <td>{{$master->receive_email_neworder_masters}}</td> <td> <button class="btn btn-info" data-my_table =…
-
0
votes1
answer88
viewsLaravel + Postgres - Return’t' or 'f' instead of true or false
Hello, When performing a query in a field booleano in the Postgres we have a return of 't' or 'f'. I’m having a problem trying to migrate an API made in Codeigniter for an API I am developing in…
-
0
votes1
answer33
viewsPath with Laravel URL parameters
It’s a silly question, but I’m racking my brain. I have the url subcategory/sessao/3/1/Facirolli04 where they are as follows, 3 - would be the category 1 - would be the session Facirolli04 - would…
-
0
votes2
answers121
viewsArithmetic operations in PHP or Mysql?
What would be the good practice when doing arithmetic operations that come from a database query, for example: SELECT valor_bruto_atual, valor_investido, (valor_bruto_atual / valor_investido) AS…
-
0
votes1
answer31
viewsProblems with AJAX return
<script type="text/javascript"> $(document).ready(function(){ $('#btn_busca_f').click(function () { var data_ini = $('#data_ini').val(); var data_fim = $('#data_fim').val(); var cod_recurso =…
-
0
votes1
answer44
viewsProblem sending multiple data to Controller
I have this dynamic table <form action="{{route ('AddDocumentosAbertura')}}" method="post" accept-charset="UTF-8" enctype="multipart/form-data"> {{ csrf_field() }} <table > <thead>…
-
0
votes1
answer75
viewsFunction does not work within class [Laravel]
I’m trying to call one function inside another in one of the controllers of my Laravel project, but when the flame the page is all blank and presents no error. public function index() {…
-
0
votes1
answer427
viewsMy cron is not running
I’m trying to make a cron in the Standard to send an email every 1 minute, but no e-mail has been sent so far. Man Emailadocaocron.php: <?php namespace App\Console\Commands; use…
-
0
votes1
answer277
viewsSynchronizing Permissions with Spatie Permissions
I need a little help, I need to synchronize permissions when creating and editing a user within the Administrator. I’m using the Laravel Spartie Permission package, which I need to synchronize roles…
-
0
votes1
answer871
viewsIt takes time to load site with Laravel
Good evening, I’m starting with Aravel, but I’m facing too much critical delay.. I tried with two templates and both took the same time (on media), I wanted to know your opinion, because I already…