This commit is contained in:
Lagacé Mathieu
2020-02-01 13:17:32 -05:00
parent 03cf1c5493
commit baef9a1df0
37 changed files with 1662 additions and 501 deletions

39
app/GoogleDriveFile.php Normal file
View 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;
}
}