Posts by Ademilson Santana da Silva • 370 points
16 posts
-
0
votes1
answer70
viewsQ: Creating Listeners in Gridview using a List Flutter
I’m creating a menu with a gridview on the flutter. Shares are on a List: List<Map> actions = [ {"description": "Cadastro", "icon": Icons.people, }, {"description": "Alterar Senha", "icon":…
-
3
votes1
answer315
viewsQ: Redirect unauthorized user Laravel
When a page that is with the middleware auth attempts to be accessed by an unauthenticated user, Laravel redirects it to the 'login' route. How to change this so it redirects to another route?…
-
6
votes2
answers144
viewsA: When using method in a string, it is not including parentheses "()"
This is because this form serves to interpolate VARIABLES in a string, then you are trying to interpolate a METHOD. It returns ( ) because it understands that $pastor->getIdMember is an attribute…
phpanswered Ademilson Santana da Silva 370 -
0
votes1
answer66
viewsQ: Run Artisan within linux shell script
How do I shell a linux script to run an Artisan command from Laravel? ex: php artisan migrate but create a script to run this command
-
0
votes1
answer176
viewsQ: Artisan Laravel linux script
I hired a shared server, which performs scheduled tasks (CRON TABLE) via linux scripts (.sh). How to run a command php Artisan (php artisan enviar:emaildiario) within that linux script? UOL server:…
-
1
votes2
answers106
viewsA: Remove Div in which element is included
Try it like this: Change the method: removerDivCloneArquivo(botao) { botao.parent().parent().remove(); } And on the line that creates the delete button, change onclick="removerDivCloneArquivo();"…
-
3
votes1
answer1781
viewsA: Laravel: How to recover last entry in mysql database by your foreign key?
If you have the standard timestamp fields of the Laravel, you can give a SuaClasse::where('chave_estrangeira', $chave)->orderBy('created_at', 'desc')->first(); Otherwise an option would be to…
laravelanswered Ademilson Santana da Silva 370 -
1
votes1
answer64
viewsA: Browse the PHP Array
Since it is a Stdclass, you can convert to array just by passing the (array) in front: foreach($dados as $relatorio){ $relatorio = (array)$relatorio; ... }
-
0
votes1
answer82
viewsQ: move variable to jquery function
I need to manipulate the button clicked inside this function, how to pass the btn variable inside it? $('.btn_excluir').on('click', function () { btn = $(this); swal_confirm('Deseja realmente…
-
0
votes2
answers570
viewsA: Save data in Localstorage and then check if it exists in another page
Your browser is blocking access to localStorage. To resolve this, go to your browser content settings and allow third-party websites to save cookies and information. see here the path on Chrome (in…
-
1
votes1
answer87
viewsA: How do I detect a click out of an element?
add a class . menus and then jquery: $('body').on('click', function () { // Pega o clique if (!$(this).hasClass('menus')) { //Se o objeto clicado não possuir a classe, então o clique foi fora dos…
-
0
votes1
answer396
viewsQ: Simple search FIREBASE
I’m doing a test on firebase and I’m having a hard time retrieving the data from the JS database. The structure of the table is as follows: Scores - key - name - points - key - name - points What I…
-
1
votes3
answers359
viewsA: "Onclick" function that calls PHP function
With AJAX you would do so: <form class="form-inline" role="form"> <div class="form-group"> <label class="sr-only" for="email">Email address</label> <input type="email"…
-
3
votes1
answer406
viewsA: array_search() expects Parameter 2 to be array, null Given in
You reversed the parameters of the array_search function: PHP:array_search()
phpanswered Ademilson Santana da Silva 370 -
2
votes2
answers242
viewsA: How to leave checked option when clicking div
First create a class in each <a>: <a class='tamanho' IdTamanho="<?php echo $ProdTam->IdTamanho; ?>" ><?php echo $ProdTam->Nome; ?></a> Then create a js code:…
-
0
votes2
answers985
viewsQ: Login customizado Laravel
I’m trying to do a custom login on Laravel 5.5, I can even authenticate the user, but when I direct to another page it loses the authenticated user reference and redirects to the login screen again.…