improve stracture

This commit is contained in:
2025-07-22 16:32:10 +03:30
parent 0c3802fd9e
commit 57d72cb9c3
3 changed files with 31 additions and 4 deletions

View File

@@ -46,9 +46,6 @@ class OperatorController extends Controller
auth()->user()->addActivityComplete(1147); auth()->user()->addActivityComplete(1147);
Sms::sendSms($mission->officer_phone_number,
"گشت راهداری با کد یکتای $road_patrol->id در تاریخ " . verta(\Carbon\Carbon::now())->format('Y-m-d H:i:s') . " با شماره شما در سامانه RMS ثبت شد. \n لینک دریافت گزارش : \n https://rms.rmto.ir/v2/road_patrols/operator/report/$road_patrol->id"
);
return $this->successResponse(); return $this->successResponse();
} }

View File

@@ -123,7 +123,7 @@ class Accident extends Model
protected function link(): Attribute protected function link(): Attribute
{ {
return Attribute::make( return Attribute::make(
get: fn (string $value) => env("PAYMENT_LINK")."/#/pay/".explode("/", $this->bill_code)[0]."/{$this->final_amount}", get: fn ($value) => env("PAYMENT_LINK")."/#/pay/".explode("/", $this->bill_code)[0]."/{$this->final_amount}",
); );
} }
} }

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('road_patrols', function (Blueprint $table) {
$table->timestamp('start_time')->nullable()->change();
$table->timestamp('end_time')->nullable()->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('road_patrols', function (Blueprint $table) {
$table->timestamp('start_time')->change();
$table->timestamp('end_time')->change();
});
}
};