CloudInitScript.php 606 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace ModulesGarden\ProxmoxAddon\App\Models;
  3. use ModulesGarden\ProxmoxAddon\Core\Models\ExtendedEloquentModel;
  4. /**
  5. * Class CloudInitScript
  6. * @package ModulesGarden\ProxmoxAddon\App\Models
  7. * @property string $id;
  8. * @property string $name
  9. * @property string $script
  10. * @method static CloudInitScript ofIds($ids)
  11. */
  12. class CloudInitScript extends ExtendedEloquentModel
  13. {
  14. protected $table = 'CloudInitScript';
  15. /** @var array */
  16. protected $fillable = [ 'name', 'script'];
  17. public function scopeOfIds($query , array $ids){
  18. return $query->whereIn('id',$ids);
  19. }
  20. }