Posts by Matheus Pereira • 59 points
6 posts
-
-1
votes0
answers9
viewsQ: PHP Code Sniffer xml is ignoring the . dist file with rules
I’m using the package "squizlabs/php_codesniffer": "^3.6" to adjust my code using Code Sniffer in a project with Laravel 8. But my phpcs.xml.dist file is ignoring the rules defined without…
-
0
votes3
answers1379
viewsA: How can I see upgraded package versions via Composer?
Another detail of the grep show they quoted above is that you can filter by package owner: composer show | grep 'proprietario/pacote' but can filter by owner or only package name using a wildcard…
-
0
votes2
answers259
viewsA: php login
The correct is to check the isset and then compare the string if(isset($_SESSION['login']) && $_SESSION['login'] == 'admin') { echo "logado"; }
-
1
votes1
answer31
viewsA: Add class according to text by JS / Jquery
With jQuery you can manage the classes with: $('td').each(function() { const el = $(this); el.addClass( el.text() ); }); And without jQuery basically the same thing, captures the element and manages…
-
2
votes1
answer199
viewsA: Login Security with PHP and AJAX safely targeting
Just return the redirect url and scroll to the session, not the middle of PHP. And you can make a function (or in the Construct) an access level validator with the scroll of the session, if you…
-
0
votes1
answer27
viewsA: Ignored validation rule
I prefer to use the Rules in an array, example: rules = [ 'data_visita' => 'required|date|date_format:d/m/Y|after_or_equal:1990' ]; However, I believe that this should work: 'data_visita' =>…