first commit
This commit is contained in:
BIN
database/.DS_Store
vendored
Normal file
BIN
database/.DS_Store
vendored
Normal file
Binary file not shown.
2
database/.gitignore
vendored
Normal file
2
database/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*.sqlite
|
||||
*.sqlite-journal
|
47
database/factories/UserFactory.php
Normal file
47
database/factories/UserFactory.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = User::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'email' => $this->faker->unique()->safeEmail,
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Factories\Factory
|
||||
*/
|
||||
public function unverified()
|
||||
{
|
||||
return $this->state(function (array $attributes) {
|
||||
return [
|
||||
'email_verified_at' => null,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBranchesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('branches', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('telephone')->nullable();
|
||||
$table->string('phone1')->nullable();
|
||||
$table->string('phone2')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('company_reg')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->string('keywords')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable()->default('in_active');
|
||||
$table->enum('is_main',['yes','no'])->nullable()->default('no');
|
||||
$table->enum('visibility',['visible','invisible'])->nullable()->default('invisible');
|
||||
$table->enum('availability',['available','not_available'])->nullable()->default('not_available');
|
||||
$table->enum('is_deleted',['yes','no'])->nullable()->default('no');
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_deleted_by')->unsigned()->index()->nullable();
|
||||
// $table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
// $table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
// $table->foreign('last_deleted_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('branches');
|
||||
}
|
||||
}
|
41
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
41
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->enum('is_deleted',['yes','no'])->nullable()->default('no');
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->bigInteger('last_updated_by')->nullable();
|
||||
$table->bigInteger('last_deleted_by')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePermissionTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$tableNames = config('permission.table_names');
|
||||
$columnNames = config('permission.column_names');
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
|
||||
Schema::create($tableNames['permissions'], function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name',125); // For MySQL 8.0 use string('name', 125);
|
||||
$table->string('guard_name',125); // For MySQL 8.0 use string('guard_name', 125);
|
||||
$table->timestamps();
|
||||
$table->unique(['name', 'guard_name']);
|
||||
});
|
||||
|
||||
Schema::create($tableNames['roles'], function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name',125); // For MySQL 8.0 use string('name', 125);
|
||||
$table->string('guard_name',125); // For MySQL 8.0 use string('guard_name', 125);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['name', 'guard_name']);
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) {
|
||||
$table->unsignedBigInteger('permission_id');
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
|
||||
|
||||
$table->foreign('permission_id')
|
||||
->references('id')
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary(['permission_id', $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary');
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) {
|
||||
$table->unsignedBigInteger('role_id');
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
|
||||
|
||||
$table->foreign('role_id')
|
||||
->references('id')
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary(['role_id', $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary');
|
||||
});
|
||||
|
||||
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) {
|
||||
$table->unsignedBigInteger('permission_id');
|
||||
$table->unsignedBigInteger('role_id');
|
||||
|
||||
$table->foreign('permission_id')
|
||||
->references('id')
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('role_id')
|
||||
->references('id')
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary(['permission_id', 'role_id'], 'role_has_permissions_permission_id_role_id_primary');
|
||||
});
|
||||
|
||||
app('cache')
|
||||
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
|
||||
->forget(config('permission.cache.key'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$tableNames = config('permission.table_names');
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
|
||||
}
|
||||
|
||||
Schema::drop($tableNames['role_has_permissions']);
|
||||
Schema::drop($tableNames['model_has_roles']);
|
||||
Schema::drop($tableNames['model_has_permissions']);
|
||||
Schema::drop($tableNames['roles']);
|
||||
Schema::drop($tableNames['permissions']);
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddFieldRolesPermission extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('roles', function (Blueprint $table) {
|
||||
$table->enum('is_deleted',['yes','no'])->nullable()->default('no');
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_deleted_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_deleted_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::table('permissions', function (Blueprint $table) {
|
||||
$table->string('group_name')->nullable();
|
||||
$table->enum('is_deleted',['yes','no'])->nullable()->default('no');
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_deleted_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_deleted_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('role_user', function (Blueprint $table) {
|
||||
$table->increments('id')->unsigned();
|
||||
$table->bigInteger('role_id')->unsigned()->index();
|
||||
$table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
|
||||
$table->bigInteger('user_id')->unsigned()->index();
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('roles', function (Blueprint $table) {
|
||||
$table->dropColumn('is_deleted');
|
||||
$table->dropColumn('deleted_at');
|
||||
$table->dropColumn('created_by');
|
||||
$table->dropColumn('last_updated_by');
|
||||
$table->dropColumn('last_deleted_by');
|
||||
});
|
||||
|
||||
Schema::table('permissions', function (Blueprint $table) {
|
||||
$table->dropColumn('is_deleted');
|
||||
$table->dropColumn('deleted_at');
|
||||
$table->dropColumn('created_by');
|
||||
$table->dropColumn('last_updated_by');
|
||||
$table->dropColumn('last_deleted_by');
|
||||
});
|
||||
|
||||
Schema::dropIfExists('role_user');
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCountriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('countries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('phone_code')->nullable();
|
||||
$table->string('country_code',255)->nullable();
|
||||
$table->string('country_name',255)->nullable();
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('countries');
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateStatesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('states', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('state_name')->nullable();
|
||||
$table->bigInteger('country_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('states');
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDistrictsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('districts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('district_name')->nullable();
|
||||
$table->bigInteger('country_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->bigInteger('state_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('state_id')->references('id')->on('states')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('districts');
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCollegesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('colleges', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->bigInteger('country_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->bigInteger('state_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('state_id')->references('id')->on('states')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('colleges');
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAgentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_agents', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('phone');
|
||||
$table->string('display_order')->nullable();
|
||||
$table->string('remarks')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('agents');
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLeadCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_leadcategories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('alias')->nullable();
|
||||
$table->string('color_code');
|
||||
$table->string('display_order')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->date('created_on')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_leadcategories');
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCampaignsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_campaigns', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('alias')->nullable();
|
||||
$table->string('details')->nullable();
|
||||
$table->string('banner')->nullable();
|
||||
$table->string('ogImage')->nullable();
|
||||
$table->date('starts')->nullable();
|
||||
$table->date('ends')->nullable();
|
||||
$table->text('ogtags')->nullable();
|
||||
$table->text('success_message')->nullable();
|
||||
$table->text('sms_message')->nullable();
|
||||
$table->text('coupon_codes')->nullable();
|
||||
$table->string('url')->nullable();
|
||||
$table->string('keywords')->nullable();
|
||||
$table->text('headers')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->string('display_order')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->date('created_on')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_campaigns');
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateRegistrationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_registrations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('campaign_id')->unsigned()->index()->nullable();
|
||||
$table->foreign('campaign_id')->references('id')->on('tbl_campaigns')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->string('name');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->bigInteger('leadcategory_id')->unsigned()->index()->nullable()->default(1);
|
||||
$table->bigInteger('country_id')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('state_id')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('district_id')->unsigned()->index()->nullable();
|
||||
$table->string('municipality_name', 255)->nullable();
|
||||
$table->unsignedInteger('ward_no')->nullable();
|
||||
$table->string('village_name', 255)->nullable();
|
||||
$table->string('full_address', 255)->nullable();
|
||||
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('state_id')->references('id')->on('states')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('district_id')->references('id')->on('districts')->onUpdate('cascade')->onDelete('cascade');
|
||||
|
||||
$table->string('see_year')->nullable();
|
||||
$table->string('see_grade')->nullable();
|
||||
$table->string('see_stream')->nullable();
|
||||
$table->string('see_school')->nullable();
|
||||
$table->string('plus2_year')->nullable();
|
||||
$table->string('plus2_grade')->nullable();
|
||||
$table->string('plus2_stream')->nullable();
|
||||
$table->string('plus2_college')->nullable();
|
||||
$table->string('bachelors_year')->nullable();
|
||||
$table->string('bachelors_grade')->nullable();
|
||||
$table->string('bachelors_stream')->nullable();
|
||||
$table->string('bachelors_college')->nullable();
|
||||
$table->string('highest_qualification')->nullable();
|
||||
$table->string('highest_grade')->nullable();
|
||||
$table->string('highest_stream')->nullable();
|
||||
$table->string('highest_college')->nullable();
|
||||
$table->string('preparation_class')->nullable();
|
||||
$table->string('preparation_score')->nullable();
|
||||
$table->string('preparation_bandscore')->nullable();
|
||||
$table->string('preparation_date')->nullable();
|
||||
$table->text('test_name')->nullable();
|
||||
$table->string('test_score')->nullable();
|
||||
$table->string('preffered_location')->nullable();
|
||||
$table->string('intrested_for_country')->nullable();
|
||||
$table->string('intrested_course')->nullable();
|
||||
$table->string('display_order')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->enum('status', ['active', 'in_active'])->nullable();
|
||||
$table->string('user_agent')->nullable();
|
||||
$table->string('source')->nullable();
|
||||
$table->string('tracking_code')->nullable();
|
||||
$table->string('headers')->nullable();
|
||||
$table->string('coupen_code')->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->date('created_on')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_registrations');
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ChangesFieldTypeOfTblCampaigns extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('tbl_campaigns', function (Blueprint $table) {
|
||||
$table->text('ogtags')->change();
|
||||
$table->text('details')->change();
|
||||
$table->string('email_success')->nullable();
|
||||
$table->string('offered_course')->nullable();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('tbl_campaigns', function (Blueprint $table) {
|
||||
$table->dropColumn(['email_success','offered_course']);
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFollowUpsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_follow_ups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('follow_up_type');
|
||||
$table->bigInteger('refrence_id')->unsigned()->index()->nullable();
|
||||
$table->date('next_schedule')->nullable();
|
||||
$table->string('follow_up_name')->nullable();
|
||||
$table->string('follow_up_by')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->string('display_order')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->bigInteger('last_updated_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('last_updated_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_follow_ups');
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateQualificationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_qualifications', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('description',1024)->nullable();
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_qualifications');
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTestPreparationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_testpreparations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('description',1024)->nullable();
|
||||
$table->enum('status',['Active','Inactive'])->default('Active');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_testpreparations');
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLocationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_locations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug')->nullable();
|
||||
$table->string('email')->unique();
|
||||
$table->text('description')->nullable();
|
||||
$table->bigInteger('user_id')->unsigned()->index()->nullable();
|
||||
$table->string('display_order')->nullable();
|
||||
$table->text('remarks')->nullable();
|
||||
$table->enum('status',['active','in_active'])->nullable();
|
||||
$table->bigInteger('created_by')->unsigned()->index()->nullable();
|
||||
$table->foreign('created_by')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->date('created_on')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_locations');
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSettingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tbl_settings', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('slug');
|
||||
$table->longtext('value')->nullable();
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tbl_settings');
|
||||
}
|
||||
}
|
36
database/migrations/2022_08_18_063916_create_jobs_table.php
Normal file
36
database/migrations/2022_08_18_063916_create_jobs_table.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
}
|
||||
}
|
23
database/seeders/CampaignSeeder.php
Normal file
23
database/seeders/CampaignSeeder.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Modules\Models\Campaign\Campaign;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CampaignSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
Campaign::create([
|
||||
'name'=>'First Campaign',
|
||||
'alias'=>'first_campaign'
|
||||
]);
|
||||
}
|
||||
}
|
26
database/seeders/DatabaseSeeder.php
Normal file
26
database/seeders/DatabaseSeeder.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// \App\Models\User::factory(10)->create();
|
||||
$this->call(PermissionSeeder::class);
|
||||
$this->call(RoleSeeder::class);
|
||||
$this->call(UsersTableSeeder::class);
|
||||
$this->call(CampaignSeeder::class);
|
||||
$this->call(QualificationSeeder::class);
|
||||
$this->call(TestPreparationSeeder::class);
|
||||
$this->call(SettingsSeeder::class);
|
||||
$this->call(LeadCategorySeeder::class);
|
||||
}
|
||||
}
|
19
database/seeders/LeadCategorySeeder.php
Normal file
19
database/seeders/LeadCategorySeeder.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Modules\Models\LeadCategory\LeadCategory;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class LeadCategorySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
LeadCategory::create(['name'=>'New Lead', 'alias'=>'new_lead','color_code'=>'808080']);
|
||||
}
|
||||
}
|
197
database/seeders/PermissionSeeder.php
Normal file
197
database/seeders/PermissionSeeder.php
Normal file
@ -0,0 +1,197 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Spatie\Permission\Models\Permission;
|
||||
|
||||
|
||||
class PermissionSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
$permissions = [
|
||||
//permission for Permissions
|
||||
[
|
||||
"name" => "permission-index",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "permission",
|
||||
],
|
||||
[
|
||||
"name" => "permission-data",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "permission",
|
||||
],
|
||||
[
|
||||
"name" => "permission-create",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "permission",
|
||||
],
|
||||
[
|
||||
"name" => "permission-store",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "permission",
|
||||
],
|
||||
[
|
||||
"name" => "permission-show",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "permission",
|
||||
],
|
||||
[
|
||||
"name" => "permission-edit",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "permission",
|
||||
],
|
||||
[
|
||||
"name" => "permission-update",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "permission",
|
||||
],
|
||||
[
|
||||
"name" => "permission-delete",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "permission",
|
||||
],
|
||||
//permission for roles
|
||||
[
|
||||
"name" => "role-index",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "role",
|
||||
],
|
||||
[
|
||||
"name" => "role-data",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "role",
|
||||
],
|
||||
[
|
||||
"name" => "role-create",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "role",
|
||||
],
|
||||
[
|
||||
"name" => "role-store",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "role",
|
||||
],
|
||||
[
|
||||
"name" => "role-show",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "role",
|
||||
],
|
||||
[
|
||||
"name" => "role-edit",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "role",
|
||||
],
|
||||
[
|
||||
"name" => "role-update",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "role",
|
||||
],
|
||||
[
|
||||
"name" => "role-delete",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "role",
|
||||
],
|
||||
//permission for users
|
||||
[
|
||||
"name" => "user-index",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "user",
|
||||
],
|
||||
[
|
||||
"name" => "user-data",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "user",
|
||||
],
|
||||
[
|
||||
"name" => "user-create",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "user",
|
||||
],
|
||||
[
|
||||
"name" => "user-store",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "user",
|
||||
],
|
||||
[
|
||||
"name" => "user-show",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "user",
|
||||
],
|
||||
[
|
||||
"name" => "user-edit",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "user",
|
||||
],
|
||||
[
|
||||
"name" => "user-update",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "user",
|
||||
],
|
||||
[
|
||||
"name" => "user-delete",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "user",
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
//permission for registration
|
||||
[
|
||||
"name" => "registration-index",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "registration",
|
||||
],
|
||||
[
|
||||
"name" => "registration-data",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "registration",
|
||||
],
|
||||
[
|
||||
"name" => "registration-create",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "registration",
|
||||
],
|
||||
[
|
||||
"name" => "registration-store",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "registration",
|
||||
],
|
||||
[
|
||||
"name" => "registration-show",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "registration",
|
||||
],
|
||||
[
|
||||
"name" => "registration-edit",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "registration",
|
||||
],
|
||||
[
|
||||
"name" => "registration-update",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "registration",
|
||||
],
|
||||
[
|
||||
"name" => "registration-delete",
|
||||
"guard_name" => "web",
|
||||
"group_name" => "registration",
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($permissions as $permission) {
|
||||
$menu = new Permission();
|
||||
$menu->fill($permission);
|
||||
$menu->save();
|
||||
}
|
||||
}
|
||||
}
|
35
database/seeders/QualificationSeeder.php
Normal file
35
database/seeders/QualificationSeeder.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Modules\Models\Qualification\Qualification;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class QualificationSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Qualification::create(
|
||||
['name' => "A+", "description" => "A+ or Equivalent"]
|
||||
);
|
||||
Qualification::create(
|
||||
|
||||
['name' => "10+2", "description" => "+2 or Equivalent"]
|
||||
|
||||
);
|
||||
Qualification::create(
|
||||
|
||||
['name' => "Bachelors", "description" => "Bachelors or Equivalent"]
|
||||
|
||||
);
|
||||
Qualification::create(
|
||||
|
||||
['name' => "Masters", "description" => "Masters or Equivalent"]
|
||||
);
|
||||
}
|
||||
}
|
37
database/seeders/RoleSeeder.php
Normal file
37
database/seeders/RoleSeeder.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Modules\Models\Role\Role;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class RoleSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
Role::create([
|
||||
'name'=>'SuperAdmin',
|
||||
'guard_name'=>'web',
|
||||
]);
|
||||
|
||||
Role::create([
|
||||
'name'=>'Consultancy',
|
||||
'guard_name'=>'web',
|
||||
]);
|
||||
|
||||
|
||||
for ($i = 1; $i < 20; $i++)
|
||||
|
||||
DB::table('role_has_permissions')->insert([
|
||||
'permission_id'=>$i,
|
||||
'role_id'=>'1',
|
||||
]);
|
||||
}
|
||||
}
|
31
database/seeders/SettingsSeeder.php
Normal file
31
database/seeders/SettingsSeeder.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Modules\Models\Setting\Setting;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class SettingsSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Setting::create(['slug'=>'APP_LOGO','value'=>"https://storage.googleapis.com/bib-cdn/Bibhuti-LMS-2.png"]);
|
||||
Setting::create(['slug'=>'APP_NAME','value'=>"Bibhuti LMS"]);
|
||||
Setting::create(['slug'=>'APP_DESC','value'=>"Simple yet powerful Leads Management System"]);
|
||||
Setting::create(['slug'=>'APP_AUTHOR','value'=>"Bibhuti Solutions"]);
|
||||
Setting::create(['slug'=>'AUTHOR_CONTACT','value'=>"+9775706765"]);
|
||||
Setting::create(['slug'=>'SMS_API','value'=>""]);
|
||||
Setting::create(['slug'=>'SMS_TOKEN','value'=>""]);
|
||||
Setting::create(['slug'=>'SMS_FROM','value'=>""]);
|
||||
Setting::create(['slug'=>'PROJECT_TITLE','value'=>"Bibhuti LMS"]);
|
||||
Setting::create(['slug'=>'PROJECT_DESC','value'=>"Simple yet powerful Leads Management System"]);
|
||||
Setting::create(['slug'=>'PROJECT_ADDRESS','value'=>"Anamnagar, Kathmandu, Nepal"]);
|
||||
Setting::create(['slug'=>'PROJECT_MAP','value'=>"https://goo.gl/maps/LXfpWFuAsfitv58W7"]);
|
||||
|
||||
}
|
||||
}
|
21
database/seeders/TestPreparationSeeder.php
Normal file
21
database/seeders/TestPreparationSeeder.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Modules\Models\TestPreparation\TestPreparation;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class TestPreparationSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
TestPreparation::create(["name"=>"IELTS"]);
|
||||
TestPreparation::create(["name"=>"PTE"]);
|
||||
TestPreparation::create(["name"=>"None"]);
|
||||
}
|
||||
}
|
38
database/seeders/UsersTableSeeder.php
Normal file
38
database/seeders/UsersTableSeeder.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Modules\Models\Branch\Branch;
|
||||
use App\Modules\Models\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class UsersTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
|
||||
$user=User::create([
|
||||
'name'=>'SuperAdmin',
|
||||
'email'=>'admin@customer.com',
|
||||
'password'=>Hash::make('admin@customer'),
|
||||
'status' => 'active',
|
||||
]);
|
||||
$user->assignRole('SuperAdmin');
|
||||
|
||||
$prajwal = User::Create([
|
||||
'name'=>'Prajwal',
|
||||
'email'=>'prajwalbro@hotmail.com',
|
||||
'password'=>Hash::make('p@ssw0rd'),
|
||||
'status' => 'active',
|
||||
]);
|
||||
$prajwal->assignRole('SuperAdmin');
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user