Posts by Dobrychtop • 835 points
30 posts
-
1
votes1
answer277
viewsA: ACL Laravel using ADMINLTE
The Administration has the option can if you want to conditionally display the menu item, it integrates with Laravel’s Gate functionality, and is defined directly in the array, thus: [ 'text' =>…
-
0
votes1
answer220
viewsA: How do I resolve the "call to Undefined method Parameterbag::save() " error?
To update a template using save, first you must recover it, set the attributes you want to update or create and then call the save method. In your case you did not recover the template, only the…
-
0
votes1
answer1326
viewsA: How to keep Scroll in last position after page refresh
I created a script using pure Javascript that saves the last scroll position of the window on localstorage, it always checks on page loading if there is any saved position, if yes, it changes the…
-
2
votes2
answers2948
viewsA: Node-Sass is not recognized as an internal command
You need to install Node-Sass globally: npm install -g node-sass Or add it to your package.json as a dependency: "devDependencies": { "node-sass": "^4.9.0" }, And then execute: npm install…
-
1
votes2
answers144
viewsA: Repeat structure that compares equal values and prints the match
What’s happening is that in your second for, the stopping condition is this.operador.tabela_perm.length, that in the I example is 4, then its if will only compare until position 4 of the array of…
-
0
votes1
answer72
viewsA: Laravel Excel I do not understand what is being filled
First you need to understand that this type of query is done using Eloquent, it is an Activerecord deployment to work with the database, the complete documentation is available here, I will start by…
-
4
votes2
answers2257
viewsA: Set current date in Input type Date
You must pass the date in the patterns defined in RFC 3339, thus: <input class='col-4' type='date' name='Dsaida' id='DSaida' value='<?php echo date("Y-m-d"); ?>'> The RFC 3339 is a…
-
3
votes1
answer568
viewsA: Artistic key error while trying to generate
The command is misspelled, the correct form is as follows: php artisan key:generate As described here at the installation of Laravel. Another thing that may be happening is that in your file .env…
-
1
votes1
answer20
viewsA: Storing image (input file) in characters and restoring to file again (?)
It is possible yes, just change the attribute src tag <img> that you wish, follows example below. Note: These characters are in Base64, which is an encoding used to transmit binary data by…
-
5
votes1
answer2197
viewsA: Laravel - Validate Unique field in update
You can force Laravel to ignore one ID during the single field check, in this case just pass the teacher id as the third parameter. 'matricula' => 'required|unique:professors,matricula,' .…
-
0
votes1
answer768
viewsA: Select dynamically in Materialize CSS
After adding dynamic options or changing some property, you need to destroy and re-initialize the select, thus: // Destroi o select $('select').material_select('destroy'); // Insere as opções via…
-
2
votes2
answers731
viewsA: Anti-adblock which replaces div
There are several ways to detect ad blocks, but none is 100% guaranteed, I tested a script taken from a reply by @Guilherme Nascimento: /a/87992/3635 <script> function possivelAdblockDetectado…
-
3
votes1
answer78
viewsA: Create x quantity of <li> according to variable $pages in php
You can create a repeat loop for, while the counter is less than the number of pages a, li is printed with the value, I started the counter at 1 for the start list also start at number 1. $paginas =…
phpanswered Dobrychtop 835 -
1
votes1
answer234
viewsA: How do I write the following SQL code in the Codeigniter Model?
There are several ways to do this, the one I recommend, for making the code more organized is this: $this->db->select('count(situacao) as Qtde, sum(valorcausa) as Total_Valor_Causa');…
-
1
votes1
answer745
viewsQ: Problem with background and linear-gradient
I’m trying to make a background for the body using an image and a linear-gradient, on loading the gradient appears for an instant, but is soon replaced only by the image, as you can see below. body…
-
0
votes1
answer53
viewsA: Error in PHP login, registration is working normal, only login does not connect according to entries in the database
You need to pass the link resource returned by mysqli_connect(), in your case you need to pass the variable $conexao as a pro parameter mysqli_query(). The same resource should be passed to the…
-
1
votes1
answer635
viewsA: Filter problem using class="selectpicker" in filter select,
When are added option dynamically, you need to call a function that updates the element, add this line in the complete after inserting the options. $('.selectpicker').selectpicker('refresh'); More…
-
2
votes1
answer401
viewsA: Error while saving records in the database
Your code SQLis generating error 1136: Column Count doesn’t match value Count at Row 1 This is because your table has 6 columns and you are passing 5, by more than the ID be auto-increment, you need…
-
2
votes1
answer41
viewsA: save quiz time
You can use the localStorage, provides access to local storage for a specific domain, allowing you, for example, to add, modify, or delete stored data items. Saving in the localStorage time and an…
-
3
votes2
answers5911
viewsA: What is rel="Preload"?
To begin we need to understand what is the rel, it allows you to specify and preload features that your page will need before the main browser rendering, it is commonly used for files CSS <link…
-
2
votes2
answers170
viewsA: Append not working properly in a Select after AJAX request
When you add options dynamically or change the state of select using select picker, you need to call a function that updates the element, add that line after adding the options.…
jqueryanswered Dobrychtop 835 -
0
votes1
answer944
viewsA: How to limit the options of a select?
You can add this to your CSS .dropdown-content { max-height: 200px; } In the max-height you will set the maximum size of the dropdown which is open with the options, 200px is about the size for 3…
-
2
votes1
answer295
viewsA: How the onchange event works when uploading a file
I modified the id of your audio element and file so as not to confuse your variable with the element itself. <div id="content"> <input type="file" id="arquivo" accept="audio/*" />…
-
0
votes3
answers1410
viewsA: How to make input mandatory in just a few cases
You can make an event, when entered age, if it is less than 18 the fields of Father and Mother change to required HTML: <input type="text" name="idade" id="idade" required> <label…
-
1
votes2
answers2131
viewsA: Change display property with jQuery
I think you can simplify the code, and still reuse easily function toggleDiv(conteudo){ $('.conteudo').hide(); if(conteudo == 1) { $('.conteudo_1').show(); } else if(conteudo == 2) {…
-
1
votes1
answer78
viewsA: Continuation of Help with asynchronous request script
Come on, first, as soon as the user selects a caledario, in addition to returning the format of it, you can put the ID of the calendar in a hidden field, to use it later for the search of the…
-
4
votes1
answer1615
viewsA: How to change Chart.js display c,
You can add one to the X-axis and Y-axis scale scales: { yAxes: [{ ticks: { max: 5, min: 0, stepSize: 1 } }] } In the option max you choose the maximum scale value, in the min the minimum value, in…
-
0
votes1
answer210
viewsQ: How to enable or disable select nearest?
I’m using Materialize CSS, I have a screen where I would like the Switch to be activated, the select the nearest becomes active so the user can select an option, and if the Switch goes back to…
-
4
votes1
answer433
viewsA: Print in A3 and A4 format
You can use the @media print CSS rule and start hiding menus and other things you don’t want to print @media print { .no-print, .no-print * { display: none !important; } } Then when you open the…
-
1
votes2
answers246
viewsA: Passing PHP Javascript PHP Parameters
var datainicio = document.getElementById('data1'); var datafim = document.getElementById('data2'); In this code snippet, you are taking the element by the ID, but in your HTML the field Ids are…