Posts by Marcelo Zapatta • 306 points
18 posts
-
0
votes1
answer110
viewsA: Access files outside public_html
In fact you should not play the Laravel public files inside public_html of your server. You should normally leave it in the project folder and inside plublic_html point to the public of the terminal…
-
0
votes2
answers18
viewsA: How to fix redirecting to subdomains that are on different servers?
You can use Redirect itself in Laravel: Route::redirect('/', env('APP_FRONTEND_URL')); https://laravel.com/docs/8.x/routing#redirect-Routes…
laravelanswered Marcelo Zapatta 306 -
4
votes2
answers132
viewsA: Make the input text field mandatory if the corresponding checkbox is selected
Juliana, you can do this using Validation’s required_if For example: Validator::make($request->all(), [ 'input_text_relacionado' => 'required_if:checkbox_relacionado,1' ]); In case 1 would be…
-
1
votes2
answers861
viewsA: Connection to db SQLITE and SELECT * FROM reciclagem_data WHERE $variable
To connect to SQLITE you must use PDO <?php // Cria uma conexão com o banco de dados indicado no caminho $myPDO = new PDO('sqlite:/home/example/books.db'); // Para rodar uma query $result =…
-
0
votes2
answers764
viewsA: Error in path when recognizing route request
Try changing the order of the routes to how Route::post('/personal/new', 'PersonalController@store'); Route::get('/personal/remove/{id}', 'PersonalController@destroy'); Route::get('/personal',…
-
1
votes2
answers77
viewsA: Help Query Sum
To give sum you have to have applied the function get before $Query = Receptivo::where('Faixa_Horario', 'Faixa_Horario')->get()->sum('Atendimento_Cliente_com_Negocio'); I don’t understand why…
-
0
votes2
answers234
viewsA: How to redesign a Datatable if a checkbox is checked?
With the return of AJAX recreate the table with jquery and start Datatable JS <script> // com os dados do retorno repreencha o table-wrapper $('#table-wrapper').html( '<table id="table">…
answered Marcelo Zapatta 306 -
0
votes3
answers44
viewsA: Send form without knowing the name
You can give an id to your form as 'alters' <form method='get' action='GG.php' name='alteracao"+ide+"' id="altera"> <button onclick='altera(alteracao"+ide+")>Enviar</button>…
-
0
votes2
answers100
viewsA: Save the data from the array and not your key
To access the value of an array at a given position you can rely on the example below: $valor = $result[0]; In case I am trying to get value of the first index in my array. More information about…
-
0
votes1
answer33
viewsA: How do you save the contents of a Nav-tabs using localstore?
How you are using Jquery how to do the following: var aba = $('.nav-tabs').find('li[class*='active']'); var id = aba.attr('id'); And save to localStorage
-
0
votes2
answers397
viewsA: Carousel Bootstrap with images coming from server folder
The error in your code is in this snippet foreach($imagens as $img){ ?> <div class="carousel-inner"> <div class="item active"> <img src="<?php echo $img ?>" alt="<?php…
-
-1
votes2
answers580
viewsA: ajax function returns [OBJECT OBJECT]
Insert a console.log(json) on its return from json, as it is returned as an object, through the console it will be possible to see the attributes of the object. Thus, just access the desired…
-
0
votes3
answers48
viewsA: Syntax error concatenation
Use "+" to concatenate into Javascript, "." is used to access the property or function of an object.
javascriptanswered Marcelo Zapatta 306 -
0
votes1
answer955
viewsA: Navigation menu items overwriting content
You should apply a CSS style to your header container: .container-menu { // Faz a o menu ficar sempre fixo na tela position: fixed; // Remove as margens do menu margin: 0; // Define a posição fixa…
-
1
votes3
answers791
viewsA: Take a value of multiple arrays within an array
Use the foreach foreach($arrays as $array) { $status = $array["membro_status"]; }
-
0
votes3
answers214
viewsA: How to create a PHP progress bar using the Laravel Framework?
You have to use something like an AJAX request, or some frontend framework. So you could make a progress bar. Only with Laravel this is not possible.
-
0
votes1
answer79
viewsA: Relationship error and method not found
In your Command model you must indicate your field id in the second relationship parameter as below: public function mesas(){ return $this->belongsToMany('App\Mesa', 'mesa_id'); } This should…
-
4
votes14
answers126839
viewsA: Phone Mask Using jQuery Mask Plugin
A better and easier solution $("#telefone").inputmask({ mask: ["(99) 9999-9999", "(99) 99999-9999", ], keepStatic: true }); Using the plugin https://github.com/RobinHerbots/jquery.inputmask…