debug the blade file
This commit is contained in:
@@ -45,7 +45,7 @@ class AccidentReceiptController extends Controller
|
||||
auth()->user()->addActivityComplete(1126);
|
||||
$name = 'گزارش از خسارات وارده به ابنیه فنی و تاسیسات راه ' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
|
||||
$data = $accidentReceiptTableService->dataTable($request, true);
|
||||
return Excel::download(new DataTableReport($data), $name);
|
||||
return Excel::download(new DataTableReport($data['data']), $name);
|
||||
}
|
||||
|
||||
public function accidentDamage(Accident $accident): JsonResponse
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Traits\ReceiptReportAble;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class Accident extends Model
|
||||
{
|
||||
@@ -95,4 +97,25 @@ class Accident extends Model
|
||||
{
|
||||
return $this->morphMany(File::class, 'fileable');
|
||||
}
|
||||
|
||||
protected function damagePicture1(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
|
||||
);
|
||||
}
|
||||
|
||||
protected function damagePicture2(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
|
||||
);
|
||||
}
|
||||
|
||||
protected function policeFile(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user