Açıklama Yok
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.

Timeline.php 524B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Model;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Timeline extends Model
  5. {
  6. //
  7. //protected $connection = 'connection-name'; //jika menggunakan 2 DB modelnya harus dikasih ini
  8. //protected $primaryKey = 'your_key_name'; // set primarykeymu jika bukan ID
  9. protected $table = 'timelines';
  10. protected $fillable = [
  11. 'user_id',
  12. 'timeline_photo',
  13. 'caption',
  14. 'is_approved'
  15. ];
  16. public function user()
  17. {
  18. return $this->belongsTo('App\User');
  19. }
  20. }