mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
login as lecturer
This commit is contained in:
@@ -4,11 +4,9 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
@@ -16,19 +14,24 @@ return new class extends Migration
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('email')
|
||||
->unique();
|
||||
$table->timestamp('email_verified_at')
|
||||
->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->foreignId('current_team_id')->nullable();
|
||||
$table->string('profile_photo_path', 2048)->nullable();
|
||||
$table->foreignId('current_team_id')
|
||||
->nullable();
|
||||
$table->string('profile_photo_path', 2048)
|
||||
->nullable();
|
||||
$table->boolean('is_lecturer')
|
||||
->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
|
||||
@@ -37,11 +37,13 @@ class DatabaseSeeder extends Seeder
|
||||
'password' => bcrypt('1234'),
|
||||
'remember_token' => Str::random(10),
|
||||
]);
|
||||
Team::create([
|
||||
$team = Team::create([
|
||||
'name' => 'Admin Team',
|
||||
'user_id' => $user->id,
|
||||
'personal_team' => true,
|
||||
]);
|
||||
$user->current_team_id = $team->id;
|
||||
$user->save();
|
||||
Country::create([
|
||||
'name' => 'Deutschland',
|
||||
'code' => 'de',
|
||||
|
||||
Reference in New Issue
Block a user