Commit 3f554084 by Muhammad Iskandar Java

Merge branch 'master' of http://git.unesa.ac.id/farendi/simlitabmas into master

parents 179c2f19 a6f9c06f
......@@ -15,6 +15,7 @@ class PenelitiAsingController extends Controller
public function index()
{
//
return view('user.penelitiasing.index');
}
/**
......
......@@ -14,7 +14,8 @@ class CreateUsersTable extends Migration
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
//$table->id();
$table->uuid('id');
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
......
......@@ -15,7 +15,7 @@ class CreateSessionsTable extends Migration
{
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->foreignUuid('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->text('payload');
......
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePermissionTables extends Migration
{
......@@ -21,28 +21,32 @@ class CreatePermissionTables extends Migration
}
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name'); // For MySQL 8.0 use string('name', 125);
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
// $table->bigIncrements('id');
$table->uuid('id');
$table->string('name');
$table->string('guard_name');
$table->timestamps();
$table->unique(['name', 'guard_name']);
$table->primary('id');
});
Schema::create($tableNames['roles'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name'); // For MySQL 8.0 use string('name', 125);
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
// $table->bigIncrements('id');
$table->uuid('id');
$table->string('name');
$table->string('guard_name');
$table->timestamps();
$table->unique(['name', 'guard_name']);
$table->primary('id');
});
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) {
$table->unsignedBigInteger('permission_id');
// $table->unsignedBigInteger('permission_id');
$table->uuid('permission_id');
$table->string('model_type');
$table->unsignedBigInteger($columnNames['model_morph_key']);
// $table->unsignedBigInteger($columnNames['model_morph_key']);
$table->uuid($columnNames['model_morph_key']);
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
$table->foreign('permission_id')
......@@ -50,15 +54,19 @@ class CreatePermissionTables extends Migration
->on($tableNames['permissions'])
->onDelete('cascade');
$table->primary(['permission_id', $columnNames['model_morph_key'], 'model_type'],
'model_has_permissions_permission_model_type_primary');
$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->unsignedBigInteger('role_id');
$table->uuid('role_id');
$table->string('model_type');
$table->unsignedBigInteger($columnNames['model_morph_key']);
$table->uuid($columnNames['model_morph_key']);
// $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')
......@@ -66,13 +74,17 @@ class CreatePermissionTables extends Migration
->on($tableNames['roles'])
->onDelete('cascade');
$table->primary(['role_id', $columnNames['model_morph_key'], 'model_type'],
'model_has_roles_role_model_type_primary');
$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->unsignedBigInteger('permission_id');
// $table->unsignedBigInteger('role_id');
$table->uuid('permission_id');
$table->uuid('role_id');
$table->foreign('permission_id')
->references('id')
......
......@@ -32,7 +32,7 @@
<a href="{{ url('dosen') }}"> Dosen Perguruan Tinggi </a>
</li>
<li>
<a href="{{ url('penlitiasing') }}"> Peneliti Asing </a>
<a href="{{ url('penelitiasing') }}"> Peneliti Asing </a>
</li>
<li>
<a href="{{ url('stafpendukung') }}"> Sumber Daya Staf Pendukung </a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment