Product.php 688 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * @property int $id
  7. * @property \Carbon\Carbon $created_at
  8. * @property \Carbon\Carbon $updated_at
  9. */
  10. class Product extends Model
  11. {
  12. use HasFactory;
  13. protected $table = 'products';
  14. protected $guarded = [
  15. 'id', // Add more fields that shouldn't be edited here
  16. ];
  17. protected $casts = [
  18. 'created_at' => 'datetime',
  19. 'updated_at' => 'datetime',
  20. // Add your casts here (e.g., 'is_active' => 'boolean')
  21. ];
  22. // Relationships
  23. // Business Logic Methods
  24. // Custom Finders
  25. // Query Scopes
  26. }