mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
Update Laravel to 7.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user