Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
89a7ee7
Update INSTALLATION.md
asaf050 Jun 17, 2015
bbf15a3
Merge pull request #32 from asaf050/patch-1
stevebauman Jun 18, 2015
d735202
Update correct install version
stevebauman Jun 18, 2015
870cd53
Added missing use trait
stevebauman Jun 18, 2015
f3a2748
Small tab fix
stevebauman Jun 18, 2015
18129f0
Lots of small changes
stevebauman Jun 19, 2015
f4dd40b
Removed more class comments, removed InvalidLocationException
stevebauman Jun 19, 2015
9bdbcf4
Removed ability to insert many locations into single methods
stevebauman Jun 19, 2015
4d3c6df
Updated comments and more use of `getAttribute()` instead of accessin…
stevebauman Jun 19, 2015
5770338
Make sure we're comparing identical types
stevebauman Jun 19, 2015
f8b0fa5
Compare quantities strictly
stevebauman Jun 19, 2015
c446e2a
Compare quantities strictly and save as float
stevebauman Jun 19, 2015
4f8fa75
Transaction updates
stevebauman Jun 19, 2015
060726d
Small comment update
stevebauman Jun 19, 2015
5eaa9da
More getting / setting use
stevebauman Jun 19, 2015
5fe0904
Remove supplier helpers in favor of traditional laravel relationship …
stevebauman Jun 19, 2015
27d1a3b
Remove supplier tests
stevebauman Jun 19, 2015
c2db72d
Removed unnecessary where call
stevebauman Jun 19, 2015
91e3a67
Removed supplier helper methods
stevebauman Jun 19, 2015
2f49f33
Remove global exception catching in helper
stevebauman Jun 19, 2015
7af4f7a
Set is_assembly in setter
stevebauman Jun 19, 2015
c9406f9
Remove unused use statement
stevebauman Jun 19, 2015
76ae0d6
Update for MSSQL
stevebauman Jun 29, 2015
d95fd79
Small clarification
stevebauman Jun 29, 2015
54eb7fc
Use empty
stevebauman Jun 29, 2015
f13b247
Small comment tweak
stevebauman Jun 29, 2015
4933142
Comment changes
stevebauman Jun 30, 2015
6a07077
Remove inventory banner
stevebauman Jul 4, 2015
3af5139
Rearrange use
stevebauman Jul 4, 2015
92448ee
Clarify requirements
stevebauman Jul 4, 2015
4411637
Remove clarification
stevebauman Jul 4, 2015
55be64f
Update INSTALLATION.md
asaf050 Jul 13, 2015
3be85c7
Merge pull request #34 from asaf050/patch-2
stevebauman Jul 13, 2015
16a632d
Small pull tweaks
stevebauman Jul 13, 2015
e13aee6
Small doc fix
stevebauman Jul 13, 2015
2621aed
Recase folder
stevebauman Aug 4, 2015
b39bf55
Recased folder name
stevebauman Aug 4, 2015
bbe2a1b
Recase folder name
stevebauman Aug 4, 2015
ee752a3
Recase folder name
stevebauman Aug 4, 2015
22c778f
Recase folder name
stevebauman Aug 4, 2015
7d49f2b
Recase folder name
stevebauman Aug 4, 2015
a4ed568
Update INSTALLATION.md
natsu90 Aug 11, 2015
833b906
Working on 2.0
stevebauman Aug 13, 2015
0f412bc
Revert "Working on 2.0"
stevebauman Aug 13, 2015
eca80e6
Working on 1.8, redoing tests
stevebauman Aug 13, 2015
232a304
Update tests badge
stevebauman Aug 13, 2015
00e48cd
Require testbench, fix travis badge
stevebauman Aug 13, 2015
641aa50
Fix composer.json extra comma
stevebauman Aug 16, 2015
14e048d
Merge pull request #36 from natsu90/master
stevebauman Sep 1, 2015
1fa07ea
metric_id is not nullable
natsu90 Sep 7, 2015
82d249e
Merge pull request #39 from natsu90/master
stevebauman Sep 7, 2015
b788932
Added missing start transaction method
stevebauman Oct 7, 2015
9693715
Make configuration prettier
stevebauman May 10, 2016
f8f3ba7
Cleaning.
stevebauman May 10, 2016
57566ab
Replace all private methods with protected.
stevebauman May 10, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
![Inventory Banner]
(https://github.com/stevebauman/inventory/blob/master/inventory-banner.jpg)
# Inventory

[![Travis CI](https://img.shields.io/travis/stevebauman/inventory.svg?style=flat-square)](https://travis-ci.org/stevebauman/inventory)
[![Travis CI](https://img.shields.io/travis/stevebauman/inventory/v1.7.5.svg?style=flat-square)](https://travis-ci.org/stevebauman/inventory)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/stevebauman/inventory.svg?style=flat-square)](https://scrutinizer-ci.com/g/stevebauman/inventory/?branch=master)
[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/69e0abf0-cd74-4d4d-b40c-e943c4a7eea9.svg?style=flat-square)](https://insight.sensiolabs.com/projects/69e0abf0-cd74-4d4d-b40c-e943c4a7eea9)
[![Latest Stable Version](https://img.shields.io/packagist/v/stevebauman/inventory.svg?style=flat-square)](https://packagist.org/packages/stevebauman/inventory)
Expand Down
13 changes: 6 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
"license": "MIT",
"require": {
"php": ">=5.4.0",
"illuminate/database": "4.* | 5.*",
"illuminate/support": "4.* | 5.*",
"baum/baum": "1.0.* | 1.1.*"
"illuminate/database": "5.*",
"illuminate/support": "5.*",
"baum/baum": "1.1.*"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"mockery/mockery": "0.9.*"
"orchestra/testbench": "3.1.*"
},
"archive": {
"exclude": ["/tests"]
"exclude": ["/tests"]
},
"autoload": {
"psr-4": {
Expand All @@ -30,7 +29,7 @@
"autoload-dev":
{
"psr-4": {
"Stevebauman\\Inventory\\Tests\\": "tests/"
"Stevebauman\\Inventory\\Tests\\": "tests/"
}
},
"minimum-stability": "stable"
Expand Down
21 changes: 17 additions & 4 deletions docs/INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
## Installation

> **Note**: If you're looking to use Inventory with MSSQL, you will need to modify the published migrations to suit. By default,
multiple cascade delete paths are present on foreign keys, and you'll need to modify and / or remove these for compatibility.

### Installation (Laravel 4)

Add inventory to your `composer.json` file:

"stevebauman/inventory" : "1.6.*"
"stevebauman/inventory" : "1.7.*"

Now perform a `composer update` on your project's source.

Expand Down Expand Up @@ -32,7 +35,7 @@ Be sure to publish the configuration if you'd like to customize inventory:

Add inventory to your `composer.json` file:

"stevebauman/inventory" : "1.6.*"
"stevebauman/inventory" : "1.7.*"

Now perform a `composer update` on your project's source.

Expand Down Expand Up @@ -117,6 +120,8 @@ Category:

class Category extends Node
{
use CategoryTrait;

protected $table = 'categories';

protected $scoped = ['belongs_to'];
Expand All @@ -137,23 +142,25 @@ Supplier:

protected $table = 'suppliers';

public function items()
public function items()
{
return $this->belongsToMany('Inventory', 'inventory_suppliers', 'supplier_id')->withTimestamps();
}
}

Inventory:

use Stevebauman\Inventory\Traits\AssemblyTrait;
use Stevebauman\Inventory\Traits\InventoryTrait;
use Stevebauman\Inventory\Traits\InventoryVariantTrait;

class Inventory extends Model
{
use InventoryTrait;
use InventoryVariantTrait;
use AssemblyTrait;

protected $table = 'inventory';
protected $table = 'inventories';

public function category()
{
Expand All @@ -179,6 +186,12 @@ Inventory:
{
return $this->belongsToMany('Supplier', 'inventory_suppliers', 'inventory_id')->withTimestamps();
}

public function assemblies()
{
return $this->belongsToMany($this, 'inventory_assemblies', 'inventory_id', 'part_id')
->withPivot(['quantity'])->withTimestamps();
}
}

InventorySku:
Expand Down
Binary file removed inventory-banner.jpg
Binary file not shown.
43 changes: 0 additions & 43 deletions src/Commands/InstallCommand.php

This file was deleted.

35 changes: 0 additions & 35 deletions src/Commands/RunMigrationsCommand.php

This file was deleted.

129 changes: 0 additions & 129 deletions src/Commands/SchemaCheckCommand.php

This file was deleted.

File renamed without changes.
Loading