mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
41 lines
1005 B
PHP
41 lines
1005 B
PHP
<?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':
|
|
case 'jpeg':
|
|
$icon = 'fas fa-file-image text-image';
|
|
break;
|
|
}
|
|
return $icon;
|
|
}
|
|
}
|