Posts by MichaelCosta • 425 points
24 posts
-
1
votes1
answer73
viewsQ: Exception in Laravel Request validation
I have a Request that validates the data. One of the validations is the unique to restrict the repetition of items. However, items are entered in categories. I need that when the item is of another…
-
-1
votes1
answer85
viewsQ: Mount Array with categories and subcategories that are in the same table
I am trying to assemble an array, but I am not getting, before the following table, I need to assemble the array as in the example below the photo. 6.x Standard design in the'categoria_id 'columns…
-
1
votes2
answers415
viewsA: Search in the database with select
Bro, from what I understand, you don’t have to do those two actions. you can do it like this. using a select that sends straight to Session when selected. I think that’s what you want this php part,…
-
1
votes2
answers1078
viewsA: Bootstrap CSS issues in DOMPDF
@Jaksonfischer Bro think you need to inform the css path to Dompdf type if boostrap is externally, like bootstrap CND, you need to activate in domPdf $options->set('isRemoteEnabled', TRUE); if…
-
0
votes1
answer53
viewsA: Disable the unselected options of multiselect with jquery
Take the test there bro! I believe it solves your problem. $('#columns-selected').change(function(){ //FAZ A CONTAGEM DE OPÇÕES MARCADAS NO SELECT var selectedOptions = $("#columns-selected…
-
1
votes1
answer69
viewsA: How to capture Mysql error 1452 and present message to user?
Bro.. I understand your problem.. you made a reversal of yours true false, for false true. when you added if(! exclamation) inside your if. so it’s not working. change this if (!$database->errno…
-
0
votes1
answer78
viewsA: How to get the value of the second Javascript button
Vinicius, when you click on any of the submit buttons, jquery takes the data from the first form, you’re not telling it the inputs from which form you want it to take. you can solve it by doing it.…
-
0
votes2
answers90
viewsA: View div according to day and time
I made some changes, I hope I’ve been useful in some way, at least it makes you a few more comfortable, to edit the code in the future. test in phpfiddle <?php…
phpanswered MichaelCosta 425 -
4
votes1
answer111
viewsQ: Copy column data from one table to another
I have 2 tables "Orcamento" -> colunas ['id', 'cliente_id'] Essa tabela existe valores em 'cliente_id' "Ordem_servicos" -> colunas ['id', 'cliente_id', 'orcamento_id'] essa tabela não existe…
-
1
votes0
answers24
viewsQ: Making 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…
-
0
votes1
answer148
viewsQ: PDF attached in encrypted email arrives
I am attaching a PDF to send in the email, using Laravel and DOMPDF but when the email arrives, there is no PDF attachment, it arrives encoded in the body of the email. follows the code. Remembering…
-
0
votes1
answer113
viewsQ: Calculate 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
answers168
viewsQ: Mask-Money does not work on input array
I have a form with fields in array <tr> <td><input id="item" name="item[]" type="text" class="form-control form-control-sm" aria-required="true" aria-invalid="false" value="{{…
-
1
votes1
answer130
viewsQ: Remove empty Request values from the form
I need to remove the values that from the first input are empty. $count = count($request->item); for($i=0; $i < $count; $i++) { if ($request->item[$i] === null) {…
-
0
votes2
answers66
viewsQ: href with single click until page Reload
I have the following code <a href="{{ route('carrinho.deltocart', $item['id']) }}" id="deltocart"><i class="fas fa-minus-circle"></i></a> <a href="{{…
-
2
votes1
answer669
viewsQ: Laravel find() function giving error
When I launch a search with an id that exists in the bank, it works normally. Laravel 5.6 public function findProduto($id) { $produto = Produto::find($id)->with('imagemgame')->first(); return…
-
1
votes1
answer72
viewsQ: Laravel Image Intervention does not save extension
The image Intervention does not save the image extension either in the database or in the folder where the saved files are located. but I want it to be recorded, follow the code to see if I’m doing…
-
1
votes1
answer41
viewsQ: Form disfigures DIV
Div doesn’t stand side by side after I insert the {!! Form:: Inside the div Row, the div COL are broken, one below the other instead of side to side. Is it possible to solve this ? or it’s normal…
-
0
votes1
answer249
viewsQ: Laravel - does not write price when value is NULL
I have a Laravel mutator to treat a field, but if the field comes empty it does not save the default value in the bank. MODEL /// PROMOÇÃO TROCA VIRGULA POR PONTO public function…
-
0
votes1
answer650
viewsQ: Accessor/Mutator do Laravel
Replacement of "," by "." by Laravel Mutator Returns empty and unsaved in the database. Productoscontroller namespace App\Http\Controllers; use Prettus\Validator\Contracts\ValidatorInterface; use…
-
0
votes1
answer55
viewsQ: Show div and hide what was or was previously opened by clicking on <a> button
@foreach($user->endereco as $endereco) <table class="table"> <thead class="thead-light"> <tr> <th scope="row">Endereço: {{ $endereco->endereco }}</th> <th…
-
0
votes0
answers64
viewsQ: Dynamic select option
I have a input:text with datepicker. Selecting the date, it is sent via ajax and returned the values in Json. All right so far, it works perfectly here on the desktop using Chrome. But in iphone…
javascriptasked MichaelCosta 425 -
1
votes3
answers130
viewsQ: Array listing with start and end
Example.. $inicio = '11:00'; $fim = '13:00'; $array = ['10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30']; I need to list the array.. but using the start value and the end…
-
0
votes1
answer395
viewsQ: Magento Ajax Cart
am having a problem in Gento.. with cart in ajax.. when I add or remove a product in cart.. the product is added and also deleted.. however.. it does not appear when I add.. or add when I delete...…
magentoasked MichaelCosta 425