Posts by Diego Ananias • 353 points
25 posts
-
2
votes2
answers1166
viewsA: Swap a dot for a comma and add a dot
Dude $moeda = 'R$ 1.550,52'; $valor = preg_replace('/[^0-9]/', '', $moeda); $valor = bcdiv($valor, 100, 2); $valor = strtr($valor, '.', ','); echo $valor; Or if you want to be separated by . $moeda…
-
1
votes0
answers62
viewsQ: How to classify the multidimensional array by value?
How can I classify this array for the value of the key level, even though the values are currently sequential, they will not always be? array:67 [▼ 0 => array:3 [▼ 0 => array:8 [▼ "idPai"…
-
1
votes1
answer74
viewsQ: Stock Control Grouping Products of the same type
I am producing a stock control system, but the stock needs to have a product grouping system with the same SKU, example, I have a product called "T-shirt A", but there are several types of "T-shirts…
-
0
votes0
answers33
viewsQ: Laravel Custom Authentication with Postgres
I created a custom provider, called CustomUserProvider, extendi of EloquentUserProvider and brought the perfect fields. However the login does not persist public function…
-
1
votes1
answer123
viewsQ: Customizing Laravel Authentication Hash
Next, I have a specific database with specific columns and a specific Hash method, I am migrating to the following Laravel multi-tenancy structure. I would like to know if there is any way to make…
-
1
votes1
answer428
viewsA: Laravel Cors blocking requisicoes Xios
Failed to register CORS as a middleware for the api.
-
0
votes1
answer269
viewsQ: Is there any way to translate the months into the input type date?
How I translate the date input? in the html I put lang="pt-br" but still English. The image is just an example!…
-
1
votes1
answer428
viewsQ: Laravel Cors blocking requisicoes Xios
The configuration of my Laravel Cors is this. 'supportsCredentials' => false, 'allowedOrigins' => ['*'], 'allowedHeaders' => ['*'], 'allowedMethods' => ['*'], 'exposedHeaders' => [],…
-
1
votes1
answer43
viewsQ: What is the correct order to inject dependencies into Laravel controllers?
I have noticed that sometimes, depending on the order I inject the dependencies, they don’t work... Is there any correct order?
-
1
votes1
answer258
viewsQ: Cors Laravel, release only for a specific domain
I’m using the library Laravelcors and would like to block all requisites except a specific Dominio, as I do this?…
-
0
votes1
answer278
viewsQ: Browse json multidimencional javascript
I have this json…
-
2
votes0
answers37
viewsQ: What is the advantage of saving whole in the field that I want to save prices?
I was reading about building RESTFUL API with Laravel, and I noticed an interesting flame that I once wondered if the way I always saved "money" in the database. Is there a problem in saving as…
-
1
votes0
answers44
viewsQ: Redirects with Htaccess
I would like to elaborate an htaccess configuration that is more or less with the following rules. When accessing http://subdominio1.meusite.com.br/ direct to a specific folder and when accessing…
-
2
votes1
answer375
viewsQ: Create Model from a Migration
I created Migrations from the command migrate:generate of dependence https://github.com/Xethron/migrations-generator Is there any way to generate models from these migrations?…
-
1
votes0
answers875
viewsQ: Traverse Arvore Binaria
I would like to make a function in PHP that goes through the entire binary tree, so I made this code. function getTree($id, $count, $conn) { if ((!isset($count)) || ($count = null)) { $count = 1; }…
-
0
votes0
answers449
viewsQ: Laravel Expired Page, why?
I’m creating a Rest api here, for some reason I get this message "The page has expired due to inactivity. Please refresh and try again." Segue Controller <?php namespace App\Http\Controllers; use…
-
2
votes0
answers64
viewsQ: What is the difference between Guard() and Middleware()?
I’ve been noticing that they both basically do the same thing... I may have misunderstood, but what would be the difference between the two in Laravel?
-
0
votes3
answers664
viewsA: Required no Ajax
You can use it like this... $("#IdDoForm").submit(function(event){ event.prefentDefault(); //previne que o formulario seja enviado sem estar devidamente preenchido com as regras de validação que…
-
2
votes1
answer216
viewsQ: Controller exists but Lumen says it does not exist
My routes are like this. http://localhost:8080/api/v1/Communities <- this is the url I’m requesting $app->group(['prefix' => 'api/v1'], function($app) { $app->get('/',…
-
-1
votes1
answer209
viewsQ: Share Localstorage with browsers
Is there a way to share localstorage with multiple browsers? For example, I define localStorage.setItem("lang", "pt"); in Chrome, however, I would like this value to be available in Firefox and…
-
0
votes2
answers15217
viewsA: How to find the file directory by "inspect element"
In the 'Source' tab of Inspect you can see some information about the file directory on common websites. PS: I only answered here because I could not comment on your question.
-
3
votes1
answer55
viewsQ: Streamline language to placeholder
I make a request ajax to search in the bank to bring the language configuration, type, EN, PT, and so on... I want placeholders to be changed according to the chosen language. For example, instead…
-
0
votes3
answers655
viewsA: Lateral alignment of Divs
Dude, use mediators... for example For screens with a maximum size of 600px; @media screen and (max-width: 600px) { img{float:right}} if it will not happen that same, on the big screen it will stay…
-
1
votes2
answers49
viewsQ: Update table field with information from another column
How to do an update that recovers data from one column and plays in another column? For example Sales IdVenda | dataVenda | dataPgto 1 | 2017-08-21 | 2 | 2017-08-21 | Want to update the dataPgto…
-
0
votes1
answer73
viewsQ: Relationship of records of a table with itself
I’m trying to put together a family tree structure, but I still can’t relate and leave it ready for while to go through the whole table and structure the tree infinitely, since one can have 'x'…