Home
expense
Fork
Export all
Schema
Model
Controller
Seeding
Form
Laravel 4.2
Add to favorites
Comments (2)
users
id
increments
timestamps
timestamps
softDeletes
softDeletes
first_name
string
last_name
string
email
string
account_balance
bigInteger
months
id
increments
timestamps
timestamps
softDeletes
softDeletes
user_id
FK
integer
exspenses
id
increments
timestamps
timestamps
softDeletes
softDeletes
title
string
date
date
description
text
month_id
FK
integer
shops
id
increments
timestamps
timestamps
softDeletes
softDeletes
title
string
location
string
user_id
FK
integer
lists
id
increments
timestamps
timestamps
softDeletes
softDeletes
title
string
shop_id
FK
integer
items
id
increments
timestamps
timestamps
softDeletes
softDeletes
title
string
price
bigInteger
quantity
integer
list_id
FK
integer
income
id
increments
timestamps
timestamps
softDeletes
softDeletes
title
string
amount
bigInteger
month_id
FK
integer
×
Comments for expense
TiaanTheunissen . 25 May 2016
// User can create many months $user->months // The Created month belongs to a user $month->user // The Created Month has many expenses $month->expenses // The Created expenses belongs to a month $expenses->month // User can create many shops $user->shops // The created shop belongs to a user $shop->user // The Created Shop has many lists $shop->lists // The list belongs to a shop/ $lists->shops // The shop has many items $shop->items // The items belong to a list. $item->shop }
umefarooq . 01 June 2016
i think months table is just an extra table, in expenses table you have date column from where you can months of specific year and those expenses directly belongs to user there is an extra link between user and expenses. so as for income table too.
Laravel Schema Designer v0.7.1
follow me on twitter
@okyn01