src/Gzero/Cms/Models/Block.php
public function files($active = true)
    {
        $query = $this->morphToMany(File::class, 'uploadable')
        ->with('translations')
        ->withPivot('weight')
        ->orderBy('weight', 'ASC')
        ->withTimestamps();

        if ($active) {
            $query->where('is_active', '=', 1);
        }

        return $query;
    }
public function files($active = true)
    {
        $query = $this->morphToMany(File::class, 'uploadable')
        ->with('translations')
        ->withPivot('weight')
        ->orderBy('weight', 'ASC')
        ->withTimestamps();

        if ($active) {
            $query->where('is_active', '=', 1);
        }

        return $query;
    }
public function files ( $ active = true ) { $ query = $ this -> morphToMany ( File :: class , 'uploadable' ) -> with ( 'translations' ) -> withPivot ( 'weight' ) -> orderBy ( 'weight' , 'ASC' ) -> withTimestamps ( ) ; if ( $ active ) { $ query -> where ( 'is_active' , '=' , 1 ) ; } return $ query ; }
Get all of the files for the content.

@param bool $active Only active file

@return \Illuminate\Database\Eloquent\Relations\BelongsToMany|\Illuminate\Database\Eloquent\Relations\morphToMany
Get all of the files for the content .