Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function up()
- {
- Schema::create('users', function (Blueprint $table) {
- $table->increments('id');
- $table->string('name');
- $table->string('email')->unique();
- $table->string('password');
- $table->rememberToken();
- $table->timestamps();
- $table->string('section');
- $table->string('type');
- });
- }
- public function up()
- {
- Schema::create('staffs', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->string('nama');
- $table->string('emel')->unique();
- $table->string('seksyen');
- $table->string('jawatan');
- $table->string('alamat');
- $table->string('no kakitangan');
- });
- $data['data'] = DB::table('staffs')
- ->join('users', 'users.section', '=', 'staffs.seksyen')
- ->where('seksyen','=','Auth(section)')->get();
Add Comment
Please, Sign In to add comment