|
@@ -1,26 +0,0 @@
|
1
|
|
-<?php
|
2
|
|
-
|
3
|
|
-namespace App\Model\Data;
|
4
|
|
-
|
5
|
|
-use Illuminate\Database\Eloquent\Model;
|
6
|
|
-
|
7
|
|
-class StockLogs extends Model
|
8
|
|
-{
|
9
|
|
- //protected $connection = 'connection-name'; //jika menggunakan 2 DB modelnya harus dikasih ini
|
10
|
|
- //protected $primaryKey = 'your_key_name'; // set primarykeymu jika bukan ID
|
11
|
|
- protected $table = 'stock_logs';
|
12
|
|
- protected $fillable = [
|
13
|
|
- 'user_id',
|
14
|
|
- 'log',
|
15
|
|
- 'quantity_kantong',
|
16
|
|
- 'is_stock_in',
|
17
|
|
- 'is_stock_out',
|
18
|
|
- ];
|
19
|
|
- //public $incrementing = false; //jika primary keynya string
|
20
|
|
- //public $timestamps = false; //matiin created_at, updated_at
|
21
|
|
-
|
22
|
|
- public function user()
|
23
|
|
- {
|
24
|
|
- return $this->belongsTo('App\User', 'user_id', 'id');
|
25
|
|
- }
|
26
|
|
-}
|