Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StockLogs.php 704B

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