<?php

namespace App\Http\Controllers;

use App\Models\Tenants\Tenant;

class PermissionController extends Controller
{
    /**
     * 권한 목록 화면
     */
    public function index()
    {
        return view('permissions.index');
    }

    /**
     * 권한 생성 화면
     */
    public function create()
    {
        $tenants = Tenant::orderBy('company_name')->get();

        return view('permissions.create', compact('tenants'));
    }

    /**
     * 권한 수정 화면
     */
    public function edit($id)
    {
        $tenants = Tenant::orderBy('company_name')->get();

        return view('permissions.edit', compact('id', 'tenants'));
    }
}
