Coupon.php 313 B

12345678910111213141516
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Coupon extends Model
  5. {
  6. protected $fillable = [
  7. 'user_id', 'type', 'code','details','discount', 'discount_type', 'start_date', 'end_date'
  8. ];
  9. public function user(){
  10. return $this->belongsTo(User::class);
  11. }
  12. }