Posts by Jorge Lima • 379 points
11 posts
-
3
votes1
answer159
viewsA: switch case javascript (simplify this code)
In this case I wouldn’t use the switch. You could simplify with the help of a vector or a simple if, depending on the case. See: Vector-shaped: let accepted_answers = [1,2,3,4,5,6,7]; let maybe =…
javascriptanswered Jorge Lima 379 -
1
votes1
answer102
viewsA: How to keep part of a v-model(string) fixed in an input with Vuejs!
You should use observers for this, see: html: ... <input type="text" v-model="input"> ... vuejs: ... export default { data(){ return { ... input:'/static/' } }, watch:{ input: function(value){…
-
1
votes1
answer114
viewsA: How to edit a record with union fields in the Standard?
Inside your Franchiseadorequest, you need to tell the Newsletter to ignore the email of the user being updated. Example: <?php use Illuminate\Validation\Rule; .... public function rules() { $id =…
laravelanswered Jorge Lima 379 -
0
votes1
answer270
viewsA: How to filter records
Do you want to make a filter by name and have the possibility to filter by situation? That’s it? if it’s: public function search1(Request $request) { $data =…
-
3
votes2
answers138
viewsA: Delete Full user
You’re waiting for the user id to come from $_GET['deleta'] but on your button, you are not passing the user id anywhere. echo '<td><button type="submit" action="deleta-cadastro.php"…
-
0
votes1
answer67
viewsA: Problem with PHP in the edit form
How did you put the content of atualizar-usuario.php in the comments got a little bad to understand... What I realized is that you are sending the data by GET: <form method="get"…
-
2
votes1
answer1821
viewsA: How do I fix my Docker-Compose.yml? expected <block end>, but found '<block Mapping start>'
Apparently, their indentation is wrong. Yml files use tabs or spaces to delimit blocks in a similar way to python. container_name, volumes, expose,ports, environment and restart are out of kwan. Try…
-
4
votes1
answer154
viewsA: How to turn content from a file into an array in PHP
First you need to get the contents of the file: Suppose the file is called meu_js.js and is at the root of the application: $file = file_get_contents('meu_js.js'); Remember to use your file in the…
-
3
votes1
answer201
viewsA: Pass parameter through AJAX
You should not use the element ID attribute for this purpose. The ID attribute should be used to manipulate the element via JS and/or CSS. I recommend using data-attribute for custom data passing.…
-
0
votes1
answer138
viewsA: Is it possible to make an http request to an external domain by Xmlhttprequest in Javascript?
You need to allow the origin of the request, in php you could do something like: <?php header("Access-Control-Allow-Origin: *"); .... ?> You could also allow a specific source by swapping *…
-
4
votes1
answer1076
viewsQ: Facebook share button displaying wrong information in "box_count"
In a wordpress-based project that I’m working on, I have a modal that dynamically receives various information coming from a post-loop. This modal serves as a kind of "Preview" the full post. Within…