Posts by Alvaro Alves • 1,065 points
61 posts
-
1
votes2
answers1556
viewsA: Jquery to add element in the.append function div
This is what you need, includes an Alert for you to see that it is possible to include an event in the click, you can call a function, etc... (function(){ var lbl, input, span, small; //Cria o label…
-
0
votes3
answers459
viewsA: How to make two WHERE clauses inside a nested WITH
I believe that what you seek is something similar to this, try the following: $sector = Sector::whereHas('charges', function ($query) use ($search) { $query->where('levels', $search);…
-
0
votes3
answers561
viewsA: Problem with accentuation in email form
Use the following code: $headers = array ( 'MIME-Version: 1.0', 'Content-Type: text/html; charset="UTF-8";', 'Content-Transfer-Encoding: 7bit', 'Date: ' . date('r', $_SERVER['REQUEST_TIME']),…
-
1
votes2
answers104
viewsQ: Custom drag and drop Javascript does not work in firefox
I’m making an XML reader to which I upload a file and it reads the content, in Chrome everything is working ok, but in firefox for some reason the drag and drop is not entering in…
-
1
votes1
answer72
viewsA: Show mysql database data in a php/html page
Try the following: $sql = $connection->query("Select * from usuarios"); if($sql) { while($exibe = $sql->fetch_assoc()) { echo "<tr>" foreach($exibe as $key => $value) { echo…
-
0
votes2
answers70
viewsQ: Backup Database, which tool to use, alternatives, security and data access?
I don’t know if this is the right place to ask this question, if not I apologize and I exclude the question... Where I work we have a system that works with 2 types of database, Firebird 2.0 or…
-
-1
votes1
answer656
viewsA: How to repeat a snippet of html using a repetition loop in php?
Although not a very good approach, you can do so and send the data to save via ajax: HTML: <html> <head> <!-- Latest compiled and minified CSS --> <link rel="stylesheet"…
-
1
votes1
answer446
viewsA: Replace Special characters
below are the functions I use to format and validate the values, both for Cpf and CNPJ: //funções para validar CPF e CNPJ function verifica_cpf_cnpj ( valor ) { // Garante que o valor é uma string…
jqueryanswered Alvaro Alves 1,065 -
1
votes1
answer137
viewsA: Where in Laravel does not return information
do this: $vinculos = Vinculo::where('profissional_id', '=', $id)->get(); ->get() works to say that you have finished building your query and want to "get"/run to fetch the results. Serves to…
laravelanswered Alvaro Alves 1,065 -
1
votes2
answers234
viewsA: How to globally set the default date output in Laravel 5?
you can set a mutator as well (as long as you are using the Date or Datetime types): protected $casts = [ 'created_at' => 'datetime:Y-m-d h:i:s', ]; Take a look at this link, do not know which…
-
1
votes2
answers360
viewsA: Convert the date format of an array to Laravel/PHP
On the Laravel I suggest you take a look at Carbon, has enough material there, is part of the mutators that already accompany the Lockable. or you can set a mutator as well (as long as you are using…