inital commit
This commit is contained in:
22
app/Models/UserPackage.php
Normal file
22
app/Models/UserPackage.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class UserPackage extends BaseModel
|
||||
{
|
||||
use HasFactory;
|
||||
protected $fillable = ['package_id','user_id'];
|
||||
|
||||
public function setUserPackage($inputData){
|
||||
return self::create($inputData);
|
||||
}
|
||||
|
||||
public function isExistPackage($package_id,$user_id){
|
||||
return self::where([
|
||||
//'package_id'=>$package_id,
|
||||
'user_id'=>$user_id,
|
||||
])->exists();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user