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
answer464
viewsProblem with Laravel + Adminlte application
My problem is the following, the application I am developing has a customer listing, which uses the following code for display: <section class="content"> <div class="row"> <div…
-
1
votes1
answer150
viewsLogging in to Laravel password without hash
Good people! I took a very old system to make some "improvements", I used Laravel to develop a system that mainly uses the database of this system. The BIG problem is, the passwords saved in the…
-
1
votes1
answer889
viewsLaravel 5.4 - Update in related tables
What’s the best way to make one update in two tables at the same time? I thought it was just to call the related table, but when I do it only makes the update on the table service and not in the…
-
1
votes1
answer385
viewsRendering a blob image with PHP + Laravel
My image is saved in the database. When I take it and give it a dd it returns which is a Resource stream, so I’m using the following code to get the content from it:…
-
1
votes2
answers297
viewsHow to show user name session inside msg with toastr using Laravel PHP?
Project is in PHP 7 with Laravel 5.8 using toastr for notifications, there is the possibility to put in the display of msg toastr info(example) the name of the user session? using the session:…
-
1
votes1
answer678
viewsSum of quantity multiplied by product value in daily sales
I have an order page, let’s take as a base a mercantil, where the person buys 3 sodas each with the value of R $ 6,00 and 2 cookies in the value of R $ 2,00 each. First I need to multiply these…
-
1
votes1
answer248
viewsWhere are the log-in routes in the Laravel?
I registered some authenticated routes (I already have the authentication pages created with the make:auth) and they work right, every time I try to access these routes in an anonymous tab it falls…
-
1
votes1
answer706
viewsLaravel / Eloquent - Consultation in more than one table
I have the following Tabelas/Models and I’m not getting a consultation: Model 1 id | Name ---+--------------- 1 | Model1.1 2 | Model1.2 3 | Model1.3 Model 2 id | Name | model1_id…
-
1
votes0
answers276
viewsHow to debug an ajax request for a route?
I am making an AJAX request on a route, using the Aravel, as follows: $.ajax( { url: "../controle/pendentes/concluirVarias", type: "POST", data: { ids: arrayIds , _token: '{!! csrf_token() !!}' },…
-
1
votes0
answers334
viewsAfter all, where should the rules of business be maintained?
I am going through this doubt at the moment, I am researching about design patterns. Using the Framework, which has by default the MVC. Where should we keep business rules? I read that some people…
-
1
votes1
answer45
viewsMy form does not save the data in the database
dry my view: {!! Notification::showAll() !!} {!! Form::open() !!} <div class="panel panel-default"> <div class="panel-heading"><h2> Cadastro Escola </h2></div> <div…
-
1
votes0
answers36
viewsHow to do a Cron task with Laravel?
I have a Function in php/Laravel, and would like to fire this Function every 2 hours and 35 minutes. My question is: Using Laravel, as I create correctly, a cron to trigger this function in this…
-
1
votes1
answer199
viewsProblems saving decimal value in Database (Laravel + Postgres)
I’m using Laravel + Postgres and I’m hoping to receive a decimal value, and in Migration I did so: $table->decimal('valor', 10, 2); When I get this amount, I get something like, $1,500.99 Before…
-
1
votes1
answer2132
viewsPaging in Laravel 5.5
I am making a data pagination as follows: Controller: $brands = $this->brand::where('id', $filter_id)->paginate($this->total_page); View: {{ $brands->appends(['id' =>…
-
1
votes2
answers536
viewsLaravel validation if there is a child record
I wonder if there is any default validation that returns an error to the user if he tries to delete a parent record where there are children. I have a table of vehicle types, where I register car,…
-
1
votes1
answer102
viewsThe images do not appear in the Mail inbox. Laravel 5.4
There is a contact form where the user sends a message to the system and the system automatically sends a message thanking his contact and along with the message I send the most viewed articles.…
-
1
votes2
answers644
viewsReal-Time How it works. Because I’m having problems with my Laravel 5.4 tests
What do I need? I need when a user in the frontend sends a message to the system and the system (Dashboard backend) to receive a real-time notification that is the message just created. I’m doing it…
-
1
votes1
answer608
viewsLaravel 5.5 - Validation Method does not exist?
I’m having problems performing a data validation in the version 5.5, can you tell me where I’m going wrong? Error: Here is the code of Controller <?php namespace App\Http\Controllers\PainelAdmin;…
-
1
votes1
answer531
viewsInsert Many to Many Laravel 5.5
I’m doing a data insertion on a form where it contains data of a relation many for many (Many to Many), my difficulty is in inserting in the pivot table more than one reference data, follow post…
-
1
votes1
answer75
viewsHow to pass data from two unrelated tables in a view?
I’m trying to move to a view, data from two unrelated tables. Appear only the data of one, the other, They are invisible, but you can notice the change in the layout when these data are loaded.…
-
1
votes1
answer61
viewsProblem with Utf8 encoding in Laravel
Guys I’m facing a problem with UTF8 coding, I don’t know what happens. When I print the text through the controller it is correct this way http://prntscr.com/ofcemt. But when I move the text to the…
-
1
votes1
answer1236
viewsCan I use select in Relationship on the Windows?
I have a model that takes the data with a with in the Standard, to take correlated data, there is form of these correlated data come only some specific fields and not all the data of the table? I…
-
1
votes1
answer150
viewsInsert data into Oracle table "no returning id into"?
I’m using Laravel 5.2 and when I have enter data he wants to return the last, but at the moment I want to enter and know if the operation was successful. My role in the controller is like this:…
-
1
votes1
answer244
viewsLaravel: Upload linked images and files
I have the following code: <link rel="stylesheet" href="css/v1.css">, but the page does not load it. When inspecting element appears the following error: As the image shows, it comes with the…
-
1
votes1
answer1297
viewsHow to work with data validation in Laravel
I’m currently working with Laravel 5.5, however, this question applies to "all versions" because of its generalisation. My question is: am using $this->validade to validate data coming from form.…
-
1
votes0
answers61
views -
1
votes2
answers55
viewsHow to get a value from an array property?
A VÁRIAVEL ARMAZENZA: $parcelas = DB::select("SELECT parcela_number FROM parcelas WHERE 3000 BETWEEN valor_min AND valor_max"); VAR_DUMP: array(1) { [0]=> object(stdClass)#144 (1) {…
-
1
votes0
answers24
viewsMaking a withCount within another relationship that is within a relationship
I have 3 tables, Client, Budget and Ordemservicos. $clientes = Cliente::withCount('orcamento')->orderBy('orcamento_count', 'desc')->get(); the code above returns me what I need, but I need the…
-
1
votes2
answers23
viewsCan I create a model responsible for more than one table in Laravel?
I wonder if I can create a model that returns the result of more than one table in Laravel.
-
1
votes1
answer417
viewsHow to set up sending email in Laravel within cron?
After the creation of cron (code below) is made a scan in the database behind changed data. I have to send an email with this data. How can I do that ??? Code of the cron: <?php namespace…
-
1
votes1
answer1490
viewsHow to test the cron in the Laravel?
I created a cron for sending email every period of time. But how to test the operation ? Code <?php namespace App\Console\Commands; namespace App\Console\Commands\EnvioEmailBlCron; use…
-
1
votes0
answers37
viewsProblem with languages in Arabic
I have a language system in Arabic, I’m using their localization system. I have the system working, what happens and that when I return to the.com domain of the error I wanted there to show by…
-
1
votes0
answers510
viewsHow to pass a list of the child component to the parent component with Vue and Blade php
I have a problem, I need to access the list I create in the component selectprodutos and it persists, but the sending is made of another Component called formulario. They shall be arranged in the…
-
1
votes3
answers268
viewsSelect postgres between two values
I am developing a system and I need to perform a select to fetch the % rate a customer will have. First I check what % of this customer’s cheque refund and look in another table what the predefined…
-
1
votes2
answers501
viewsI cannot use the foreach with object twice in the same view in the Laravel
I have a big problem that I can’t solve because I’m still a beginner in Laravel. The problem is I’m developing a web application and I need to list the cities object in two different select, but…
-
1
votes2
answers1943
viewsProblems accessing the application from the browser
I want to be able to access/view my applications through the browser using Docker. I installed Docker for Windows, did not make any additional configuration, and created the files below, along with…
-
1
votes0
answers119
viewsHow to upload dynamically generated PDF to AWS with Laravel?
I am generating a PDF dynamically with the DOMPDF in the Laravel and I have to save the document in the service Cloud of Amazon. I’m not able to save the document in the cloud. But I can only save…
-
1
votes1
answer335
viewsSaving multiple images
I’m not able to save multiple images in my database, follow my code below to in the highlighted line with the arrow (-->). Observing: when it was just a normal saving image. public function…
-
1
votes1
answer82
viewsSQL: Avoid repeating line and adding values
I have this select: select DISTINCT (clients.name) as nomeempresa, payments.amount_paid as pagamento, receipts.original_amount as recebimento FROM payments, receipts, receipt_status, payment_status,…
-
1
votes2
answers185
viewsLaravel cron error does not execute
I have a cron that should be running every day in an hour. $Schedule->command('inspire')->dailyAt('15:00'); but he is not being executed Code <?php namespace App\Units; use…
-
1
votes1
answer54
viewsGROUP_CONCAT (CONCAT... in Laravel?
I don’t know if anyone can help me I needed to execute this SQL in Laravel I just don’t know how to use the GROUP_CONCAT with the CONCAT within? select dictionaries.name,…
-
1
votes1
answer34
viewsDate format in Laravel
I’m using Mysql as a database for a project developed with Laravel. However, I need to convert the default date format (YYYY-MM-DD) to the "DD-MM-YYY" format. How can I make this conversion?
-
1
votes0
answers41
viewsLumen - Middleware running on all requests
I created a Middleware which is working perfectly, but it is running on routes that I have declared in the route group and is also running on other routes that I have not declared. Example: Route 1:…
-
1
votes1
answer24
viewsSort by Laravel polymorphic relationship column
I need to sort the results by column distance relationship between order and address by paging the results. Order: public function address() { return $this->morphOne(Address::class,…
-
1
votes0
answers44
viewsSet value of another table in the column of the current table (search value by ID)
I’ll get right to the point. My sql table looks like this: id, venda_id, produto_id, qtd_saida, preco_produto I’d like to fill in the column preco_produto automatically when the product be saved.…
-
1
votes0
answers20
viewsGeneral check in Laravel
I have a site in Aravel with an administrative panel. I would like to know how to implement a general check. For example: In my control panel I have a screen of site parameters, with a checkbox that…
-
1
votes1
answer149
viewsSend Hash in the e-mail and confirm in the form
I would like to make a system that works like this: For the student to confirm the proof visa, he would have to receive a hash code in his email. If he doesn’t know the code, he would have to put…
-
1
votes2
answers449
viewsError-Laravel php Artisan
I have this error in executing the command php artisan serve RuntimeException in Encrypter.php line 43: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in…
-
1
votes1
answer79
viewsnumber_format() generates error only in Return
Inside the table orders, I have a field valor defined as decimal(10,2). In the archive Order.php, I created a method to format the value: public function getValorAttribute($valor) {…
-
1
votes1
answer97
viewsAdd values from a table when the client is the same
Look at the table below, the final result should be this: I wonder how do I make so that only the last record of the client in the table displays the total amount of checks. I am using PHP (Laravel…