-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c2a9620
Showing
6 changed files
with
282 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Laravel.php Adminer | ||
|
||
on: push | ||
|
||
jobs: | ||
cd: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: cd | ||
uses: tripteki/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repotoken: ${{ secrets.REPOSITORY_TOKEN }} | ||
repouser: tripteki | ||
repository: https://packagist.org | ||
language: php | ||
artifact: composer.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Trip Teknologi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<h1 align="center">Adminer</h1> | ||
|
||
This package provides drivers, helpers, repositories, endpoints starterpack implementation of basic features for facilitate developing admin menagement modules in your codebase, built by applying (concepts) like `Test Driven Development` `Event-Listener Driven Development` `Async-like (Queue)` `Cached`, (design principle) `RESTful API` `Tight Cohesion & Loose Coupling` `SOLID`, (design pattern) `Gangs of Four (GoF) Repository Pattern`. <br /> | ||
Click one of packages and follow the instruction to get started. | ||
|
||
### 📃 Packages | ||
|
||
<table style="width: 100%; border: none;"> | ||
<tr> | ||
<th>No</th> | ||
<th>Repository</th> | ||
<th>Description</th> | ||
</tr> | ||
<tr> | ||
<td>1</td> | ||
<td> | ||
<a href="https://github.com/tripteki/laravelphp-user">laravelphp-user</a><br /> | ||
</td> | ||
<td>User Management</td> | ||
</tr> | ||
<tr> | ||
<td>2</td> | ||
<td> | ||
<a href="https://github.com/tripteki/laravelphp-setting">laravelphp-setting</a><br /> | ||
</td> | ||
<td>Setting Management</td> | ||
</tr> | ||
<tr> | ||
<td>3</td> | ||
<td> | ||
<a href="https://github.com/tripteki/laravelphp-setting-profile">laravelphp-setting-profile</a><br /> | ||
</td> | ||
<td>Setting per-User Variable Environment Management</td> | ||
</tr> | ||
<tr> | ||
<td>4</td> | ||
<td> | ||
<a href="https://github.com/tripteki/laravelphp-setting-locale">laravelphp-setting-locale</a><br /> | ||
</td> | ||
<td>Setting per-User i18n Management</td> | ||
</tr> | ||
<tr> | ||
<td>5</td> | ||
<td> | ||
<a href="https://github.com/tripteki/laravelphp-setting-menu">laravelphp-setting-menu</a><br /> | ||
</td> | ||
<td>Setting per-User Menu Management</td> | ||
</tr> | ||
<tr> | ||
<td>6</td> | ||
<td> | ||
<a href="https://github.com/tripteki/laravelphp-acl">laravelphp-acl</a><br /> | ||
</td> | ||
<td>Access Control List (granted or denied) Management</td> | ||
</tr> | ||
<tr> | ||
<td>7</td> | ||
<td> | ||
<a href="https://github.com/tripteki/laravelphp-log">laravelphp-log</a><br /> | ||
</td> | ||
<td>Logging Management</td> | ||
</tr> | ||
<td>8</td> | ||
<td> | ||
<a href="https://github.com/tripteki/laravelphp-notification">laravelphp-notification</a><br /> | ||
</td> | ||
<td>Notification Management</td> | ||
</tr> | ||
</table> | ||
|
||
Getting Started | ||
--- | ||
|
||
Installation : | ||
|
||
``` | ||
$ composer require tripteki/laravelphp-adminer | ||
``` | ||
|
||
How to use it : | ||
|
||
- Put `Tripteki\Adminer\Providers\AdminerServiceProvider` to service provider configuration list. | ||
|
||
- Put `Tripteki\Adminer\Providers\AdminerServiceProvider::ignoreConfig()` into `register` provider, then publish config file into your project's directory with running (optionally) : | ||
|
||
``` | ||
php artisan vendor:publish --tag=tripteki-laravelphp-adminer-configs | ||
``` | ||
|
||
Author | ||
--- | ||
|
||
- Trip Teknologi ([@tripteki](https://linkedin.com/company/tripteki)) | ||
- Hasby Maulana ([@hsbmaulana](https://linkedin.com/in/hsbmaulana)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "tripteki/laravelphp-adminer", | ||
"version": "1.0.0", | ||
"description": "Trip Teknologi's Laravel.php Adminer", | ||
|
||
"readme": "README.md", | ||
"license": "MIT", | ||
"authors": [ { "name": "Trip Teknologi", "email": "[email protected]" } ], | ||
"homepage": "https://github.com/tripteki/laravelphp-adminer", | ||
"support": { "issues": "https://github.com/tripteki/laravelphp-adminer/issues" }, | ||
|
||
"require": { | ||
|
||
"php": "^8.0.2" | ||
}, | ||
|
||
"require-dev": {}, | ||
|
||
"suggest": { | ||
|
||
"laravel/lumen-framework": "Required when using lumen framework (^9.0).", | ||
"laravel/framework": "Required when using laravel framework (^9.0)." | ||
}, | ||
|
||
"autoload": { | ||
|
||
"psr-4": { | ||
|
||
"Tripteki\\Adminer\\": "src/" | ||
} | ||
}, | ||
|
||
"autoload-dev": {}, | ||
|
||
"extra": { | ||
|
||
"laravel": { | ||
|
||
"dont-discover": [], | ||
|
||
"providers": [ | ||
|
||
"Tripteki\\Adminer\\Providers\\AdminerServiceProvider" | ||
], | ||
|
||
"aliases": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
* Route prefix. | ||
* | ||
* Default global prefix "/api" scope. | ||
*/ | ||
"route" => [ | ||
|
||
/* | ||
* Route prefix for admin scope. | ||
*/ | ||
"admin" => "admin", | ||
|
||
/* | ||
* Route prefix for user scope. | ||
*/ | ||
"user" => null, // "auth:web" // | ||
], | ||
|
||
/* | ||
* Middleware. | ||
*/ | ||
"middleware" => [ | ||
|
||
/* | ||
* Middleware for admin scope. | ||
*/ | ||
"admin" => [ "api", ], | ||
|
||
/* | ||
* Middleware for user scope. | ||
*/ | ||
"user" => [ "api", "auth:api", ], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
|
||
namespace Tripteki\Adminer\Providers; | ||
|
||
use Tripteki\Adminer\Console\Commands\InstallCommand; | ||
use Illuminate\Support\ServiceProvider; | ||
|
||
class AdminerServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* @var bool | ||
*/ | ||
public static $loadConfig = true; | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public static function shouldLoadConfig() | ||
{ | ||
return static::$loadConfig; | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
public static function ignoreConfig() | ||
{ | ||
static::$loadConfig = false; | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
public function boot() | ||
{ | ||
$this->registerConfigs(); | ||
$this->registerPublishers(); | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
protected function registerConfigs() | ||
{ | ||
if (static::shouldLoadConfig()) { | ||
|
||
$this->mergeConfigFrom(__DIR__."/../../config/adminer.php", "adminer"); | ||
} | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
protected function registerPublishers() | ||
{ | ||
$this->publishes( | ||
[ | ||
__DIR__."/../../config/adminer.php" => config_path("adminer.php"), | ||
], | ||
|
||
"tripteki-laravelphp-adminer-configs"); | ||
} | ||
}; |