Posts by Darlei Fernando Zillmer • 3,867 points
153 posts
-
0
votes1
answer3569
viewsA: Ajax (POST) Laravel
Solving your problem of falling into error 419... First change your route to: Route::post('ajaxRegister', ['as' => 'ajax.register', 'uses' => 'Ajax@Register']); Soon after update in ajax to:…
-
1
votes1
answer423
viewsA: Complete form without giving Reload on page
Solving your problem of falling in error soon when sending the data... First change your route to: Route::post('editarInstalador', ['as' => 'editar.editarInstalador', 'uses' =>…
-
1
votes1
answer21
viewsA: Consulting in Eloquent
Well I usually create a little differently this, I find it more intuitive and easy to understand and manipulate, you can use as you think best: Add the uses of the classes at the beginning of the…
-
3
votes1
answer123
viewsA: Customizing Laravel Authentication Hash
Just take a look at how the hashing standard works. There is in the Illuminate\Hashing\HashServiceProvider the following method public function register() { $this->app->singleton('hash',…
-
0
votes3
answers149
viewsA: How to open a message screen in all the views the user logs in? + Laravel
Without using any form of storage I find difficult, but I believe it is not necessary a ajax to check it every view loaded. You can access the user attribute (which is being used in the user table)…
-
5
votes3
answers6427
viewsA: Style input type='number' to change arrows
The controls input[type=number] natives are not cross-browser capable of being stylized. The easiest and safest way to get what you want: input[type="number"] { -webkit-appearance: textfield;…
-
6
votes2
answers887
viewsA: How to receive a json in Controller and pass to Object array
Change your function on Controller to stay that way, test what is printed on console.log of callback success and post here in the comments. public function exportar(Request $request){ $dados =…
-
0
votes2
answers1390
viewsA: How to go through an array of objects accessing each element of the array with PHP
You can use the foreach it works only on arrays and objetos, and will issue an error when trying to use it in a variable with a different data type or an uninitialized variable. foreach ($meu_array…
phpanswered Darlei Fernando Zillmer 3,867 -
1
votes2
answers36
viewsA: Why isn’t my view presenting the css design?
Because the path is wrong. If you are using the files from css in the public folder (which is recommended) you should add as follows: <link href="{{ asset('css/app.css') }}" rel="stylesheet"…
-
4
votes2
answers97
viewsA: Doubt about validation of POST
First you need to understand what the error of undefined. This error indicates that there is no value in your variable, thus the function isset checks whether the variable is defined or not. $texto…
-
0
votes2
answers719
viewsA: How to return ajax errors with jquery in Laravel 5.6
By its error message in json return it seems that the email is a unique key defined as a form of validation email: ["validation.unique"] First check the data that is sent via ajax: They are being…
-
2
votes2
answers37
viewsA: while Inside the variable
Try concatenating by pieces not mixing everything into a cake. Example: $output='<h2 class="text-center mb-4" style="color:red">Elementos</h2> <div class="table-responsive">…
phpanswered Darlei Fernando Zillmer 3,867 -
2
votes1
answer61
viewsA: Doubt about Aravel; How does he execute this code?
The function you are looking for is within the class Builder (vendor/framework/src/Illuminate/Database/Query/Builder/Builder.php), it is difficult to find anything beyond the definitions of the…
-
0
votes1
answer100
viewsA: CSS does not load with $_SESSION
I believe that you have a config file in your project, if there is a suggestion to create one, in it you can define variables and constants to use in your project, example: config.php…
-
2
votes2
answers783
viewsA: Create a new database with Mysql user and password directly from PHP
This is possible, but one thing that is clear, do not sign in as root to do these commands. With that in mind, a method similar to this can work. mysql_connect('localhost', 'user', password);…
-
1
votes4
answers1457
viewsA: How to make the screen scroll by clicking on a <a> tag
Try to create a function in the click and call all actions within it, example: <a href="javascript:void(0)" onclick="scrollToComentarios()">Escreva um comentário</a> <script>…
-
2
votes3
answers1161
viewsA: How to send an object array type variable via AJAX?
Submit your full formatted object and handle it in php with json_decode(). To send the data use the function JSON.stringify() that will convert it into a string. $.ajax({…
-
1
votes1
answer42
viewsA: List 4 bank tables and account
Let’s go to a few points, with the increase in the number of employees of course that can be slower, but I believe you should worry less about the volume of data and more about how to search for and…
-
1
votes1
answer153
viewsA: Problem in Query Builder Laravel
I managed to solve using the following way: $Dados = DB::select('SELECT EmpresaCNAE.*, empresa.*, ServicoValor.* FROM EmpresaCNAE INNER JOIN empresa on empresa.EmpresaId=EmpresaCNAE.EmpresaId INNER…
-
2
votes1
answer153
viewsQ: Problem in Query Builder Laravel
I am in doubt in a query with joins in my project, when running Select directly in the database I have no problems, but when building with Query Builder I get no results. Where would I be missing…
-
0
votes2
answers45
viewsA: return tinyint as boleano in json Ncode
You can check when you arrow the array using a conditional (if, switch, ternary) $usermail = $request->getHeader('PHP_AUTH_USER'); $senha = $request->getHeader('PHP_AUTH_PW'); $sql = new…
phpanswered Darlei Fernando Zillmer 3,867 -
3
votes2
answers48
viewsA: Does google take more into account the name View/Controller or Parameters?
No one knows for sure how Google’s algorithm checks the domains and properties to rank each one, but of course it’s not based on either technique. It is also known that Google values the user…
seoanswered Darlei Fernando Zillmer 3,867 -
1
votes1
answer215
viewsA: How to configure routes in Laravel 5.3?
As mentioned in the comments, the correct thing is to create a Controller and there you prepare the data to send to the view. Example: Route: Route::get('/teste', ['as'=>'teste.index',…
-
2
votes1
answer241
viewsA: Model Laravel 5.2
If you want to make all attributes assignable in bulk, you can set the property $guarded as an empty matrix: protected $guarded = []; While $fillable serves as a "white list" of attributes that must…
-
1
votes1
answer26
viewsA: What is Meta Description for? And how do you use it?
The Meta Description is the text generally used by Google to display the text results of the second and third lines of the search results, just below the Title. The content of meta Description does…
-
3
votes2
answers182
viewsA: Does dynamic SEO work?
Dynamically change the microformats according to the content to be is functional, semantic and viable ? Whether your content is dynamic or static, for each page there will be different microformats,…
seoanswered Darlei Fernando Zillmer 3,867 -
1
votes2
answers44
viewsA: I place a jquery and the site enters direct id
They’re jumping right in because you focus on the tab with the focus() $('.abas:first').trigger('click').focus(); $('.abas:first').trigger('click'); // Dessa forma não ficaria selecionado de largada…
-
-1
votes1
answer444
viewsA: Stylization of views - Laravel
There are three types of style sheet CSS possible for use in WEB projects, I will talk a little about each and at the end you can see what is the best option for you to use in the projects (if you…
-
2
votes1
answer882
viewsA: SQLSTATE[08001] - Named Pipes Provider - Laravel
Basically you should enable the possibility of remote connection, the protocol Named-Pipes and TCP/IP as well as the SQL Browser service. (in theory) But try the following: Temporarily disable…
-
4
votes2
answers218
viewsA: SEO+ techniques currently used!
Some time ago I wrote a small manual about this, I will leave some important excerpts as a response and link the PDF at the end. Principles of SEO Spiders, Bots & Crawlers (Are the robots)…
-
1
votes3
answers1015
viewsA: Remove style added with . css() Function with jQuery
You can change the property to an empty string, to do this: $("body").css("background-color", ""); Or remove the full attribute, the problem would be that all inline styles of the element would be…
-
2
votes1
answer89
viewsA: Problems with PHP data
It is returning the format "interpreted" by json, use json_decode to manipulate: $data = ["Data_Nascimento" => "15/06/1995"]; $data = json_encode($data); var_dump($data); // Veja como fica como…
-
9
votes2
answers3969
viewsA: How to remove all Classes from an element using jQuery?
$("#div").removeClass(); Call removeClass no parameters will remove all classes from the item. You can also use (but not necessarily recommended, the correct path is the one above):…
-
1
votes1
answer40
viewsA: Problem with syntax
The error was in the wrong written While... <?php $conexao = mysqli_connect("localhost", "root", "", "banco") or die(mysql_error); if(isset($_POST['email']) && isset($_POST['senha'])) {…
-
4
votes1
answer58
viewsA: I can’t get value from date-Object
First of all review the HTML, see the "hierarchy" of double quotes, you open and close them in the wrong way... Then try the following: $(document).ready(function() { $(".btn-primary").on('click',…
-
2
votes1
answer1542
viewsA: Bring up column values and add up the total with php + mysql
You can make an SQL query using SUM: SELECT SUM(valor) as total FROM cv_contratos_dependentes WHERE idcontrato = $idcontrato Or sum the values with a variable in the print loop: $results =…
-
0
votes3
answers1645
viewsA: Search Database By Selecting Select Options
A simple (more or less) example that can help you: Javascript(jQuery): - Here you will make the ajax request and check which state is selected, with the return of ajax (which will have a json of…
-
2
votes1
answer841
viewsA: Separate a JSON array into columns and rows
You can use the method .each(), it is designed to make DOM loop constructs concise and less error-prone. When called iterate on the DOM elements that are part of the object jQuery. Each time the…
-
4
votes1
answer10458
viewsA: How to use Inner Join in Laravel 5?
You can use Query Builder to make joins To run a basic "merge", you can use the method in a query constructor instance. The first argument passed to the method join is the name of the table to which…
-
0
votes2
answers1876
viewsA: How to take the value of a TD?
Try it like this: PHP: <?php require_once('acessabanco.php'); $objDb = new db(); $link = $objDb->conecta_banco(); $sql = "SELECT p.sequencia codigo, p.nome_completo nome, c.data_nascimento…
-
0
votes2
answers35
viewsA: Select does not select the correct value
The selected does not receive values, it serves to "set" the default option, every loop run in foreach it prints the selected option, so you will always be the last selected. In order for it to work…
-
0
votes1
answer433
viewsA: Problems when creating Migrations - Laravel
The answer is in the question itself... Command "make:migrations" is not defined. Did you mean one of these? make:migration make:Migrations - is not defined, the command is without the s in the end…
-
1
votes2
answers2337
viewsA: Take the value of a select and play in php variable
How do I get the selected value from a select and already print he? For this you need a javascript (jQuery is simpler): $(document).ready( function () { $("#cb_catinsumo").on('change', function() {…
-
2
votes1
answer719
viewsA: Route and form in Laravel
Well first your method in Form and in the routes is wrong, in one is defined a post and in the other the get. Normally get is used for simple pages, and the post in Formulars and so on, in your case…
-
1
votes3
answers59
viewsA: Redirecting users through a form
The solution goes through simple javascript. Just put a function at the click of the button. Here is an option without jQuery: var link =…
-
0
votes2
answers105
viewsA: How to define table that will receive the Insert using PHP variable?
First of all, check the variables that receive the Session value before trying to do the insert, will avoid good stress in the future. Then you can concatenate the table name: $tabela =…
-
5
votes1
answer908
viewsQ: What is and how does an RTA work?
I recently read some questions about RTA and noticed there are not many explanations about it. Looking a little deeper into this subject I came across some conceptual questions, nothing about…
-
0
votes1
answer222
viewsA: LARAVEL - Loss after running the MIGRATE command
Do you have the seeders set up and ready with the data that was in the table? If you just run migrate, it will only recreate the database. Some migration operations are destructive, which means they…
-
1
votes2
answers31
viewsA: Error in searching the register in the comic
When you do that: $query = "SELECT * FROM teste WHERE email = '$var2'"; $query = "SELECT * FROM teste WHERE cpf = '$var1'"; You say that the variable is receiving a value, in case using the same…
-
0
votes2
answers621
viewsA: Read a specific value in Json with PHP
Note that You have returns from non-arrays objects (the true of json_decode converts it into an associative array, particularly I prefer to work with objects). Stay tuned in the hierarchy of the…