I have a users table with two types 'student' or 'faculty' in type column. I would like to create two different tables from the user table for faculty and students...
I thought of creating two models for faculty and students but i can't think ahead of that on how to populate tables for these models.
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('identif')->unique();
$table->string('type');
$table->string('email')->unique();
$table->string('password', 60);
$table->rememberToken();
$table->timestamps();
//Add Primary Key
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
} }