PHP code example of quansitech / qscmf-access-generation
1. Go to this page and download the library: Download quansitech/qscmf-access-generation library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
quansitech / qscmf-access-generation example snippets
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTestNodeData extends Migration
{
protected $nodeData = [
'ControllerName1'=>[
'testAction1' => '方法1',
'testAction2' => '方法2',
'testAction3' => '方法3',
],
'ControllerName2'=>[
'testAction1' => '方法1',
'testAction2' => '方法2',
'testAction3' => '方法3',
],
];
public function up()
{
\quansitech\dataGenerate\Node::up($this->nodeData);
}
public function down()
{
\quansitech\dataGenerate\Node::down($this->nodeData);
}
}
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTestAccessData extends Migration
{
protected $nodeData = [
'ControllerName1'=>[
'testAction1' => '方法1',
'testAction2' => '方法2',
'testAction3' => '方法3',
],
'ControllerName2'=>[
'testAction1' => '方法1',
'testAction2' => '方法2',
'testAction3' => '方法3',
],
'NewAccess'=>[
'access1' => '方法1',
'access2' => '方法2',
'access3' => '方法3',
],
];
public function up()
{
\quansitech\dataGenerate\Access::up($this->nodeData, 1);
}
public function down()
{
\quansitech\dataGenerate\Access::down($this->nodeData, 1);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.