Make filename unique for each area, rename column to name/lname for files
This commit is contained in:
@@ -3,11 +3,9 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\File as FileFacade;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Rennokki\QueryCache\Traits\QueryCacheable;
|
||||
@@ -161,7 +159,7 @@ class File extends Model
|
||||
|
||||
public function getFullStoragePathAttribute(): string
|
||||
{
|
||||
return sprintf('%04X/%s',$this->filearea_id,$this->file);
|
||||
return sprintf('%04X/%s',$this->filearea_id,$this->name);
|
||||
}
|
||||
|
||||
/* METHODS */
|
||||
|
Reference in New Issue
Block a user