Posts by vinicius73 • 443 points
14 posts
-
4
votes5
answers287
viewsA: How to go through an array of objects, add specific properties and unify those objects where it has a specific property equal to another?
const listaProdutos = [{ nome: 'Teclado', preco: 28.00 }, { nome: 'Mouse', preco: 36.00 }, { nome: 'Monitor', preco: 500.00 …
javascriptanswered vinicius73 443 -
2
votes1
answer460
viewsA: List CRUD with Jquery
You got off to a good start in your approach, but you misunderstood how .map works. .map will return a new array, based on this you can generate an array of strings, using Join you can join them…
-
1
votes2
answers88
viewsA: How to use extensive functions in Javascript
In the early days of Web development this was a common practice, (Prototypejs and Sugar js.) are good examples. The problem is to maintain the compatibility and interoperability of these library…
-
7
votes3
answers9590
viewsA: How to use Jquery with Vue.js?
With v-el it is possible to "mark" html elements to be used inside components. It is also possible to use custom directives to make these manipulations. <span v-el:msg>hello</span>…
-
4
votes2
answers75
viewsA: What do increment operators do in arrays?
Increment/decrement operators affect only numbers and strings. Arrays, objects and resources are not affected. Decreasing NULL does not generate effects, but incrementing results in 1.…
-
1
votes2
answers286
viewsA: What’s the convention on the location of the Laravel 4?
I advise you to use repositories, make your code much more readable and flexible. Best(s) way(s) to use Dependency injection in Laravel At first it may seem difficult, but after the adjusted…
-
0
votes2
answers476
viewsA: How to change the method of an HTTP request in Laravel 4
Try to use Redirect::route('rota.pessoa.show, $pessoa->id) Makes it easier to maintain and read. I always name my routes, even not using Resource, and never had a similar problem with the…
-
1
votes1
answer93
viewsA: Extender Resource Controllers
Based on this post from forum do Laravel you can solve this. class MyRouter extends \Laravel\Routing\Router {} app/config/app.php 'aliases' => array( //--// Route' => 'MyRoute' //--// ); I…
-
2
votes3
answers4468
viewsA: Best(s) way(s) to use Dependency injection in Laravel
I’ve faced the same problem in the last few months, the book Laravel: From Apprentice to Craftsman helped a lot. Following the model described by him I made some slightly different. I put my…
-
2
votes3
answers5592
viewsA: Where to create a class of its own, and how to instantiate it later?
With Laravel and Composer it’s very easy to work with your own classes. If you organize your classes well with namespaces it is extremely easy to load them afterwards I do so: app/Meupacote/…
-
1
votes2
answers700
viewsA: Refresh with Iframe Parameter using jquery - Google Maps V3 API - Codeigniter
If you just want to update the iframe maybe this link will help: https://stackoverflow.com/questions/168455/how-do-you-post-to-an-iframe Test putting the target tag on your form, with the iframe id.…
-
2
votes2
answers2341
viewsA: Upload and structure for image storage in Laravel
Use the package codesleeve/stapler With it you will associate images to a record of the table you want to place an image. In general I create a table only for images and link the record of this…
-
2
votes2
answers288
viewsA: How does Laravel 4 cache queries work?
I usually use the method member($min) in the query itself. DB::table('users')->with('ucomments')->remember(10)->get(); The Laravel will store a cache of your query for 10 minutes. I find…
-
-2
votes1
answer517
viewsQ: How to deal with multiple login areas in Laravel?
In my application I have 3 distinct areas: Admin Where everything is managed, currently the authentication is done by Sentry (very good by the way). For this area I have the Users model that…