Blame view

backend/models/UploadForm.php 440 Bytes
a63b5418   Administrator   first_commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  <?php
  namespace app\models;
  
  use yii\base\Model;
  use yii\web\UploadedFile;
  
  /**
   * UploadForm is the model behind the upload form.
   */
  class UploadForm extends Model
  {
      /**
       * @var UploadedFile file attribute
       */
      public $file;
  
      /**
       * @return array the validation rules.
       */
      public function rules()
      {
          return [
              [['file'], 'file', ] //'extensions' => ['csv', 'xml'] ],
          ];
      }
  }