Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Tim Debo
    @rawcreative
    roughly 40 products, 20 of which are all assemblies, some single level, most 2-3 levels deep. the primary listing screen currently runs 85 queries per render..
    Steve Bauman
    @stevebauman
    Ouch
    Hmmm..
    Tim Debo
    @rawcreative
    yeah but that's with 1 query per assembly..
    Steve Bauman
    @stevebauman
    Oh so is that running with your custom assembly code or the dev-master current in my inventory repo?
    Currently*
    Tim Debo
    @rawcreative
    but it's also querying and joining a ton of other info..
    that's with custom assembly code..
    Steve Bauman
    @stevebauman
    Ahh ok so it's not too bad then, if you're joining other information with that, then that's not too bad.
    Is there a way I can output the amount of queries while testing?
    Tim Debo
    @rawcreative
    yeah, but what I'm saying is that if currently, to get the assembly info, only one query per assembly is needed, but by changing it to that recursive method there would be multiple per assembly, it would jump from say 85 to 100s..
    Steve Bauman
    @stevebauman
    Well technically it should stay the same, one query is required per level of assemblies, hang on I'm going to see if I can test this
    Steve Bauman
    @stevebauman
    Okay, so the test I showed above runs 5 queries
    Going to verify, one min here.
    Tim Debo
    @rawcreative
    hmm not sure the best way to get query information when testing.. Symfony has their profiler, but I don't know if it would work with Laravel or if there's anything comparable
    Steve Bauman
    @stevebauman
    I grabbed it through the model object $item->getConnection()->getQueryLog(), dumps the whole log
    Tim Debo
    @rawcreative
    ah
    Steve Bauman
    @stevebauman
    Ok it runs 5 queries generating a complete nested array
    [54]=>
    array(3) {
    ["query"]=>
    string(469) "select "inventories"., "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created
    _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" = ?"
    ["bindings"]=>
    array(1) {
    [0]=>
    int(1)
    }
    ["time"]=>
    float(0.09)
    }
    [55]=>
    array(3) {
    ["query"]=>
    string(475) "select "inventories".
    , "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created
    _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" in (?, ?)"
    ["bindings"]=>
    array(2) {
    [0]=>
    string(1) "2"
    1=>
    string(1) "3"
    }
    ["time"]=>
    float(0.09)
    }
    [56]=>
    array(3) {
    ["query"]=>
    string(472) "select "inventories"., "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created
    _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" in (?)"
    ["bindings"]=>
    array(1) {
    [0]=>
    string(1) "4"
    }
    ["time"]=>
    float(0.08)
    }
    [57]=>
    array(3) {
    ["query"]=>
    string(472) "select "inventories".
    , "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created
    _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" in (?)"
    ["bindings"]=>
    array(1) {
    [0]=>
    string(1) "5"
    }
    ["time"]=>
    float(0.08)
    }
    [58]=>
    array(3) {
    ["query"]=>
    string(472) "select "inventories".*, "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created
    _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" in (?)"
    ["bindings"]=>
    array(1) {
    [0]=>
    string(1) "6"
    }
    ["time"]=>
    float(0.09)
    }
    Woops, hang on let me make that legible, lol
    [54]=> array(3) { ["query"]=> string(469) "select "inventories".*, "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" = ?" ["bindings"]=> array(1) { [0]=> int(1) } ["time"]=> float(0.09) } [55]=> array(3) { ["query"]=> string(475) "select "inventories".*, "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" in (?, ?)" ["bindings"]=> array(2) { [0]=> string(1) "2" [1]=> string(1) "3" } ["time"]=> float(0.09) } [56]=> array(3) { ["query"]=> string(472) "select "inventories".*, "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" in (?)" ["bindings"]=> array(1) { [0]=> string(1) "4" } ["time"]=> float(0.08) } [57]=> array(3) { ["query"]=> string(472) "select "inventories".*, "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" in (?)" ["bindings"]=> array(1) { [0]=> string(1) "5" } ["time"]=> float(0.08) } [58]=> array(3) { ["query"]=> string(472) "select "inventories".*, "inventory_assemblies"."inventory_id" as "pivot_inventory_id", "inventory_assemblies"."part_id" as "pivot_part_id", "inventory_assemblies"."quantity" as "pivot_quantity", "inventory_assemblies"."created_at" as "pivot_created _at", "inventory_assemblies"."updated_at" as "pivot_updated_at" from "inventories" inner join "inventory_assemblies" on "inventories"."id" = "inventory_assemblies"."part_id" where "inventory_assemblies"."inventory_id" in (?)" ["bindings"]=> array(1) { [0]=> string(1) "6" } ["time"]=> float(0.09) }
    Okay as expected per assembly level (in the test there's 4 levels table->table top->screws->metal->ore)
    Brb, need to move laptop
    Tim Debo
    @rawcreative
    so are those results with or without the level integer you were talking about adding?
    Steve Bauman
    @stevebauman
    That's without, but adding a depth integer would cause any extra queries, I'm most likely not explaining it well at all, hang on I'll send you some code in just a moment with depth involved and it's results
    Steve Bauman
    @stevebauman
    Ok here we go, this is with the depth integer I was talking about
    You can see here that the depth integer is correctly inserted per assembly
    Though this definitely needs tweaking, already found an issue with it, but still easily possible
    Steve Bauman
    @stevebauman
    Okay here we go, easy fix - Method: https://gist.github.com/stevebauman/00aaeaa0c7ca260a0aa5
    Steve Bauman
    @stevebauman
    Implemented caching assemblies as well. This means assemblies only need to be generated once and when an addition or removal occurs on an assembly, the cached assembly is removed and re-generated once it's been asked for.
    Eric Santos Araujo
    @JogoTopMideSup
    Hi, Steve! First, sorry about my poor english... Im trying to run inventory for the first time on a mac, after a painfull job to configure (my first month on a mac) LAMP.
    Eric Santos Araujo
    @JogoTopMideSup
    Im lost. After:
    $ php artisan inventory:install
    i tried to access trough browser the public folder(located in the project folder) but i got the message "oops, something went wrong" so i need to know if i follow the instructions and populate the DB with some stocks will work.
    I need to see the "website"/front-end to do the costumization(it have front-end?) . Basically ima doing alterations to do a archaeological inventory management, for the Museum of my city. You need to know: im really dont know how to use laravel. Reading a lot but.... almost changing to a non-laravel project...
    Eric Santos Araujo
    @JogoTopMideSup
    Im thinking this is wrong place... right?
    Eric Santos Araujo
    @JogoTopMideSup
    i posted a issue. sorry.
    yayatimsa
    @yayatimsa
    hi, i'm newbie. how to install this apps in localhost n db mysql?
    yayatimsa
    @yayatimsa
    @stevebauman how to install this apps?
    Steve Bauman
    @stevebauman
    @yatatimsa Hi, have you ever installed Laravel before? Inventory isn't a fully built application, it's a package to help you build an inventory system.
    Luciano Miranda
    @lucianojmf
    Hi @stevebauman! You have made a wonderful job with this package. =) Thanks!!!
    So, i saw that you are working on a Kit structure.Do you have a estimation to release it?
    I think that Kits are very similar to Assemblies. Now a Assembly is a especial kind of Inventory item, right? Do you plan make some thing similar with Kits? Or kits will not generate a Inventory register, i.e. a Kit is basically a group of inventory items.
    Mohd Sulaiman
    @natsu90
    Hey guys, how do I implement Inventory in my app? I mean, what are the additional steps after the installation? I did post an issue, #37. I have no knowledge of inventory solution so I figure I'll install Inventory.
    Dhaval Mesavaniya
    @dhaval48
    I am also waiting for kits.
    Edvin Malinovskis
    @nCrazed
    Hey, @stevebauman. I've been tasked to evaluate this package for use in our current project and I like it so far, but the multiple open issues combined with the fact that the last release was about a year ago are a bit concerning. Are you still actively maintaining this package?
    Juls PaƱares
    @_Julxz_twitter
    hey good morning to all .. @stevebauman i want to ask i was just a new user of the laravel .. i want to know how to install the inventory system that you posted in the packalyst .. i hoping for your further information about that .. thank you
    Cristian Tapia
    @Aquilesnake
    who can help me for install in laravel 5.4 ?
    Klevin Kona
    @klevinkona
    Hello guys, i tried to install in windows 10 for testing purpose but i am facing this problem

    C:\xampp\htdocs\laravel>composer update
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.

    Problem 1

    - The requested package stevebauman/inventory No version set (parsed as 1.0.0) is satisfiable by stevebauman/inventory[No version set (parsed as 1.0.0)] but these conflict with your requirements or minimum-stability.
    can someone suggest on tis?
    Ula2001
    @Ula2001
    @stevebauman would you like to make a tutorial for using this package