Compare commits

..

No commits in common. 'main' and 'v2.0.0' have entirely different histories.
main ... v2.0.0

@ -16,7 +16,6 @@ use Illuminate\Http\File;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Illuminate\Validation\Rule;
class ApkUpdate extends Model { class ApkUpdate extends Model {
use HasFactory; use HasFactory;
@ -48,7 +47,7 @@ class ApkUpdate extends Model {
'id' => 'nullable|integer|exists:App\Models\ApkUpdate,id', 'id' => 'nullable|integer|exists:App\Models\ApkUpdate,id',
'name' => 'required|string', 'name' => 'required|string',
'file' => 'required_without:id|file|' . FileHelper::convertToStrLaraValidation(FileHelper::$allowedApkExtensions), 'file' => 'required_without:id|file|' . FileHelper::convertToStrLaraValidation(FileHelper::$allowedApkExtensions),
'version_code' => ['required', 'integer', 'min:1', Rule::unique('apk_updates', 'version_code')->ignore($request->id)], 'version_code' => 'required|integer|min:1|unique:apk_updates,version_code',
'version_name' => 'required|string', 'version_name' => 'required|string',
'change_note' => 'nullable|string' 'change_note' => 'nullable|string'
], [ ], [

@ -185,7 +185,7 @@ class NewTvRequest extends Model {
$tv->device_info = $newTvReq->device_info; $tv->device_info = $newTvReq->device_info;
$tv->installed_at = now(); $tv->installed_at = now();
$tv->save(); $tv->save();
TvLog::historyCreate($request->user(), $tv->id, $tv); TVLog::historyCreate($request->user(), $tv->id, $tv);
// TODO: waiting execution until update from ops // TODO: waiting execution until update from ops
// NEED TO REFACTOR (cause by add existing tv code) // NEED TO REFACTOR (cause by add existing tv code)

@ -86,7 +86,7 @@ class VideoUpdate extends Model {
} }
$videoUpdate->file_name = $request->file_name; $videoUpdate->file_name = $request->file_name;
if($request->is_selected) { if($request->is_selected == 'true') {
VideoUpdate::where('is_selected', true) VideoUpdate::where('is_selected', true)
->when($request->id, function(Builder $query, $id) { ->when($request->id, function(Builder $query, $id) {
$query->where('id', '!=', $id); $query->where('id', '!=', $id);

Loading…
Cancel
Save