change telephone id for every user
This commit is contained in:
@@ -25,7 +25,8 @@ return new class extends Migration
|
||||
$table->string('province_fa');
|
||||
$table->string('email')->unique()->nullable();
|
||||
$table->dateTime('last_login')->nullable();
|
||||
$table->string('telephone_id')->unique();
|
||||
$table->string('telephone_id')->unique()->nullable();
|
||||
$table->boolean('is_online');
|
||||
$table->rememberToken()->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
@@ -15,25 +15,15 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->string('telephone_id');
|
||||
$table->string('caller_phone_number');
|
||||
|
||||
$table->foreignId('province_id')
|
||||
->nullable()
|
||||
->constrained();
|
||||
$table->foreignId('province_id')->nullable()->constrained();
|
||||
$table->string('province_fa')->nullable();
|
||||
|
||||
$table->foreignId('operator_id')
|
||||
->nullable()
|
||||
->constrained('users');
|
||||
|
||||
$table->foreignId('operator_id')->nullable()->constrained('users');
|
||||
$table->string('operator_username')->nullable();
|
||||
$table->string('operator_full_name')->nullable();
|
||||
|
||||
$table->unsignedSmallInteger('category_id')->nullable();
|
||||
$table->string('category_name')->nullable();
|
||||
|
||||
$table->unsignedSmallInteger('subcategory_id')->nullable();
|
||||
$table->string('subcategory_name')->nullable();
|
||||
|
||||
$table->text('description')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Permission;
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class RoleSeeder extends Seeder
|
||||
{
|
||||
@@ -12,6 +16,16 @@ class RoleSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
//
|
||||
$role = Role::query()->create([
|
||||
'id' => 1,
|
||||
'name' => 'super-admin',
|
||||
'name_fa' => 'ادمین',
|
||||
'guard_name' => 'web',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now()
|
||||
]);
|
||||
|
||||
$role->givePermissionTo(Permission::all());
|
||||
User::query()->where('username', '=', 'witel')->first()->assignRole('super-admin');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user