Skip to content

Commit b28e07f

Browse files
committed
Initialize project
1 parent 0ed7842 commit b28e07f

File tree

204 files changed

+189607
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+189607
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.php linguist-language=PHP
2+
*.js linguist-language=PHP

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/node_modules
2+
vendor
3+
.idea
4+
build
5+
.lock
6+
composer.lock
7+
.phpunit.result.cache
8+
npm-debug.log
9+
yarn-error.log

.scrutinizer.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
filter:
2+
excluded_paths: [tests/*]
3+
checks:
4+
php:
5+
code_rating: true
6+
remove_extra_empty_lines: true
7+
remove_php_closing_tag: true
8+
remove_trailing_whitespace: true
9+
fix_use_statements:
10+
remove_unused: true
11+
preserve_multiple: false
12+
preserve_blanklines: true
13+
order_alphabetically: true
14+
fix_php_opening_tag: true
15+
fix_linefeed: true
16+
fix_line_ending: true
17+
fix_identation_4spaces: true
18+
fix_doc_comments: true
19+
tools:
20+
external_code_coverage:
21+
timeout: 600
22+
runs: 2

.travis.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
language: php
2+
3+
php:
4+
- '7.2'
5+
- '7.3'
6+
7+
cache:
8+
directories:
9+
- $HOME/.composer/cache
10+
- node_modules
11+
12+
before_script:
13+
- travis_retry composer self-update
14+
- travis_retry composer update --prefer-lowest --prefer-source --no-interaction
15+
16+
script:
17+
- phpunit --coverage-text --coverage-clover=coverage.clover
18+
19+
after_script:
20+
- wget https://scrutinizer-ci.com/ocular.phar
21+
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
22+
23+
notifications:
24+
on_success: never
25+
on_failure: always

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 CodexShaper
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

composer.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "codexshaper/laravel-database-manager",
3+
"description": "Laravel Database Manager",
4+
"type": "library",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Md Abu Ahsan Basir",
9+
"email": "maab.career@gmail.com"
10+
}
11+
],
12+
"minimum-stability": "dev",
13+
"require": {
14+
"php": "^7.2",
15+
"doctrine/dbal": "^2.10",
16+
"laravel/passport": "^8.0",
17+
"codexshaper/database-backup-restore": "^1.1"
18+
},
19+
"require-dev": {
20+
"phpunit/phpunit": "^8.0"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"CodexShaper\\DBM\\": "src/"
25+
}
26+
},
27+
"autoload-dev": {
28+
"psr-4": {
29+
"CodexShaper\\DBM\\": "src/",
30+
"CodexShaper\\DBM\\Test\\": "tests/"
31+
}
32+
},
33+
"extra": {
34+
"laravel": {
35+
"providers": [
36+
"CodexShaper\\DBM\\ManagerServiceProvider"
37+
],
38+
"aliases": {
39+
"DBM": "CodexShaper\\DBM\\Facades\\Manager"
40+
}
41+
}
42+
}
43+
}

config/dbm.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
return [
3+
'prefix' => '/admin',
4+
'namespace' => '\CodexShaper\DBM',
5+
'controller_namespace' => '\CodexShaper\DBM\Http\Controllers',
6+
'resources_path' => 'package/laravel-database-manager/publishable/assets/',
7+
'views' => 'package/laravel-database-manager/publishable/views',
8+
'modal_namespace' => 'App\\\\',
9+
'filesystem' => [
10+
'random_length' => 32,
11+
],
12+
'backup' => [
13+
'dump_path' => "c:\\\\xampp\\\\mysql\\\\bin\\\\mysqldump",
14+
'restore_path' => "c:\\\\xampp\\\\mysql\\\\bin\\\\mysql",
15+
'dir' => 'backups',
16+
],
17+
'user' => [
18+
'model' => 'App\\User',
19+
'table' => 'users',
20+
'local_key' => 'id',
21+
'display_name' => 'name',
22+
],
23+
'permission' => [
24+
25+
],
26+
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
class CreateDBMFieldsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('dbm_fields', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->bigInteger('dbm_object_id')->unsigned();
19+
$table->string('name');
20+
$table->string('display_name');
21+
$table->string('type')->nullable();
22+
$table->boolean('required')->default(false);
23+
$table->boolean('create')->default(true);
24+
$table->boolean('read')->default(true);
25+
$table->boolean('edit')->default(true);
26+
$table->boolean('delete')->default(true);
27+
$table->integer('order')->unsigned();
28+
$table->text('extra')->nullable();
29+
$table->timestamps();
30+
});
31+
}
32+
33+
/**
34+
* Reverse the migrations.
35+
*
36+
* @return void
37+
*/
38+
public function down()
39+
{
40+
Schema::dropIfExists('dbm_fields');
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
class CreateDBMObjectsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('dbm_objects', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->string('name');
19+
$table->string('slug')->unique();
20+
$table->string('display_name');
21+
$table->string('model')->nullable();
22+
$table->string('controller')->nullable();
23+
$table->text('details');
24+
$table->timestamps();
25+
});
26+
}
27+
28+
/**
29+
* Reverse the migrations.
30+
*
31+
* @return void
32+
*/
33+
public function down()
34+
{
35+
Schema::dropIfExists('dbm_fields');
36+
}
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
class CreateDBMTemplatesTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('dbm_templates', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->string('name');
19+
$table->string('old_name');
20+
$table->string('type');
21+
$table->integer('length')->nullable();
22+
$table->string('index')->nullable();
23+
$table->string('default')->nullable();
24+
$table->boolean('notnull')->default(false);
25+
$table->boolean('unsigned')->default(true);
26+
$table->boolean('auto_increment')->default(true);
27+
$table->timestamps();
28+
});
29+
}
30+
31+
/**
32+
* Reverse the migrations.
33+
*
34+
* @return void
35+
*/
36+
public function down()
37+
{
38+
Schema::dropIfExists('dbm_templates');
39+
}
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
class CreateDBMPermissionsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('dbm_permissions', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->string('name');
19+
$table->string('slug');
20+
$table->string('prefix');
21+
$table->timestamps();
22+
});
23+
}
24+
25+
/**
26+
* Reverse the migrations.
27+
*
28+
* @return void
29+
*/
30+
public function down()
31+
{
32+
Schema::dropIfExists('dbm_permissions');
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
class CreateDBMUserPermissionsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('dbm_user_permissions', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->bigInteger("user_id");
19+
$table->bigInteger("dbm_permission_id");
20+
$table->timestamps();
21+
});
22+
}
23+
24+
/**
25+
* Reverse the migrations.
26+
*
27+
* @return void
28+
*/
29+
public function down()
30+
{
31+
Schema::dropIfExists('dbm_user_permissions');
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
class CreateDBMCollectionsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('dbm_collections', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->string('name')->unique();
19+
$table->string('old_name');
20+
$table->text('extra')->nullable();
21+
$table->timestamps();
22+
});
23+
}
24+
25+
/**
26+
* Reverse the migrations.
27+
*
28+
* @return void
29+
*/
30+
public function down()
31+
{
32+
Schema::dropIfExists('dbm_collections');
33+
}
34+
}

0 commit comments

Comments
 (0)