initial commit

This commit is contained in:
Inshal
2024-10-25 01:02:11 +05:00
commit 6e65bc3a62
1710 changed files with 273609 additions and 0 deletions

37
app/Models/PlanV1.php Normal file
View File

@@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class PlanV1 extends Model
{
use HasFactory;
protected $table = 'plans_v1';
protected $fillable = [
'title',
'currency',
'price',
'list_one_title',
'list_two_title',
'list_sub_title',
'image_url',
'slug',
'domain',
'medication_category_id',
'product_file_path',
'is_prescription_required',
'shipping_cost'
];
public static function generateUniqueSlug($title)
{
$slug = Str::slug($title);
$count = self::where('slug', 'like', "$slug%")->count();
return $count ? "{$slug}-{$count}" : $slug;
}
}