Update Laravel to 7.0

This commit is contained in:
George Frederick "Buzz" Beurling
2020-06-20 17:03:30 -04:00
parent f104c1b61b
commit 8866cafd31
57 changed files with 8739 additions and 2281 deletions

View File

@@ -7,6 +7,32 @@ use Illuminate\Support\Facades\Storage;
use League\Flysystem\FileNotFoundException;
use mysql_xdevapi\Exception;
/**
* App\GoogleDriveFile
*
* @property string $id
* @property string $type
* @property string $name
* @property string $path
* @property array $rank_permission
* @property array $job_permission
* @property array $user_permission
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereJobPermission($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile wherePath($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereRankPermission($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereUserPermission($value)
* @mixin \Eloquent
*/
class GoogleDriveFile extends Model
{
protected $primaryKey = 'id'; // or null
@@ -409,4 +435,10 @@ class GoogleDriveFile extends Model
}
return $sidebarArray;
}
public static function getDownloadURL($path,$file)
{
$dir = urlencode(\App\GoogleDriveFile::findByPath($path)->id);
return '/file/get?d='.$dir.'&f='.urlencode($file);
}
}