first commit

This commit is contained in:
2024-04-16 15:43:24 +05:45
commit b49e06fa93
4387 changed files with 543889 additions and 0 deletions

50
app/Models/Agents.php Normal file
View File

@@ -0,0 +1,50 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Agents extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'agent_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

57
app/Models/Branches.php Normal file
View File

@@ -0,0 +1,57 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Branches extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'branch_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'description',
'email',
'telephone',
'phone1',
'phone2',
'address',
'company_reg',
'is_main',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

View File

@@ -0,0 +1,54 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Campaignarticles extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'campaignarticle_id';
public $timestamps = true;
protected $fillable =[
'campaigns_id',
'parent_article',
'title',
'alias',
'text',
'link',
'cover_photo',
'thumb',
'display_order',
'status',
'created_at',
'updated_at',
'createdby',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

73
app/Models/Campaigns.php Normal file
View File

@@ -0,0 +1,73 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Campaigns extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'campaign_id';
public $timestamps = true;
protected $fillable = [
'title',
'alias',
'description',
'details',
'cover_photo',
'thumb',
'starts',
'ends',
'success_message',
'sms_message',
'coupon_codes',
'offered_choices',
'og_image',
'seo_title',
'seo_keywords',
'seo_description',
'meta_tags',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
'pass_layout',
'qr_position',
'id_position',
'name_position',
'email_position',
'notify_emails',
'google_sheet_id',
'google_sheet_worksheet',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

51
app/Models/Cities.php Normal file
View File

@@ -0,0 +1,51 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Cities extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'city_id';
public $timestamps = true;
protected $fillable =[
'districts_id',
'title',
'alias',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

55
app/Models/Contactus.php Normal file
View File

@@ -0,0 +1,55 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Contactus extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'inquiries_id';
public $timestamps = true;
protected $table = 'contactus';
protected $fillable = [
'title',
'email',
'phone',
'country_interested',
'study_background',
'terms_and_condition',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

50
app/Models/Countries.php Normal file
View File

@@ -0,0 +1,50 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Countries extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'country_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

51
app/Models/Districts.php Normal file
View File

@@ -0,0 +1,51 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Districts extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'district_id';
public $timestamps = true;
protected $fillable =[
'provinces_id',
'title',
'alias',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

48
app/Models/Faqs.php Normal file
View File

@@ -0,0 +1,48 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Faqs extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'faq_id';
public $timestamps = true;
protected $fillable =[
'title',
'text',
'display_order',
'status',
'createdby',
'updatedby',
'created_at',
'updated_at',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

55
app/Models/Followups.php Normal file
View File

@@ -0,0 +1,55 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Followups extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'followup_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'registrations_id',
'parent_followup',
'followup_date',
'followup_response',
'followup_by',
'next_schedule',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Institutions extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'institution_id';
public $timestamps = true;
protected $fillable =[
'institutiontypes_id',
'countries_id',
'title',
'alias',
'description',
'state',
'city',
'address',
'contact',
'logo',
'thumb',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

View File

@@ -0,0 +1,50 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Institutiontypes extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'institutiontype_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Leadcategories extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'leadcategory_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'description',
'color',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace App\Models\Log;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ActivityLog extends Model
{
use HasFactory;
protected $primaryKey = 'activity_id';
public $timestamps = true;
protected $fillable = [
'user_id',
'controllerName',
'methodName',
'actionUrl',
'activity',
'created_at',
'updated_at',
];
protected $appends = ['user_name'];
public function getUserNameAttribute()
{
$user = User::find($this->user_id);
return $user ? $user->name : '';
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Models\Log;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ErrorLog extends Model
{
use HasFactory;
protected $primaryKey = 'id';
public $timestamps = true;
protected $fillable = [
'user_id',
'controller_name',
'method_name',
'errors',
'created_at',
'updated_at',
];
protected $appends = [];
}

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Models\Log;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class LoginLog extends Model
{
use HasFactory;
protected $primaryKey = 'login_id';
public $timestamps = true;
protected $fillable = [
'user_id',
'ip',
'user_agent',
'type',
'login_at',
'logout_at',
'created_at',
'updated_at',
];
protected $appends = ['user_name'];
public function getUserNameAttribute()
{
$user = User::find($this->user_id);
return $user ? $user->name : '';
}
}

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Models\Log;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class OperationLog extends Model
{
use HasFactory;
protected $primaryKey = 'operation_id';
public $timestamps = true;
protected $fillable = [
'refNo',
'user_id',
'operation_start_no',
'operation_end_no',
'model_name',
'model_id',
'operation_name',
'previous_values',
'new_values',
'created_at',
'updated_at',
];
// protected $appends = ['operation_by'];
// public function getOperationByAttribute()
// {
// $user = User::find($this->user_id);
// return $user ? $user->name : '';
// }
}

View File

@@ -0,0 +1,64 @@
<?php
namespace App\Models;
use App\Models\User;
use App\Traits\CreatedUpdatedBy;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Offerapplications extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'offerapplication_id';
public $timestamps = true;
protected $fillable = [
'title',
'alias',
'students_id',
'programs_id',
'advice',
'requireddocuments_id',
'additional_documents',
'application_date',
'application_fee',
'applicationfee_deadline',
'applicationfee_paid',
'applicationfee_paymentdate',
'offer_status',
'offer_letter',
'offerletter_date',
'offered_conditions',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

53
app/Models/Options.php Normal file
View File

@@ -0,0 +1,53 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Options extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'option_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'students_id',
'programs_id',
'advice',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

70
app/Models/Programs.php Normal file
View File

@@ -0,0 +1,70 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Programs extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'program_id';
public $timestamps = true;
protected $fillable =[
'institutions_id',
'title',
'alias',
'description',
'program_level',
'years',
'psw',
'prospects',
'intake',
'institution',
'city',
'application_open',
'application_deadline',
'level',
'min_level',
'min_level_faculty',
'min_level_score',
'min_level_passout',
'min_level_optional_requirement',
'prof_test_required',
'prof_test_accepted',
'prof_test_min_score',
'prof_test_band_score',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

50
app/Models/Provinces.php Normal file
View File

@@ -0,0 +1,50 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Provinces extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'province_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

View File

@@ -0,0 +1,50 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Qualifications extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'qualification_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

View File

@@ -0,0 +1,97 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Registrations extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'registration_id';
public $timestamps = true;
protected $fillable = [
'campaigns_id',
'sources_id',
'countries_id',
'provinces_id',
'districts_id',
'cities_id',
'leadcategories_id',
'agents_id',
'name',
'email',
'phone',
'mobile',
'address',
'qualifications_id',
'see_year',
'see_grade',
'see_stream',
'see_school',
'plus2_year',
'plus2_grade',
'plus2_stream',
'plus2_college',
'bachelors_year',
'bachelors_grade',
'bachelors_stream',
'bachelors_college',
'highest_qualification',
'highest_grade',
'highest_stream',
'highest_college',
'highest_year',
'preparation_class',
'preparation_score',
'preparation_bandscore',
'preparation_date',
'preffered_location',
'intrested_for_country',
'intrested_course',
'user_agent',
'tags',
'coupen_code',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
'marital_status',
'experience',
'reference',
'how_you_know',
'gender',
'dob',
'guardian_name',
'applied_before'
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

View File

@@ -0,0 +1,50 @@
<?php
namespace App\Models;
use App\Models\User;
use App\Traits\CreatedUpdatedBy;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Requireddocuments extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'requireddocument_id';
public $timestamps = true;
protected $fillable = [
'title',
'alias',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

83
app/Models/Settings.php Normal file
View File

@@ -0,0 +1,83 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Settings extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'setting_id';
public $timestamps = true;
protected $fillable = [
'title',
'description',
'url1',
'url2',
'email',
'phone',
'secondary_phone',
'google_map',
'fb',
'insta',
'twitter',
'tiktok',
'primary_logo',
'secondary_logo',
'thumb',
'icon',
'og_image',
'no_image',
'copyright_text',
'content1',
'content2',
'content3',
'seo_title',
'seo_description',
'seo_keywords',
'og_tags',
'meta_pixel_code',
'smtp_server',
'smtp_security',
'smtp_port',
'smtp_user',
'smtp_password',
'sms_api',
'sms_username',
'sms_password',
'sms_sender',
'display_order',
'status',
'created_at',
'updated_at',
'createdby',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

51
app/Models/Sources.php Normal file
View File

@@ -0,0 +1,51 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Sources extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'source_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'name',
'description',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Spinthewheelwinners extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'spinthewheelwinner_id';
public $timestamps = true;
protected $fillable =[
'title',
'alias',
'registrations_id',
'prize',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

83
app/Models/Students.php Normal file
View File

@@ -0,0 +1,83 @@
<?php
namespace App\Models;
use App\Models\User;
use App\Traits\CreatedUpdatedBy;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Students extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'student_id';
public $timestamps = true;
protected $fillable = [
'campaigns_id',
'sources_id',
'leadcategories_id',
'agents_id',
'countries_id',
'name',
'email',
'phone',
'mobile',
'address',
'see_year',
'see_grade',
'see_stream',
'see_school',
'plus2_year',
'plus2_grade',
'plus2_stream',
'plus2_college',
'bachelors_year',
'bachelors_grade',
'bachelors_stream',
'bachelors_college',
'highest_qualification',
'highest_grade',
'highest_stream',
'highest_college',
'preparation_class',
'preparation_score',
'preparation_bandscore',
'preparation_date',
'preffered_location',
'intrested_for_country',
'intrested_course',
'user_agent',
'tags',
'coupen_code',
'display_order',
'status',
'remarks',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn($value) => User::find($value) ? User::find($value)->name : '',
);
}
}

46
app/Models/User.php Normal file
View File

@@ -0,0 +1,46 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'username',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}

52
app/Models/Users.php Normal file
View File

@@ -0,0 +1,52 @@
<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\CreatedUpdatedBy;
class Users extends Model
{
use HasFactory, CreatedUpdatedBy;
protected $primaryKey = 'id';
public $timestamps = true;
protected $fillable =[
'name',
'email',
'username',
'email_verified_at',
'password',
'remember_token',
'display_order',
'status',
'created_at',
'createdby',
'updated_at',
'updatedby',
];
protected $appends = ['status_name'];
protected function getStatusNameAttribute()
{
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
}
protected function createdBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
protected function updatedBy(): Attribute
{
return Attribute::make(
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
);
}
}