Skip to content

Commit 07af1a2

Browse files
committed
refactor: Rename the package
this is a BREAKING CHANGE !!!
1 parent aad70f0 commit 07af1a2

File tree

374 files changed

+1382
-1342
lines changed

Some content is hidden

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

374 files changed

+1382
-1342
lines changed

.github/workflows/phpunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
node-version: 'lts/*'
8080

8181
- name: Run semantic-release
82-
if: github.repository == 'php-casbin/laravel-admin' && github.event_name == 'push'
82+
if: github.repository == 'php-panel/laravel-admin' && github.event_name == 'push'
8383
env:
8484
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
8585
run: npx semantic-release

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
</p>
1515

1616
<div align="center">
17-
<a href="https://github.com/php-casbin/laravel-admin/actions">
18-
<img src="https://github.com/php-casbin/laravel-admin/actions/workflows/phpunit.yml/badge.svg" alt="PHPUnit Status">
17+
<a href="https://github.com/php-panel/laravel-admin/actions">
18+
<img src="https://github.com/php-panel/laravel-admin/actions/workflows/phpunit.yml/badge.svg" alt="PHPUnit Status">
1919
</a>
20-
<a href="https://coveralls.io/github/php-casbin/laravel-admin">
21-
<img src="https://coveralls.io/repos/github/php-casbin/laravel-admin/badge.svg" alt="Coverage Status">
20+
<a href="https://coveralls.io/github/php-panel/laravel-admin">
21+
<img src="https://coveralls.io/repos/github/php-panel/laravel-admin/badge.svg" alt="Coverage Status">
2222
</a>
23-
<a href="https://packagist.org/packages/casbin/laravel-admin">
24-
<img src="https://poser.pugx.org/casbin/laravel-admin/v/stable" alt="Latest Stable Version">
23+
<a href="https://packagist.org/packages/php-panel/laravel-admin">
24+
<img src="https://poser.pugx.org/php-panel/laravel-admin/v/stable" alt="Latest Stable Version">
2525
</a>
26-
<a href="https://packagist.org/packages/casbin/laravel-admin">
27-
<img src="https://poser.pugx.org/casbin/laravel-admin/downloads" alt="Total Downloads">
26+
<a href="https://packagist.org/packages/php-panel/laravel-admin">
27+
<img src="https://poser.pugx.org/php-panel/laravel-admin/downloads" alt="Total Downloads">
2828
</a>
29-
<a href="https://packagist.org/packages/casbin/laravel-admin">
30-
<img src="https://poser.pugx.org/casbin/laravel-admin/license" alt="License">
29+
<a href="https://packagist.org/packages/php-panel/laravel-admin">
30+
<img src="https://poser.pugx.org/php-panel/laravel-admin/license" alt="License">
3131
</a>
3232
</div>
3333

@@ -43,13 +43,13 @@ Installation
4343
First, install laravel, and make sure that the database connection settings are correct.
4444

4545
```
46-
composer require casbin/laravel-admin
46+
composer require php-panel/laravel-admin
4747
```
4848

4949
Then run these commands to publish assets and config:
5050

5151
```
52-
php artisan vendor:publish --provider="Casbin\Admin\AdminServiceProvider"
52+
php artisan vendor:publish --provider="Ladmin\AdminServiceProvider"
5353
```
5454
After run command you can find config file in `config/admin.php`, in this file you can change the install directory, db connection or table names.
5555

@@ -66,7 +66,7 @@ The file `config/admin.php` contains an array of configurations, you can find th
6666

6767
Right to left support
6868
------------
69-
just go to this path `<YOUR_PROJECT_PATH>\vendor\casbin\laravel-admin\src\Traits\HasAssets.php` and modify `$baseCss` array for loading right to left (rtl) version of bootstap and AdminLTE css files.
69+
just go to this path `<YOUR_PROJECT_PATH>\vendor\php-panel\laravel-admin\src\Traits\HasAssets.php` and modify `$baseCss` array for loading right to left (rtl) version of bootstap and AdminLTE css files.
7070
**bootstrap.min.css** change it to **bootstrap.rtl.min.css**
7171
**AdminLTE.min.css** change it to **AdminLTE.rtl.min.css**
7272

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "casbin/laravel-admin",
2+
"name": "php-panel/laravel-admin",
33
"description": "laravel admin",
44
"type": "library",
55
"keywords": [
66
"laravel",
77
"admin",
8-
"casbin",
98
"permission",
109
"rbac",
1110
"access control",
1211
"grid",
13-
"form"
12+
"form",
13+
"php-panel"
1414
],
15-
"homepage": "https://github.com/php-casbin/laravel-admin",
15+
"homepage": "https://github.com/php-panel/laravel-admin",
1616
"license": "Apache-2.0",
1717
"authors": [
1818
{
@@ -35,7 +35,7 @@
3535
},
3636
"autoload": {
3737
"psr-4": {
38-
"Casbin\\Admin\\": "src/"
38+
"Ladmin\\": "src/"
3939
},
4040
"files": [
4141
"src/helpers.php"
@@ -51,7 +51,7 @@
5151
]
5252
},
5353
"scripts": {
54-
"test": "./vendor/bin/phpunit"
54+
"test": "XDEBUG_MODE=coverage ./vendor/bin/phpunit"
5555
},
5656
"suggest": {
5757
"intervention/image": "Required to handling and manipulation upload images (~2.3).",
@@ -60,10 +60,10 @@
6060
"extra": {
6161
"laravel": {
6262
"providers": [
63-
"Casbin\\Admin\\AdminServiceProvider"
63+
"Ladmin\\AdminServiceProvider"
6464
],
6565
"aliases": {
66-
"Admin": "Casbin\\Admin\\Facades\\Admin"
66+
"Admin": "Ladmin\\Facades\\Admin"
6767
}
6868
}
6969
}

config/admin.php

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
'providers' => [
125125
'admin' => [
126126
'driver' => 'eloquent',
127-
'model' => Casbin\Admin\Auth\Database\Administrator::class,
127+
'model' => Ladmin\Auth\Database\Administrator::class,
128128
],
129129
],
130130

@@ -177,19 +177,19 @@
177177

178178
// User tables and model.
179179
'users_table' => 'admin_users',
180-
'users_model' => Casbin\Admin\Auth\Database\Administrator::class,
180+
'users_model' => Ladmin\Auth\Database\Administrator::class,
181181

182182
// Role table and model.
183183
'roles_table' => 'admin_roles',
184-
'roles_model' => Casbin\Admin\Auth\Database\Role::class,
184+
'roles_model' => Ladmin\Auth\Database\Role::class,
185185

186186
// Permission table and model.
187187
'permissions_table' => 'admin_permissions',
188-
'permissions_model' => Casbin\Admin\Auth\Database\Permission::class,
188+
'permissions_model' => Ladmin\Auth\Database\Permission::class,
189189

190190
// Menu table and model.
191191
'menu_table' => 'admin_menu',
192-
'menu_model' => Casbin\Admin\Auth\Database\Menu::class,
192+
'menu_model' => Ladmin\Auth\Database\Menu::class,
193193

194194
// Pivot table for table above.
195195
'operation_log_table' => 'admin_operation_log',
@@ -223,7 +223,7 @@
223223
* or specific method to path like: get:admin/auth/logs.
224224
*/
225225
'except' => [
226-
env('ADMIN_ROUTE_PREFIX', 'admin').'/auth/logs*',
226+
env('ADMIN_ROUTE_PREFIX', 'admin') . '/auth/logs*',
227227
],
228228
],
229229

@@ -348,9 +348,7 @@
348348
'minify_assets' => [
349349

350350
// Assets will not be minified.
351-
'excepts' => [
352-
353-
],
351+
'excepts' => [],
354352

355353
],
356354

@@ -383,7 +381,7 @@
383381
| The global Grid action display class.
384382
|--------------------------------------------------------------------------
385383
*/
386-
'grid_action_class' => \Casbin\Admin\Grid\Displayers\DropdownActions::class,
384+
'grid_action_class' => \Ladmin\Grid\Displayers\DropdownActions::class,
387385

388386
/*
389387
|--------------------------------------------------------------------------
@@ -404,7 +402,5 @@
404402
| https://github.com/laravel-admin-extensions.
405403
|
406404
*/
407-
'extensions' => [
408-
409-
],
405+
'extensions' => [],
410406
];

docs/en/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ composer require encore/laravel-admin 1.5.*
3535
Then run these commands to publish assets and config:
3636

3737
```
38-
php artisan vendor:publish --provider="Casbin\Admin\AdminServiceProvider"
38+
php artisan vendor:publish --provider="Ladmin\AdminServiceProvider"
3939
```
4040
After run command you can find config file in `config/admin.php`, in this file you can change the install directory,db connection or table names.
4141

docs/en/content-layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The layout usage of `laravel-admin` can be found in the `index()` method of the home page's layout file [HomeController.php](https://github.com/z-song/laravel-admin/blob/master/src/Console/stubs/HomeController.stub).
44

5-
The `Casbin\Admin\Layout\Content` class is used to implement the layout of the content area. The `Content::body ($element)` method is used to add page content:
5+
The `Ladmin\Layout\Content` class is used to implement the layout of the content area. The `Content::body ($element)` method is used to add page content:
66

77
The page code for an unfilled content is as follows:
88

docs/en/custom-chart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Use `chartjs` for example, first download [chartjs](http://chartjs.org/), put it
66

77
Then import the component in `app/Admin/bootstrap.php`:
88
```php
9-
use Casbin\Admin\Facades\Admin;
9+
use Ladmin\Facades\Admin;
1010

1111
Admin::js('/vendor/chartjs/dist/Chart.min.js');
1212

docs/en/custom-navbar.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Since version `1.5.6`, you can add the html element to the top navigation bar, open `app/Admin/bootstrap.php`:
44
```php
5-
use Casbin\Admin\Facades\Admin;
5+
use Ladmin\Facades\Admin;
66

7-
Admin::navbar(function (\Casbin\Admin\Widgets\Navbar $navbar) {
7+
Admin::navbar(function (\Ladmin\Widgets\Navbar $navbar) {
88

99
$navbar->left('html...');
1010

docs/en/extension-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Open `app/Providers/AppServiceProvider.php`, and call the `Config::load()` metho
1919

2020
namespace App\Providers;
2121

22-
use Casbin\Admin\Config\Config;
22+
use Ladmin\Config\Config;
2323
use Illuminate\Support\ServiceProvider;
2424

2525
class AppServiceProvider extends ServiceProvider

docs/en/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ composer require encore/laravel-admin "1.5.*"
1111

1212
Publish assets and config with command:
1313
```
14-
php artisan vendor:publish --provider="Casbin\Admin\AdminServiceProvider"
14+
php artisan vendor:publish --provider="Ladmin\AdminServiceProvider"
1515
```
1616

1717
After runnung previous command you can find config file in `config/admin.php`, in this file you can change default install directory (```/app/Admin```), db connection or table names.

0 commit comments

Comments
 (0)