Files
c-cms-legacy/app/GoogleDriveFile.php
Lagacé Mathieu baef9a1df0 3.2.5
2020-02-01 13:17:32 -05:00

40 lines
980 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':
$icon = 'fas fa-file-image text-image';
break;
}
return $icon;
}
}