for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Arcanedev\LaravelAuth\Bases\Migration;
use Illuminate\Database\Schema\Blueprint;
/**
* Class CreatePermissionRoleTable
*
* @author ARCANEDEV <[email protected]>
* @see \Arcanedev\LaravelAuth\Models\Pivots\PermissionRole
*/
class CreateAuthPermissionRolePivotTable extends Migration
{
/* -----------------------------------------------------------------
| Constructor
| -----------------------------------------------------------------
* CreateAuthPermissionRolePivotTable constructor.
public function __construct()
parent::__construct();
$this->setTable(config('laravel-auth.permission-role.table', 'permission_role'));
}
| Main Methods
* Run the migrations.
public function up()
$this->createSchema(function (Blueprint $table) {
$table->unsignedInteger('permission_id');
$table->unsignedInteger('role_id');
$table->timestamps();
$table->primary(['permission_id', 'role_id']);
});