uawdijnntqw1x1x1
IP : 216.73.217.77
Hostname : panel.codeskitter.com
Kernel : Linux panel.codeskitter.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
Disable Function : apache_child_terminate, apache_note, apache_setenv, define_syslog_variables, dl, link, opcache_get_status, openlog, pcntl_exec, pcntl_fork, pcntl_setpriority, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid
OS : Linux
PATH:
/
home
/
users
/
unlimited
/
www
/
learnoid.codeskitter.site
/
tests
/
..
/
app
/
Repositories
/
FrameRepository.php
/
/
<?php namespace App\Repositories; use Abedin\Maker\Repositories\Repository; use App\Models\Frame; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Storage; class FrameRepository extends Repository { public static function model() { return Frame::class; } public static function storeByRequest(UploadedFile $file, $path, $type = null): Frame { $src = Storage::put('/' . trim($path, '/'), $file, 'public'); return self::create([ 'extension' => $file->extension(), 'src' => $src, 'path' => $path, 'type' => $type, ]); } // this for local path file update public static function storeByPath($filePath, $path, $type = null): Frame { // Read the file content from the provided path $fileContents = file_get_contents($filePath); $fileName = basename($filePath); // Get the filename // Use Storage to put the file content into the specified directory $src = Storage::put('/' . trim($path, '/') . '/' . $fileName, $fileContents, 'public'); // Return a new Media record with the stored file details return self::create([ 'extension' => pathinfo($filePath, PATHINFO_EXTENSION), // Get the extension from file path 'src' => $src, 'path' => $path, 'type' => $type, ]); } public static function updateByRequest(UploadedFile $file, Frame $frame, $path, $type = null): Frame { $src = Storage::put('/' . trim($path, '/'), $file, 'public'); if (Storage::exists($frame->src)) { Storage::delete($frame->src); } self::update($frame, [ 'extension' => $file->extension(), 'src' => $src, 'path' => $path, 'type' => $type, ]); return $frame; } public static function updateOrCreateByRequest(UploadedFile $file, $path, $frame = null, $type = null): Frame { $src = Storage::put('/' . trim($path, '/'), $file, 'public'); if ($frame && Storage::exists($frame->src)) { Storage::delete($frame->src); } $frame = self::query()->updateOrCreate([ 'id' => $frame?->id ?? 0 ], [ 'extension' => $file->extension(), 'src' => $src, 'path' => $path, 'type' => $type, ]); return $frame; } }
/home/users/unlimited/www/learnoid.codeskitter.site/tests/../app/Repositories/FrameRepository.php