inital commit

This commit is contained in:
2026-06-24 18:29:01 +06:00
commit f401802bf7
3918 changed files with 553085 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class CreditreportProvider extends BaseModel
{
use HasFactory;
protected $fillable = ['company_type','link'];
public function getReportProviders()
{
return self::pluck('link','company_type');
}
public function deleteReportProvider($inputData)
{
$data = [];
$provider = self:: where('company_type',$inputData['delete_source_type'])->first();
if(!empty($provider))
{
$data = $provider->delete();
}
return $data;
}
public function insertReportProvider($inputData){
return self::create($inputData);
}
public function updateReportProvider($inputData){
$result = [];
$provider = self:: where('company_type',$inputData['edit_source_type'])->first();
if(!empty($provider)){
$data['company_type'] = $inputData['edit_source_type'];
$data['link'] = $inputData['edit_link'];
$result = $provider->update($data);
}
return $result;
}
}