Posts by Diego Vieira • 1,807 points
111 posts
-
0
votes1
answer250
viewsQ: Configure Production and Approval paths on the server
The server had version 5.5 of the PHP, then I had to switch to 7.1. But after restarting the apache, no longer loads the site. There used to be the main website (production) and the testing…
-
1
votes1
answer218
viewsQ: Script to search prices on various websites
As the title already says, I need to develop a site that searches product prices on certain sites. The idea is like Trivago, zoom, Buscapé, etc.. But I have no idea how to start this. I have read in…
phpasked Diego Vieira 1,807 -
0
votes2
answers73
viewsA: Insert data into sql after validation
You will not need to do this kind of validation, since you will list drivers and users and then select them, correct? When you bring that data to the form, just bring the names and the ids of both.…
mysqlanswered Diego Vieira 1,807 -
0
votes1
answer28
viewsA: Website - User changes password even if there is an error between the new pass and the confirmation of the password
I made a modification to your code, left the two checks in one IF. // verifica se a senha antiga está correta $sql = "SELECT user_id FROM utilizadores WHERE (user_id='$id' AND user_senha=SHA1('$p')…
-
2
votes2
answers41
viewsA: Best way to replace more than one character in php
With this same function you are using it is possible to do this. The str_replace accepts a array as a parameter, then just do the following: $fone = str_replace(['(', ')', '-'], '', $_POST['fone']);…
phpanswered Diego Vieira 1,807 -
2
votes1
answer1401
viewsA: How to create a mouse-over effect on an image and position it where I want?
I created a div father to the content and left the text as position absolute and with bottom 0. https://jsfiddle.net/6k2Lhaje/191/…
-
0
votes2
answers54
viewsA: View counter
In the table where the information on this page is stored, put a field int to store the number of views. Whenever the page is accessed, it takes the current value of the field and adds +1, then it…
phpanswered Diego Vieira 1,807 -
0
votes2
answers87
viewsA: Free access to a page with set time
First you’ll need to choose a language backend to implement in the project. After doing this, to control this 5-day access, you can do the following: Create 2 more fields in the table, a field to…
html5answered Diego Vieira 1,807 -
3
votes2
answers1922
viewsQ: Access indices of an array inside another array
I have the array below and need to create a foreachs to go through it and pick up the product and the Qtd. $array = array( array( 'loja' => 'Loja1', array( array( 'produto' => 'bolsa', 'qtd'…
-
2
votes1
answer100
viewsQ: Capture only one element of an array
I got the following array, how could I store in a new array only the "producto_id" of all "loja_id"? array(2) { [0]=> array(2) { ["loja_id"]=> string(3) "286" [0]=> array(2) {…
-
2
votes2
answers392
viewsA: Replace jquery with pure javascript
So you won’t have to use the onload in the body. In itself JS, it will already load the method through the window.onload. window.onload = removerClass(); function removerClass() { var element =…
-
2
votes3
answers46606
viewsA: Mask for HTML5 Input fields
It’s not returning anything because you don’t care about any library. You can use this one: $(document).ready(function(){ $('.telefone').mask("(99) 99999-9999"); }); <input type="text"…
-
2
votes2
answers862
viewsA: Laravel: Syntax error or access Violation: 1071 Specified key was Too long
This happens because the Laravel changed the value default fields. To fix this, just go in the file app/Providers/AppServiceProvider.php and add the following code: use…
-
2
votes1
answer576
viewsA: Redirect after update Readable
Informs the url for redirect: return redirect('/agenda_exames)->with('success','Os dados foram atualizados com sucesso.');
-
1
votes1
answer2391
viewsQ: Vue 2: Take input value without using v-model
I’m already detecting when the pressure is enter in the input, how can I make to catch the current value that input too? Can’t be with v-model, because I need to leave a value default, as shown in…
-
0
votes1
answer644
viewsQ: Angularjs: Picking input value in keypress
I’m already detecting when the user presses enter in the input, but how can I capture the text he typed? HTML <div ng-app="Insidetv" ng-controller="ListaController"> @foreach($listas as…
-
0
votes2
answers1030
viewsA: custom datatable filter
Like you’re passing the parameters by GET, you catch like this on server-side: $_GET['nome_do_parametro'];
-
0
votes2
answers173
viewsA: Leaving CSS inside HTML pages disrupts SEO ?
Hardly, because what the search engine takes into account is the textual content. Everything else will be filtered. I believe that the CSS influence only when it determines whether the elements are…
-
-1
votes2
answers114
viewsA: How to execute a function only if the input is typed?
I made a modification to your if. So it will only add the text and class if the Cpf field is not empty. if($('#cpf').val() != '') { $('#erro-cpf').html('Digite um CPF válido');…
javascriptanswered Diego Vieira 1,807 -
0
votes1
answer89
viewsA: Laravel 5.2: Multi authentication always returns false
The bcrypt occupies more than 50 characters, so I changed the size in the database to 100 and the problem was solved!
-
0
votes1
answer89
viewsQ: Laravel 5.2: Multi authentication always returns false
Is always returning error when making the login, even if the data is correct. I’ve seen several topics about this error, but none solved the problem. CONTROLLER public function cadastro(Request…
-
2
votes0
answers1878
viewsQ: Configure Laravel Virtual Host in Ubuntu
When I access a project that does not use Lockable, it works normal, but when some access uses, does not load anything and shows an empty screen. Its configuration has to be different from the…
-
0
votes2
answers67
viewsQ: Angular: Controller does not find Model
On my main page shows me the error: Uncaught ReferenceError: Insidetv is not defined, i.e., the Controller is not finding the file of Model. But if I put the two in the same file works perfectly. On…
-
0
votes0
answers193
viewsQ: Angular: Ajax request
Shouldn’t the code below be working? I already tested on console and the text in the 'test' file is coming normally, only does not appear when I call with the //demo.msg//. Where am I going wrong?…
-
2
votes1
answer219
viewsQ: Position Absolute not activate overflow: auto
How can I make for the div absolute(id 3) stay on top of the others Divs and does not activate the overflow of div father(id 2)? <div id="1" style="background: red; width: 400px"> <div…
-
0
votes1
answer60
viewsQ: Drag & drop: Detect when element is not released in marked place
I’m working with drag and drop, and accurate to detect with JS when the element is not released in the marked zone, that is, when I drag the element but release it and it returns to its place. It is…
-
1
votes1
answer1230
viewsQ: Range: change color of progress bar in Chrome
In the firefox it is possible to change the color of the slider using: ::-moz-range-progress. Is there any way to do Chrome also? HTML <input type="range" class="bar" min="1" max="100"> CSS…
-
1
votes1
answer191
viewsQ: Laravel 5.5: Pick name of each table in select Union
I need to make a select in two tables and join them with the union, until then, but I also need to take the name of the two View. I’ve tried using the getTable() in each select, but it returns me…
-
2
votes1
answer232
viewsQ: Laravel 5.5 : Wherehas in relationship Many to one
From what I understand in the documentation, to the whereHas it is necessary to have a get at the end of query, but I need to use the first, since I’m picking up the information from a particular…
-
2
votes1
answer248
viewsQ: Split sum and Count output in the same Query?
The code below works, but I wanted to know how to do it all query, and if the way I’m riding her is really the best way. $query = Avaliar::select(DB::raw('COUNT(id) as contar'), DB::raw('SUM(nota)…
-
-1
votes1
answer110
viewsA: Selector Parent css
I’ll tell you what: .img-parent img{ //Estilo do elemento }
cssanswered Diego Vieira 1,807 -
1
votes2
answers686
viewsQ: How to count the total of records in a limit and offset query?
In a query with paginate I would use the total() in view to return the total of records. Using the limit and offset cannot do this, there is some alternative that does not involve making a new query…
laravelasked Diego Vieira 1,807 -
1
votes1
answer439
viewsQ: Pick first letter of each word
I am using the following code to capture the first letter of each word. How can I add one more rule in the preg_split to ignore words such as: da, do, das, dos, de? $nome = preg_split("/[\s,_-]+/",…
phpasked Diego Vieira 1,807 -
0
votes1
answer647
viewsQ: Upload Images: More than one input file with the same name
I need to upload images, but I can’t create just one input and use the Multiple, like this: <input type="file" name="images[]" multiple> What I need is to create 5 inputs that in the backend…
-
4
votes1
answer939
viewsQ: Mobile First: Show image only on desktop
How best to make an image appear only on desktop? Usually I add one media query to place a display: none when open in the mobile. But this image is processed by mobile, just not displayed. What is…
-
1
votes3
answers146
viewsQ: Laravel 5.5: same field in multiple rows on Seeds
As can be seen in the code below, the field created_at is the same in all, the only thing that changes is the nome. Would you have some way of writing the created_at only once, but insert in all…
-
2
votes1
answer146
viewsA: Jquery Mobile: Change page background color
The following code replaces stylization: .ui-page { background: red; }
-
3
votes1
answer146
viewsQ: Jquery Mobile: Change page background color
How can I override the stylization of this file css to change the background color of the page? I’ve tried using the !important in the background of body and yet it’s no use. I know it is this file…
-
2
votes1
answer97
viewsQ: Using Whereraw with Datediff
I need to take the difference in days between the current date and the date stored in the bank, subtract this difference by 90 and then check if the result is equal to 7. Where is the error?…
laravel-eloquentasked Diego Vieira 1,807 -
0
votes1
answer98
viewsQ: Change direction of the arrow from the menu when opening the submenu
It is possible only with CSS change the direction of the arrow from the menu when opening the submenu? I believe the question would be how to detect the click on the menu. I’m using the…
cssasked Diego Vieira 1,807 -
1
votes1
answer244
viewsQ: Laravel: 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
answer680
viewsQ: Redirect Route direct to view
I’ve read in some places that the correct thing is to point the way to a controller and then redirect to a view. I do it even when I won’t pass any variable to that view? In that case, I will have a…
-
1
votes1
answer889
viewsQ: Laravel 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…
-
4
votes1
answer527
viewsQ: Blade OR syntax within Laravel Collective input value
The following input works normally, but when I pass it to the syntax of Laravel Collective, says that the variable $servico does not exist. It does not exist at all, so it should show the value…
-
0
votes1
answer1537
viewsQ: Laravel 5.4: AJAX request using route with JS variable?
I need to use a route from Laravel within the AJAX request code. The way I built it doesn’t work, but it doesn’t work. I believe the variable call (servico) you’re wrong, because I put a number…
-
1
votes2
answers1429
viewsQ: Laravel 5.4: List information from 4 tables related to the WITH clause
As you can see in convenio controller, I am listing the information of each agreement along with the information that are in other tables(phones, addressee), but I would also like to list the…
-
1
votes0
answers968
viewsQ: Laravel: Fill in form::model
I use the same form to register and edit, so I have that if else to show the form. As I have the table Convenio and Endereco, need to bring the information from the address through a with, my…
laravelasked Diego Vieira 1,807 -
1
votes1
answer244
viewsQ: Laravel 5.4 - Display all phones of each result
I have the table convenios and telefones, each convenio has one or more telefones and a screen where are listed all convenios, I need you to come along with all the phones related to each meeting. I…
-
1
votes2
answers324
viewsA: Laravel 5.4: Error creating table - Unexpected '(', expecting Identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'
I forgot to put the "ON" before the table name. Follow the tidy code: Schema::create('conv_servs', function (Blueprint $table) { $table->increments('id');…
-
0
votes2
answers324
viewsQ: Laravel 5.4: Error creating table - Unexpected '(', expecting Identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'
When executing the command php Artisan migrate to create the table in the database, the error appears below: [Symfony\Component\Debug\Exception\FatalThrowableError] Parse error: syntax error,…