Posts by Miguel Batista • 2,812 points
92 posts
-
2
votes1
answer51
viewsQ: Is it possible to detect scroll action with CSS animation only?
Is it possible to detect scroll action only with CSS animation, without using javascript? I found an example in this link https://codepen.io/Tont/pen/eDJpb but I couldn’t identify how it was done…
cssasked Miguel Batista 2,812 -
1
votes0
answers28
viewsQ: Is not stitching and comma at the end of the javascript operation standard for ES6?
I see people programming this way: import React, { Component } from 'react'; and import React, { Component } from 'react' not putting the comma at the end is standard of the same Es6? I found…
javascriptasked Miguel Batista 2,812 -
2
votes4
answers6679
viewsQ: How to force numeric keyboard display on the smartphone when clicking an input?
I have a field on my form with type="text" and has mask for the zip code. When access by cell phone and click on the field need to trigger the number keyboard. Can anyone tell me if you have any…
-
0
votes1
answer121
viewsQ: Is it possible to fire two types of action at Redux at the same time?
I’m using Redux and Redux-saga in an application with React and with doubt when it comes to displaying the load to the user when a saga is launched. I don’t know if this is good practice, but I was…
-
2
votes1
answer424
viewsQ: How to fire scroll using pure javascript?
I would like to know how to implement in pure javascript the same action used with jQuery below: $('html, body').animate({ scrollTop: 500 }, 300); Can anyone tell me what the code would look like?…
javascriptasked Miguel Batista 2,812 -
1
votes2
answers167
viewsA: HTML to open url stored in a variable
In this case you should use the tag <a></a> with the attribute href as follows: <div class="csgo-item--inspectLink"> <a href="{{item.inspect}}"><img…
-
2
votes0
answers185
viewsQ: Why does the jboss server crash and not run with the standalone.bat command?
I am trying to configure Jboss and I have already researched in several places my problem. But I still can’t solve it. I changed the default http port in the file…
-
0
votes1
answer281
viewsQ: I put the file extension as . phtml and only Chrome is displaying all the code. Why?
I put the file extension as .phtml and only in Google Chrome is displaying all the page code, but in other browsers is interpreting normally. The page is loaded inside a iframe. If I change the…
-
1
votes1
answer259
viewsQ: How do I keep the browser scrollbar at the top by loading a new angled page?
I’m using modules created with Ode and Angular, by project specification we had to take the # of the navigation. However, when I click on a link that is on the footer and loads another page the…
-
6
votes3
answers482
viewsQ: Why does Angularjs default to # in the URL?
I have a question and I would like to know why Angular uses # at the url?
angularjsasked Miguel Batista 2,812 -
0
votes0
answers433
viewsQ: Why doesn’t my option keep selected even with the attribute Selected="Selected"?
I am working with angular and have the following select <select ng-change="$ctrl.calculateDescount(partnerIndex,item)" ng-model="item.offerDiscountId" class="form-control"…
angularjsasked Miguel Batista 2,812 -
0
votes2
answers1012
viewsA: Consultation with Eloquent do Laravel
Amanda you can make the query as follows: $questoes = Questao::with(['capitulosQuestoes', 'bancoDisciplinas',' 'bancoSeries']) ->paginate(15); in the html you display {{$questoes->links()}} To…
-
1
votes2
answers981
viewsA: How to allow html tags to be executed from an angular variable?
How I am picking up the data via Ajax if I try to display the information directly from the ng-bind-html directive is reported error regarding $sce "Error: [$sce:unsafe]…
-
3
votes2
answers981
viewsQ: How to allow html tags to be executed from an angular variable?
I am consuming data from an angular api, the api is returning me the following value with HTML: variavel = '<p>testo de retorno</p>'; When I do the view view type {{variable}} is…
-
0
votes1
answer595
viewsQ: Keep an angle combobox selected
I am using Angularjs to fill out the data of a form within a modal. have a function editarSolicitacao(solicitacao) which runs from the button click event. When the modal opens the field is selected…
angularjsasked Miguel Batista 2,812 -
3
votes1
answer6501
viewsA: Sending email with Laravel 5.2
To ensure that everything is correct and identify the authentication error I created a test email in gmail: To test change the file config/mail as follows: return [ 'driver' => env('MAIL_DRIVER',…
-
1
votes2
answers613
viewsA: How to return a collection of objects via ajax?
To return a collection of objects, it can also be done as follows: public function getFuncionarios(Request $request){ $funcionarios = Funcionario::whereEmpresa($request->empresa)->get(); if…
-
5
votes3
answers5260
viewsA: Laravel: Migrations
After you have created a Migration and still want to add a new field, you can proceed as follows: Execute the command php artisan make:migration alter_table_model With this command a new Migration…
-
2
votes1
answer776
viewsA: Error datepicker bootstrap calendar in bisex year
After several tests it was identified that the problem was in the translation of the calendar causing it to start counting on Monday. What was done to solve: On the translation line where it is…
-
1
votes1
answer776
viewsQ: Error datepicker bootstrap calendar in bisex year
I’m using the datepicker bootstrap, and found that the 2016 calendar is wrong. Today for example is day 01/07/2016 Friday and the calendar is displaying as if it were Saturday. Can anyone tell me if…
-
1
votes2
answers427
viewsA: Apache Virtual Host without Servername
It is possible to solve your problem as follows: open the file hosts using the command sudo nano /etc/hosts and add the following lines in the file to create the redirect referring to vhost that you…
-
0
votes1
answer660
viewsA: Save Relationships in Bank - Laravel 5.2
Friend you can insert as follows: public function store(Request $request) { try{ \DB::transaction(function() use($request){ $campos = $request->only([ 'nome_fantasia', ]); $endereco =…
laravelanswered Miguel Batista 2,812 -
0
votes2
answers8469
viewsA: How to call php in html and validate a form?
You can do the validation as follows: <?php $input = $_POST; $erro = false; if (isset($input['enviar'])) { if (in_array("",$input)){ $erro = 'Favor preencher todos os campos do formulário'; }…
-
6
votes1
answer152
viewsA: Library for data validations in Brazilian Portuguese for Laravel
Yes. Has That one that you can use. To install via Poser in Laravel 4 { "phplegends/pt-br-validator" : "1.*" } already in Laravel 5 { "phplegends/pt-br-validator" : "2.*" } In the app.php you need…
-
0
votes1
answer228
viewsA: Invalid ssl certificate when accessing by mobile browsers
After several searches, I found that the certificate purchased and signed by the certification body Rapdssl is not compatible with mobile devices. Rapdssl itself informs and sells only Geotrust with…
-
1
votes1
answer228
viewsQ: Invalid ssl certificate when accessing by mobile browsers
I set up the ssl certificates on Amazon’s Ec2 server for the company websites where I work and the desktop was perfect. But when access by mobile https turns red and the browser informs that the…
-
1
votes3
answers1065
viewsA: Multiplo INSERT Models Laravel 5
Friend. According to the error presented the entered field of your table supplier cannot be null and its variable $input does not seem to contain this field. I recommend you use the…
laravel-5answered Miguel Batista 2,812 -
0
votes2
answers77
viewsA: How do I set only one font-size on the font so that it decreases according to the size of the device?
You can use the new font-size relative 1.5vw = 15px font size ex: font-size: 1.5vw but there is still only support for IE10, IE9, Chrome 22+, Safari 6 and iOS Safari 6, Firefox 19 (late February…
-
5
votes2
answers1007
viewsA: How to Filter Multiple Fields in the Query?
Yes it is possible to do this using the method where(function(){}) as follows: To the Laravel 4.2 $consulta = Model::where(function($query) use($string, $numero, $outro) { if($string)…
laravelanswered Miguel Batista 2,812 -
2
votes4
answers742
viewsA: What is the difference between PHP’s "Exception"?
Yes, there is difference. When you use Exception in a Try catch any kind of error will fall in the catch. If you specify another as Pdoexception you are setting a specific error type to be caught by…
-
0
votes2
answers90
viewsA: Popular select with result plus a null element
You can create the first null field as follows: {{ Form::select('name',['' => 'Selecione']+$teachers,'') }}
-
3
votes1
answer1303
viewsA: Authentication Laravel 5.2
To authenticate using the Laravel method attempt() you must certify that you have encrypted the password with the Hashing of the Laravel as follows: Hash::make('sua senha') in the database or…
-
1
votes1
answer51
viewsA: Laravel - I make a @list action for each Controller or a 'listController' Controller receiving parameters?
To avoid future problems and follow the concept of object orientation, I believe that separating the responsibilities of each thing is the best option. We know that several things have listings.…
-
2
votes1
answer127
viewsQ: Is it possible to customize the return of the Laravel validation when using Request?
When I use a request post and check the data using Request in Laravel 5.2 via ajax, the data is automatically returned to javascript. I wonder if there is a way for me to capture and customize this…
-
1
votes2
answers2873
viewsA: Laravel - How popular a combobox in the 'on load' event of a view (Blade)
To feed a combobox by Laravel 5 recommend you install by Composer the package Laravel Collective to create forms by Form facade and facilitate working with forms. If the combobox needs to be powered…
-
0
votes3
answers3672
viewsA: Release other Amazon HTTP ports
Friend, to host multiple sites in the same instance is not necessary to open doors. You can leave the standard 80. If your server is Ubuntu or linux-Amazon just create the virtual host and point to…
-
2
votes2
answers912
viewsA: How to make sql for a field of a table that is not primary become foreign in another table?
In the script that creates the table register you must change the Cpf column of the person table to Unique as follows: CPF VARCHAR(15) UNIQUE NOT NULL e na tabela de cadastro FK_CPF VARCHAR(15) NOT…
-
0
votes2
answers883
viewsA: AWS - Remote access to the instance
Some of the factors that may be occurring. 1 - Go to your instance view panel and click on the security group option and then inbound and check that the ssh source is at ip 0.0.0.0/0 if you are so…
-
1
votes1
answer1880
viewsA: How to pass data searched by a view back to the view itself
To pass variables to the view in the 5.* window on the return of your controller’s method use: return view('listar',compact('resultado')); ou return view('listar',get_defined_vars());…
-
1
votes1
answer235
viewsA: How to determine that a div should occupy the entire space of a PDF A4 sheet by CSS?
I was able to solve by css as follows: @page { size: A4; margin: 0; } .page { width: 21cm; height: 22cm; padding: 2cm; }…
-
1
votes1
answer235
viewsQ: How to determine that a div should occupy the entire space of a PDF A4 sheet by CSS?
How to determine that a div should occupy the entire space of a PDF A4 sheet by CSS? To generate the pdf I use PHP. for example <div class="page"> // conteúdo da div </div> I wish…
-
0
votes2
answers40
viewsA: How to modify the width for the adaptation on tablets of a menu without media queries?
If you want to switch the style of a menu without using media queries you can use css and javascript merge. In css you create a class for the respective menu related to the approximate measure of…
-
3
votes2
answers2143
viewsA: Laravel - Session and Array
If you are using Laravel 4 The session is created as follows: Session::put('key',['um','dois']); to display the data Session::get('key.um') To the Laravel 5 to create…
-
0
votes2
answers385
viewsA: My DIV is not pasted to the top bar of the browser
I usually use the code *{margin:0; padding:0} instead of putting on the body as specified in your code. I’m not saying this is a better option. But it is the option that I prefer to use because by…
cssanswered Miguel Batista 2,812 -
1
votes1
answer46
viewsA: Make a menu really responsive
I’m not seeing code to change class in your script. advise you to create a class in css for the specified style as for example: .meu-estilo1{ width: 50% !important; margin-right: auto !important;…
jqueryanswered Miguel Batista 2,812 -
0
votes1
answer397
viewsA: Laravel - How to save checkbox choice in item listing?
I believe there are no problems in using the database and ajax even if having other users moving at the moment. If this is the problem you can use DB::transaction() in the method that performs the…
-
3
votes1
answer649
viewsQ: Laravel 5.2 pages redirecting in the POST without showing validation errors
In Laravel 5 whenever I try to send a post to save or edit the data, a redirection occurs in all requests with the status 302 . This is occurring on any page of the system where I make a POST to…
-
0
votes2
answers1972
viewsA: Route does not execute controller method
I’ll give you some tips that can help you solve the problem: First I would like to emphasize about Javascript. What the hard part $.post of jQuery concerning the $.ajax is that $.post does not have…
-
28
votes1
answer13822
viewsA: What’s the simplest way to make an IS NULL with Eloquent?
Yes, there are two methods; one you can use for the IS NULL and another to NOT NULL. follow the examples: To IS NULL you can use Remessa::whereNull('campo')->get(); You can also do it in a way,…
-
0
votes2
answers1042
viewsA: Combobox and mask of Cpf and cnpj
You can implement as follows: function mascaraCPF(element) { $(element).mask("999.999.999-99"); } the element parameter of the functions will be specified by an id referring to the field example…