save to codehub
This commit is contained in:
64
app/Models/ActivityDay.php
Normal file
64
app/Models/ActivityDay.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\SubscriptionMaster;
|
||||
use App\Models\Teacher;
|
||||
use App\Models\ActivitySchedule;
|
||||
use App\Models\LinkFaqActivityMasterIds;
|
||||
use App\Models\ActivityMaster;
|
||||
|
||||
class ActivityDay extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'activity_day';
|
||||
// protected $fillable = [
|
||||
// 'activity_master_id',
|
||||
// 'activity_schedule_id',
|
||||
// 'activity_name',
|
||||
// 'activity_teaser',
|
||||
// 'activity_duration',
|
||||
// 'activity_level',
|
||||
// 'description',
|
||||
// 'benefits',
|
||||
// 'date',
|
||||
// 'day',
|
||||
// 'time',
|
||||
// 'pre_requisites',
|
||||
// 'zoom_link',
|
||||
// 'subscription_id',
|
||||
// 'is_active',
|
||||
// ];
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function schedule()
|
||||
{
|
||||
return $this->hasMany(ActivitySchedule::class, 'activity_master_id');
|
||||
}
|
||||
public function subscription(){
|
||||
return $this->belongsTo(SubscriptionMaster::class, 'subscription_id', 'id');
|
||||
}
|
||||
|
||||
public function teacher_data(){
|
||||
return $this->belongsTo(Teacher::class,'teacher_id','id');
|
||||
}
|
||||
public function faq_activity_link() {
|
||||
return $this->hasMany(LinkFaqActivityMasterIds::class, 'activity_master_id', 'id');
|
||||
}
|
||||
|
||||
public function scheduleData()
|
||||
{
|
||||
return $this->hasMany(ActivitySchedule::class, 'id', 'activity_schedule_id');
|
||||
}
|
||||
|
||||
public function activityData()
|
||||
{
|
||||
return $this->hasMany(ActivityMaster::class, 'id', 'activity_master_id');
|
||||
}
|
||||
}
|
||||
64
app/Models/ActivityMaster.php
Normal file
64
app/Models/ActivityMaster.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\SubscriptionMaster;
|
||||
use App\Models\Teacher;
|
||||
use App\Models\ActivitySchedule;
|
||||
use App\Models\LinkFaqActivityMasterIds;
|
||||
use App\Models\ActivityDay;
|
||||
|
||||
class ActivityMaster extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'activity_master';
|
||||
// protected $fillable = [
|
||||
// 'activity_name',
|
||||
// 'title',
|
||||
// 'main_activity_banner',
|
||||
// 'description',
|
||||
// 'start_date',
|
||||
// 'end_date',
|
||||
// 'teacher_id',
|
||||
// 'teaser_url',
|
||||
// 'benefits',
|
||||
// 'activity_level',
|
||||
// 'pre_requisites',
|
||||
// 'subscription_id',
|
||||
// 'is_active',
|
||||
// ];
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function schedule()
|
||||
{
|
||||
return $this->hasMany(ActivitySchedule::class, 'activity_master_id');
|
||||
}
|
||||
// public function day()
|
||||
// {
|
||||
// return $this->hasMany(ActivityDay::class, 'activity_master_id');
|
||||
// }
|
||||
public function subscription(){
|
||||
return $this->belongsTo(SubscriptionMaster::class, 'subscription_id', 'id');
|
||||
}
|
||||
|
||||
public function teacher_data(){
|
||||
return $this->belongsTo(Teacher::class,'teacher_id','id');
|
||||
}
|
||||
public function past_data(){
|
||||
return $this->hasMany(PastSession::class,'activity_master_id','id');
|
||||
}
|
||||
// public function schedule(){
|
||||
// return $this->belongsTo(ActivitySchedule::class,'id');
|
||||
// }
|
||||
|
||||
public function faq_activity_link() {
|
||||
return $this->hasMany(LinkFaqActivityMasterIds::class, 'activity_master_id', 'id');
|
||||
}
|
||||
|
||||
}
|
||||
48
app/Models/ActivitySchedule.php
Normal file
48
app/Models/ActivitySchedule.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\ActivityMaster;
|
||||
use App\Models\PastSession;
|
||||
|
||||
class ActivitySchedule extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
// protected $fillable = [
|
||||
// 'activity_master_id',
|
||||
// 'activity_name',
|
||||
// 'activity_teaser',
|
||||
// 'activity_duration',
|
||||
// 'activity_level',
|
||||
// 'description',
|
||||
// 'benefits',
|
||||
// 'date',
|
||||
// 'day',
|
||||
// 'time',
|
||||
// 'activity_level',
|
||||
// 'pre_requisites',
|
||||
// 'zoom_link',
|
||||
// 'is_active',
|
||||
// ];
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function schedule(){
|
||||
return $this->belongsTo(ActivityMaster::class, 'subscription_id');
|
||||
}
|
||||
public function subscription(){
|
||||
return $this->belongsTo(SubscriptionMaster::class, 'subscription_id', 'id');
|
||||
}
|
||||
public function past_data(){
|
||||
return $this->hasMany(PastSession::class,'activity_schedule_id','id');
|
||||
}
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
}
|
||||
|
||||
24
app/Models/AdminMaster.php
Normal file
24
app/Models/AdminMaster.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
|
||||
class AdminMaster extends Authenticatable
|
||||
{
|
||||
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $table = 'admin_masters';
|
||||
|
||||
public function getReview1()
|
||||
{
|
||||
return Crypt::decrypt( $this->review1);
|
||||
}
|
||||
}
|
||||
12
app/Models/AppVersion.php
Normal file
12
app/Models/AppVersion.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AppVersion extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $guarded= [];
|
||||
}
|
||||
15
app/Models/BioMakerActivity.php
Normal file
15
app/Models/BioMakerActivity.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class BioMakerActivity extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
}
|
||||
13
app/Models/CompanyMaster.php
Normal file
13
app/Models/CompanyMaster.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
// use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class CompanyMaster extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
// use SoftDeletes;
|
||||
}
|
||||
34
app/Models/ContactUs.php
Normal file
34
app/Models/ContactUs.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\User;
|
||||
|
||||
class ContactUs extends Model {
|
||||
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'contact_us';
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'name',
|
||||
'email_id',
|
||||
'contact_number',
|
||||
'subject',
|
||||
'type',
|
||||
'message',
|
||||
'is_reply',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
public function user() {
|
||||
|
||||
return $this->belongsTo(User::class,'user_id');
|
||||
}
|
||||
|
||||
}
|
||||
17
app/Models/DailyStepsCount.php
Normal file
17
app/Models/DailyStepsCount.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class DailyStepsCount extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
use SoftDeletes;
|
||||
protected $table = 'daily_steps_counts';
|
||||
}
|
||||
19
app/Models/DietCategoryMaster.php
Normal file
19
app/Models/DietCategoryMaster.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class DietCategoryMaster extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
|
||||
|
||||
}
|
||||
23
app/Models/DietPlan.php
Normal file
23
app/Models/DietPlan.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class DietPlan extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'diet_plans';
|
||||
protected $fillable = [
|
||||
'image',
|
||||
'diet_categories',
|
||||
'bmr_range_from',
|
||||
'bmr_range_to',
|
||||
'is_active'
|
||||
];
|
||||
}
|
||||
|
||||
16
app/Models/DietQuestionMaster.php
Normal file
16
app/Models/DietQuestionMaster.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class DietQuestionMaster extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
}
|
||||
34
app/Models/LeaderboardMaster.php
Normal file
34
app/Models/LeaderboardMaster.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\UserOverView;
|
||||
use App\Models\UserDetail;
|
||||
use App\Models\User;
|
||||
|
||||
class LeaderboardMaster extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'leaderboard_masters';
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'total_score',
|
||||
'progress_bar'
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class,'user_id');
|
||||
}
|
||||
|
||||
public function user_data()
|
||||
{
|
||||
return $this->hasOne(UserDetail::class,'user_id','user_id');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
21
app/Models/LinkFaqActivityMasterIds.php
Normal file
21
app/Models/LinkFaqActivityMasterIds.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\ManageFaq;
|
||||
use App\Models\ActivityMaster;
|
||||
|
||||
class LinkFaqActivityMasterIds extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public function faqs() {
|
||||
return $this->hasMany(ActivityMaster::class, 'activity_master_id', 'id');
|
||||
}
|
||||
public function faqsData() {
|
||||
return $this->hasOne(ManageFaq::class, 'id', 'faqs_id');
|
||||
}
|
||||
|
||||
}
|
||||
28
app/Models/ManageAboutUs.php
Normal file
28
app/Models/ManageAboutUs.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class ManageAboutUs extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
// protected $table = 'manage_about_us';
|
||||
// protected $fillable = [
|
||||
// 'user_id',
|
||||
// 'name',
|
||||
// 'email_id',
|
||||
// 'contact_number',
|
||||
// 'subject',
|
||||
// 'type',
|
||||
// 'message',
|
||||
// 'is_reply',
|
||||
// 'is_active'
|
||||
// ];
|
||||
|
||||
}
|
||||
14
app/Models/ManageBanner.php
Normal file
14
app/Models/ManageBanner.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class ManageBanner extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
}
|
||||
35
app/Models/ManageFaq.php
Normal file
35
app/Models/ManageFaq.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\ManageFaqCategory;
|
||||
use App\Models\LinkFaqActivityMasterIds;
|
||||
|
||||
class ManageFaq extends Model {
|
||||
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'manage_faqs';
|
||||
protected $fillable = [
|
||||
'category_id',
|
||||
'question',
|
||||
'answer',
|
||||
'video_url',
|
||||
'thumbnail_path',
|
||||
'is_active',
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
public function category() {
|
||||
return $this->belongsTo(ManageFaqCategory::class, 'category_id', 'id');
|
||||
}
|
||||
|
||||
public function faqs() {
|
||||
return $this->hasMany(LinkFaqActivityMasterIds::class, 'faqs_id', 'id');
|
||||
}
|
||||
}
|
||||
25
app/Models/ManageFaqCategory.php
Normal file
25
app/Models/ManageFaqCategory.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\ManageFaq;
|
||||
|
||||
|
||||
class ManageFaqCategory extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'manage_faq_categories';
|
||||
protected $fillable = [
|
||||
'category_name',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
public function faqs(){
|
||||
return $this->hasMany(ManageFaq::class,'category_id','id');
|
||||
}
|
||||
}
|
||||
25
app/Models/ManageFeedback.php
Normal file
25
app/Models/ManageFeedback.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class ManageFeedback extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $fillable = ['user_id', 'message', 'reaction'];
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
public function user(){
|
||||
return $this->hasOne(User::class,'id','user_id');
|
||||
}
|
||||
|
||||
public function user_detail(){
|
||||
return $this->belongsTo(UserDetail::class,'user_id','user_id');
|
||||
}
|
||||
|
||||
}
|
||||
19
app/Models/ManageFreeVideo.php
Normal file
19
app/Models/ManageFreeVideo.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
|
||||
class ManageFreeVideo extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
|
||||
|
||||
}
|
||||
22
app/Models/ManageNewsArticles.php
Normal file
22
app/Models/ManageNewsArticles.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\NewsArticlesCategory;
|
||||
|
||||
class ManageNewsArticles extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
// public function category(){
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
18
app/Models/ManagePodcast.php
Normal file
18
app/Models/ManagePodcast.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class ManagePodcast extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
|
||||
|
||||
}
|
||||
22
app/Models/ManageQuizQuestion.php
Normal file
22
app/Models/ManageQuizQuestion.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\QuizQuestionsAnswer;
|
||||
|
||||
|
||||
class ManageQuizQuestion extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $guarded = [];
|
||||
|
||||
public function answer(){
|
||||
|
||||
return $this->hasMany(QuizQuestionsAnswer::class,'question_id','id');
|
||||
}
|
||||
}
|
||||
18
app/Models/ManageRateUs.php
Normal file
18
app/Models/ManageRateUs.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class ManageRateUs extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
// protected $table = ['manage_rate_us'];
|
||||
protected $fillable = ['user_id', 'rate_us'];
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
}
|
||||
18
app/Models/ManageSetting.php
Normal file
18
app/Models/ManageSetting.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class ManageSetting extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
|
||||
|
||||
}
|
||||
29
app/Models/ManageShortClips.php
Normal file
29
app/Models/ManageShortClips.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class ManageShortClips extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $table = 'manage_short_clips';
|
||||
protected $fillable = [
|
||||
'video_title',
|
||||
'video_description',
|
||||
'video_url',
|
||||
'likes',
|
||||
'thumbnail',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
public function ShortClip(){
|
||||
return $this->hasMany(ShortClipsLikes::class, 'short_clips_id','id')->where('is_active','1');
|
||||
}
|
||||
|
||||
}
|
||||
BIN
app/Models/Models.zip
Normal file
BIN
app/Models/Models.zip
Normal file
Binary file not shown.
24
app/Models/MonthlyPosition.php
Normal file
24
app/Models/MonthlyPosition.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\User;
|
||||
|
||||
class MonthlyPosition extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'monthly_positions';
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'position',
|
||||
'month',
|
||||
'group_levels'
|
||||
];
|
||||
|
||||
public function user_data()
|
||||
{
|
||||
return $this->hasMany(User::class,'id','user_id');
|
||||
}
|
||||
}
|
||||
22
app/Models/NewsArticlesCategory.php
Normal file
22
app/Models/NewsArticlesCategory.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\ManageNewsArticles;
|
||||
|
||||
class NewsArticlesCategory extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function articles(){
|
||||
return $this->hasMany(ManageNewsArticles::class, 'category_id','id')->where('is_active','1');
|
||||
}
|
||||
|
||||
}
|
||||
16
app/Models/NotificationMaster.php
Normal file
16
app/Models/NotificationMaster.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class NotificationMaster extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'notification_masters';
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'messages'
|
||||
];
|
||||
}
|
||||
31
app/Models/NotificationUser.php
Normal file
31
app/Models/NotificationUser.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\User;
|
||||
use App\Models\NotificationMaster;
|
||||
// use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class NotificationUser extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
// use SoftDeletes;
|
||||
// protected $dates = ['deleted_at'];
|
||||
protected $table = 'notification_users';
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'notification_id'
|
||||
];
|
||||
|
||||
public function user_data()
|
||||
{
|
||||
return $this->hasOne(User::class,'id','user_id');
|
||||
}
|
||||
|
||||
public function notification_master_data(){
|
||||
|
||||
return $this->hasOne(NotificationMaster::class,'id','notification_id');
|
||||
}
|
||||
}
|
||||
19
app/Models/PastSession.php
Normal file
19
app/Models/PastSession.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\ActivitySchedule;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class PastSession extends Model
|
||||
{
|
||||
use HasFactory,SoftDeletes;
|
||||
// protected $dates = ['deleted_at'];
|
||||
protected $table = 'past_activity';
|
||||
public function schedule_data(){
|
||||
return $this->hasOne(ActivitySchedule::class, 'id','activity_schedule_id');
|
||||
}
|
||||
}
|
||||
|
||||
15
app/Models/PaymentTransactionsMaster.php
Normal file
15
app/Models/PaymentTransactionsMaster.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class PaymentTransactionsMaster extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
}
|
||||
12
app/Models/PeriodDate.php
Normal file
12
app/Models/PeriodDate.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PeriodDate extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
}
|
||||
23
app/Models/PersonalAccessToken.php
Normal file
23
app/Models/PersonalAccessToken.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
// use Laravel\Passport\HasApiTokens;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
class PersonalAccessToken extends Model
|
||||
{
|
||||
|
||||
use HasApiTokens;
|
||||
use Notifiable;
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id', 'token', 'device_id', 'last_login',
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
17
app/Models/PreRecordedVideoDetails.php
Normal file
17
app/Models/PreRecordedVideoDetails.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class PreRecordedVideoDetails extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
}
|
||||
15
app/Models/PreRecordedVideoMaster.php
Normal file
15
app/Models/PreRecordedVideoMaster.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class PreRecordedVideoMaster extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
}
|
||||
21
app/Models/QuizQuestionsAnswer.php
Normal file
21
app/Models/QuizQuestionsAnswer.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\ManageQuizQuestion;
|
||||
|
||||
class QuizQuestionsAnswer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $guarded = [];
|
||||
|
||||
// public function question(){
|
||||
// return $this->hasMany(ManageQuizQuestion::class);
|
||||
// }
|
||||
|
||||
}
|
||||
11
app/Models/SessionStatus.php
Normal file
11
app/Models/SessionStatus.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SessionStatus extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
11
app/Models/ShareYourThought.php
Normal file
11
app/Models/ShareYourThought.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ShareYourThought extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
22
app/Models/ShortClipsLikes.php
Normal file
22
app/Models/ShortClipsLikes.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class ShortClipsLikes extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
// use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $fillable = ['user_id', 'short_clips_id'];
|
||||
|
||||
|
||||
public function shortClicpLikes(){
|
||||
return $this->belongsTo(ManageShortClips::class,'id')->where('is_active','1');
|
||||
}
|
||||
}
|
||||
38
app/Models/SubscriptionMaster.php
Normal file
38
app/Models/SubscriptionMaster.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\ActivityMaster;
|
||||
use App\Models\SubscriptionPlanPackage;
|
||||
use App\Models\SubscriptionPackageDescription;
|
||||
|
||||
class SubscriptionMaster extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'subscription_masters';
|
||||
protected $fillable = [
|
||||
'plan_name',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
public function activity(){
|
||||
return $this->hasMany(ActivityMaster::class, 'subscription_id', 'id');
|
||||
}
|
||||
|
||||
public function subscription_plan_packages()
|
||||
{
|
||||
|
||||
return $this->hasOne(SubscriptionPlanPackage::class, 'subscription_master_id', 'id');
|
||||
}
|
||||
|
||||
public function subscription_package_descriptions()
|
||||
{
|
||||
|
||||
return $this->hasOne(SubscriptionPackageDescription::class, 'subscription_master_id', 'id');
|
||||
}
|
||||
}
|
||||
32
app/Models/SubscriptionPackageDescription.php
Normal file
32
app/Models/SubscriptionPackageDescription.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\SubscriptionPlanPackage;
|
||||
|
||||
|
||||
class SubscriptionPackageDescription extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'subscription_package_descriptions';
|
||||
protected $fillable = [
|
||||
'plan_id',
|
||||
'subscription_master_id',
|
||||
'description',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
|
||||
public function subscription_plan_packages() {
|
||||
|
||||
return $this->hasOne(SubscriptionPackageDescription::class, 'plan_id');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
36
app/Models/SubscriptionPlanPackage.php
Normal file
36
app/Models/SubscriptionPlanPackage.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\SubscriptionPackageDescription;
|
||||
use App\Models\SubscriptionMaster;
|
||||
|
||||
class SubscriptionPlanPackage extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'subscription_plan_packages';
|
||||
protected $fillable = [
|
||||
'subscription_master_id',
|
||||
'plan_period',
|
||||
'plan_price',
|
||||
'currency_type',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
public function SubscriptionMaster() {
|
||||
|
||||
return $this->belongsTo(SubscriptionMaster::class,'plan_id');
|
||||
}
|
||||
|
||||
public function subscription_package_descriptions() {
|
||||
|
||||
return $this->hasOne(SubscriptionPackageDescription::class, 'plan_id');
|
||||
}
|
||||
|
||||
}
|
||||
24
app/Models/Teacher.php
Normal file
24
app/Models/Teacher.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Teacher extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'teachers';
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'teacher_title',
|
||||
'teacher_sub_title',
|
||||
'teacher_image',
|
||||
'description',
|
||||
'address',
|
||||
'contact_number'
|
||||
];
|
||||
}
|
||||
30
app/Models/Testimonial.php
Normal file
30
app/Models/Testimonial.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\TestimonialImages;
|
||||
|
||||
|
||||
class Testimonial extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $table = 'testimonials';
|
||||
protected $fillable = [
|
||||
'user_name',
|
||||
'image',
|
||||
'title',
|
||||
'description',
|
||||
'rating',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
public function testimonial_data(){
|
||||
return $this->hasMany(TestimonialImages::class,'testimonial_id','id');
|
||||
}
|
||||
}
|
||||
14
app/Models/TestimonialImages.php
Normal file
14
app/Models/TestimonialImages.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TestimonialImages extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
|
||||
|
||||
}
|
||||
11
app/Models/Thoughts.php
Normal file
11
app/Models/Thoughts.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Thoughts extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
33
app/Models/Tracher.php
Normal file
33
app/Models/Tracher.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\ActivityMaster;
|
||||
|
||||
class Tracher extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'trachers';
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'teacher_title',
|
||||
'teacher_sub_title',
|
||||
'description',
|
||||
'address',
|
||||
'contact_number'
|
||||
];
|
||||
|
||||
|
||||
public function subscription(){
|
||||
return $this->belongsTo(SubscriptionMaster::class, 'subscription_id', 'id');
|
||||
}
|
||||
|
||||
// public function teacher(){
|
||||
// return $this->hasMany(ActivityMaster::class, 'id','teacher_id');
|
||||
// }
|
||||
}
|
||||
148
app/Models/User.php
Normal file
148
app/Models/User.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
// use Laravel\Passport\HasApiTokens;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
// use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject;
|
||||
use Tymon\JWTAuth\Contracts\JWTSubject;
|
||||
use App\Models\ContactUs;
|
||||
use App\Models\UserThought;
|
||||
use App\Models\UserOverView;
|
||||
|
||||
use App\Models\DailyStepsCount;
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
class User extends Authenticatable implements JWTSubject
|
||||
{
|
||||
|
||||
use HasApiTokens;
|
||||
use Notifiable;
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'users';
|
||||
|
||||
protected $guarded = [];
|
||||
// protected $fillable = [
|
||||
// 'full_name',
|
||||
// 'contact_number',
|
||||
// 'email_id',
|
||||
// 'offering_name',
|
||||
// 'offering_type',
|
||||
// 'price_per_spot',
|
||||
// 'transaction_date',
|
||||
// 'booking_schedule',
|
||||
// 'answers_0_q_text',
|
||||
// 'answers_0_q_type',
|
||||
// 'answers_0_q_ans',
|
||||
// 'answers_1_q_text',
|
||||
// 'answers_1_q_type',
|
||||
// 'answers_1_q_ans',
|
||||
// 'answers_2_q_text',
|
||||
// 'answers_2_q_type',
|
||||
// 'answers_2_q_ans',
|
||||
// 'answers_3_q_text',
|
||||
// 'answers_3_q_type',
|
||||
// 'answers_3_q_ans',
|
||||
// 'answers_4_q_text',
|
||||
// 'answers_4_q_type',
|
||||
// 'answers_4_q_ans',
|
||||
// 'answers_5_q_text',
|
||||
// 'answers_5_q_type',
|
||||
// 'answers_5_q_ans',
|
||||
// 'answers_6_q_text',
|
||||
// 'answers_6_q_type',
|
||||
// 'answers_6_q_ans',
|
||||
// 'gst_name',
|
||||
// 'gst_number',
|
||||
// 'gst_company_address',
|
||||
// 'billing_state',
|
||||
// 'password',
|
||||
// 'signup_from',
|
||||
// 'google_id',
|
||||
// 'apple_id',
|
||||
// 'user_type',
|
||||
// 'status',
|
||||
// 'utm_source',
|
||||
// 'address',
|
||||
// 'fitness_goal',
|
||||
// 'hear_about',
|
||||
// 'start_date',
|
||||
// 'end_date',
|
||||
// ];
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
public function getJWTIdentifier()
|
||||
{
|
||||
return $this->getKey();
|
||||
}
|
||||
|
||||
public function getJWTCustomClaims()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
/**
|
||||
* Get the identifier that will be stored in the subject claim of the JWT.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
// public function getJWTIdentifier() {
|
||||
// return $this->getKey();
|
||||
// }
|
||||
|
||||
/**
|
||||
* Return a key value array, containing any custom claims to be added to the JWT.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
// public function getJWTCustomClaims() {
|
||||
// return [];
|
||||
// }
|
||||
|
||||
public function ContactUs() {
|
||||
return $this->hasOne(ContactUs::class);
|
||||
}
|
||||
|
||||
public function userThought() {
|
||||
return $this->hasOne(UserThought::class, 'user_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Created By : Pradyumn Dwivedi
|
||||
* Created at : 06-feb-2023
|
||||
* Use : To get user details data in user listing
|
||||
*/
|
||||
public function user_detail(){
|
||||
return $this->hasOne('App\Models\UserDetail', 'user_id', 'id')->withDefault();
|
||||
}
|
||||
|
||||
public function leaderboard_master()
|
||||
{
|
||||
return $this->hasMany(LeaderboardMaster::class);
|
||||
}
|
||||
|
||||
public function stepCount()
|
||||
{
|
||||
return $this->hasMany(DailyStepsCount::class)->where('date', Carbon::today()->toDateString());
|
||||
}
|
||||
|
||||
public function latestStepCount()
|
||||
{
|
||||
return $this->hasOne(DailyStepsCount::class)->orderBy('date', 'desc');
|
||||
}
|
||||
|
||||
public function getLatestStepCountArrayAttribute()
|
||||
{
|
||||
$latestStepCount = $this->latestStepCount;
|
||||
return $latestStepCount ? [$latestStepCount->toArray()] : [];
|
||||
}
|
||||
}
|
||||
14
app/Models/UserContentView.php
Normal file
14
app/Models/UserContentView.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class UserContentView extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
}
|
||||
38
app/Models/UserDetail.php
Normal file
38
app/Models/UserDetail.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\User;
|
||||
use App\Models\LeaderboardMaster;
|
||||
|
||||
|
||||
class UserDetail extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'company_id',
|
||||
'profile_picture',
|
||||
'user_bio',
|
||||
'description',
|
||||
'gender',
|
||||
'age',
|
||||
'city',
|
||||
'full_address',
|
||||
'height',
|
||||
'weight'
|
||||
];
|
||||
|
||||
public function user(){
|
||||
return $this->hasMany(User::class);
|
||||
}
|
||||
|
||||
// public function user_details()
|
||||
// {
|
||||
// return $this->belongsTo(LeaderboardMaster::class);
|
||||
// }
|
||||
|
||||
}
|
||||
13
app/Models/UserEmailOtp.php
Normal file
13
app/Models/UserEmailOtp.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserEmailOtp extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $fillable = ['user_id', 'otp', 'valid_upto','is_verify','created_at','updated_at'];
|
||||
|
||||
}
|
||||
43
app/Models/UserOverView.php
Normal file
43
app/Models/UserOverView.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\User;
|
||||
use DateTimeInterface;
|
||||
|
||||
|
||||
class UserOverView extends Model {
|
||||
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected function serializeDate(DateTimeInterface $date) {
|
||||
return $date->format('d-m-Y H:i:s');
|
||||
}
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'user_over_views';
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'muscle_rate',
|
||||
'body_fat',
|
||||
'skeletal_muscle',
|
||||
'protein',
|
||||
'bmr',
|
||||
'water',
|
||||
'age'
|
||||
];
|
||||
|
||||
public function user() {
|
||||
return $this->belongsTo(User::class, 'id', 'user_id');
|
||||
}
|
||||
|
||||
public function userData()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id', 'id');
|
||||
}
|
||||
|
||||
}
|
||||
12
app/Models/UserQuizPoints.php
Normal file
12
app/Models/UserQuizPoints.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserQuizPoints extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $guarded = [];
|
||||
}
|
||||
14
app/Models/UserQuizReport.php
Normal file
14
app/Models/UserQuizReport.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class UserQuizReport extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
}
|
||||
24
app/Models/UserThought.php
Normal file
24
app/Models/UserThought.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\User;
|
||||
|
||||
|
||||
class UserThought extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $table = 'user_thoughts';
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'user_thought',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
}
|
||||
26
app/Models/mood_o_meter.php
Normal file
26
app/Models/mood_o_meter.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class mood_o_meter extends Model {
|
||||
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $table = 'mood_o_meter';
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'mood_o_meter',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
public function user() {
|
||||
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user