Posts by Morkhusz • 136 points
9 posts
-
0
votes1
answer985
viewsA: Is it correct to use redirect route on the Laravel to make the change in the page’s Russian language?
When you do the return redirect()->route('login') you are redirecting the request to the desired route, what will happen? For the route login there is a controller, in this controller the method…
-
0
votes1
answer37
viewsA: Laravel database
The default Laravel does not support connections with firebase, it is not like we do the connection by the drivers of the proper mysql Laravel for example. I advise you to use the…
-
1
votes2
answers110
viewsA: Save data from array
There are two ways I see to do this: $dados = []; foreach ($campo as $key => $value) { $dados[$key] => $value; } or $dados = [ 'prodOperadora' => $campo['produtoOperadora'], 'prodPreco'…
-
0
votes1
answer56
viewsA: Calculate PHP box goals
There is no secret, you will store the return of your query in a variable $total = resultado_da_query; Divide by goal and multiply by 100. $meta = 200000; $porcentagemDoMes = ($total / $meta) * 100;…
-
0
votes1
answer76
viewsA: Referencing scripts on different PHP pages
If it’s in a PHP file you could do something like this: __DIR__ . '../../quantasPastasVocePrecisarVoltar'; the magic constant DIR serves to indicate the current path, then from the current path you…
-
1
votes1
answer128
viewsA: Date formatting to save to Database
There is more than one way to do what you want, if you want to keep the value of input with snippets of code, you could do the following: In your input, create a property name : <input…
-
1
votes1
answer67
viewsA: Doubt with Laravel MVC
The Laravel uses the pattern of active record, which allows us to only from the model we can persist and query data, without the need for an extra layer for the database specifically. I don’t see…
-
2
votes2
answers522
viewsA: Query SQL with multiple WHERE conditions
The mysqli_query returns an object in case of success and if it fails returns a Boolean FALSE, that is, very likely that your $resultado be it false and you’re trying to make a fetch_array() in a…
-
1
votes1
answer160
viewsA: Is it always necessary to call the father-class builder in the daughter-class?
That’s right, if you are extending the parent’s behavior you must pass the parameters required by it, if you do not need new behaviors in the constructor it is not necessary to call the parent…