Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita0ece39

Browse files
committed
add: admin extension
1 parent1c27870 commita0ece39

File tree

7 files changed

+458
-51
lines changed

7 files changed

+458
-51
lines changed

‎app/Console/Commands/InstallCommand.php‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespaceApp\Console\Commands;
44

55
useEncore\Admin\Auth\Database\Administrator;
6+
useEncore\Admin\Auth\Database\Menu;
67
useIlluminate\Console\Command;
78

89
class InstallCommandextends Command
@@ -48,5 +49,22 @@ public function installAdmin()
4849
if (Administrator::count() ==0) {
4950
$this->call('db:seed', ['--class' => \Encore\Admin\Auth\Database\AdminTablesSeeder::class]);
5051
}
52+
// admin extension
53+
if (Menu::where('title','=','Helpers')->count() ==0) {
54+
$this->call('admin:import', ['helpers']);
55+
}
56+
57+
if (Menu::where('title','=','Api tester')->count() ==0) {
58+
$this->call('admin:import', ['api-tester']);
59+
}
60+
61+
if (Menu::where('title','=','Log viwer')->count() ==0) {
62+
$this->call('admin:import', ['log-viewer']);
63+
}
64+
65+
if (Menu::where('title','=','Media manager')->count() ==0) {
66+
$this->call('admin:import', ['media-manager']);
67+
}
68+
5169
}
5270
}

‎composer.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"php":">=7.0.0",
99
"encore/laravel-admin":"^1.5",
1010
"fideloper/proxy":"~3.3",
11+
"laravel-admin-ext/api-tester":"^1.0",
12+
"laravel-admin-ext/helpers":"^1.0",
13+
"laravel-admin-ext/log-viewer":"^1.0",
14+
"laravel-admin-ext/media-manager":"^1.0",
1115
"laravel/framework":"5.5.*",
1216
"laravel/tinker":"~1.0"
1317
},

‎composer.lock‎

Lines changed: 220 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎config/admin.php‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,24 @@
151151
* Settings for extensions.
152152
*/
153153
'extensions' => [
154-
154+
'api-tester' => [
155+
156+
// route prefix for APIs
157+
'prefix' =>'api',
158+
159+
// auth guard for api
160+
'guard' =>'api',
161+
162+
// If you are not using the default user model as the authentication model, set it up
163+
'user_retriever' =>function ($id) {
164+
return \App\User::find($id);
165+
},
166+
],
167+
168+
'media-manager' => [
169+
170+
// Select a local disk that you configured in `config/filesystem.php`
171+
'disk' =>'public'
172+
],
155173
],
156174
];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp