mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
3.2.5
This commit is contained in:
39
app/GoogleDriveFile.php
Normal file
39
app/GoogleDriveFile.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class GoogleDriveFile extends Model
|
||||
{
|
||||
public static function icon($extension)
|
||||
{
|
||||
$icon = "fas fa-file";
|
||||
switch ($extension)
|
||||
{
|
||||
case 'pdf':
|
||||
$icon = 'fas fa-file-pdf text-pdf';
|
||||
break;
|
||||
case 'php':
|
||||
$icon = 'fas fa-file-code text-code';
|
||||
break;
|
||||
case 'pptx':
|
||||
$icon = 'fas fa-file-powerpoint text-powerpoint';
|
||||
break;
|
||||
case 'docx':
|
||||
case 'odt':
|
||||
$icon = 'fas fa-file-word text-word';
|
||||
break;
|
||||
case 'ods':
|
||||
case 'xlsx':
|
||||
$icon = 'fas fa-file-excel text-excel';
|
||||
break;
|
||||
case 'png':
|
||||
case 'PNG':
|
||||
case 'jpg':
|
||||
$icon = 'fas fa-file-image text-image';
|
||||
break;
|
||||
}
|
||||
return $icon;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user