repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/AdminPermission.php
app/AdminPermission.php
<?php namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Collection; class AdminPermission extends Model { protected $fillable = ['name', 'routes']; // public function roles() { return $this->belongsToMany(AdminRole::class); } protected function setRoutesAttribute($routes) { if (!($routes instanceof Collection)) { $routes = new Collection($routes); } $this->attributes['routes'] = $routes->implode(','); } protected function getRoutesAttribute($routeStr) { return new Collection(explode(',', $routeStr)); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/AdminMenu.php
app/AdminMenu.php
<?php namespace App; use App\Scopes\SortScope; use Illuminate\Database\Eloquent\Model; class AdminMenu extends Model { protected $fillable = ['name', 'url', 'icon', 'sort', 'pid']; protected static function boot() { parent::boot(); static::addGlobalScope(new SortScope); } // public function roles() { return $this->belongsToMany(AdminRole::class); } /** * 无限分级菜单,获取下一级菜单 * */ public function children() { return $this->hasMany(self::class, 'pid'); } /** * 无限分级菜单,获取上一级菜单 * */ public function parent() { return $this->belongsTo(self::class, 'pid'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/AdminRole.php
app/AdminRole.php
<?php namespace App; use App\AdminUser; use Illuminate\Database\Eloquent\Model; class AdminRole extends Model { // protected $fillable = ['name', 'description']; public function users() { return $this->belongsToMany(AdminUser::class); } public function menus() { return $this->belongsToMany(AdminMenu::class); } public function permissions() { return $this->belongsToMany(AdminPermission::class); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/AdminConfig.php
app/AdminConfig.php
<?php namespace App; use Illuminate\Database\Eloquent\Model; class AdminConfig extends Model { protected $fillable = ['name', 'config_key', 'config_value', 'type']; // public static function getValue($key) { $instance = new static; if (is_array($key)) { $result = $instance->whereIn('config_key', $key)->get(); if ($result) { $data = $result->flatMap(function ($config) { return [$config->config_key => $config->config_value]; })->toArray(); } else { $data = []; } return $data; } else { $result = $instance->where('config_key', $key)->first(); if (!$result) { return null; } return $result->config_value; } } public function scopeSearchCondition($query, string $keyword = null) { if (is_null($keyword)) { return $query; } else { return $query->where("config_key", "like", "%{$keyword}%") ->orWhere("name", "like", "%{$keyword}%"); } } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Scopes/SortScope.php
app/Scopes/SortScope.php
<?php namespace App\Scopes; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Scope; class SortScope implements Scope { /** * 排序约束 * * @param \Illuminate\Database\Eloquent\Builder $builder * @param \Illuminate\Database\Eloquent\Model $model * @return void */ public function apply(Builder $builder, Model $model) { $builder->orderBy('sort', 'DESC'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Exceptions/Handler.php
app/Exceptions/Handler.php
<?php namespace App\Exceptions; use Exception; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Support\Facades\Config; class Handler extends ExceptionHandler { /** * A list of the exception types that are not reported. * * @var array */ protected $dontReport = [ // ]; /** * A list of the inputs that are never flashed for validation exceptions. * * @var array */ protected $dontFlash = [ 'password', 'password_confirmation', ]; /** * Report or log an exception. * * @param \Exception $exception * @return void */ public function report(Exception $exception) { parent::report($exception); } /** * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request * @param \Exception $exception * @return \Illuminate\Http\Response */ public function render($request, Exception $exception) { if (Config::get('app.debug') === false) { if ($request->ajax()) { $message = $exception->getMessage(); $line = $exception->getLine(); $file = $exception->getFile(); $code = $exception->getCode(); return response()->json(['code' => 500, 'msg' => '请求发生错误!', 'data' => [ 'code' => $code, 'line' => $line, 'file' => $file, 'message' => $message, ]]); } else { return response()->view('base.404'); } } return parent::render($request, $exception); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Kernel.php
app/Http/Kernel.php
<?php namespace App\Http; use Illuminate\Foundation\Http\Kernel as HttpKernel; class Kernel extends HttpKernel { /** * The application's global HTTP middleware stack. * * These middleware are run during every request to your application. * * @var array */ protected $middleware = [ \App\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, \App\Http\Middleware\TrustProxies::class, ]; /** * The application's route middleware groups. * * @var array */ protected $middlewareGroups = [ 'web' => [ \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, // \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, ], 'api' => [ 'throttle:60,1', 'bindings', ], ]; /** * The application's route middleware. * * These middleware may be assigned to groups or used individually. * * @var array */ protected $routeMiddleware = [ 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 'rbac' => \App\Http\Middleware\Rbac::class, 'session.check' => \App\Http\Middleware\CheckSession::class, 'install.check' => \App\Http\Middleware\CheckInstall::class, ]; }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Controllers/Controller.php
app/Http/Controllers/Controller.php
<?php namespace App\Http\Controllers; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; class Controller extends BaseController { use AuthorizesRequests, DispatchesJobs, ValidatesRequests; /** * @Author woann <304550409@qq.com> * @param int $code * @param string $msg * @param array $data * @return mixed * @description 接口返回数据格式 */ protected function json($code = 200, $msg = '', $data = []) { if ($data == []) { $res = [ 'code' => $code, 'msg' => $msg, ]; } else { $res = [ 'code' => $code, 'msg' => $msg, 'data' => $data, ]; } return response()->json($res)->header('Content-Type', 'application/json; charset=UTF-8'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Controllers/InstallController.php
app/Http/Controllers/InstallController.php
<?php namespace App\Http\Controllers; use App\AdminUser; use App\Utility\Install; use Illuminate\Container\Container; use Illuminate\Http\Request; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Route; class InstallController extends Controller { const DEFAULT_MYSQL_PORT = 3306; // public function index(Request $request) { if (Install::hasLock()) { return Container::getInstance() ->make('redirect') ->to('/login'); } else { return view('base.install', ['errorMsg' => '']); } } public function setEnviroment(Request $request) { $host = $request->input('mysqlHost', 'localhost'); if (strpos($host, ':') !== false) { list($host, $port) = explode(':', $host); } else { $port = self::DEFAULT_MYSQL_PORT; } $port = intval($port); $port = $port ? $port : self::DEFAULT_MYSQL_PORT; $mysqlUsername = $request->input('mysqlUsername', 'homestead'); $mysqlPassword = $request->input('mysqlPassword', 'secret'); $mysqlDatabase = $request->input('mysqlDatabase', 'homestead'); $mysqlPrefix = $request->input('mysqlPrefix', ''); //将配置写入env $data = new Collection([ 'DB_PORT' => $port, 'DB_DATABASE' => $mysqlDatabase, 'DB_USERNAME' => $mysqlUsername, 'DB_PASSWORD' => $mysqlPassword, 'DB_HOST' => $host, 'DB_PREFIX' => $mysqlPrefix, ]); $contents = Install::getEnvFileDic(); $contents = $contents->merge($data); Install::saveEnvFileDic($contents); return $this->json(200, 'success'); } public function startInstall(Request $request) { $adminUsername = $request->input('adminUsername', 'admin'); $adminPassword = $request->input('adminPassword', 'admin'); $adminPasswordAgain = $request->input('adminPasswordAgain', 'admin'); if ($adminPassword !== $adminPasswordAgain) { return $this->json(400, '管理员密码不一致'); } Artisan::call('migrate:fresh'); Artisan::call('db:seed'); // 账户信息修改 $admin = AdminUser::find(1); $admin->account = $adminUsername; $admin->password = $adminPassword; $admin->save(); // 安装锁 Install::lock(); return $this->json(200, 'success'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Controllers/Admin/AdministratorController.php
app/Http/Controllers/Admin/AdministratorController.php
<?php /** * Created by PhpStorm. * Author: woann <304550409@qq.com> * Date: 18-10-26下午1:23 * Desc: 管理员 */ namespace App\Http\Controllers\Admin; use App\AdminMenu; use App\AdminPermission; use App\AdminRole; use App\AdminUser; use App\Http\Controllers\Controller; use App\Utility\Rbac; use Illuminate\Http\Request; use Illuminate\Support\Collection; class AdministratorController extends Controller { /** * @Desc: 菜单列表 * @Author: woann <304550409@qq.com> * @return \Illuminate\View\View */ public function menuList() { // 获取一级菜单 return view('admin.menu', ['list' => AdminMenu::where('pid', 0)->get()]); } /** * @Desc: 添加菜单 * @Author: woann <304550409@qq.com> * @param Request $request * @return \Illuminate\View\View */ public function menuAddView(Request $request) { $roles = AdminRole::get(); $topMenu = AdminMenu::where('pid', 0)->get(); return view('admin.menu_add', ['roles' => $roles, 'top_menu' => $topMenu]); } public function menuAdd(Request $request) { $data = $request->except(['role', 's']); $roles = new Collection($request->input('roles')); if ($roles->isEmpty()) { return $this->json(500, '未选择任何角色'); } $menu = new AdminMenu(); $menu->fill($data); $menu->save(); // 保存菜单所属角色 $roles->map(function ($roleId) use ($menu) { $role = AdminRole::find($roleId); $menu->roles()->attach($role); }); return $this->json(200, '添加成功'); } /** * @Desc: 修改菜单 * @Author: woann <304550409@qq.com> * @param Request $request * @param $id * @return \Illuminate\View\View */ public function menuUpdateView(Request $request, $id) { $roles = AdminRole::get(); $menu = AdminMenu::findOrFail($id); $roles->map(function ($role) use ($menu) { $menu->roles->each(function ($mRole) use (&$role) { if ($mRole->id === $role->id) { $role->checked = true; } }); return $role; }); $topMenu = AdminMenu::where('pid', 0)->get(); return view('admin.menu_update', [ 'roles' => $roles, 'top_menu' => $topMenu, 'menu' => $menu, ]); } public function menuUpdate(Request $request, $id) { $menu = AdminMenu::findOrFail($id); $roles = new Collection($request->input('roles')); if ($roles->isEmpty()) { return $this->json(500, '未选择任何角色'); } // 基础信息更新 $data = $request->except(['role', 's']); $menu->fill($data)->save(); // 删除原有关联数据 $menu->roles()->detach(); // 重新关联数据 $roles->each(function ($roleId) use ($menu) { $role = AdminRole::find($roleId); $menu->roles()->attach($role); }); return $this->json(200, '修改成功'); } /** * @Desc: 删除菜单 * @Author: woann <304550409@qq.com> * @param $id * @return mixed */ public function menuDel($id) { $menu = AdminMenu::findOrFail($id); $menu->roles()->detach(); $menu->delete(); return $this->json(200, '删除成功'); } public function roleList() { return view('admin.role', [ 'list' => AdminRole::paginate(10), ]); } /** * @Desc: 添加角色 * @Author: woann <304550409@qq.com> * @param Request $request * @return \Illuminate\View\View */ public function roleAddView(Request $request) { return view('admin.role_add', [ 'permissions' => AdminPermission::get(), ]); } public function roleAdd(Request $request) { $param = $request->post(); $role = new AdminRole(); $role->fill($param); $role->save(); if (isset($param['permissions'])) { (new Collection($param['permissions']))->map(function ($permissionId) use ($role) { $permission = AdminPermission::find($permissionId); $role->permissions()->attach($permission); }); } return $this->json(200, "添加成功"); } /** * @Desc: 修改角色 * @Author: woann <304550409@qq.com> * @param Request $request * @param $id * @return \Illuminate\View\View */ public function roleUpdateView(Request $request, $id) { $role = AdminRole::findOrFail($id); $permissions = AdminPermission::get(); $permissions->map(function ($permission) use ($role) { $permission->checked = false; $role->permissions->each(function ($rPermission) use ($role, &$permission) { if ($rPermission->id === $permission->id) { $permission->checked = true; return false; } }); return $permission; }); return view('admin.role_update', ['role' => $role, 'permissions' => $permissions]); } public function roleUpdate(Request $request, $id) { $param = $request->post(); $role = AdminRole::findOrFail($id); $role->fill($param); $role->save(); // 删除所有权限关联 $role->permissions()->detach(); // 录入权限关联 if (isset($param['permissions'])) { (new Collection($param['permissions']))->map(function ($permissionId) use ($role) { $permission = AdminPermission::find($permissionId); $role->permissions()->attach($permission); }); } return $this->json(200, "修改成功"); } /** * @Desc: 删除角色 * @Author: woann <304550409@qq.com> * @param $id * @return mixed */ public function roleDel($id) { if ($id == 1) { return $this->json(500, '超级管理员不可删除'); } $role = AdminRole::findOrFail($id); // 删除所有多对多关系 $role->users()->detach(); $role->menus()->detach(); $role->permissions()->detach(); $role->delete(); return $this->json(200, '删除成功'); } /** * @return mixed * 权限列表 */ public function permissionList() { return view('admin.permission', [ 'list' => AdminPermission::get(), ]); } /** * @param Request $request * @return mixed * 添加权限 */ public function permissionAddView(Request $request) { //渲染页面 $routes = Rbac::getAllRoutes(); return view('admin.permission_add', ['routes' => $routes]); } public function permissionAdd(Request $request) { $data = $request->post(); $permission = new AdminPermission(); $permission->fill($data); $permission->save(); return $this->json(200, '添加成功'); } /** * @param Request $request * @param $id * @return mixed * 修改权限 */ public function permissionUpdateView(Request $request, $id) { $permission = AdminPermission::findOrFail($id); $rbacRoutes = Rbac::getAllRoutes(); $checkRoutes = $permission->routes->map(function ($route) { $routeObj = new \StdClass(); $routeObj->rbacRule = $route; return $routeObj; }); $uncheckRoutes = new Collection(); $rbacRoutes->each(function ($route) use ($permission, $checkRoutes, &$uncheckRoutes) { $uncheckFlag = true; $checkRoutes->each(function ($checkRoute) use ($route, &$uncheckFlag) { if ($route->rbacRule === $checkRoute->rbacRule) { $uncheckFlag = false; } }); if ($uncheckFlag) { $uncheckRoutes->push($route); } }); return view('admin.permission_update', [ 'permission' => $permission, 'uncheck_routes' => $uncheckRoutes, 'check_routes' => $checkRoutes, ]); } public function permissionUpdate(Request $request, $id) { $data = $request->post(); $permission = AdminPermission::findOrFail($id); $permission->fill($data); $permission->save(); return $this->json(200, '修改成功'); } /** * @return mixed * 删除权限 */ public function permissionDel($id) { $permission = AdminPermission::findOrFail($id); // 解除所有多对多关系 $permission->roles()->detach(); $permission->delete(); return $this->json(200, '删除成功'); } /** * @return mixed * 管理员列表 */ public function administratorList() { return view('admin.administrator', [ 'admins' => AdminUser::paginate(10), ]); } /** * @param Request $request * @return mixed * 添加管理员 */ public function administratorAddView(Request $request) { $roles = AdminRole::select('id', 'name')->get(); return view('admin.administrator_add', ['roles' => $roles]); } public function administratorAdd(Request $request) { $post = $request->post(); $roles = (new Collection($request->post('roles'))); if (AdminUser::isExist($post['account'])) { return $this->json(500, '该账号已存在'); } $admin = new AdminUser(); $admin->fill($post); $admin->save(); $roles->map(function ($roleId) use ($admin) { $role = AdminRole::find($roleId); $admin->roles()->attach($role); }); return $this->json(200, '添加成功'); } public function administratorUpdateView(Request $request, $id) { $roles = AdminRole::select('id', 'name')->get(); $admin = AdminUser::findOrFail($id); $selectRoleIdArr = []; $admin->roles->map(function ($role) use (&$selectRoleIdArr) { $selectRoleIdArr[] = $role->id; }); return view('admin.administrator_update', [ 'admin' => $admin, 'roles' => $roles, 's_role_id_arr' => $selectRoleIdArr, ]); } public function administratorUpdate(Request $request, $id) { $post = $request->post(); $roles = (new Collection($request->post('roles'))); $admin = AdminUser::findOrFail($id); if ($admin->isExistForUpdate($post['account'])) { return $this->json(500, '该账号已存在'); } $admin->fill($post)->save(); // 删除用户的所有关联角色 $admin->roles()->detach(); $roles->map(function ($roleId) use ($admin) { $role = AdminRole::find($roleId); $admin->roles()->attach($role); }); return $this->json(200, '修改成功'); } /** * @return mixed * 删除管理员 */ public function administratorDel($id) { $admin = AdminUser::findOrFail($id); // 解除管理员角色多对多关系 $admin->roles()->detach(); $admin->delete(); return $this->json(200, '删除成功'); } /** * @param Request $request * @return mixed * 后台登录 */ public function login(Request $request) { return view('admin.login'); } public function checkLogin(Request $request) { $post = $request->post(); if (empty($post['account'])) { return $this->json(500, '请输入账号!'); } if (empty($post['password'])) { return $this->json(500, '请输入密码!'); } $admin = AdminUser::where('account', $post['account'])->first(); if (empty($admin)) { return $this->json(500, '账号不存在!'); } if (!password_verify($post['password'], $admin->password)) { return $this->json(500, '密码输入不正确!'); } $request->session()->put('admin', $admin); return $this->json(200, '登录成功!'); } /** * @param Request $request * @param $id * @return mixed * 修改信息 */ public function editInfoView(Request $request, $id) { return view('admin.edit_info', ['admin' => AdminUser::findOrFail($id)]); } public function editInfo(Request $request, $id) { $post = $request->post(); $admin = AdminUser::findOrFail($id); $admin->fill($post); $admin->save(); $request->session()->put('admin', $admin); return $this->json(200, '修改成功'); } /** * @param Request $request * @return mixed * 退出登录 */ public function logout(Request $request) { $request->session()->flush(); return redirect('/login'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Controllers/Admin/IndexController.php
app/Http/Controllers/Admin/IndexController.php
<?php namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Storage; class IndexController extends Controller { public function index() { $admin = session('admin'); $menuList = $admin->getMenus(); return view('admin.index', ['menu' => $menuList]); } public function console() { return view('admin.console'); } /** * @Desc: 后台图片上传 * @Author: woann <304550409@qq.com> * @param Request $request * @return mixed */ public function upload(Request $request) { $file = $request->file('image'); $path = $request->input('path') . '/'; if ($file) { if ($file->isValid()) { $size = $file->getSize(); if ($size > 5000000) { return $this->json(500, '图片不能大于5M!'); } // 获取文件相关信息 $ext = $file->getClientOriginalExtension(); // 扩展名 if (!in_array($ext, ['png', 'jpg', 'gif', 'jpeg', 'pem'])) { return $this->json(500, '文件类型不正确!'); } $realPath = $file->getRealPath(); //临时文件的绝对路径 // 上传文件 $filename = $path . date('Ymd') . '/' . uniqid() . '.' . $ext; // 使用我们新建的uploads本地存储空间(目录) $bool = Storage::disk('admin')->put($filename, file_get_contents($realPath)); if ($bool) { return $this->json(200, '上传成功', ['filename' => '/uploads/' . $filename]); } else { return $this->json(500, '上传失败!'); } } else { return $this->json(500, '文件类型不正确!'); } } else { return $this->json(500, '上传失败!'); } } /** * @Desc: 富文本上传图片 * @Author: woann <304550409@qq.com> * @param Request $request */ public function wangeditorUpload(Request $request) { $file = $request->file('wangEditorH5File'); if ($file) { if ($file->isValid()) { // 获取文件相关信息 $ext = $file->getClientOriginalExtension(); // 扩展名 $realPath = $file->getRealPath(); //临时文件的绝对路径 // 上传文件 $filename = date('Ymd') . '/' . uniqid() . '.' . $ext; // 使用我们新建的uploads本地存储空间(目录) $bool = Storage::disk('admin')->put('/wangeditor/' . $filename, file_get_contents($realPath)); if ($bool) { echo asset('/uploads/wangeditor/' . $filename); } else { echo 'error|上传失败'; } } else { echo 'error|上传失败'; } } else { echo 'error|图片类型不正确'; } } /** * @Desc: 无权限界面 * @Author: woann <304550409@qq.com> * @return \Illuminate\View\View */ public function noPermission() { return view('base.403'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Controllers/Admin/ConfigController.php
app/Http/Controllers/Admin/ConfigController.php
<?php namespace App\Http\Controllers\Admin; use App\AdminConfig; use App\Http\Controllers\Controller; use Illuminate\Http\Request; class ConfigController extends Controller { /** * @Desc: 配置列表 * @Author: woann <304550409@qq.com> * @param Request $request * @return \Illuminate\View\View */ public function configList(Request $request) { $wd = $request->input('wd'); $list = AdminConfig::searchCondition($wd)->paginate(10); return view('admin.config', ['list' => $list, 'wd' => $wd]); } /** * @Desc: 添加配置 * @Author: woann <304550409@qq.com> * @param Request $request * @return \Illuminate\View\View */ public function configAddView(Request $request) { return view('admin.config_add'); } public function configAdd(Request $request) { $data = $request->post(); $config = new AdminConfig(); $config->fill($data)->save(); return $this->json(200, '添加成功'); } /** * @Desc: 修改配置信息 * @Author: woann <304550409@qq.com> * @param Request $request * @param $id * @return \Illuminate\View\View */ public function configUpdateView(Request $request, $id) { return view('admin.config_update', ['config' => AdminConfig::findOrFail($id)]); } public function configUpdate(Request $request, $id) { $config = AdminConfig::findOrFail($id); $data = $request->post(); $config->fill($data); $config->save(); return $this->json(200, '修改成功'); } /** * @Desc: 删除配置 * @Author: woann <304550409@qq.com> * @param $id * @return mixed */ public function configDel($id) { AdminConfig::findOrFail($id)->delete(); return $this->json(200, '删除成功'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/CheckInstall.php
app/Http/Middleware/CheckInstall.php
<?php namespace App\Http\Middleware; use App\Utility\Install; use Closure; use Illuminate\Container\Container; class CheckInstall { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if (Install::hasLock()) { return $next($request); } else { return Container::getInstance() ->make('redirect') ->route('installView'); } } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/Rbac.php
app/Http/Middleware/Rbac.php
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Support\Facades\Route; class Rbac { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $guard * @return mixed */ public function handle($request, Closure $next) { $admin = $request->session()->get('admin'); //获取当前管理员角色 $roles = $admin->roles; if ($roles->isEmpty()) { return redirect('403'); } //通过角色获取当前管理员所有权限 $permissionRoutes = $admin->getPermissionRoutes(); $currentRule = Route::current()->methods[0] . ':' . Route::current()->uri; if ($permissionRoutes->contains($currentRule) === false) { return redirect('403'); } //判断当前路由是否属于该管理员的权限 return $next($request); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/Authenticate.php
app/Http/Middleware/Authenticate.php
<?php namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; class Authenticate extends Middleware { /** * Get the path the user should be redirected to when they are not authenticated. * * @param \Illuminate\Http\Request $request * @return string */ protected function redirectTo($request) { if (! $request->expectsJson()) { return route('login'); } } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/RedirectIfAuthenticated.php
app/Http/Middleware/RedirectIfAuthenticated.php
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Support\Facades\Auth; class RedirectIfAuthenticated { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $guard * @return mixed */ public function handle($request, Closure $next, $guard = null) { if (Auth::guard($guard)->check()) { return redirect('/home'); } return $next($request); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/TrustProxies.php
app/Http/Middleware/TrustProxies.php
<?php namespace App\Http\Middleware; use Illuminate\Http\Request; use Fideloper\Proxy\TrustProxies as Middleware; class TrustProxies extends Middleware { /** * The trusted proxies for this application. * * @var array */ protected $proxies; /** * The headers that should be used to detect proxies. * * @var int */ protected $headers = Request::HEADER_X_FORWARDED_ALL; }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/CheckSession.php
app/Http/Middleware/CheckSession.php
<?php namespace App\Http\Middleware; use App\AdminUser; use Closure; class CheckSession { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if (!$request->session()->has('admin')) { return redirect('/login'); } $admin = $request->session()->get('admin'); if (!($admin instanceof AdminUser)) { return redirect('/login'); } return $next($request); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/TrimStrings.php
app/Http/Middleware/TrimStrings.php
<?php namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; class TrimStrings extends Middleware { /** * The names of the attributes that should not be trimmed. * * @var array */ protected $except = [ 'password', 'password_confirmation', ]; }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/CheckForMaintenanceMode.php
app/Http/Middleware/CheckForMaintenanceMode.php
<?php namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware; class CheckForMaintenanceMode extends Middleware { /** * The URIs that should be reachable while maintenance mode is enabled. * * @var array */ protected $except = [ // ]; }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/EncryptCookies.php
app/Http/Middleware/EncryptCookies.php
<?php namespace App\Http\Middleware; use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; class EncryptCookies extends Middleware { /** * The names of the cookies that should not be encrypted. * * @var array */ protected $except = [ // ]; }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Http/Middleware/VerifyCsrfToken.php
app/Http/Middleware/VerifyCsrfToken.php
<?php namespace App\Http\Middleware; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; class VerifyCsrfToken extends Middleware { /** * Indicates whether the XSRF-TOKEN cookie should be set on the response. * * @var bool */ protected $addHttpCookie = true; /** * The URIs that should be excluded from CSRF verification. * * @var array */ protected $except = [ "/admin/wangeditor/upload" ]; }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Console/Kernel.php
app/Console/Kernel.php
<?php namespace App\Console; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { /** * The Artisan commands provided by your application. * * @var array */ protected $commands = [ // ]; /** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { // $schedule->command('inspire') // ->hourly(); } /** * Register the commands for the application. * * @return void */ protected function commands() { $this->load(__DIR__.'/Commands'); // require base_path('routes/console.php'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Utility/Rbac.php
app/Utility/Rbac.php
<?php namespace App\Utility; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Route; class Rbac { public static function getAllRoutes(): Collection { return (new Collection(Route::getRoutes())) ->filter(function ($route) { $actions = $route->getAction(); return isset($actions['as']) && $actions['as'] === 'rbac'; }) ->map(function ($route) { $method = $route->methods[0]; $route->rbacRule = "{$method}:{$route->uri}"; return $route; }); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Utility/Install.php
app/Utility/Install.php
<?php namespace App\Utility; use Dotenv\Dotenv; use Illuminate\Container\Container; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Storage; class Install { const INSTALL_FILE = '.' . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'install.lock'; public static function hasLock() { return file_exists(self::getInstallLockPath()); } public static function lock() { touch(self::getInstallLockPath()); } public static function getEnvFileDic() { $contents = new Collection(file(self::getEnvFilePath())); $contentDic = $contents->reduce(function ($contentDic, $content) { if (is_string($content) && $content !== PHP_EOL) { $explodeArr = explode('=', str_replace(PHP_EOL, '', $content)); if (count($explodeArr) > 1) { list($key, $value) = $explodeArr; } else { $key = $explodeArr[0]; $value = ''; } $contentDic[$key] = $value; } return $contentDic; }, []); return new Collection($contentDic); } public static function saveEnvFileDic(Collection $contents) { $contentArray = $contents->map(function ($value, $index) { return "{$index}={$value}"; })->toArray(); $content = implode($contentArray, PHP_EOL); file_put_contents(self::getEnvFilePath(), $content); } private static function getEnvFilePath() { return Container::getInstance()->environmentPath() . DIRECTORY_SEPARATOR . Container::getInstance()->environmentFile(); } private static function getInstallLockPath() { return Container::getInstance() ->make('path.storage') . DIRECTORY_SEPARATOR . self::INSTALL_FILE; } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Utility/functions.php
app/Utility/functions.php
<?php use App\AdminConfig; function validateURL($URL) { $pattern = "/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/"; if (preg_match($pattern, $URL)) { return true; } else { return false; } } /** * @Desc: 获取配置值 * @Author: woann <304550409@qq.com> * @param $key * @return array */ function getConfig($key) { return AdminConfig::getValue($key); }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Providers/BroadcastServiceProvider.php
app/Providers/BroadcastServiceProvider.php
<?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Broadcast; class BroadcastServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { Broadcast::routes(); require base_path('routes/channels.php'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Providers/RouteServiceProvider.php
app/Providers/RouteServiceProvider.php
<?php namespace App\Providers; use Illuminate\Support\Facades\Route; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; class RouteServiceProvider extends ServiceProvider { /** * This namespace is applied to your controller routes. * * In addition, it is set as the URL generator's root namespace. * * @var string */ protected $namespace = 'App\Http\Controllers'; /** * Define your route model bindings, pattern filters, etc. * * @return void */ public function boot() { // parent::boot(); } /** * Define the routes for the application. * * @return void */ public function map() { $this->mapApiRoutes(); $this->mapWebRoutes(); // } /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes() { Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); } /** * Define the "api" routes for the application. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::prefix('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Providers/EventServiceProvider.php
app/Providers/EventServiceProvider.php
<?php namespace App\Providers; use Illuminate\Support\Facades\Event; use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; class EventServiceProvider extends ServiceProvider { /** * The event listener mappings for the application. * * @var array */ protected $listen = [ Registered::class => [ SendEmailVerificationNotification::class, ], ]; /** * Register any events for your application. * * @return void */ public function boot() { parent::boot(); // } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Providers/AppServiceProvider.php
app/Providers/AppServiceProvider.php
<?php namespace App\Providers; use Illuminate\Support\Facades\Schema; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { // Schema::defaultStringLength(191); } /** * Register any application services. * * @return void */ public function register() { // } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/app/Providers/AuthServiceProvider.php
app/Providers/AuthServiceProvider.php
<?php namespace App\Providers; use Illuminate\Support\Facades\Gate; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; class AuthServiceProvider extends ServiceProvider { /** * The policy mappings for the application. * * @var array */ protected $policies = [ 'App\Model' => 'App\Policies\ModelPolicy', ]; /** * Register any authentication / authorization services. * * @return void */ public function boot() { $this->registerPolicies(); // } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/bootstrap/app.php
bootstrap/app.php
<?php /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | The first thing we will do is create a new Laravel application instance | which serves as the "glue" for all the components of Laravel, and is | the IoC container for the system binding all of the various parts. | */ $app = new Illuminate\Foundation\Application( realpath(__DIR__.'/../') ); /* |-------------------------------------------------------------------------- | Bind Important Interfaces |-------------------------------------------------------------------------- | | Next, we need to bind some important interfaces into the container so | we will be able to resolve them when needed. The kernels serve the | incoming requests to this application from both the web and CLI. | */ $app->singleton( Illuminate\Contracts\Http\Kernel::class, App\Http\Kernel::class ); $app->singleton( Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class ); $app->singleton( Illuminate\Contracts\Debug\ExceptionHandler::class, App\Exceptions\Handler::class ); /* |-------------------------------------------------------------------------- | Return The Application |-------------------------------------------------------------------------- | | This script returns the application instance. The instance is given to | the calling script so we can separate the building of the instances | from the actual running of the application and sending responses. | */ return $app;
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/tests/TestCase.php
tests/TestCase.php
<?php namespace Tests; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase { use CreatesApplication; }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/tests/CreatesApplication.php
tests/CreatesApplication.php
<?php namespace Tests; use Illuminate\Contracts\Console\Kernel; trait CreatesApplication { /** * Creates the application. * * @return \Illuminate\Foundation\Application */ public function createApplication() { $app = require __DIR__.'/../bootstrap/app.php'; $app->make(Kernel::class)->bootstrap(); return $app; } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/tests/Feature/ExampleTest.php
tests/Feature/ExampleTest.php
<?php namespace Tests\Feature; use Tests\TestCase; use Illuminate\Foundation\Testing\RefreshDatabase; class ExampleTest extends TestCase { /** * A basic test example. * * @return void */ public function testBasicTest() { $response = $this->get('/'); $response->assertStatus(200); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/tests/Unit/ExampleTest.php
tests/Unit/ExampleTest.php
<?php namespace Tests\Unit; use Tests\TestCase; use Illuminate\Foundation\Testing\RefreshDatabase; class ExampleTest extends TestCase { /** * A basic test example. * * @return void */ public function testBasicTest() { $this->assertTrue(true); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/routes/web.php
routes/web.php
<?php use Illuminate\Support\Facades\Route; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ /** * 需要加入 rbac 控制的路由置于此处 */ Route::group([ 'middleware' => ['install.check', 'session.check', 'rbac'], 'as' => 'rbac', ], function ($route) { //控制台 $route->get('console', 'Admin\IndexController@console'); $route->group(['prefix' => 'admin'], function ($route) { //菜单管理 $route->get('menu/list', 'Admin\AdministratorController@menuList'); $route->get('menu/add', 'Admin\AdministratorController@menuAddView'); $route->post('menu/add', 'Admin\AdministratorController@menuAdd'); $route->get('menu/update/{id}', 'Admin\AdministratorController@menuUpdateView'); $route->post('menu/update/{id}', 'Admin\AdministratorController@menuUpdate'); $route->post('menu/del/{id}', 'Admin\AdministratorController@menuDel'); //角色管理 $route->get('role/list', 'Admin\AdministratorController@roleList'); $route->get('role/add', 'Admin\AdministratorController@roleAddView'); $route->post('role/add', 'Admin\AdministratorController@roleAdd'); $route->get('role/update/{id}', 'Admin\AdministratorController@roleUpdateView'); $route->post('role/update/{id}', 'Admin\AdministratorController@roleUpdate'); $route->post('role/del/{id}', 'Admin\AdministratorController@roleDel'); //权限管理 $route->get('permission/list', 'Admin\AdministratorController@permissionList'); $route->get('permission/add', 'Admin\AdministratorController@permissionAddView'); $route->post('permission/add', 'Admin\AdministratorController@permissionAdd'); $route->get('permission/update/{id}', 'Admin\AdministratorController@permissionUpdateView'); $route->post('permission/update/{id}', 'Admin\AdministratorController@permissionUpdate'); $route->post('permission/del/{id}', 'Admin\AdministratorController@permissionDel'); //管理员管理 $route->get('administrator/list', 'Admin\AdministratorController@administratorList'); $route->get('administrator/add', 'Admin\AdministratorController@administratorAddView'); $route->post('administrator/add', 'Admin\AdministratorController@administratorAdd'); $route->get('administrator/update/{id}', 'Admin\AdministratorController@administratorUpdateView'); $route->post('administrator/update/{id}', 'Admin\AdministratorController@administratorUpdate'); $route->post('administrator/del/{id}', 'Admin\AdministratorController@administratorDel'); //配置管理 $route->get('config/list', 'Admin\ConfigController@configList'); $route->get('config/add', 'Admin\ConfigController@configAddView'); $route->post('config/add', 'Admin\ConfigController@configAdd'); $route->get('config/update/{id}', 'Admin\ConfigController@configUpdateView'); $route->post('config/update/{id}', 'Admin\ConfigController@configUpdate'); $route->post('config/del/{id}', 'Admin\ConfigController@configDel'); }); }); Route::group([ 'middleware' => ['install.check', 'session.check'], 'as' => 'base', ], function ($route) { //框架 $route->get('/', 'Admin\IndexController@index'); //403无访问权限 $route->get('403', 'Admin\IndexController@noPermission'); //修改个人信息 $route->get('edit/info/{id}', 'Admin\AdministratorController@editInfoView'); $route->post('edit/info/{id}', 'Admin\AdministratorController@editInfo'); //图片上传 $route->post('admin/upload', 'Admin\IndexController@upload'); $route->post('admin/wangeditor/upload', 'Admin\IndexController@wangeditorUpload'); //退出登录 $route->get('logout', 'Admin\AdministratorController@logout'); }); Route::group([ 'middleware' => ['install.check'], 'as' => 'base', ], function ($route) { // 登录 $route->get('login', 'Admin\AdministratorController@login'); $route->post('login', 'Admin\AdministratorController@checkLogin'); }); // 图标库(开发者用) Route::get('icon', function () { return view('admin.icon'); }); // 安装向导 Route::get('install', 'InstallController@index')->name('installView'); Route::post('install/1', 'InstallController@setEnviroment')->name('setEnviroment'); Route::post('install/2', 'InstallController@startInstall')->name('startInstall');
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/routes/api.php
routes/api.php
<?php $router->post('/set_callback_url', 'Admin\VideoController@setCallbackUrl');
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/public/index.php
public/index.php
<?php /** * Laravel - A PHP Framework For Web Artisans * * @package Laravel * @author Taylor Otwell <taylor@laravel.com> */ define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- | Register The Auto Loader |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loader for | our application. We just need to utilize it! We'll simply require it | into the script here so that we don't have to worry about manual | loading any of our classes later on. It feels great to relax. | */ require __DIR__ . '/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- | Turn On The Lights |-------------------------------------------------------------------------- | | We need to illuminate PHP development, so let us turn on the lights. | This bootstraps the framework and gets it ready for use, then it | will load up this application so that we can run it and send | the responses back to the browser and delight our users. | */ $app = require_once __DIR__ . '/../bootstrap/app.php'; /* |-------------------------------------------------------------------------- | Run The Application |-------------------------------------------------------------------------- | | Once we have the application, we can handle the incoming request | through the kernel, and send the associated response back to | the client's browser allowing them to enjoy the creative | and wonderful application we have prepared for them. | */ $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $response = $kernel->handle( $request = Illuminate\Http\Request::capture() ); $response->send(); $kernel->terminate($request, $response);
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/app.php
config/app.php
<?php return [ /* |-------------------------------------------------------------------------- | Application Name |-------------------------------------------------------------------------- | | This value is the name of your application. This value is used when the | framework needs to place the application's name in a notification or | any other location as required by the application or its packages. | */ 'name' => env('APP_NAME', 'Laravel'), /* |-------------------------------------------------------------------------- | Application Environment |-------------------------------------------------------------------------- | | This value determines the "environment" your application is currently | running in. This may determine how you prefer to configure various | services the application utilizes. Set this in your ".env" file. | */ 'env' => env('APP_ENV', 'production'), /* |-------------------------------------------------------------------------- | Application Debug Mode |-------------------------------------------------------------------------- | | When your application is in debug mode, detailed error messages with | stack traces will be shown on every error that occurs within your | application. If disabled, a simple generic error page is shown. | */ 'debug' => env('APP_DEBUG', false), /* |-------------------------------------------------------------------------- | Application URL |-------------------------------------------------------------------------- | | This URL is used by the console to properly generate URLs when using | the Artisan command line tool. You should set this to the root of | your application so that it is used when running Artisan tasks. | */ 'url' => env('APP_URL', 'http://localhost'), /* |-------------------------------------------------------------------------- | Application Timezone |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which | will be used by the PHP date and date-time functions. We have gone | ahead and set this to a sensible default for you out of the box. | */ 'timezone' => 'PRC', /* |-------------------------------------------------------------------------- | Application Locale Configuration |-------------------------------------------------------------------------- | | The application locale determines the default locale that will be used | by the translation service provider. You are free to set this value | to any of the locales which will be supported by the application. | */ 'locale' => 'en', /* |-------------------------------------------------------------------------- | Application Fallback Locale |-------------------------------------------------------------------------- | | The fallback locale determines the locale to use when the current one | is not available. You may change the value to correspond to any of | the language folders that are provided through your application. | */ 'fallback_locale' => 'en', /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | This key is used by the Illuminate encrypter service and should be set | to a random, 32 character string, otherwise these encrypted strings | will not be safe. Please do this before deploying an application! | */ 'key' => env('APP_KEY'), 'cipher' => 'AES-256-CBC', /* |-------------------------------------------------------------------------- | Autoloaded Service Providers |-------------------------------------------------------------------------- | | The service providers listed here will be automatically loaded on the | request to your application. Feel free to add your own services to | this array to grant expanded functionality to your applications. | */ 'providers' => [ /* * Laravel Framework Service Providers... */ Illuminate\Auth\AuthServiceProvider::class, Illuminate\Broadcasting\BroadcastServiceProvider::class, Illuminate\Bus\BusServiceProvider::class, Illuminate\Cache\CacheServiceProvider::class, Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, Illuminate\Cookie\CookieServiceProvider::class, Illuminate\Database\DatabaseServiceProvider::class, Illuminate\Encryption\EncryptionServiceProvider::class, Illuminate\Filesystem\FilesystemServiceProvider::class, Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class, Illuminate\Mail\MailServiceProvider::class, Illuminate\Notifications\NotificationServiceProvider::class, Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class, Illuminate\Redis\RedisServiceProvider::class, Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, Illuminate\Session\SessionServiceProvider::class, Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, /* * Package Service Providers... */ /* * Application Service Providers... */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, ], /* |-------------------------------------------------------------------------- | Class Aliases |-------------------------------------------------------------------------- | | This array of class aliases will be registered when this application | is started. However, feel free to register as many as you wish as | the aliases are "lazy" loaded so they don't hinder performance. | */ 'aliases' => [ 'App' => Illuminate\Support\Facades\App::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Auth' => Illuminate\Support\Facades\Auth::class, 'Blade' => Illuminate\Support\Facades\Blade::class, 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 'Bus' => Illuminate\Support\Facades\Bus::class, 'Cache' => Illuminate\Support\Facades\Cache::class, 'Config' => Illuminate\Support\Facades\Config::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Crypt' => Illuminate\Support\Facades\Crypt::class, 'DB' => Illuminate\Support\Facades\DB::class, 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'Event' => Illuminate\Support\Facades\Event::class, 'File' => Illuminate\Support\Facades\File::class, 'Gate' => Illuminate\Support\Facades\Gate::class, 'Hash' => Illuminate\Support\Facades\Hash::class, 'Lang' => Illuminate\Support\Facades\Lang::class, 'Log' => Illuminate\Support\Facades\Log::class, 'Mail' => Illuminate\Support\Facades\Mail::class, 'Notification' => Illuminate\Support\Facades\Notification::class, 'Password' => Illuminate\Support\Facades\Password::class, 'Queue' => Illuminate\Support\Facades\Queue::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class, 'Redis' => Illuminate\Support\Facades\Redis::class, 'Request' => Illuminate\Support\Facades\Request::class, 'Response' => Illuminate\Support\Facades\Response::class, 'Route' => Illuminate\Support\Facades\Route::class, 'Schema' => Illuminate\Support\Facades\Schema::class, 'Session' => Illuminate\Support\Facades\Session::class, 'Storage' => Illuminate\Support\Facades\Storage::class, 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/logging.php
config/logging.php
<?php use Monolog\Handler\StreamHandler; return [ /* |-------------------------------------------------------------------------- | Default Log Channel |-------------------------------------------------------------------------- | | This option defines the default log channel that gets used when writing | messages to the logs. The name specified in this option should match | one of the channels defined in the "channels" configuration array. | */ 'default' => env('LOG_CHANNEL', 'stack'), /* |-------------------------------------------------------------------------- | Log Channels |-------------------------------------------------------------------------- | | Here you may configure the log channels for your application. Out of | the box, Laravel uses the Monolog PHP logging library. This gives | you a variety of powerful log handlers / formatters to utilize. | | Available Drivers: "single", "daily", "slack", "syslog", | "errorlog", "monolog", | "custom", "stack" | */ 'channels' => [ 'stack' => [ 'driver' => 'stack', 'channels' => ['single'], ], 'single' => [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), 'level' => 'debug', ], 'daily' => [ 'driver' => 'daily', 'path' => storage_path('logs/laravel.log'), 'level' => 'debug', 'days' => 7, ], 'slack' => [ 'driver' => 'slack', 'url' => env('LOG_SLACK_WEBHOOK_URL'), 'username' => 'Laravel Log', 'emoji' => ':boom:', 'level' => 'critical', ], 'stderr' => [ 'driver' => 'monolog', 'handler' => StreamHandler::class, 'with' => [ 'stream' => 'php://stderr', ], ], 'syslog' => [ 'driver' => 'syslog', 'level' => 'debug', ], 'errorlog' => [ 'driver' => 'errorlog', 'level' => 'debug', ], ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/session.php
config/session.php
<?php return [ /* |-------------------------------------------------------------------------- | Default Session Driver |-------------------------------------------------------------------------- | | This option controls the default session "driver" that will be used on | requests. By default, we will use the lightweight native driver but | you may specify any of the other wonderful drivers provided here. | | Supported: "file", "cookie", "database", "apc", | "memcached", "redis", "array" | */ 'driver' => env('SESSION_DRIVER', 'file'), /* |-------------------------------------------------------------------------- | Session Lifetime |-------------------------------------------------------------------------- | | Here you may specify the number of minutes that you wish the session | to be allowed to remain idle before it expires. If you want them | to immediately expire on the browser closing, set that option. | */ 'lifetime' => env('SESSION_LIFETIME', 120), 'expire_on_close' => false, /* |-------------------------------------------------------------------------- | Session Encryption |-------------------------------------------------------------------------- | | This option allows you to easily specify that all of your session data | should be encrypted before it is stored. All encryption will be run | automatically by Laravel and you can use the Session like normal. | */ 'encrypt' => false, /* |-------------------------------------------------------------------------- | Session File Location |-------------------------------------------------------------------------- | | When using the native session driver, we need a location where session | files may be stored. A default has been set for you but a different | location may be specified. This is only needed for file sessions. | */ 'files' => storage_path('framework/sessions'), /* |-------------------------------------------------------------------------- | Session Database Connection |-------------------------------------------------------------------------- | | When using the "database" or "redis" session drivers, you may specify a | connection that should be used to manage these sessions. This should | correspond to a connection in your database configuration options. | */ 'connection' => env('SESSION_CONNECTION', null), /* |-------------------------------------------------------------------------- | Session Database Table |-------------------------------------------------------------------------- | | When using the "database" session driver, you may specify the table we | should use to manage the sessions. Of course, a sensible default is | provided for you; however, you are free to change this as needed. | */ 'table' => 'sessions', /* |-------------------------------------------------------------------------- | Session Cache Store |-------------------------------------------------------------------------- | | When using the "apc" or "memcached" session drivers, you may specify a | cache store that should be used for these sessions. This value must | correspond with one of the application's configured cache stores. | */ 'store' => env('SESSION_STORE', null), /* |-------------------------------------------------------------------------- | Session Sweeping Lottery |-------------------------------------------------------------------------- | | Some session drivers must manually sweep their storage location to get | rid of old sessions from storage. Here are the chances that it will | happen on a given request. By default, the odds are 2 out of 100. | */ 'lottery' => [2, 100], /* |-------------------------------------------------------------------------- | Session Cookie Name |-------------------------------------------------------------------------- | | Here you may change the name of the cookie used to identify a session | instance by ID. The name specified here will get used every time a | new session cookie is created by the framework for every driver. | */ 'cookie' => env( 'SESSION_COOKIE', str_slug(env('APP_NAME', 'laravel'), '_').'_session' ), /* |-------------------------------------------------------------------------- | Session Cookie Path |-------------------------------------------------------------------------- | | The session cookie path determines the path for which the cookie will | be regarded as available. Typically, this will be the root path of | your application but you are free to change this when necessary. | */ 'path' => '/', /* |-------------------------------------------------------------------------- | Session Cookie Domain |-------------------------------------------------------------------------- | | Here you may change the domain of the cookie used to identify a session | in your application. This will determine which domains the cookie is | available to in your application. A sensible default has been set. | */ 'domain' => env('SESSION_DOMAIN', null), /* |-------------------------------------------------------------------------- | HTTPS Only Cookies |-------------------------------------------------------------------------- | | By setting this option to true, session cookies will only be sent back | to the server if the browser has a HTTPS connection. This will keep | the cookie from being sent to you if it can not be done securely. | */ 'secure' => env('SESSION_SECURE_COOKIE', false), /* |-------------------------------------------------------------------------- | HTTP Access Only |-------------------------------------------------------------------------- | | Setting this value to true will prevent JavaScript from accessing the | value of the cookie and the cookie will only be accessible through | the HTTP protocol. You are free to modify this option if needed. | */ 'http_only' => true, /* |-------------------------------------------------------------------------- | Same-Site Cookies |-------------------------------------------------------------------------- | | This option determines how your cookies behave when cross-site requests | take place, and can be used to mitigate CSRF attacks. By default, we | do not enable this as other CSRF protection services are in place. | | Supported: "lax", "strict" | */ 'same_site' => null, ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/queue.php
config/queue.php
<?php return [ /* |-------------------------------------------------------------------------- | Default Queue Connection Name |-------------------------------------------------------------------------- | | Laravel's queue API supports an assortment of back-ends via a single | API, giving you convenient access to each back-end using the same | syntax for every one. Here you may define a default connection. | */ 'default' => env('QUEUE_CONNECTION', 'sync'), /* |-------------------------------------------------------------------------- | Queue Connections |-------------------------------------------------------------------------- | | Here you may configure the connection information for each server that | is used by your application. A default configuration has been added | for each back-end shipped with Laravel. You are free to add more. | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" | */ 'connections' => [ 'sync' => [ 'driver' => 'sync', ], 'database' => [ 'driver' => 'database', 'table' => 'jobs', 'queue' => 'default', 'retry_after' => 90, ], 'beanstalkd' => [ 'driver' => 'beanstalkd', 'host' => 'localhost', 'queue' => 'default', 'retry_after' => 90, ], 'sqs' => [ 'driver' => 'sqs', 'key' => env('SQS_KEY', 'your-public-key'), 'secret' => env('SQS_SECRET', 'your-secret-key'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 'queue' => env('SQS_QUEUE', 'your-queue-name'), 'region' => env('SQS_REGION', 'us-east-1'), ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', 'queue' => 'default', 'retry_after' => 90, 'block_for' => null, ], ], /* |-------------------------------------------------------------------------- | Failed Queue Jobs |-------------------------------------------------------------------------- | | These options configure the behavior of failed queue job logging so you | can control which database and table are used to store the jobs that | have failed. You may change them to any database / table you wish. | */ 'failed' => [ 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/cache.php
config/cache.php
<?php return [ /* |-------------------------------------------------------------------------- | Default Cache Store |-------------------------------------------------------------------------- | | This option controls the default cache connection that gets used while | using this caching library. This connection is used when another is | not explicitly specified when executing a given caching function. | | Supported: "apc", "array", "database", "file", "memcached", "redis" | */ 'default' => env('CACHE_DRIVER', 'file'), /* |-------------------------------------------------------------------------- | Cache Stores |-------------------------------------------------------------------------- | | Here you may define all of the cache "stores" for your application as | well as their drivers. You may even define multiple stores for the | same cache driver to group types of items stored in your caches. | */ 'stores' => [ 'apc' => [ 'driver' => 'apc', ], 'array' => [ 'driver' => 'array', ], 'database' => [ 'driver' => 'database', 'table' => 'cache', 'connection' => null, ], 'file' => [ 'driver' => 'file', 'path' => storage_path('framework/cache/data'), ], 'memcached' => [ 'driver' => 'memcached', 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 'sasl' => [ env('MEMCACHED_USERNAME'), env('MEMCACHED_PASSWORD'), ], 'options' => [ // Memcached::OPT_CONNECT_TIMEOUT => 2000, ], 'servers' => [ [ 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 'port' => env('MEMCACHED_PORT', 11211), 'weight' => 100, ], ], ], 'redis' => [ 'driver' => 'redis', 'connection' => 'cache', ], ], /* |-------------------------------------------------------------------------- | Cache Key Prefix |-------------------------------------------------------------------------- | | When utilizing a RAM based store such as APC or Memcached, there might | be other applications utilizing the same cache. So, we'll specify a | value to get prefixed to all our keys so we can avoid collisions. | */ 'prefix' => env( 'CACHE_PREFIX', str_slug(env('APP_NAME', 'laravel'), '_').'_cache' ), ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/hashing.php
config/hashing.php
<?php return [ /* |-------------------------------------------------------------------------- | Default Hash Driver |-------------------------------------------------------------------------- | | This option controls the default hash driver that will be used to hash | passwords for your application. By default, the bcrypt algorithm is | used; however, you remain free to modify this option if you wish. | | Supported: "bcrypt", "argon", "argon2id" | */ 'driver' => 'bcrypt', /* |-------------------------------------------------------------------------- | Bcrypt Options |-------------------------------------------------------------------------- | | Here you may specify the configuration options that should be used when | passwords are hashed using the Bcrypt algorithm. This will allow you | to control the amount of time it takes to hash the given password. | */ 'bcrypt' => [ 'rounds' => env('BCRYPT_ROUNDS', 10), ], /* |-------------------------------------------------------------------------- | Argon Options |-------------------------------------------------------------------------- | | Here you may specify the configuration options that should be used when | passwords are hashed using the Argon algorithm. These will allow you | to control the amount of time it takes to hash the given password. | */ 'argon' => [ 'memory' => 1024, 'threads' => 2, 'time' => 2, ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/view.php
config/view.php
<?php return [ /* |-------------------------------------------------------------------------- | View Storage Paths |-------------------------------------------------------------------------- | | Most templating systems load templates from disk. Here you may specify | an array of paths that should be checked for your views. Of course | the usual Laravel view path has already been registered for you. | */ 'paths' => [ resource_path('views'), ], /* |-------------------------------------------------------------------------- | Compiled View Path |-------------------------------------------------------------------------- | | This option determines where all the compiled Blade templates will be | stored for your application. Typically, this is within the storage | directory. However, as usual, you are free to change this value. | */ 'compiled' => realpath(storage_path('framework/views')), ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/database.php
config/database.php
<?php return [ /* |-------------------------------------------------------------------------- | Default Database Connection Name |-------------------------------------------------------------------------- | | Here you may specify which of the database connections below you wish | to use as your default connection for all database work. Of course | you may use many connections at once using the Database library. | */ 'default' => env('DB_CONNECTION', 'mysql'), /* |-------------------------------------------------------------------------- | Database Connections |-------------------------------------------------------------------------- | | Here are each of the database connections setup for your application. | Of course, examples of configuring each database platform that is | supported by Laravel is shown below to make development simple. | | | All database work in Laravel is done through the PHP PDO facilities | so make sure you have the driver for your particular database of | choice installed on your machine before you begin development. | */ 'connections' => [ 'sqlite' => [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', ], 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => env('DB_PREFIX', ''), 'strict' => true, 'engine' => null, ], 'pgsql' => [ 'driver' => 'pgsql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', 'sslmode' => 'prefer', ], 'sqlsrv' => [ 'driver' => 'sqlsrv', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '1433'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', ], ], /* |-------------------------------------------------------------------------- | Migration Repository Table |-------------------------------------------------------------------------- | | This table keeps track of all the migrations that have already run for | your application. Using this information, we can determine which of | the migrations on disk haven't actually been run in the database. | */ 'migrations' => 'migrations', /* |-------------------------------------------------------------------------- | Redis Databases |-------------------------------------------------------------------------- | | Redis is an open source, fast, and advanced key-value store that also | provides a richer set of commands than a typical key-value systems | such as APC or Memcached. Laravel makes it easy to dig right in. | */ 'redis' => [ 'client' => 'predis', 'default' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), 'database' => env('REDIS_DB', 0), ], 'cache' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), 'database' => env('REDIS_CACHE_DB', 1), ], ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/services.php
config/services.php
<?php return [ /* |-------------------------------------------------------------------------- | Third Party Services |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such | as Stripe, Mailgun, SparkPost and others. This file provides a sane | default location for this type of information, allowing packages | to have a conventional place to find your various credentials. | */ 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), ], 'ses' => [ 'key' => env('SES_KEY'), 'secret' => env('SES_SECRET'), 'region' => env('SES_REGION', 'us-east-1'), ], 'sparkpost' => [ 'secret' => env('SPARKPOST_SECRET'), ], 'stripe' => [ 'model' => App\User::class, 'key' => env('STRIPE_KEY'), 'secret' => env('STRIPE_SECRET'), ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/filesystems.php
config/filesystems.php
<?php return [ /* |-------------------------------------------------------------------------- | Default Filesystem Disk |-------------------------------------------------------------------------- | | Here you may specify the default filesystem disk that should be used | by the framework. The "local" disk, as well as a variety of cloud | based disks are available to your application. Just store away! | */ 'default' => env('FILESYSTEM_DRIVER', 'local'), /* |-------------------------------------------------------------------------- | Default Cloud Filesystem Disk |-------------------------------------------------------------------------- | | Many applications store files both locally and in the cloud. For this | reason, you may specify a default "cloud" driver here. This driver | will be bound as the Cloud disk implementation in the container. | */ 'cloud' => env('FILESYSTEM_CLOUD', 's3'), /* |-------------------------------------------------------------------------- | Filesystem Disks |-------------------------------------------------------------------------- | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have | been setup for each driver as an example of the required options. | | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" | */ 'disks' => [ 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), ], 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'visibility' => 'public', ], 'admin' => [ 'driver' => 'local', 'root' => public_path('uploads'), ], 's3' => [ 'driver' => 's3', 'key' => env('AWS_ACCESS_KEY_ID'), 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'region' => env('AWS_DEFAULT_REGION'), 'bucket' => env('AWS_BUCKET'), 'url' => env('AWS_URL'), ], ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/mail.php
config/mail.php
<?php return [ /* |-------------------------------------------------------------------------- | Mail Driver |-------------------------------------------------------------------------- | | Laravel supports both SMTP and PHP's "mail" function as drivers for the | sending of e-mail. You may specify which one you're using throughout | your application here. By default, Laravel is setup for SMTP mail. | | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses", | "sparkpost", "log", "array" | */ 'driver' => env('MAIL_DRIVER', 'smtp'), /* |-------------------------------------------------------------------------- | SMTP Host Address |-------------------------------------------------------------------------- | | Here you may provide the host address of the SMTP server used by your | applications. A default option is provided that is compatible with | the Mailgun mail service which will provide reliable deliveries. | */ 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), /* |-------------------------------------------------------------------------- | SMTP Host Port |-------------------------------------------------------------------------- | | This is the SMTP port used by your application to deliver e-mails to | users of the application. Like the host we have set this value to | stay compatible with the Mailgun e-mail application by default. | */ 'port' => env('MAIL_PORT', 587), /* |-------------------------------------------------------------------------- | Global "From" Address |-------------------------------------------------------------------------- | | You may wish for all e-mails sent by your application to be sent from | the same address. Here, you may specify a name and address that is | used globally for all e-mails that are sent by your application. | */ 'from' => [ 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 'name' => env('MAIL_FROM_NAME', 'Example'), ], /* |-------------------------------------------------------------------------- | E-Mail Encryption Protocol |-------------------------------------------------------------------------- | | Here you may specify the encryption protocol that should be used when | the application send e-mail messages. A sensible default using the | transport layer security protocol should provide great security. | */ 'encryption' => env('MAIL_ENCRYPTION', 'tls'), /* |-------------------------------------------------------------------------- | SMTP Server Username |-------------------------------------------------------------------------- | | If your SMTP server requires a username for authentication, you should | set it here. This will get used to authenticate with your server on | connection. You may also set the "password" value below this one. | */ 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), /* |-------------------------------------------------------------------------- | Sendmail System Path |-------------------------------------------------------------------------- | | When using the "sendmail" driver to send e-mails, we will need to know | the path to where Sendmail lives on this server. A default path has | been provided here, which will work well on most of your systems. | */ 'sendmail' => '/usr/sbin/sendmail -bs', /* |-------------------------------------------------------------------------- | Markdown Mail Settings |-------------------------------------------------------------------------- | | If you are using Markdown based email rendering, you may configure your | theme and component paths here, allowing you to customize the design | of the emails. Or, you may simply stick with the Laravel defaults! | */ 'markdown' => [ 'theme' => 'default', 'paths' => [ resource_path('views/vendor/mail'), ], ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/user.php
config/user.php
<?php return [ ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/broadcasting.php
config/broadcasting.php
<?php return [ /* |-------------------------------------------------------------------------- | Default Broadcaster |-------------------------------------------------------------------------- | | This option controls the default broadcaster that will be used by the | framework when an event needs to be broadcast. You may set this to | any of the connections defined in the "connections" array below. | | Supported: "pusher", "redis", "log", "null" | */ 'default' => env('BROADCAST_DRIVER', 'null'), /* |-------------------------------------------------------------------------- | Broadcast Connections |-------------------------------------------------------------------------- | | Here you may define all of the broadcast connections that will be used | to broadcast events to other systems or over websockets. Samples of | each available type of connection are provided inside this array. | */ 'connections' => [ 'pusher' => [ 'driver' => 'pusher', 'key' => env('PUSHER_APP_KEY'), 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ 'cluster' => env('PUSHER_APP_CLUSTER'), 'encrypted' => true, ], ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', ], 'log' => [ 'driver' => 'log', ], 'null' => [ 'driver' => 'null', ], ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/config/auth.php
config/auth.php
<?php return [ /* |-------------------------------------------------------------------------- | Authentication Defaults |-------------------------------------------------------------------------- | | This option controls the default authentication "guard" and password | reset options for your application. You may change these defaults | as required, but they're a perfect start for most applications. | */ 'defaults' => [ 'guard' => 'web', 'passwords' => 'users', ], /* |-------------------------------------------------------------------------- | Authentication Guards |-------------------------------------------------------------------------- | | Next, you may define every authentication guard for your application. | Of course, a great default configuration has been defined for you | here which uses session storage and the Eloquent user provider. | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | Supported: "session", "token" | */ 'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', ], 'api' => [ 'driver' => 'token', 'provider' => 'users', ], ], /* |-------------------------------------------------------------------------- | User Providers |-------------------------------------------------------------------------- | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | If you have multiple user tables or models you may configure multiple | sources which represent each model / table. These sources may then | be assigned to any extra authentication guards you have defined. | | Supported: "database", "eloquent" | */ 'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => App\User::class, ], // 'users' => [ // 'driver' => 'database', // 'table' => 'users', // ], ], /* |-------------------------------------------------------------------------- | Resetting Passwords |-------------------------------------------------------------------------- | | You may specify multiple password reset configurations if you have more | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | | The expire time is the number of minutes that the reset token should be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | */ 'passwords' => [ 'users' => [ 'provider' => 'users', 'table' => 'password_resets', 'expire' => 60, ], ], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/seeds/RbacSeeder.php
database/seeds/RbacSeeder.php
<?php use App\AdminPermission; use App\AdminRole; use App\AdminUser; use App\Utility\Rbac; use Illuminate\Database\Seeder; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Route; class RbacSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { // $adminUser = new AdminUser(); $adminUser->fill([ 'avatar' => '/uploads/avatar/20181031/5bd90252493d1.jpg', 'nickname' => '最牛逼的程序员', 'account' => 'admin', 'password' => 'admin', ]); $adminUser->save(); $adminRole = new AdminRole(); $adminRole->fill([ 'name' => '超级管理员', 'description' => '系统最高权限', ]); $adminUser->roles()->save($adminRole); $routes = Rbac::getAllRoutes() ->map(function ($route) { return $route->rbacRule; }); $adminPerm = new AdminPermission(); $adminPerm->fill([ 'name' => '所有权限', 'routes' => $routes, ]); $adminRole->permissions()->save($adminPerm); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/seeds/AdminConfigsTableSeeder.php
database/seeds/AdminConfigsTableSeeder.php
<?php use App\AdminConfig; use Illuminate\Database\Seeder; class AdminConfigsTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { // $adminConfig = new AdminConfig(); $adminConfig->fill([ 'name' => '后台管理LOGO', 'config_key' => 'admin_logo', 'config_value' => '/uploads/config/20181107/5be269ef937d1.png', 'type' => 'image', ]); $adminConfig->save(); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/seeds/DatabaseSeeder.php
database/seeds/DatabaseSeeder.php
<?php use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Seed the application's database. * * @return void */ public function run() { $this->call([ RbacSeeder::class, AdminConfigsTableSeeder::class, ]); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/factories/UserFactory.php
database/factories/UserFactory.php
<?php use Faker\Generator as Faker; /* |-------------------------------------------------------------------------- | Model Factories |-------------------------------------------------------------------------- | | This directory should contain each of the model factory definitions for | your application. Factories provide a convenient way to generate new | model instances for testing / seeding your application's database. | */ $factory->define(App\User::class, function (Faker $faker) { return [ 'name' => $faker->name, 'email' => $faker->unique()->safeEmail, 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 'remember_token' => str_random(10), ]; });
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/migrations/2019_02_25_122313_create_admin_permission_admin_role.php
database/migrations/2019_02_25_122313_create_admin_permission_admin_role.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAdminPermissionAdminRole extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('admin_permission_admin_role', function (Blueprint $table) { // $table->increments('id'); // $table->timestamps(); $table->integer('admin_permission_id'); $table->integer('admin_role_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admin_permission_admin_role'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/migrations/2019_02_25_121505_create_admin_menu_admin_role.php
database/migrations/2019_02_25_121505_create_admin_menu_admin_role.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAdminMenuAdminRole extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('admin_menu_admin_role', function (Blueprint $table) { // $table->increments('id'); // $table->timestamps(); $table->integer('admin_role_id'); $table->integer('admin_menu_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admin_menu_admin_role'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/migrations/2019_02_25_112304_create_admin_menus_table.php
database/migrations/2019_02_25_112304_create_admin_menus_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAdminMenusTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('admin_menus', function (Blueprint $table) { $table->increments('id'); $table->integer('pid')->default(0); $table->string('name', 50); $table->string('url', 50); $table->string('icon', 50)->nullable(); $table->integer('sort', 0)->comment('权重'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admin_menus'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/migrations/2019_02_25_112454_create_admin_configs_table.php
database/migrations/2019_02_25_112454_create_admin_configs_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAdminConfigsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('admin_configs', function (Blueprint $table) { $table->increments('id'); $table->string('name', 255)->nullable(); $table->string('config_key')->nullable(); $table->text('config_value'); $table->string('type', 255)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admin_configs'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/migrations/2019_02_25_103116_create_admin_roles_table.php
database/migrations/2019_02_25_103116_create_admin_roles_table.php
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateAdminRolesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('admin_roles', function (Blueprint $table) { $table->increments('id'); $table->string('name', 50); $table->string('description', 50)->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admin_roles'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/migrations/2019_02_25_111309_create_admin_role_admin_user.php
database/migrations/2019_02_25_111309_create_admin_role_admin_user.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAdminRoleAdminUser extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('admin_role_admin_user', function (Blueprint $table) { // $table->increments('id'); $table->integer('admin_role_id'); $table->integer('admin_user_id'); // $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admin_role_admin_user'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/migrations/2019_02_25_100017_create_admin_users_table.php
database/migrations/2019_02_25_100017_create_admin_users_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAdminUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('admin_users', function (Blueprint $table) { $table->increments('id'); $table->string('avatar', 100)->nullable(); $table->string('nickname', 50)->default(''); $table->string('account', 30)->default(''); $table->string('password', 500)->default(''); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admin_users'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/database/migrations/2019_02_25_113053_create_admin_permissions_table.php
database/migrations/2019_02_25_113053_create_admin_permissions_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAdminPermissionsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('admin_permissions', function (Blueprint $table) { $table->increments('id'); $table->string('name', 500); $table->text('routes'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('admin_permissions'); } }
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/lang/en/passwords.php
resources/lang/en/passwords.php
<?php return [ /* |-------------------------------------------------------------------------- | Password Reset Language Lines |-------------------------------------------------------------------------- | | The following language lines are the default lines which match reasons | that are given by the password broker for a password update attempt | has failed, such as for an invalid token or invalid new password. | */ 'password' => 'Passwords must be at least six characters and match the confirmation.', 'reset' => 'Your password has been reset!', 'sent' => 'We have e-mailed your password reset link!', 'token' => 'This password reset token is invalid.', 'user' => "We can't find a user with that e-mail address.", ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/lang/en/pagination.php
resources/lang/en/pagination.php
<?php return [ /* |-------------------------------------------------------------------------- | Pagination Language Lines |-------------------------------------------------------------------------- | | The following language lines are used by the paginator library to build | the simple pagination links. You are free to change them to anything | you want to customize your views to better match your application. | */ 'previous' => '« Previous', 'next' => 'Next »', ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/lang/en/validation.php
resources/lang/en/validation.php
<?php return [ /* |-------------------------------------------------------------------------- | Validation Language Lines |-------------------------------------------------------------------------- | | The following language lines contain the default error messages used by | the validator class. Some of these rules have multiple versions such | as the size rules. Feel free to tweak each of these messages here. | */ 'accepted' => 'The :attribute must be accepted.', 'active_url' => 'The :attribute is not a valid URL.', 'after' => 'The :attribute must be a date after :date.', 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 'alpha' => 'The :attribute may only contain letters.', 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', 'alpha_num' => 'The :attribute may only contain letters and numbers.', 'array' => 'The :attribute must be an array.', 'before' => 'The :attribute must be a date before :date.', 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 'between' => [ 'numeric' => 'The :attribute must be between :min and :max.', 'file' => 'The :attribute must be between :min and :max kilobytes.', 'string' => 'The :attribute must be between :min and :max characters.', 'array' => 'The :attribute must have between :min and :max items.', ], 'boolean' => 'The :attribute field must be true or false.', 'confirmed' => 'The :attribute confirmation does not match.', 'date' => 'The :attribute is not a valid date.', 'date_format' => 'The :attribute does not match the format :format.', 'different' => 'The :attribute and :other must be different.', 'digits' => 'The :attribute must be :digits digits.', 'digits_between' => 'The :attribute must be between :min and :max digits.', 'dimensions' => 'The :attribute has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', 'email' => 'The :attribute must be a valid email address.', 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', 'gt' => [ 'numeric' => 'The :attribute must be greater than :value.', 'file' => 'The :attribute must be greater than :value kilobytes.', 'string' => 'The :attribute must be greater than :value characters.', 'array' => 'The :attribute must have more than :value items.', ], 'gte' => [ 'numeric' => 'The :attribute must be greater than or equal :value.', 'file' => 'The :attribute must be greater than or equal :value kilobytes.', 'string' => 'The :attribute must be greater than or equal :value characters.', 'array' => 'The :attribute must have :value items or more.', ], 'image' => 'The :attribute must be an image.', 'in' => 'The selected :attribute is invalid.', 'in_array' => 'The :attribute field does not exist in :other.', 'integer' => 'The :attribute must be an integer.', 'ip' => 'The :attribute must be a valid IP address.', 'ipv4' => 'The :attribute must be a valid IPv4 address.', 'ipv6' => 'The :attribute must be a valid IPv6 address.', 'json' => 'The :attribute must be a valid JSON string.', 'lt' => [ 'numeric' => 'The :attribute must be less than :value.', 'file' => 'The :attribute must be less than :value kilobytes.', 'string' => 'The :attribute must be less than :value characters.', 'array' => 'The :attribute must have less than :value items.', ], 'lte' => [ 'numeric' => 'The :attribute must be less than or equal :value.', 'file' => 'The :attribute must be less than or equal :value kilobytes.', 'string' => 'The :attribute must be less than or equal :value characters.', 'array' => 'The :attribute must not have more than :value items.', ], 'max' => [ 'numeric' => 'The :attribute may not be greater than :max.', 'file' => 'The :attribute may not be greater than :max kilobytes.', 'string' => 'The :attribute may not be greater than :max characters.', 'array' => 'The :attribute may not have more than :max items.', ], 'mimes' => 'The :attribute must be a file of type: :values.', 'mimetypes' => 'The :attribute must be a file of type: :values.', 'min' => [ 'numeric' => 'The :attribute must be at least :min.', 'file' => 'The :attribute must be at least :min kilobytes.', 'string' => 'The :attribute must be at least :min characters.', 'array' => 'The :attribute must have at least :min items.', ], 'not_in' => 'The selected :attribute is invalid.', 'not_regex' => 'The :attribute format is invalid.', 'numeric' => 'The :attribute must be a number.', 'present' => 'The :attribute field must be present.', 'regex' => 'The :attribute format is invalid.', 'required' => 'The :attribute field is required.', 'required_if' => 'The :attribute field is required when :other is :value.', 'required_unless' => 'The :attribute field is required unless :other is in :values.', 'required_with' => 'The :attribute field is required when :values is present.', 'required_with_all' => 'The :attribute field is required when :values is present.', 'required_without' => 'The :attribute field is required when :values is not present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.', 'same' => 'The :attribute and :other must match.', 'size' => [ 'numeric' => 'The :attribute must be :size.', 'file' => 'The :attribute must be :size kilobytes.', 'string' => 'The :attribute must be :size characters.', 'array' => 'The :attribute must contain :size items.', ], 'string' => 'The :attribute must be a string.', 'timezone' => 'The :attribute must be a valid zone.', 'unique' => 'The :attribute has already been taken.', 'uploaded' => 'The :attribute failed to upload.', 'url' => 'The :attribute format is invalid.', /* |-------------------------------------------------------------------------- | Custom Validation Language Lines |-------------------------------------------------------------------------- | | Here you may specify custom validation messages for attributes using the | convention "attribute.rule" to name the lines. This makes it quick to | specify a specific custom language line for a given attribute rule. | */ 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], /* |-------------------------------------------------------------------------- | Custom Validation Attributes |-------------------------------------------------------------------------- | | The following language lines are used to swap attribute place-holders | with something more reader friendly such as E-Mail Address instead | of "email". This simply helps us make messages a little cleaner. | */ 'attributes' => [], ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/lang/en/auth.php
resources/lang/en/auth.php
<?php return [ /* |-------------------------------------------------------------------------- | Authentication Language Lines |-------------------------------------------------------------------------- | | The following language lines are used during authentication for various | messages that we need to display to the user. You are free to modify | these language lines according to your application's requirements. | */ 'failed' => 'These credentials do not match our records.', 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', ];
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/base/install.blade.php
resources/views/base/install.blade.php
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="csrf-token" content="{{ csrf_token() }}" /> <title>安装</title> <link rel="stylesheet" href="{{ asset('assets/vendors/iconfonts/mdi/css/materialdesignicons.min.css') }}"> <link rel="stylesheet" href="{{ asset('assets/vendors/css/vendor.bundle.base.css') }}"> <link rel="stylesheet" href="{{ asset('assets/css/style.css') }}"> <link rel="shortcut icon" href="{{ asset('assets/images/favicon.png') }}" /> </head> <style> #error,.error,#success,.success { background: #D83E3E; color: #fff; padding: 15px 20px; border-radius: 4px; margin-bottom: 20px; } #success { background:#3C5675; } #error a, .error a { color:white; text-decoration: underline; } </style> <body> <div class="container-scroller"> <div class="container-fluid page-body-wrapper full-page-wrapper"> <div class="content-wrapper d-flex align-items-center auth"> <div class="row w-100"> <div class="col-lg-4 mx-auto"> <div class="auth-form-light text-left p-5"> <h4>Yamecent-admin 安装</h4> <form class="pt-3"> @if($errorMsg) <div class="error"> {{ $errorMsg }} </div> @endif <div id="error" style="display:none"></div> <div id="success" style="display:none"></div> <div class="form-group"> <input type="text" class="form-control form-control-lg" name="mysqlHost" placeholder="Mysql 数据库地址" > </div> <div class="form-group"> <input type="text" class="form-control form-control-lg" name="mysqlDatabase" placeholder="请输入已存在的 Mysql 数据库名" > </div> <div class="form-group"> <input type="text" class="form-control form-control-lg" name="mysqlUsername" placeholder="Mysql 用户名" > </div> <div class="form-group"> <input type="password" class="form-control form-control-lg" name="mysqlPassword" placeholder="Mysql 密码" > </div> <div class="form-group"> <input type="text" class="form-control form-control-lg" name="mysqlPrefix" placeholder="Mysql 表前缀 例:ya_" > </div> <br> <br> <div class="form-group"> <input type="text" class="form-control form-control-lg" name="adminUsername" placeholder="管理员用户名" > </div> <div class="form-group"> <input type="password" class="form-control form-control-lg" name="adminPassword" placeholder="管理员密码" > </div> <div class="form-group"> <input type="password" class="form-control form-control-lg" name="adminPasswordAgain" placeholder="管理员确认密码" > </div> <div class="mb-2"> <button type="submit" class="btn btn-gradient-info btn-lg btn-block"> 安装 </button> </div> <div class="text-center mt-4 font-weight-light"> @csrf </div> </form> </div> </div> </div> </div> </div> </div> <script src="{{ asset('assets/vendors/js/vendor.bundle.base.js') }}"></script> <script src="{{ asset('assets/vendors/js/vendor.bundle.addons.js') }}"></script> <script src="{{ asset('assets/js/off-canvas.js') }}"></script> <script src="{{ asset('assets/js/misc.js') }}"></script> <script src="http://cdn.bootcss.com/jquery/1.12.3/jquery.min.js"></script> <script src="{{ asset('assets/layer/layer.js') }}"></script> <script src="{{ asset('assets/js/common.js') }}"></script> </body> <script> var REQUEST_SUCCESS = 200; $(function () { $("form :input:first").select(); $("form").on("submit", function (e) { var index = layer.load(); e.preventDefault(); var $button = $(this).find("button") .text("安装中...") .prop("disabled", true); var payload = $(this).serializeArray(); payload = payload.filter(function(input) { return input.value.length > 0; }); var step1Callback = function (ret) { if (ret.code === REQUEST_SUCCESS) { layer.close(index); $("#error").hide(); $("#success").text("配置文件已写入,即将开始安装...").show(); setTimeout(function(){ $.post("{{ route('startInstall') }}", payload) .done(step2Callback) .fail(failCallback) },1000); localStorage.setItem("fastep", "installed"); } else { layer.close(index); $("#error").show().text(ret.msg); $button.prop("disabled", false).text("点击安装"); $("html,body").animate({ scrollTop: 0 }, 500); } } var step2Callback = function (ret) { if (ret.code === REQUEST_SUCCESS) { layer.close(index); $("#error").hide(); $("#success").text("安装成功!即将跳转至登录页!").show(); setTimeout(function(){ location.href = "/login"; },2000); localStorage.setItem("fastep", "installed"); } else { layer.close(index); $("#error").show().text(ret.msg); $button.prop("disabled", false).text("点击安装"); $("html,body").animate({ scrollTop: 0 }, 500); } } var failCallback = function (data) { layer.close(index); $("#error").show().text("发生错误:\n\n" + data.responseText); $button.prop("disabled", false).text("点击安装"); $("html,body").animate({ scrollTop: 0 }, 500); } $.post("{{ route('setEnviroment') }}", payload) .done(step1Callback) .fail(failCallback); return false; }); }); </script> </html>
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/base/403.blade.php
resources/views/base/403.blade.php
@extends('base.base') @section('base') <div class="container-scroller"> <div class="container-fluid page-body-wrapper full-page-wrapper"> <div class="content-wrapper d-flex align-items-center text-center error-page bg-info"> <div class="row flex-grow"> <div class="col-lg-7 mx-auto text-white"> <div class="row align-items-center d-flex flex-row"> <div class="col-lg-6 text-lg-right pr-lg-4"> <h1 class="display-1 mb-0">403</h1> </div> <div class="col-lg-6 error-page-divider text-lg-left pl-lg-4"> <h2>提示!</h2> <h3 class="font-weight-light">无访问权限!</h3> </div> </div> <div class="row mt-5"> <div class="col-12 text-center mt-xl-2"> <a class="text-white font-weight-medium" href="/console" >返回到首页</a> </div> </div> <div class="row mt-5"> <div class="col-12 mt-xl-2"> <p class="text-white font-weight-medium text-center">Copyright &copy; 2018 yamecent All rights reserved.</p> </div> </div> </div> </div> </div> <!-- content-wrapper ends --> </div> <!-- page-body-wrapper ends --> </div> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/base/base.blade.php
resources/views/base/base.blade.php
<!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="csrf-token" content="{{ csrf_token() }}" /> <title>管理控制台</title> <!-- plugins:css --> <link rel="stylesheet" href="/assets/vendors/iconfonts/mdi/css/materialdesignicons.min.css"> <link rel="stylesheet" href="/assets/vendors/css/vendor.bundle.base.css"> <link rel="stylesheet" type="text/css" href="/assets/wangEditor/dist/css/wangEditor.min.css"> <!-- endinject --> <!-- inject:css --> <link rel="stylesheet" href="/assets/css/style.css"> <!-- endinject --> <link rel="shortcut icon" href="/assets/images/favicon.png" /> <script src="https://code.jquery.com/jquery-3.0.0.min.js"></script> {{--datetimer--}} <link rel="stylesheet" id=cal_style type="text/css" href="/assets/datetimer/dist/flatpickr.min.css"> <script src="/assets/datetimer/src/flatpickr.js"></script> <script src="/assets/datetimer/src/flatpickr.l10n.zh.js"></script> <style> /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ ::-webkit-scrollbar { width: 5px; height: 20px; background-color: #F5F5F5; } /*定义滚动条轨道 内阴影+圆角*/ ::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); border-radius: 10px; background-color: #F5F5F5; } /*定义滑块 内阴影+圆角*/ ::-webkit-scrollbar-thumb { border-radius: 10px; -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); background-color: #b66dff; } </style> </head> <body> <script src="/assets/layer/layer.js"></script> <script src="/assets/wangEditor/dist/js/wangEditor.min.js"></script> @yield('base') <!-- plugins:js --> <script src="/assets/vendors/js/vendor.bundle.base.js"></script> <script src="/assets/vendors/js/vendor.bundle.addons.js"></script> <!-- endinject --> <!-- Plugin js for this page--> <!-- End plugin js for this page--> <!-- inject:js --> <script src="/assets/js/off-canvas.js"></script> <script src="/assets/js/misc.js"></script> <!-- endinject --> <!-- Custom js for this page--> <script src="/assets/js/dashboard.js"></script> <script src="/assets/js/common.js"></script> <!-- End custom js for this page--> </body> </html>
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/base/404.blade.php
resources/views/base/404.blade.php
@extends('base.base') @section('base') <div class="container-scroller"> <div class="container-fluid page-body-wrapper full-page-wrapper"> <div class="content-wrapper d-flex align-items-center text-center error-page bg-info"> <div class="row flex-grow"> <div class="col-lg-7 mx-auto text-white"> <div class="row align-items-center d-flex flex-row"> <div class="col-lg-6 text-lg-right pr-lg-4"> <h1 class="display-1 mb-0">404</h1> </div> <div class="col-lg-6 error-page-divider text-lg-left pl-lg-4"> <h2>提示!</h2> <h3 class="font-weight-light">页面不存在!</h3> </div> </div> <div class="row mt-5"> <div class="col-12 text-center mt-xl-2"> <a class="text-white font-weight-medium" href="/console" >返回到首页</a> </div> </div> <div class="row mt-5"> <div class="col-12 mt-xl-2"> <p class="text-white font-weight-medium text-center">Copyright &copy; 2018 yamecent All rights reserved.</p> </div> </div> </div> </div> </div> <!-- content-wrapper ends --> </div> <!-- page-body-wrapper ends --> </div> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/administrator_add.blade.php
resources/views/admin/administrator_add.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">请填写管理员信息</h4> <form class="forms-sample" id="form"> <div class="form-group"> <label>头像上传</label> <input type="file" class="file-upload-default img-file" data-path="avatar"> <input type="hidden" name="avatar" class="image-path"> <div class="input-group col-xs-12"> <input type="text" class="form-control file-upload-info" disabled=""> <span class="input-group-append"> <button class="file-upload-browse btn btn-gradient-primary" onclick="upload($(this))" type="button">上传</button> </span> </div> <div class="img-yl"> </div> </div> <div class="form-group"> <label for="nickname">*昵称</label> <input type="text" class="form-control required" name="nickname" placeholder="请输入管理员昵称"> </div> <div class="form-group"> <label for="account">*账号</label> <input type="text" class="form-control required" name="account" placeholder="请输入账号"> </div> <div class="form-group"> <label for="password">*密码</label> <input type="password" id="password" class="form-control required" name="password" placeholder="请输入密码"> </div> <div class="form-group"> <label for="password">*确认密码</label> <input type="password" id="password_verify" class="form-control required" name="password_verify" placeholder="请再次输入密码"> </div> <div class="form-group"> <label for="role">*角色</label> <select id="roles-selector" class="form-control form-control-lg" multiple="multiple"> @foreach($roles as $role) <option value="{{$role->id}}">{{$role->name}}</option> @endforeach </select> </div> <button type="button" onclick="commit()" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> function commit(){ if($("#password").val() != $("#password_verify").val()){ layer.msg('两次密码输入不一致', function(){}); } if(!checkForm()){ return false; } var data = $("#form").serializeObject(); data.roles = [] var rolesSelector = document.querySelector('select#roles-selector') for(opt of rolesSelector) { if(opt.selected) { data.roles.push(opt.value) } } myRequest("/admin/administrator/add","post",data,function(res){ if(res.code == '200'){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }else{ layer.msg(res.msg) } }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/login.blade.php
resources/views/admin/login.blade.php
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="csrf-token" content="{{ csrf_token() }}" /> <title>登录</title> <link rel="stylesheet" href="/assets/vendors/iconfonts/mdi/css/materialdesignicons.min.css"> <link rel="stylesheet" href="/assets/vendors/css/vendor.bundle.base.css"> <link rel="stylesheet" href="/assets/css/style.css"> <link rel="shortcut icon" href="/assets/images/favicon.png" /> </head> <body> <div class="container-scroller"> <div class="container-fluid page-body-wrapper full-page-wrapper"> <div class="content-wrapper d-flex align-items-center auth"> <div class="row w-100"> <div class="col-lg-4 mx-auto"> <div class="auth-form-light text-left p-5"> <div class="brand-logo"> <img src="{{ getConfig("admin_logo") }}"> </div> <form class="pt-3"> <div class="form-group"> <input type="text" class="form-control form-control-lg" id="account" placeholder="请输入账号"> </div> <div class="form-group"> <input type="password" class="form-control form-control-lg" id="password" placeholder="请输入密码"> </div> <div class="mb-2"> <button type="button" onclick="login()" class="btn btn-gradient-info btn-lg btn-block"> 登录 </button> </div> <div class="text-center mt-4 font-weight-light"> </div> </form> </div> </div> </div> </div> </div> </div> <script src="/assets/vendors/js/vendor.bundle.base.js"></script> <script src="/assets/vendors/js/vendor.bundle.addons.js"></script> <script src="/assets/js/off-canvas.js"></script> <script src="/assets/js/misc.js"></script> <script src="https://code.jquery.com/jquery-3.0.0.min.js"></script> <script src="/assets/layer/layer.js"></script> <script src="/assets/js/common.js"></script> </body> <script> document.onkeydown=keyListener; function keyListener(e){ if(e.keyCode == 13){ login(); } } function login(){ var account = $("#account").val(); var password = $("#password").val(); if(!account || !password){ layer.msg('账号和密码不能为空', function(){}); return false; } var data = { 'account':account, 'password':password, }; myRequest("/login","post",data,function(res){ if(res.code == '200'){ layer.msg(res.msg) setTimeout(function(){ window.location.href="/"; },1500) }else{ layer.msg(res.msg) } }); } </script> </html>
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/console.blade.php
resources/views/admin/console.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="page-header"> <h3 class="page-title"> <span class="page-title-icon bg-gradient-primary text-white mr-2"> <i class="mdi mdi-home"></i> </span> Dashboard </h3> {{--<nav aria-label="breadcrumb">--}} {{--<ul class="breadcrumb">--}} {{--<li class="breadcrumb-item active" aria-current="page">--}} {{--<span></span>Overview--}} {{--<i class="mdi mdi-alert-circle-outline icon-sm text-primary align-middle"></i>--}} {{--</li>--}} {{--</ul>--}} {{--</nav>--}} </div> <div class="row"> <div class="col-md-4 stretch-card grid-margin"> <div class="card bg-gradient-danger card-img-holder text-white"> <div class="card-body"> <img src="/assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image"/> <h4 class="font-weight-normal mb-3">Weekly Sales <i class="mdi mdi-chart-line mdi-24px float-right"></i> </h4> <h2 class="mb-5">$ 15,0000</h2> <h6 class="card-text">Increased by 60%</h6> </div> </div> </div> <div class="col-md-4 stretch-card grid-margin"> <div class="card bg-gradient-info card-img-holder text-white"> <div class="card-body"> <img src="/assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image"/> <h4 class="font-weight-normal mb-3">Weekly Orders <i class="mdi mdi-bookmark-outline mdi-24px float-right"></i> </h4> <h2 class="mb-5">45,6334</h2> <h6 class="card-text">Decreased by 10%</h6> </div> </div> </div> <div class="col-md-4 stretch-card grid-margin"> <div class="card bg-gradient-success card-img-holder text-white"> <div class="card-body"> <img src="/assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image"/> <h4 class="font-weight-normal mb-3">Visitors Online <i class="mdi mdi-diamond mdi-24px float-right"></i> </h4> <h2 class="mb-5">95,5741</h2> <h6 class="card-text">Increased by 5%</h6> </div> </div> </div> </div> <div class="row"> <div class="col-md-7 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <div class="clearfix"> <h4 class="card-title float-left">Visit And Sales Statistics</h4> <div id="visit-sale-chart-legend" class="rounded-legend legend-horizontal legend-top-right float-right"></div> </div> <canvas id="visit-sale-chart" class="mt-4"></canvas> </div> </div> </div> <div class="col-md-5 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">Traffic Sources</h4> <canvas id="traffic-chart"></canvas> <div id="traffic-chart-legend" class="rounded-legend legend-vertical legend-bottom-left pt-4"></div> </div> </div> </div> </div> <div class="row"> <div class="col-12 grid-margin"> <div class="card"> <div class="card-body"> <h4 class="card-title">Recent Tickets</h4> <div class="table-responsive"> <table class="table"> <thead> <tr> <th> Assignee </th> <th> Subject </th> <th> Status </th> <th> Last Update </th> <th> Tracking ID </th> </tr> </thead> <tbody> <tr> <td> <img src="/assets/images/faces/face1.jpg" class="mr-2" alt="image"> David Grey </td> <td> Fund is not recieved </td> <td> <label class="badge badge-gradient-success">DONE</label> </td> <td> Dec 5, 2017 </td> <td> WD-12345 </td> </tr> <tr> <td> <img src="/assets/images/faces/face2.jpg" class="mr-2" alt="image"> Stella Johnson </td> <td> High loading time </td> <td> <label class="badge badge-gradient-warning">PROGRESS</label> </td> <td> Dec 12, 2017 </td> <td> WD-12346 </td> </tr> <tr> <td> <img src="/assets/images/faces/face3.jpg" class="mr-2" alt="image"> Marina Michel </td> <td> Website down for one week </td> <td> <label class="badge badge-gradient-info">ON HOLD</label> </td> <td> Dec 16, 2017 </td> <td> WD-12347 </td> </tr> <tr> <td> <img src="/assets/images/faces/face4.jpg" class="mr-2" alt="image"> John Doe </td> <td> Loosing control on server </td> <td> <label class="badge badge-gradient-danger">REJECTED</label> </td> <td> Dec 3, 2017 </td> <td> WD-12348 </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">Recent Updates</h4> <div class="d-flex"> <div class="d-flex align-items-center mr-4 text-muted font-weight-light"> <i class="mdi mdi-account-outline icon-sm mr-2"></i> <span>jack Menqu</span> </div> <div class="d-flex align-items-center text-muted font-weight-light"> <i class="mdi mdi-clock icon-sm mr-2"></i> <span>October 3rd, 2018</span> </div> </div> <div class="row mt-3"> <div class="col-6 pr-1"> <img src="/assets/images/dashboard/img_1.jpg" class="mb-2 mw-100 w-100 rounded" alt="image"> <img src="/assets/images/dashboard/img_4.jpg" class="mw-100 w-100 rounded" alt="image"> </div> <div class="col-6 pl-1"> <img src="/assets/images/dashboard/img_2.jpg" class="mb-2 mw-100 w-100 rounded" alt="image"> <img src="/assets/images/dashboard/img_3.jpg" class="mw-100 w-100 rounded" alt="image"> </div> </div> <div class="d-flex mt-5 align-items-top"> <img src="/assets/images/faces/face3.jpg" class="img-sm rounded-circle mr-3" alt="image"> <div class="mb-0 flex-grow"> <h5 class="mr-2 mb-2">School Website - Authentication Module.</h5> <p class="mb-0 font-weight-light">It is a long established fact that a reader will be distracted by the readable content of a page.</p> </div> <div class="ml-auto"> <i class="mdi mdi-heart-outline text-muted"></i> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">Project Status</h4> <div class="table-responsive"> <table class="table"> <thead> <tr> <th> # </th> <th> Name </th> <th> Due Date </th> <th> Progress </th> </tr> </thead> <tbody> <tr> <td> 1 </td> <td> Herman Beck </td> <td> May 15, 2015 </td> <td> <div class="progress"> <div class="progress-bar bg-gradient-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div> </div> </td> </tr> <tr> <td> 2 </td> <td> Messsy Adam </td> <td> Jul 01, 2015 </td> <td> <div class="progress"> <div class="progress-bar bg-gradient-danger" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div> </div> </td> </tr> <tr> <td> 3 </td> <td> John Richards </td> <td> Apr 12, 2015 </td> <td> <div class="progress"> <div class="progress-bar bg-gradient-warning" role="progressbar" style="width: 90%" aria-valuenow="90" aria-valuemin="0" aria-valuemax="100"></div> </div> </td> </tr> <tr> <td> 4 </td> <td> Peter Meggik </td> <td> May 15, 2015 </td> <td> <div class="progress"> <div class="progress-bar bg-gradient-primary" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div> </div> </td> </tr> <tr> <td> 5 </td> <td> Edward </td> <td> May 03, 2015 </td> <td> <div class="progress"> <div class="progress-bar bg-gradient-danger" role="progressbar" style="width: 35%" aria-valuenow="35" aria-valuemin="0" aria-valuemax="100"></div> </div> </td> </tr> <tr> <td> 5 </td> <td> Ronald </td> <td> Jun 05, 2015 </td> <td> <div class="progress"> <div class="progress-bar bg-gradient-info" role="progressbar" style="width: 65%" aria-valuenow="65" aria-valuemin="0" aria-valuemax="100"></div> </div> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- partial:partials/_footer.html --> <footer class="footer"> <div class="d-sm-flex justify-content-center justify-content-sm-between"> <span class="text-muted text-center text-sm-left d-block d-sm-inline-block">Copyright © 2017-2018 <a href="http://www.yamecent.com/" target="_blank">Yamecent</a>. All rights reserved. </span> </div> </footer> <!-- partial --> </div> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/icon.blade.php
resources/views/admin/icon.blade.php
@extends('base.base') @section('base') <div class="main-panel"> <div class="content-wrapper"> <div class="page-header"> <h3 class="page-title"> Icons </h3> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">UI Elements</a></li> <li class="breadcrumb-item active" aria-current="page">Icons</li> </ol> </nav> </div> <div class="row icons-list"> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-access-point"></i> mdi mdi-access-point </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-access-point-network"></i> mdi mdi-access-point-network </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account"></i> mdi mdi-account </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-box"></i> mdi mdi-account-box </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-box-outline"></i> mdi mdi-account-box-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-card-details"></i> mdi mdi-account-card-details </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-check"></i> mdi mdi-account-check </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-circle"></i> mdi mdi-account-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-convert"></i> mdi mdi-account-convert </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-key"></i> mdi mdi-account-key </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-location"></i> mdi mdi-account-location </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-minus"></i> mdi mdi-account-minus </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-multiple"></i> mdi mdi-account-multiple </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-multiple-minus"></i> mdi mdi-account-multiple-minus </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-multiple-outline"></i> mdi mdi-account-multiple-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-multiple-plus"></i> mdi mdi-account-multiple-plus </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-network"></i> mdi mdi-account-network </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-off"></i> mdi mdi-account-off </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-outline"></i> mdi mdi-account-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-plus"></i> mdi mdi-account-plus </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-remove"></i> mdi mdi-account-remove </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-search"></i> mdi mdi-account-search </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-settings"></i> mdi mdi-account-settings </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-settings-variant"></i> mdi mdi-account-settings-variant </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-star"></i> mdi mdi-account-star </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-star-variant"></i> mdi mdi-account-star-variant </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-account-switch"></i> mdi mdi-account-switch </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-adjust"></i> mdi mdi-adjust </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-air-conditioner"></i> mdi mdi-air-conditioner </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-airballoon"></i> mdi mdi-airballoon </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-airplane"></i> mdi mdi-airplane </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-airplane-landing"></i> mdi mdi-airplane-landing </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-airplane-off"></i> mdi mdi-airplane-off </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-airplane-takeoff"></i> mdi mdi-airplane-takeoff </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-airplay"></i> mdi mdi-airplay </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alarm"></i> mdi mdi-alarm </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alarm-check"></i> mdi mdi-alarm-check </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alarm-multiple"></i> mdi mdi-alarm-multiple </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alarm-off"></i> mdi mdi-alarm-off </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alarm-plus"></i> mdi mdi-alarm-plus </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-album"></i> mdi mdi-albums </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alert"></i> mdi mdi-alert </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alert-box"></i> mdi mdi-alert-box </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alert-circle"></i> mdi mdi-alert-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alert-circle-outline"></i> mdi mdi-alert-circle-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alert-octagon"></i> mdi mdi-alert-octagon </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alert-outline"></i> mdi mdi-alert-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alpha"></i> mdi mdi-alpha </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-alphabetical"></i> mdi mdi-alphabetical </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-altimeter"></i> mdi mdi-altimeter </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-amazon"></i> mdi mdi-amazon </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-amazon-clouddrive"></i> mdi mdi-amazon-clouddrive </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-ambulance"></i> mdi mdi-ambulance </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-amplifier"></i> mdi mdi-amplifier </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-anchor"></i> mdi mdi-anchor </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-android"></i> mdi mdi-android </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-android-debug-bridge"></i> mdi mdi-android-debug-bridge </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-android-studio"></i> mdi mdi-android-studio </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-animation"></i> mdi mdi-animation </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple"></i> mdi mdi-apple </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple-finder"></i> mdi mdi-apple-finder </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple-ios"></i> mdi mdi-apple-ios </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple-keyboard-caps"></i> mdi mdi-apple-keyboard-caps </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple-keyboard-command"></i> mdi mdi-apple-keyboard-command </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple-keyboard-control"></i> mdi mdi-apple-keyboard-control </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple-keyboard-option"></i> mdi mdi-apple-keyboard-option </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple-keyboard-shift"></i> mdi mdi-apple-keyboard-shift </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple-mobileme "></i> mdi mdi-apple-mobileme </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apple-safari"></i> mdi mdi-apple-safari </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-application"></i> mdi mdi-application </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-appnet"></i> mdi mdi-appnet </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-apps"></i> mdi mdi-apps </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-archive"></i> mdi mdi-archive </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrange-bring-forward"></i> mdi mdi-arrange-bring-forward </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrange-bring-to-front"></i> mdi mdi-arrange-bring-to-front </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrange-send-backward"></i> mdi mdi-arrange-send-backward </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrange-send-to-back"></i> mdi mdi-arrange-send-to-back </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-all"></i> mdi mdi-arrow-all </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-bottom-left"></i> mdi mdi-arrow-bottom-left </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-bottom-right"></i> mdi mdi-arrow-bottom-right </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-compress"></i> mdi mdi-arrow-compress </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-compress-all"></i> mdi mdi-arrow-compress-all </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-down"></i> mdi mdi-arrow-down </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-down"></i> mdi mdi-arrow-down </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-down-bold-circle"></i> mdi mdi-arrow-down-bold-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-down-bold-circle-outline"></i> mdi mdi-arrow-down-bold-circle-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-down-bold-hexagon-outline"></i> mdi mdi-arrow-down-bold-hexagon-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-down-drop-circle"></i> mdi mdi-arrow-down-drop-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-down-drop-circle-outline"></i> mdi mdi-arrow-down-drop-circle-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-expand"></i> mdi mdi-arrow-expand </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-expand-all"></i> mdi mdi-arrow-expand-all </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-left"></i> mdi mdi-arrow-left </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-left-bold"></i> mdi mdi-arrow-left-bold </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-left-bold-circle"></i> mdi mdi-arrow-left-bold-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-left-bold-circle-outline"></i> mdi mdi-arrow-left-bold-circle-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-left-bold-hexagon-outline"></i> mdi mdi-arrow-left-bold-hexagon-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-left-drop-circle"></i> mdi mdi-arrow-left-drop-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-left-drop-circle-outline"></i> mdi mdi-arrow-left-drop-circle-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-right"></i> mdi mdi-arrow-right </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-right-bold"></i> mdi mdi-arrow-right-bold </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-right-bold-circle"></i> mdi mdi-arrow-right-bold-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-right-bold-circle-outline"></i> mdi mdi-arrow-right-bold-circle-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-right-bold-hexagon-outline"></i> mdi mdi-arrow-right-bold-hexagon-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-right-drop-circle"></i> mdi mdi-arrow-right-drop-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-right-drop-circle-outline"></i> mdi mdi-arrow-right-drop-circle-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-top-left"></i> mdi mdi-arrow-top-left </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-top-right"></i> mdi mdi-arrow-top-right </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-up"></i> mdi mdi-arrow-up </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-up-bold"></i> mdi mdi-arrow-up-bold </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-up-bold-circle"></i> mdi mdi-arrow-up-bold-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-up-bold-circle-outline"></i> mdi mdi-arrow-up-bold-circle-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-up-bold-hexagon-outline"></i> mdi mdi-arrow-up-bold-hexagon-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-up-drop-circle"></i> mdi mdi-arrow-up-drop-circle </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-arrow-up-drop-circle-outline"></i> mdi mdi-arrow-up-drop-circle-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-assistant"></i> mdi mdi-assistant </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-at"></i> mdi mdi-at </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-attachment"></i> mdi mdi-attachment </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-audiobook"></i> mdi mdi-audiobook </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-auto-fix"></i> mdi mdi-auto-fix </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-auto-upload"></i> mdi mdi-auto-upload </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-autorenew"></i> mdi mdi-autorenew </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-av-timer"></i> mdi mdi-av-timer </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-baby"></i> mdi mdi-baby </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-backburger"></i> mdi mdi-backburger </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-backspace"></i> mdi mdi-backspace </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-backup-restore"></i> mdi mdi-backup-restore </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bank"></i> mdi mdi-bank </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-barcode"></i> mdi mdi-barcode </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-barcode-scan"></i> mdi mdi-barcode-scan </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-barley"></i> mdi mdi-barley </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-barrel"></i> mdi mdi-barrel </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-basecamp"></i> mdi mdi-basecamp </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-basket"></i> mdi mdi-basket </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-basket-fill"></i> mdi mdi-basket-fill </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-basket-unfill"></i> mdi mdi-basket-unfill </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery"></i> mdi mdi-battery </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-10"></i> mdi mdi-battery-10 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-20"></i> mdi mdi-battery-20 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-30"></i> mdi mdi-battery-30 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-40"></i> mdi mdi-battery-40 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-50"></i> mdi mdi-battery-50 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-60"></i> mdi mdi-battery-60 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-70"></i> mdi mdi-battery-70 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-80"></i> mdi mdi-battery-80 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-90"></i> mdi mdi-battery-90 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-alert"></i> mdi mdi-battery-alert </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-charging"></i> mdi mdi-battery-charging </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-charging-100"></i> mdi mdi-battery-charging-100 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-charging-20"></i> mdi mdi-battery-charging-20 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-charging-30"></i> mdi mdi-battery-charging-30 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-charging-40"></i> mdi mdi-battery-charging-40 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-charging-60"></i> mdi mdi-battery-charging-60 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-charging-80"></i> mdi mdi-battery-charging-80 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-charging-90"></i> mdi mdi-battery-charging-90 </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-minus"></i> mdi mdi-battery-minus </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-negative"></i> mdi mdi-battery-negative </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-outline"></i> mdi mdi-battery-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-plus"></i> mdi mdi-battery-plus </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-positive"></i> mdi mdi-battery-positive </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-battery-unknown"></i> mdi mdi-battery-unknown </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-beach"></i> mdi mdi-beach </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-beats"></i> mdi mdi-beats </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-beer"></i> mdi mdi-beer </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-behance"></i> mdi mdi-behance </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bell"></i> mdi mdi-bell </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bell-off"></i> mdi mdi-bell-off </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bell-outline"></i> mdi mdi-bell-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bell-plus"></i> mdi mdi-bell-plus </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bell-ring"></i> mdi mdi-bell-ring </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bell-ring-outline"></i> mdi mdi-bell-ring-outline </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bell-sleep"></i> mdi mdi-bell-sleep </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-beta"></i> mdi mdi-beta </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bible"></i> mdi mdi-bible </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bike"></i> mdi mdi-bike </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bing"></i> mdi mdi-bing </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-binoculars"></i> mdi mdi-binoculars </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bio"></i> mdi mdi-bio </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-biohazard"></i> mdi mdi-biohazard </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bitbucket"></i> mdi mdi-bitbucket </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-black-mesa"></i> mdi mdi-black-mesa </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-blackberry"></i> mdi mdi-blackberry </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-blender"></i> mdi mdi-blender </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-blinds"></i> mdi mdi-blinds </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-block-helper"></i> mdi mdi-block-helper </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-blogger"></i> mdi mdi-blogger </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bluetooth"></i> mdi mdi-bluetooth </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bluetooth-audio"></i> mdi mdi-bluetooth-audio </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bluetooth-connect"></i> mdi mdi-bluetooth-connect </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bluetooth-off"></i> mdi mdi-bluetooth-off </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bluetooth-settings"></i> mdi mdi-bluetooth-settings </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bluetooth-transfer"></i> mdi mdi-bluetooth-transfer </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-blur"></i> mdi mdi-blur </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-blur-linear"></i> mdi mdi-blur-linear </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-blur-off"></i> mdi mdi-blur-off </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-blur-radial"></i> mdi mdi-blur-radial </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-bone"></i> mdi mdi-bone </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-book"></i> mdi mdi-book </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-book-minus"></i> mdi mdi-book-minus </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-book-multiple"></i> mdi mdi-book-multiple </div> <div class="col-sm-6 col-md-4 col-lg-3"> <i class="mdi mdi-book-multiple-variant"></i> mdi mdi-book-multiple-variant </div>
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
true
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/permission_update.blade.php
resources/views/admin/permission_update.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">修改权限</h4> <p class="card-description"> Update Permission </p> <form class="forms-sample"> <div class="form-group"> <label for="name">权限名</label> <input type="text" class="form-control" id="name" value="{{ $permission->name }}"> </div> <div class="form-group" style="width: 100%;height: 200px;"> <select class="form-control" id="selectL" name="selectL" multiple="multiple" style="width:40%;height:200px;float: left"> @foreach($uncheck_routes as $route) <option value="{{$route->rbacRule}}">{{$route->rbacRule}}</option> @endforeach </select> <button type="button" id="toright" class="btn btn-gradient-primary btn-sm" style="margin-left: 60px;margin-top: 80px;"> > </button> <button type="button" id="toleft" class="btn btn-gradient-primary btn-sm" style="margin-top: 80px;"> < </button> <select class="form-control" id="selectR" name="selectR" multiple="multiple" style="width:40%;height:200px;float: right"> @foreach($check_routes as $route) <option value="{{$route->rbacRule}}">{{$route->rbacRule}}</option> @endforeach </select> </div> <button type="button" onclick="commit({{ $permission->id }})" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> var leftSel = $("#selectL"); var rightSel = $("#selectR"); $("#toright").bind("click",function(){ leftSel.find("option:selected").each(function(){ $(this).remove().appendTo(rightSel); }); }); $("#toleft").bind("click",function(){ rightSel.find("option:selected").each(function(){ $(this).remove().appendTo(leftSel); }); }); leftSel.dblclick(function(){ $(this).find("option:selected").each(function(){ $(this).remove().appendTo(rightSel); }); }); rightSel.dblclick(function(){ $(this).find("option:selected").each(function(){ $(this).remove().appendTo(leftSel); }); }); function commit(id){ var selVal = []; rightSel.find("option").each(function(){ selVal.push(this.value); }); // selVals = selVal.join(","); // if(selVals==""){ // layer.msg('请选择路由', function(){}); // } if (selVal.length === 0) { layer.msg('请选择路由', function(){}); } var name = $("#name").val(); if(name==""){ layer.msg('您必须输入权限名称', function(){}); } var data = { 'name':name, 'routes':selVal, }; myRequest("/admin/permission/update/"+id,"post",data,function(res){ if(res.code == '200'){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }else{ layer.msg(res.msg) } }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/config_add.blade.php
resources/views/admin/config_add.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">请填写配置信息</h4> {{--<p class="card-description">--}} {{--Basic form elements--}} {{--</p>--}} <form class="forms-sample" id="form"> <div class="form-group"> <label >* 配置描述</label> <input type="text" class="form-control required" name="name" placeholder="配置描述"> </div> <div class="form-group"> <label >* 关键字(key)</label> <input type="text" class="form-control required" name="config_key" placeholder="key"> </div> <div class="form-group"> <label for="exampleInputPassword4">* 选择配置类型</label> <select class="form-control required" id="type" name="type"> <option value="string">字符串</option> <option value="image">图片</option> <option value="text">富文本</option> </select> </div> <div class="form-group" id="string"> <label >* 配置值(value)</label> <input type="text" name="config_value" class="form-control value-input" placeholder="key"> </div> <div class="form-group" id="image" style="display: none;"> <label>* 配置值(value)</label> <input type="file" class="file-upload-default img-file" data-path="config"> <input type="hidden" class="image-path value-input"> <div class="input-group col-xs-12"> <input type="text" class="form-control file-upload-info" disabled=""> <span class="input-group-append"> <button class="file-upload-browse btn btn-gradient-primary" onclick="upload($(this))" type="button">上传</button> </span> </div> <div class="img-yl"> </div> </div> <div class="form-group " id="text" style="display: none;"> <label >* 配置值(value)</label> <textarea placeholder="请在此处编辑内容" id="editor" style="height:400px;max-height:400px;overflow: hidden"></textarea > </div> <button type="button" onclick="commit()" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> $(document).on('change','#type',function(){ if($(this).val() == 'string'){ $('#string').show().find('input').attr('name','config_value'); $('#text').hide().find('textarea').removeAttr('name'); $('#image').hide().find('.value-input').removeAttr('name'); }else if($(this).val() == 'text'){ $('#text').show().find('textarea').attr('name','config_value'); $('#string').hide().find('input').removeAttr('name'); $('#image').hide().find('.value-input').removeAttr('name'); }else if($(this).val() == 'image'){ $('#string').hide().find('input').removeAttr('name'); $('#text').hide().find('textarea').removeAttr('name'); $('#image').show().find('.value-input').attr('name','config_value'); } }) var editor = new wangEditor('editor'); // 上传图片(举例) editor.config.uploadImgUrl = "/admin/wangeditor/upload"; // 隐藏掉插入网络图片功能。该配置,只有在你正确配置了图片上传功能之后才可用。 editor.config.hideLinkImg = false; editor.create(); function commit(){ if(!checkForm()){ return false; } var data = $("#form").serializeObject(); myRequest("/admin/config/add","post",data,function(res){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/index.blade.php
resources/views/admin/index.blade.php
<!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>管理控制台</title> <!-- plugins:css --> <link rel="stylesheet" href="/assets/vendors/iconfonts/mdi/css/materialdesignicons.min.css"> <link rel="stylesheet" href="/assets/vendors/css/vendor.bundle.base.css"> <!-- endinject --> <!-- inject:css --> <link rel="stylesheet" href="/assets/css/style.css"> <!-- endinject --> <link rel="shortcut icon" href="/assets/images/favicon.png" /> <style> /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ ::-webkit-scrollbar { width: 0px; height: 0px; background-color: #F5F5F5; } </style> </head> <body> <div class="container-scroller"> <!-- partial:partials/_navbar.html --> <nav class="navbar default-layout-navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row"> <div class="text-center navbar-brand-wrapper d-flex align-items-center justify-content-center"> <a class="navbar-brand brand-logo" href="/"><img src="{{ getConfig("admin_logo") }}" alt="logo"/></a> <a class="navbar-brand brand-logo-mini" href="/"><img src="/assets/images/logo-mini.svg" alt="logo"/></a> </div> <div class="navbar-menu-wrapper d-flex align-items-stretch"> <div class="search-field d-none d-md-block"> <form class="d-flex align-items-center h-100" action="#"> <div class="input-group"> <div class="input-group-prepend bg-transparent"> <i class="input-group-text border-0 mdi mdi-magnify"></i> </div> <input type="text" class="form-control bg-transparent border-0" placeholder="搜索内容"> </div> </form> </div> <ul class="navbar-nav navbar-nav-right"> <li class="nav-item nav-profile dropdown"> <a class="nav-link dropdown-toggle" id="profileDropdown" href="#" data-toggle="dropdown" aria-expanded="false"> <div class="nav-profile-img"> <img src="{{ session('admin')->avatar }}" alt="image"> <span class="availability-status online"></span> </div> <div class="nav-profile-text"> <p class="mb-1 text-black">{{ session('admin')->account }}</p> </div> </a> <div class="dropdown-menu navbar-dropdown" aria-labelledby="profileDropdown"> <a class="dropdown-item" onclick="editInfo({{ session('admin')->id }})" href="javascript:;"> <i class="mdi mdi-border-color mr-2 text-success"></i> 修改信息 </a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/logout"> <i class="mdi mdi-logout mr-2 text-primary"></i> 退出登录 </a> </div> </li> <li class="nav-item d-none d-lg-block full-screen-link"> <a class="nav-link"> <i class="mdi mdi-fullscreen" id="fullscreen-button"></i> </a> </li> <li class="nav-item dropdown"> <a class="nav-link count-indicator dropdown-toggle" id="messageDropdown" href="#" data-toggle="dropdown" aria-expanded="false"> <i class="mdi mdi-email-outline"></i> <span class="count-symbol bg-warning"></span> </a> <div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list" aria-labelledby="messageDropdown"> <h6 class="p-3 mb-0">未读来信</h6> <div class="dropdown-divider"></div> <a class="dropdown-item preview-item"> <div class="preview-thumbnail"> <img src="/assets/images/faces/face4.jpg" alt="image" class="profile-pic"> </div> <div class="preview-item-content d-flex align-items-start flex-column justify-content-center"> <h6 class="preview-subject ellipsis mb-1 font-weight-normal">Mark send you a message</h6> <p class="text-gray mb-0"> 1 Minutes ago </p> </div> </a> <div class="dropdown-divider"></div> <h6 class="p-3 mb-0 text-center">查看全部</h6> </div> </li> <li class="nav-item dropdown"> <a class="nav-link count-indicator dropdown-toggle" id="notificationDropdown" href="#" data-toggle="dropdown"> <i class="mdi mdi-bell-outline"></i> <span class="count-symbol bg-danger"></span> </a> <div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list" aria-labelledby="notificationDropdown"> <h6 class="p-3 mb-0">系统消息</h6> <div class="dropdown-divider"></div> <a class="dropdown-item preview-item"> <div class="preview-thumbnail"> <div class="preview-icon bg-success"> <i class="mdi mdi-calendar"></i> </div> </div> <div class="preview-item-content d-flex align-items-start flex-column justify-content-center"> <h6 class="preview-subject font-weight-normal mb-1">Event today</h6> <p class="text-gray ellipsis mb-0"> Just a reminder that you have an event today </p> </div> </a> <div class="dropdown-divider"></div> <h6 class="p-3 mb-0 text-center">查看全部</h6> </div> </li> {{--退出登录--}} {{--<li class="nav-item nav-logout d-none d-lg-block">--}} {{--<a class="nav-link" href="#">--}} {{--<i class="mdi mdi-power"></i>--}} {{--</a>--}} {{--</li>--}} {{--<li class="nav-item nav-settings d-none d-lg-block">--}} {{--<a class="nav-link" href="#">--}} {{--<i class="mdi mdi-format-line-spacing"></i>--}} {{--</a>--}} {{--</li>--}} </ul> <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas"> <span class="mdi mdi-menu"></span> </button> </div> </nav> <!-- partial --> <div class="container-fluid page-body-wrapper"> <!-- partial:partials/_sidebar.html --> <nav class="sidebar sidebar-offcanvas" id="sidebar"> <ul class="nav"> <li class="nav-item nav-profile"> <a href="#" class="nav-link"> <div class="nav-profile-image"> <img src="{{ session('admin')->avatar }}" alt="profile"> <span class="login-status online"></span> </div> <div class="nav-profile-text d-flex flex-column"> <span class="font-weight-bold mb-2">{{ session('admin')->account }}</span> <span class="text-secondary text-small">{{ session('admin')->nickname }}</span> </div> <i class="mdi mdi-bookmark-check text-success nav-profile-badge"></i> </a> </li> <li class="nav-item"> <a class="nav-link" href="/"> <span class="menu-title">控制台</span> <i class="mdi mdi-home menu-icon"></i> </a> </li> @if(session('admin')->hasSuperRole()) <li class="nav-item"> <a class="nav-link" target="main" href="/admin/config/list"> <span class="menu-title">配置项</span> <i class="mdi mdi-settings-box menu-icon"></i> </a> </li> @endif @foreach($menu as $k=>$v) @if($v->hasChild) <li class="nav-item"> <a class="nav-link" data-toggle="collapse" href="#system-pages-{{$v->id}}" aria-expanded="false" aria-controls="general-pages"> <span class="menu-title">{{ $v->name }}</span> <i class="menu-arrow"></i> <i class="{{ $v->icon }} menu-icon"></i> </a> <div class="collapse" id="system-pages-{{$v->id}}"> <ul class="nav flex-column sub-menu"> @foreach($v->children as $key=>$val) <li class="nav-item"> <a class="nav-link" target="main" href="{{ $val->url }}">{{ $val->name }}</a></li> @endforeach </ul> </div> </li> @else <li class="nav-item"> <a class="nav-link" target="main" href="{{ $v->url }}"> <span class="menu-title">{{ $v->name }}</span> <i class="{{ $v->icon }} menu-icon"></i> </a> </li> @endif @endforeach @if(session('admin')->hasSuperRole()) <li class="nav-item"> <a class="nav-link" data-toggle="collapse" href="#system-pages" aria-expanded="false" aria-controls="general-pages" > <span class="menu-title">系统设置</span> <i class="menu-arrow"></i> <i class="mdi mdi-settings menu-icon"></i> </a> <div class="collapse" id="system-pages"> <ul class="nav flex-column sub-menu"> <li class="nav-item"> <a class="nav-link" target="main" href="/admin/menu/list">菜单</a></li> <li class="nav-item"> <a class="nav-link" target="main" href="/admin/permission/list">权限</a></li> <li class="nav-item"> <a class="nav-link" target="main" href="/admin/role/list">角色</a></li> <li class="nav-item"> <a class="nav-link" target="main" href="/admin/administrator/list">管理员</a></li> </ul> </div> </li> @endif {{--<li class="nav-item sidebar-actions">--}} {{--<span class="nav-link">--}} {{--<div class="border-bottom">--}} {{--<h6 class="font-weight-normal mb-3">Projects</h6> --}} {{--</div>--}} {{--<button class="btn btn-block btn-lg btn-gradient-primary mt-4">+ Add a project</button>--}} {{--<div class="mt-4">--}} {{--<div class="border-bottom">--}} {{--<p class="text-secondary">Categories</p> --}} {{--</div>--}} {{--<ul class="gradient-bullet-list mt-4">--}} {{--<li>Free</li>--}} {{--<li>Pro</li>--}} {{--</ul>--}} {{--</div>--}} {{--</span>--}} {{--</li>--}} </ul> </nav> <iframe id="mainiframe" name="main" width="100%" src="{{ url('console') }}" frameborder="0" scrolling="auto" marginheight="0" marginwidth="0"></iframe> <!-- main-panel ends --> </div> <!-- page-body-wrapper ends --> </div> <!-- container-scroller --> <script src="https://code.jquery.com/jquery-3.0.0.min.js"></script> <script src="/assets/layer/layer.js"></script> <script> function editInfo(id) { var page = layer.open({ type: 2, title: '修改个人信息', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/edit/info/'+id }); } </script> <!-- plugins:js --> <script src="/assets/vendors/js/vendor.bundle.base.js"></script> <script src="/assets/vendors/js/vendor.bundle.addons.js"></script> <!-- endinject --> <!-- Plugin js for this page--> <!-- End plugin js for this page--> <!-- inject:js --> <script src="/assets/js/off-canvas.js"></script> <script src="/assets/js/misc.js"></script> <!-- endinject --> <!-- Custom js for this page--> <script src="/assets/js/dashboard.js"></script> <!-- End custom js for this page--> </body> </html>
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/role_update.blade.php
resources/views/admin/role_update.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">请修改角色信息</h4> {{--<p class="card-description">--}} {{--Basic form elements--}} {{--</p>--}} <form class="forms-sample" id="form"> <div class="form-group"> <label >*角色名称</label> <input type="text" class="form-control required" name="name" placeholder="角色名称" value="{{ $role->name }}"> </div> <div class="form-group"> <label >角色描述</label> <textarea class="form-control" name="description" rows="4">{{ $role->description }}</textarea> </div> <div class="form-group"> <div class="form-check col-md-1 col-sm-1" style="display: inline-block;"> <label class="form-check-label" style="margin-left: 0"> *选择权限 </label> </div> <div class="form-check col-md-2 col-sm-2" style="display: inline-block;"> <label class="form-check-label"> <input type="checkbox" class="form-check-input all"> 全选 <i class="input-helper"></i> </label> </div> <br> @foreach($permissions as $permission) <div class="form-check col-md-2 col-sm-2" style="display: inline-block;"> <label class="form-check-label"> <input type="checkbox" class="form-check-input permission" value="{{ $permission->id }}" @if($permission->checked) checked @endif> {{ $permission->name }} <i class="input-helper"></i> </label> </div> @endforeach </div> <button type="button" onclick="commit({{ $role->id }})" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> $('.all').on("click",function(){ if(this.checked) { $("input[type='checkbox']").prop('checked',true); }else { $("input[type='checkbox']").prop('checked',false); } }); function commit(id){ if(!checkForm()){ return false; } var data = $("#form").serializeObject(); var permissions = new Array(); $('.permission:checked').each(function(index){ permissions[index] = $(this).val(); }) data.permissions = permissions; myRequest("/admin/role/update/"+id,"post",data,function(res){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/permission_add.blade.php
resources/views/admin/permission_add.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">添加权限</h4> <p class="card-description"> Add Permission </p> <form class="forms-sample"> <div class="form-group"> <label for="name">权限名</label> <input type="text" class="form-control" id="name" placeholder="请输入权限名"> </div> <div class="form-group" style="width: 100%;height: 200px;"> <select class="form-control" id="selectL" name="selectL" multiple="multiple" style="width:40%;height:200px;float: left"> @foreach($routes as $route) <option value="{{$route->rbacRule}}">{{$route->rbacRule}}</option> @endforeach </select> <button type="button" id="toright" class="btn btn-gradient-primary btn-sm" style="margin-left: 60px;margin-top: 80px;"> > </button> <button type="button" id="toleft" class="btn btn-gradient-primary btn-sm" style="margin-top: 80px;"> < </button> <select class="form-control" id="selectR" name="selectR" multiple="multiple" style="width:40%;height:200px;float: right"> </select> </div> <button type="button" onclick="commit()" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> var leftSel = $("#selectL"); var rightSel = $("#selectR"); $("#toright").bind("click",function(){ leftSel.find("option:selected").each(function(){ $(this).remove().appendTo(rightSel); }); }); $("#toleft").bind("click",function(){ rightSel.find("option:selected").each(function(){ $(this).remove().appendTo(leftSel); }); }); leftSel.dblclick(function(){ $(this).find("option:selected").each(function(){ $(this).remove().appendTo(rightSel); }); }); rightSel.dblclick(function(){ $(this).find("option:selected").each(function(){ $(this).remove().appendTo(leftSel); }); }); function commit(){ var selVal = []; rightSel.find("option").each(function(){ selVal.push(this.value); }); // selVals = selVal.join(","); // if(selVals==""){ // layer.msg('请选择路由', function(){}); // } if (selVal.length === 0) { layer.msg('请选择路由', function(){}); } var name = $("#name").val(); if(name==""){ layer.msg('您必须输入权限名称', function(){}); } var data = { 'name':name, 'routes':selVal, }; myRequest("/admin/permission/add","post",data,function(res){ if(res.code == '200'){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }else{ layer.msg(res.msg) } }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/menu_update.blade.php
resources/views/admin/menu_update.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">请修改菜单信息</h4> {{--<p class="card-description">--}} {{--Basic form elements--}} {{--</p>--}} <form class="forms-sample" id="form"> <div class="form-group"> <label for="exampleInputName1">菜单名称</label> <input type="text" class="form-control required" name="name" placeholder="菜单名称" value="{{ $menu->name }}"> </div> <div class="form-group"> <label for="exampleInputEmail3">菜单链接</label> <input type="text" class="form-control required" name="url" placeholder="菜单链接" value="{{ $menu->url }}"> </div> <div class="form-group"> <label for="exampleInputEmail3">菜单图标</label> <input type="text" class="form-control" name="icon" placeholder="菜单图标对应class值,二级菜单留空即可" value="{{ $menu->icon }}"> <p class="card-description"> 点击查看<a href="/icon" target="_blank">图标库</a> </p> </div> <div class="form-group"> <label for="exampleInputEmail3">权重</label> <input type="text" class="form-control required" name="sort" placeholder="权重 数字越大,排名越靠前" value="{{ $menu->sort }}"> </div> <div class="form-group"> <label for="exampleInputPassword4">上级菜单</label> <select class="form-control required" name="pid" > <option value="0" @if($menu->pid == 0) selected @endif>顶级菜单</option> @foreach($top_menu as $tMenu) <option @if($menu->pid == $tMenu->id) selected @endif value="{{ $tMenu->id }}">{{ $tMenu->name }}</option> @endforeach </select> </div> <div class="form-group"> <div class="form-check col-md-1 col-sm-1" style="display: inline-block;"> <label class="form-check-label" style="margin-left: 0"> *选择角色 </label> </div> <div class="form-check col-md-2 col-sm-2" style="display: inline-block;"> <label class="form-check-label"> <input type="checkbox" class="form-check-input all"> 全选 <i class="input-helper"></i> </label> </div> <br> @foreach($roles as $role) <div class="form-check col-md-2 col-sm-2" style="display: inline-block;"> <label class="form-check-label"> <input type="checkbox" class="form-check-input role" value="{{ $role->id }}" @if($role->checked) checked @endif> {{ $role->name }} <i class="input-helper"></i> </label> </div> @endforeach </div> <button type="button" onclick="commit({{ $menu->id }})" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> $('.all').on("click",function(){ if(this.checked) { $("input[type='checkbox']").prop('checked',true); }else { $("input[type='checkbox']").prop('checked',false); } }); function commit(id){ if(!checkForm()){ return false; } var data = $("#form").serializeObject(); var roles = new Array(); $('.role:checked').each(function(index){ roles[index] = $(this).val(); }) data.roles = roles; myRequest("/admin/menu/update/"+id,"post",data,function(res){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/role.blade.php
resources/views/admin/role.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="page-header"> <h3 class="page-title"> <span class="page-title-icon bg-gradient-primary text-white mr-2"> <i class="mdi mdi-wrench"></i> </span> 角色 </h3> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">系统设置</a></li> <li class="breadcrumb-item active" aria-current="page">角色管理</li> </ol> </nav> </div> <div class="row"> <div class="col-lg-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">角色列表</h4> <p class="card-description"> <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()"> <i class="mdi mdi-plus btn-icon-prepend"></i> 添加角色 </button> </p> <table class="table table-bordered"> <thead> <tr> <th>角色名称</th> <th>角色描述</th> <th>创建时间</th> <th>更新时间</th> <th>操作</th> </tr> </thead> <tbody> @foreach($list as $k=>$v) <tr> <td>{{ $v->name }}</td> <td>{{ $v->description }}</td> <td>{{ $v->created_at }}</td> <td>{{ $v->updated_at }}</td> <td> <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $v->id }})"> 修改 <i class="mdi mdi-file-check btn-icon-append"></i> </button> <button @if($v->id == 1) disabled @endif type="button" class="btn btn-sm btn-gradient-danger btn-icon-text" onclick="del({{ $v->id }})"> <i class="mdi mdi-delete btn-icon-prepend"></i> 删除 </button> </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> </div> <script> function add(){ var page = layer.open({ type: 2, title: '添加角色', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/role/add' }); } function update(id){ var page = layer.open({ type: 2, title: '修改角色', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/role/update/'+id }); } function del(id){ myConfirm("删除操作不可逆,是否继续?",function(){ myRequest("/admin/role/del/"+id,"post",{},function(res){ layer.msg(res.msg) setTimeout(function(){ window.location.reload(); },1500) }); }); } $('.menu-switch').click(function(){ id = $(this).attr('id'); state = $(this).attr('state'); console.log(id) console.log(state) if(state == "on"){ $('.pid-'+id).hide(); $(this).attr("state","off") $(this).removeClass('mdi-menu-down').addClass('mdi-menu-right'); }else{ $('.pid-'+id).show(); $(this).attr("state","on") $(this).removeClass('mdi-menu-right').addClass('mdi-menu-down'); } }) </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/permission.blade.php
resources/views/admin/permission.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="page-header"> <h3 class="page-title"> <span class="page-title-icon bg-gradient-primary text-white mr-2"> <i class="mdi mdi-wrench"></i> </span> 权限 </h3> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">系统设置</a></li> <li class="breadcrumb-item active" aria-current="page">权限管理</li> </ol> </nav> </div> <div class="row"> <div class="col-lg-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">权限列表</h4> <p class="card-description"> <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()"> <i class="mdi mdi-plus btn-icon-prepend"></i> 添加权限 </button> </p> <table class="table table-bordered"> <thead> <tr> <th width="5%">ID</th> <th width="10%">权限名</th> <th width="35%">路由</th> <th width="15%">创建时间</th> <th width="15%">更新时间</th> <th width="20%">操作</th> </tr> </thead> <tbody> @foreach($list as $permission) <tr> <td>{{ $permission->id }}</td> <td>{{ $permission->name }}</td> <td style="word-wrap:break-word;word-break:break-all"> @foreach($permission->routes as $route) <label class="badge badge-success">{{$route}}</label> @endforeach </td> <td>{{ $permission->created_at }}</td> <td>{{ $permission->updated_at }}</td> <td> <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $permission->id }})"> 修改 <i class="mdi mdi-file-check btn-icon-append"></i> </button> <button type="button" class="btn btn-sm btn-gradient-danger btn-icon-text" onclick="del({{ $permission->id }})"> <i class="mdi mdi-delete btn-icon-prepend"></i> 删除 </button> </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> </div> <script> function add(){ layer.open({ type: 2, title: '添加权限', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/permission/add' }); } function update(id){ var page = layer.open({ type: 2, title: '修改权限', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/permission/update/'+id }); } function del(id){ myConfirm("删除操作不可逆,是否继续?",function(){ myRequest("/admin/permission/del/"+id,"post",{},function(res){ layer.msg(res.msg) setTimeout(function(){ window.location.reload(); },1500) }); }); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/menu.blade.php
resources/views/admin/menu.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="page-header"> <h3 class="page-title"> <span class="page-title-icon bg-gradient-primary text-white mr-2"> <i class="mdi mdi-wrench"></i> </span> 菜单 </h3> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">系统设置</a></li> <li class="breadcrumb-item active" aria-current="page">菜单管理</li> </ol> </nav> </div> <div class="row"> <div class="col-lg-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">菜单列表</h4> <p class="card-description"> <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()"> <i class="mdi mdi-plus btn-icon-prepend"></i> 添加菜单 </button> </p> <table class="table table-bordered"> <thead> <tr> <th>菜单名称</th> <th>菜单链接</th> <th>所属角色</th> <th>创建时间</th> <th>更新时间</th> <th>操作</th> </tr> </thead> <tbody> @foreach($list as $menu) <tr> <td> @if(count($menu->children)) <i class="mdi mdi-menu-down menu-switch" id="{{$menu->id}}" state="on"></i> @endif <i class="{{ $menu->icon }}"> </i>{{ $menu->name }} </td> <td>{{ $menu->url }}</td> <td> @foreach($menu->roles as $role) <label class="badge badge-success">{{ $role->name }}</label> @endforeach </td> <td>{{ $menu->created_at }}</td> <td>{{ $menu->updated_at }}</td> <td> <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $menu->id }})"> 修改 <i class="mdi mdi-file-check btn-icon-append"></i> </button> <button type="button" class="btn btn-sm btn-gradient-danger btn-icon-text" onclick="del({{ $menu->id }})"> <i class="mdi mdi-delete btn-icon-prepend"></i> 删除 </button> </td> </tr> @if(count($menu->children)) @foreach($menu->children as $childmenu) <tr class="pid-{{ $menu->id }}"> <td>     {{ $childmenu->name }}</td> <td>{{ $childmenu->url }}</td> <td> @foreach($childmenu->roles as $role) <label class="badge badge-success">{{ $role->name }}</label> @endforeach </td> <td>{{ $childmenu->created_at }}</td> <td>{{ $menu->updated_at }}</td> <td> <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $childmenu->id }})"> 修改 <i class="mdi mdi-file-check btn-icon-append"></i> </button> <button type="button" class="btn btn-sm btn-gradient-danger btn-icon-text" onclick="del({{ $childmenu->id }})"> <i class="mdi mdi-delete btn-icon-prepend"></i> 删除 </button> </td> </tr> @endforeach @endif @endforeach </tbody> </table> </div> </div> </div> </div> </div> </div> <script> function add(){ var page = layer.open({ type: 2, title: '添加菜单', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/menu/add' }); } function update(id){ var page = layer.open({ type: 2, title: '修改菜单', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/menu/update/'+id }); } function del(id){ myConfirm("删除操作不可逆,是否继续?",function(){ myRequest("/admin/menu/del/"+id,"post",{},function(res){ layer.msg(res.msg) setTimeout(function(){ window.location.reload(); },1500) }); }); } $('.menu-switch').click(function(){ id = $(this).attr('id'); state = $(this).attr('state'); console.log(id) console.log(state) if(state == "on"){ $('.pid-'+id).hide(); $(this).attr("state","off") $(this).removeClass('mdi-menu-down').addClass('mdi-menu-right'); }else{ $('.pid-'+id).show(); $(this).attr("state","on") $(this).removeClass('mdi-menu-right').addClass('mdi-menu-down'); } }) </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/edit_info.blade.php
resources/views/admin/edit_info.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">请修改您的个人信息</h4> <form class="forms-sample" id="form"> <div class="form-group"> <label>修改头像</label> <input type="file" class="file-upload-default img-file" data-path="avatar"> <input type="hidden" name="avatar" class="image-path" value="{{$admin->avatar}}"> <div class="input-group col-xs-12"> <input type="text" class="form-control file-upload-info" disabled="" value="{{$admin->avatar}}" placeholder="选择图片"> <span class="input-group-append"> <button class="file-upload-browse btn btn-gradient-primary" onclick="upload($(this))" type="button">上传</button> </span> </div> <div class="img-yl" style="display: block;"> <img src="{{$admin->avatar}}"> </div> </div> <div class="form-group"> <label for="nickname">*昵称</label> <input type="text" class="form-control required" name="nickname" value="{{$admin->nickname}}"> </div> <div class="form-group"> <label for="password">*密码</label> <input type="password" id="password" class="form-control" name="password" value="{{$admin->clear_password}}"> </div> <div class="form-group"> <label for="password">*确认密码</label> <input type="password" id="password_verify" class="form-control" name="password_verify" value="{{$admin->clear_password}}"> </div> <button type="button" onclick="commit({{$admin->id}})" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> function commit(id){ if($("#password").val() != $("#password_verify").val()){ layer.msg('两次密码输入不一致', function(){}); } if(!checkForm()){ return false; } var data = $("#form").serializeObject(); myRequest("/edit/info/"+id,"post",data,function(res){ if(res.code == '200'){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }else{ layer.msg(res.msg) } }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/administrator_update.blade.php
resources/views/admin/administrator_update.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">请修改管理员信息</h4> <form class="forms-sample" id="form"> <div class="form-group"> <label>头像上传</label> <input type="file" class="file-upload-default img-file" data-path="avatar"> <input type="hidden" name="avatar" class="image-path" value="{{$admin->avatar}}"> <div class="input-group col-xs-12"> <input type="text" class="form-control file-upload-info" disabled="" value="{{$admin->avatar}}"> <span class="input-group-append"> <button class="file-upload-browse btn btn-gradient-primary" onclick="upload($(this))" type="button">上传</button> </span> </div> <div class="img-yl" style="display: block;"> <img src="{{$admin->avatar}}"> </div> </div> <div class="form-group"> <label for="nickname">*昵称</label> <input type="text" class="form-control required" name="nickname" value="{{$admin->nickname}}"> </div> <div class="form-group"> <label for="account">*账号</label> <input type="text" class="form-control required" name="account" value="{{$admin->account}}"> </div> <div class="form-group"> <label for="password">*密码</label> <input type="password" id="password" class="form-control" name="password" value="{{$admin->clear_password}}"> </div> <div class="form-group"> <label for="password">*确认密码</label> <input type="password" id="password_verify" class="form-control" name="password_verify" value="{{$admin->clear_password}}"> </div> <div class="form-group"> <label for="role">*角色</label> <select id="roles-selector" class="form-control form-control-lg" multiple="multiple"> @foreach($roles as $role) <option value="{{$role->id}}" @if(in_array($role->id, $s_role_id_arr)) selected @endif>{{$role->name}}</option> @endforeach </select> </div> <button type="button" onclick="commit({{$admin->id}})" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> function commit(id){ if($("#password").val() != $("#password_verify").val()){ layer.msg('两次密码输入不一致', function(){}); } if(!checkForm()){ return false; } var data = $("#form").serializeObject(); data.roles = [] var rolesSelector = document.querySelector('select#roles-selector') for(opt of rolesSelector) { if(opt.selected) { data.roles.push(opt.value) } } myRequest("/admin/administrator/update/"+id,"post",data,function(res){ if(res.code == '200'){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }else{ layer.msg(res.msg) } }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/role_add.blade.php
resources/views/admin/role_add.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">请填写角色信息</h4> {{--<p class="card-description">--}} {{--Basic form elements--}} {{--</p>--}} <form class="forms-sample" id="form"> <div class="form-group"> <label >*角色名称</label> <input type="text" class="form-control required" name="name" placeholder="角色名称"> </div> <div class="form-group"> <label >角色描述</label> <textarea class="form-control" name="description" rows="4"></textarea> </div> <div class="form-group"> <div class="form-check col-md-1 col-sm-1" style="display: inline-block;"> <label class="form-check-label" style="margin-left: 0"> *选择权限 </label> </div> <div class="form-check col-md-2 col-sm-2" style="display: inline-block;"> <label class="form-check-label"> <input type="checkbox" class="form-check-input all"> 全选 <i class="input-helper"></i> </label> </div> <br> @foreach($permissions as $permission) <div class="form-check col-md-2 col-sm-2" style="display: inline-block;"> <label class="form-check-label"> <input type="checkbox" class="form-check-input permission" value="{{ $permission->id }}"> {{ $permission->name }} <i class="input-helper"></i> </label> </div> @endforeach </div> <button type="button" onclick="commit()" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> $('.all').on("click",function(){ if(this.checked) { $("input[type='checkbox']").prop('checked',true); }else { $("input[type='checkbox']").prop('checked',false); } }); function commit(){ if(!checkForm()){ return false; } var data = $("#form").serializeObject(); var permissions = new Array(); $('.permission:checked').each(function(index){ permissions[index] = $(this).val(); }) data.permissions = permissions; myRequest("/admin/role/add","post",data,function(res){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/config_update.blade.php
resources/views/admin/config_update.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">请修改配置信息</h4> {{--<p class="card-description">--}} {{--Basic form elements--}} {{--</p>--}} <form class="forms-sample" id="form"> <div class="form-group"> <label >* 配置描述</label> <input type="text" class="form-control required" name="name" placeholder="配置描述" value="{{ $config->name }}"> </div> <div class="form-group"> <label >* 关键字(key)</label> <input type="text" class="form-control required" name="config_key" placeholder="key" value="{{ $config->config_key }}"> </div> @if($config->type == "string") <div class="form-group" id="string"> <label >* 配置值(value)</label> <input type="text" name="config_value" class="form-control value-input" name="config_key" placeholder="key" value="{{ $config->config_value }}"> </div> @elseif($config->type == "image") <div class="form-group" id="image"> <label>* 配置值(value)</label> <input type="file" class="file-upload-default img-file" data-path="config"> <input type="hidden" class="image-path value-input" name="config_value" value="{{ $config->config_value }}"> <div class="input-group col-xs-12"> <input type="text" class="form-control file-upload-info" disabled="" value="{{ $config->config_value }}"> <span class="input-group-append"> <button class="file-upload-browse btn btn-gradient-primary" onclick="upload($(this))" type="button">上传</button> </span> </div> <div class="img-yl" style="display: block;"> <img src="{{ $config->config_value }}" alt=""> </div> </div> @else <div class="form-group " id="text"> <label >* 配置值(value)</label> <textarea placeholder="请在此处编辑内容" name="config_value" id="editor" style="height:400px;max-height:400px;overflow: hidden">{{ $config->config_value }}</textarea > </div> @endif <button type="button" onclick="commit({{ $config->id }})" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> @if($config->type == "text") var editor = new wangEditor('editor'); // 上传图片(举例) editor.config.uploadImgUrl = "/admin/wangeditor/upload"; // 隐藏掉插入网络图片功能。该配置,只有在你正确配置了图片上传功能之后才可用。 editor.config.hideLinkImg = false; editor.create(); @endif function commit(id){ if(!checkForm()){ return false; } var data = $("#form").serializeObject(); myRequest("/admin/config/update/"+id,"post",data,function(res){ layer.msg(res.msg) setTimeout(function(){ parent.location.reload(); },1500) }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/administrator.blade.php
resources/views/admin/administrator.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="page-header"> <h3 class="page-title"> <span class="page-title-icon bg-gradient-primary text-white mr-2"> <i class="mdi mdi-wrench"></i> </span> 管理员 </h3> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">系统设置</a></li> <li class="breadcrumb-item active" aria-current="page">管理员管理</li> </ol> </nav> </div> <div class="row"> <div class="col-lg-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">管理员列表</h4> <p class="card-description"> <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()"> <i class="mdi mdi-plus btn-icon-prepend"></i> 添加管理员 </button> </p> <table class="table table-bordered"> <thead> <tr> <th>ID</th> <th>头像</th> <th>昵称</th> <th>账号</th> <th>角色</th> <th>操作</th> </tr> </thead> <tbody> @foreach($admins as $admin) <tr> <td>{{ $admin->id }}</td> <td> @if($admin->avatar) <img class="avatar" src="{{ $admin->avatar ?? "" }}" alt="image"> @endif </td> <td>{{ $admin->nickname }}</td> <td>{{ $admin->account }}</td> <td> @foreach($admin->roles as $role) {{ $role->name }} @endforeach </td> <td> <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $admin->id }})"> 修改 <i class="mdi mdi-file-check btn-icon-append"></i> </button> <button type="button" class="btn btn-sm btn-gradient-danger btn-icon-text" onclick="del({{ $admin->id }})"> <i class="mdi mdi-delete btn-icon-prepend"></i> 删除 </button> </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> </div> <script> function add(){ layer.open({ type: 2, title: '添加管理员', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/administrator/add' }); } function update(id){ var page = layer.open({ type: 2, title: '修改管理员', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/administrator/update/'+id }); } function del(id){ myConfirm("删除操作不可逆,是否继续?",function(){ myRequest("/admin/administrator/del/"+id,"post",{},function(res){ layer.msg(res.msg) setTimeout(function(){ window.location.reload(); },1500) }); }); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/config.blade.php
resources/views/admin/config.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="page-header"> <h3 class="page-title"> <span class="page-title-icon bg-gradient-primary text-white mr-2"> <i class="mdi mdi-settings"></i> </span> 配置 </h3> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">配置管理</a></li> <li class="breadcrumb-item active" aria-current="page">配置列表</li> </ol> </nav> </div> <div class="row"> <div class="col-lg-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">配置列表</h4> <div class="col-lg-9" style="float: left;padding: 0;"> <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()"> <i class="mdi mdi-plus btn-icon-prepend"></i> 添加配置 </button> </div> <div class="col-lg-3" style="float: right"> <form action=""> <div class="form-group" > <div class="input-group col-xs-3"> <input type="text" name="wd" class="form-control file-upload-info" placeholder="请输入关键字" value="{{ $wd }}"> <span class="input-group-append"> <button class=" btn btn-sm btn-gradient-primary" type="submit"><i class="mdi mdi-account-search btn-icon-prepend"></i> 搜索 </button> </span> </div> </div> </form> </div> <table class="table table-bordered"> <thead> <tr> <th width="10%">配置描述</th> <th width="10%">配置类型</th> <th width="10%">key</th> <th width="25%">value</th> <th width="10%">创建时间</th> <th width="10%">更新时间</th> <th width="15%">操作</th> </tr> </thead> <tbody> @foreach($list as $k=>$v) <tr> <td>{{ $v->name }}</td> <td> @if($v->type == "string") 字符串 @elseif($v->type == "image") 图片 @else 富文本 @endif </td> <td>{{ $v->config_key }}</td> <td @if($v->type != "image") class="len" @endif> @if($v->type == "image") <div> <img src="{{ $v->config_value }}" class="config-img" alt=""> </div> @else {{ $v->config_value }} @endif </td> <td>{{ $v->created_at }}</td> <td>{{ $v->updated_at }}</td> <td> <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $v->id }})"> 修改 <i class="mdi mdi-file-check btn-icon-append"></i> </button> <button type="button" class="btn btn-sm btn-gradient-danger btn-icon-text" onclick="del({{ $v->id }})"> <i class="mdi mdi-delete btn-icon-prepend"></i> 删除 </button> </td> </tr> @endforeach </tbody> </table> <div class="box-footer clearfix"> 总共 <b>{{ $list->appends(["wd"=>$wd])->total() }}</b> 条,分为<b>{{ $list->lastPage() }}</b>页 {!! $list->links() !!} </div> </div> </div> </div> </div> </div> </div> <script> $(function(){ cutStr(50); }); function add(){ var page = layer.open({ type: 2, title: '添加配置', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/config/add' }); } function update(id){ var page = layer.open({ type: 2, title: '修改配置', shadeClose: true, shade: 0.8, area: ['70%', '90%'], content: '/admin/config/update/'+id }); } function del(id){ myConfirm("删除操作不可逆,是否继续?",function(){ myRequest("/admin/config/del/"+id,"post",{},function(res){ layer.msg(res.msg) setTimeout(function(){ window.location.reload(); },1500) }); }); } $('.menu-switch').click(function(){ id = $(this).attr('id'); state = $(this).attr('state'); console.log(id) console.log(state) if(state == "on"){ $('.pid-'+id).hide(); $(this).attr("state","off") $(this).removeClass('mdi-menu-down').addClass('mdi-menu-right'); }else{ $('.pid-'+id).show(); $(this).attr("state","on") $(this).removeClass('mdi-menu-right').addClass('mdi-menu-down'); } }) </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
woann/yamecent-admin
https://github.com/woann/yamecent-admin/blob/3ca32f67185386e2b2e6cf361831a18ebcc94c0f/resources/views/admin/menu_add.blade.php
resources/views/admin/menu_add.blade.php
@extends('base.base') @section('base') <!-- 内容区域 --> <div class="main-panel"> <div class="content-wrapper"> <div class="row"> <div class="col-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">请填写菜单信息</h4> {{--<p class="card-description">--}} {{--Basic form elements--}} {{--</p>--}} <form class="forms-sample" id="form"> <div class="form-group"> <label for="exampleInputName1">*菜单名称</label> <input type="text" class="form-control required" name="name" placeholder="菜单名称"> </div> <div class="form-group"> <label for="exampleInputEmail3">*菜单链接</label> <input type="text" class="form-control required" name="url" placeholder="菜单链接"> </div> <div class="form-group"> <label for="exampleInputEmail3">菜单图标</label> <input type="text" class="form-control" name="icon" placeholder="菜单图标对应class值,二级菜单留空即可"> <p class="card-description"> 点击查看<a href="/icon" target="_blank">图标库</a> </p> </div> <div class="form-group"> <label for="exampleInputEmail3">权重</label> <input type="text" class="form-control required" name="sort" placeholder="权重 数字越大,排名越靠前" value="0"> </div> <div class="form-group"> <label for="exampleInputPassword4">*上级菜单</label> <select class="form-control required" name="pid" > <option value="0">顶级菜单</option> @foreach($top_menu as $menu) <option value="{{ $menu->id }}">{{ $menu->name }}</option> @endforeach </select> </div> <div class="form-group"> <div class="form-check col-md-1 col-sm-1" style="display: inline-block;"> <label class="form-check-label" style="margin-left: 0"> *选择角色 </label> </div> <div class="form-check col-md-2 col-sm-2" style="display: inline-block;"> <label class="form-check-label"> <input type="checkbox" class="form-check-input all"> 全选 <i class="input-helper"></i> </label> </div> <br> @foreach($roles as $role) <div class="form-check col-md-2 col-sm-2" style="display: inline-block;"> <label class="form-check-label"> <input type="checkbox" class="form-check-input role" value="{{ $role->id }}"> {{ $role->name }} <i class="input-helper"></i> </label> </div> @endforeach </div> <button type="button" onclick="commit()" class="btn btn-sm btn-gradient-primary btn-icon-text"> <i class="mdi mdi-file-check btn-icon-prepend"></i> 提交 </button> <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text"> <i class="mdi mdi-reload btn-icon-prepend"></i> 取消 </button> </form> </div> </div> </div> </div> </div> </div> <script> $('.all').on("click",function(){ if(this.checked) { $("input[type='checkbox']").prop('checked',true); }else { $("input[type='checkbox']").prop('checked',false); } }); function commit(){ if(!checkForm()){ return false; } var data = $("#form").serializeObject(); var roles = new Array(); $('.role:checked').each(function(index){ roles[index] = $(this).val(); }) data.roles = roles; myRequest("/admin/menu/add","post",data,function(res){ layer.msg(res.msg) if(res.code == 200){ setTimeout(function(){ parent.location.reload(); },1500) } }); } function cancel() { parent.location.reload(); } </script> @endsection
php
MIT
3ca32f67185386e2b2e6cf361831a18ebcc94c0f
2026-01-05T05:21:26.903260Z
false
datlechin/filament-menu-builder
https://github.com/datlechin/filament-menu-builder/blob/9e1236f11a11419d4e226cac9ba2d59fa122f084/src/FilamentMenuBuilderPlugin.php
src/FilamentMenuBuilderPlugin.php
<?php declare(strict_types=1); namespace Datlechin\FilamentMenuBuilder; use Closure; use Datlechin\FilamentMenuBuilder\Contracts\MenuPanel; use Datlechin\FilamentMenuBuilder\Models\Menu; use Datlechin\FilamentMenuBuilder\Models\MenuItem; use Datlechin\FilamentMenuBuilder\Models\MenuLocation; use Datlechin\FilamentMenuBuilder\Resources\MenuResource; use Filament\Contracts\Plugin; use Filament\Panel; use Filament\Support\Concerns\EvaluatesClosures; use Illuminate\Database\Eloquent\Model; class FilamentMenuBuilderPlugin implements Plugin { use EvaluatesClosures; protected string $resource = MenuResource::class; protected string $menuModel = Menu::class; protected string $menuItemModel = MenuItem::class; protected string $menuLocationModel = MenuLocation::class; protected array $locations = []; protected array | Closure $menuFields = []; protected array | Closure $menuItemFields = []; protected string | Closure | null $navigationLabel = null; protected string | Closure | null $navigationGroup = null; protected string | Closure | null $navigationIcon = 'heroicon-o-bars-3'; protected int | Closure | null $navigationSort = null; protected bool $navigationCountBadge = false; /** * @var MenuPanel[] */ protected array $menuPanels = []; protected bool $showCustomLinkPanel = true; protected bool $showCustomTextPanel = false; protected bool $enableIndentActions = true; public function getId(): string { return 'menu-builder'; } public function register(Panel $panel): void { $panel->resources([$this->getResource()]); } public function boot(Panel $panel): void { // } public static function make(): static { return app(static::class); } public static function get(): static { return filament(app(static::class)->getId()); } public function usingResource(string $resource): static { $this->resource = $resource; return $this; } public function usingMenuModel(string $model): static { $this->menuModel = $model; return $this; } public function usingMenuItemModel(string $model): static { $this->menuItemModel = $model; return $this; } public function usingMenuLocationModel(string $model): static { $this->menuLocationModel = $model; return $this; } public function addLocation(string $key, string $label): static { $this->locations[$key] = $label; return $this; } public function addLocations(array $locations): static { foreach ($locations as $key => $label) { $this->addLocation($key, $label); } return $this; } public function addMenuPanel(MenuPanel $menuPanel): static { $this->menuPanels[] = $menuPanel; return $this; } /** * @param array<MenuPanel> $menuPanels */ public function addMenuPanels(array $menuPanels): static { foreach ($menuPanels as $menuPanel) { $this->addMenuPanel($menuPanel); } return $this; } public function showCustomLinkPanel(bool $show = true): static { $this->showCustomLinkPanel = $show; return $this; } public function showCustomTextPanel(bool $show = true): static { $this->showCustomTextPanel = $show; return $this; } public function enableIndentActions(bool $enable = true): static { $this->enableIndentActions = $enable; return $this; } public function addMenuFields(array | Closure $schema): static { $this->menuFields = $schema; return $this; } public function addMenuItemFields(array | Closure $schema): static { $this->menuItemFields = $schema; return $this; } public function navigationLabel(string | Closure | null $label = null): static { $this->navigationLabel = $label; return $this; } public function navigationGroup(string | Closure | null $group = null): static { $this->navigationGroup = $group; return $this; } public function navigationIcon(string | Closure $icon): static { $this->navigationIcon = $icon; return $this; } public function navigationSort(int | Closure $order): static { $this->navigationSort = $order; return $this; } public function navigationCountBadge(bool $show = true): static { $this->navigationCountBadge = $show; return $this; } public function getResource(): string { return $this->resource; } /** * @template TModel of Model * * @return class-string<TModel> */ public function getMenuModel(): string { return $this->menuModel; } /** * @template TModel of Model * * @return class-string<TModel> */ public function getMenuItemModel(): string { return $this->menuItemModel; } /** * @template TModel of Model * * @return class-string<TModel> */ public function getMenuLocationModel(): string { return $this->menuLocationModel; } /** * @return MenuPanel[] */ public function getMenuPanels(): array { return collect($this->menuPanels) ->sortBy(fn (MenuPanel $menuPanel) => $menuPanel->getSort()) ->all(); } public function isShowCustomLinkPanel(): bool { return $this->showCustomLinkPanel; } public function isShowCustomTextPanel(): bool { return $this->showCustomTextPanel; } public function isIndentActionsEnabled(): bool { return $this->enableIndentActions; } public function getLocations(): array { return $this->locations; } public function getMenuFields(): array | Closure { return $this->menuFields; } public function getMenuItemFields(): array | Closure { return $this->menuItemFields; } public function getNavigationGroup(): ?string { return $this->evaluate($this->navigationGroup); } public function getNavigationLabel(): ?string { return $this->evaluate($this->navigationLabel); } public function getNavigationIcon(): ?string { return $this->evaluate($this->navigationIcon); } public function getNavigationSort(): ?int { return $this->evaluate($this->navigationSort); } public function getNavigationCountBadge(): bool { return $this->navigationCountBadge; } }
php
MIT
9e1236f11a11419d4e226cac9ba2d59fa122f084
2026-01-05T05:21:51.412797Z
false
datlechin/filament-menu-builder
https://github.com/datlechin/filament-menu-builder/blob/9e1236f11a11419d4e226cac9ba2d59fa122f084/src/FilamentMenuBuilderServiceProvider.php
src/FilamentMenuBuilderServiceProvider.php
<?php declare(strict_types=1); namespace Datlechin\FilamentMenuBuilder; use Datlechin\FilamentMenuBuilder\Livewire\CreateCustomLink; use Datlechin\FilamentMenuBuilder\Livewire\CreateCustomText; use Datlechin\FilamentMenuBuilder\Livewire\MenuItems; use Datlechin\FilamentMenuBuilder\Livewire\MenuPanel; use Filament\Support\Assets\AlpineComponent; use Filament\Support\Assets\Css; use Filament\Support\Facades\FilamentAsset; use Livewire\Livewire; use Spatie\LaravelPackageTools\Commands\InstallCommand; use Spatie\LaravelPackageTools\Package; use Spatie\LaravelPackageTools\PackageServiceProvider; class FilamentMenuBuilderServiceProvider extends PackageServiceProvider { public static string $name = 'filament-menu-builder'; public static string $viewNamespace = 'filament-menu-builder'; public function configurePackage(Package $package): void { $package ->name(static::$name) ->hasInstallCommand(function (InstallCommand $command) { $command ->publishConfigFile() ->publishMigrations() ->askToRunMigrations() ->askToStarRepoOnGitHub('datlechin/filament-menu-builder'); }); $configFileName = $package->shortName(); if (file_exists($package->basePath("/../config/{$configFileName}.php"))) { $package->hasConfigFile(); } if (file_exists($package->basePath('/../database/migrations'))) { $package->hasMigrations($this->getMigrations()); } if (file_exists($package->basePath('/../resources/lang'))) { $package->hasTranslations(); } if (file_exists($package->basePath('/../resources/views'))) { $package->hasViews(static::$viewNamespace); } } public function packageRegistered(): void {} public function packageBooted(): void { FilamentAsset::register( $this->getAssets(), $this->getAssetPackageName(), ); Livewire::component('menu-builder-items', MenuItems::class); Livewire::component('menu-builder-panel', MenuPanel::class); Livewire::component('create-custom-link', CreateCustomLink::class); Livewire::component('create-custom-text', CreateCustomText::class); } protected function getAssetPackageName(): ?string { return 'datlechin/filament-menu-builder'; } protected function getAssets(): array { return [ AlpineComponent::make('filament-menu-builder', __DIR__ . '/../resources/dist/filament-menu-builder.js'), Css::make('filament-menu-builder-styles', __DIR__ . '/../resources/dist/filament-menu-builder.css'), ]; } protected function getMigrations(): array { return [ 'create_menus_table', ]; } }
php
MIT
9e1236f11a11419d4e226cac9ba2d59fa122f084
2026-01-05T05:21:51.412797Z
false
datlechin/filament-menu-builder
https://github.com/datlechin/filament-menu-builder/blob/9e1236f11a11419d4e226cac9ba2d59fa122f084/src/Livewire/CreateCustomLink.php
src/Livewire/CreateCustomLink.php
<?php declare(strict_types=1); namespace Datlechin\FilamentMenuBuilder\Livewire; use Datlechin\FilamentMenuBuilder\Enums\LinkTarget; use Datlechin\FilamentMenuBuilder\Models\Menu; use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; use Filament\Forms\Concerns\InteractsWithForms; use Filament\Forms\Contracts\HasForms; use Filament\Forms\Form; use Filament\Notifications\Notification; use Illuminate\Contracts\View\View; use Illuminate\Validation\Rule; use Livewire\Component; class CreateCustomLink extends Component implements HasForms { use InteractsWithForms; public Menu $menu; public string $title = ''; public string $url = ''; public string $target = LinkTarget::Self->value; public function save(): void { $this->validate([ 'title' => ['required', 'string'], 'url' => ['required', 'string'], 'target' => ['required', 'string', Rule::in(LinkTarget::cases())], ]); $this->menu ->menuItems() ->create([ 'title' => $this->title, 'url' => $this->url, 'target' => $this->target, 'order' => $this->menu->menuItems->max('order') + 1, ]); Notification::make() ->title(__('filament-menu-builder::menu-builder.notifications.created.title')) ->success() ->send(); $this->reset('title', 'url', 'target'); $this->dispatch('menu:created'); } public function form(Form $form): Form { return $form ->schema([ TextInput::make('title') ->label(__('filament-menu-builder::menu-builder.form.title')) ->required(), TextInput::make('url') ->label(__('filament-menu-builder::menu-builder.form.url')) ->required(), Select::make('target') ->label(__('filament-menu-builder::menu-builder.open_in.label')) ->options(LinkTarget::class) ->default(LinkTarget::Self), ]); } public function render(): View { return view('filament-menu-builder::livewire.create-custom-link'); } }
php
MIT
9e1236f11a11419d4e226cac9ba2d59fa122f084
2026-01-05T05:21:51.412797Z
false
datlechin/filament-menu-builder
https://github.com/datlechin/filament-menu-builder/blob/9e1236f11a11419d4e226cac9ba2d59fa122f084/src/Livewire/MenuPanel.php
src/Livewire/MenuPanel.php
<?php declare(strict_types=1); namespace Datlechin\FilamentMenuBuilder\Livewire; use Datlechin\FilamentMenuBuilder\Contracts\MenuPanel as ContractsMenuPanel; use Datlechin\FilamentMenuBuilder\Models\Menu; use Filament\Forms\Components; use Filament\Forms\Concerns\InteractsWithForms; use Filament\Forms\Contracts\HasForms; use Filament\Forms\Form; use Filament\Notifications\Notification; use Illuminate\Contracts\View\View; use Livewire\Attributes\Validate; use Livewire\Component; class MenuPanel extends Component implements HasForms { use InteractsWithForms; public Menu $menu; public string $id; public string $name; public ?string $description; public ?string $icon; public bool $collapsible; public bool $collapsed; public bool $paginated; public int $perPage; public int $page = 1; public array $items = []; #[Validate('required|array')] public array $data = []; public function mount(ContractsMenuPanel $menuPanel): void { $this->id = $menuPanel->getIdentifier(); $this->name = $menuPanel->getName(); $this->description = $menuPanel->getDescription(); $this->icon = $menuPanel->getIcon(); $this->collapsible = $menuPanel->isCollapsible(); $this->collapsed = $menuPanel->isCollapsed(); $this->paginated = $menuPanel->isPaginated(); $this->perPage = $menuPanel->getPerPage(); $this->items = array_map(function ($item) { if (isset($item['url']) && is_callable($item['url'])) { $item['url'] = $item['url'](); } return $item; }, $menuPanel->getItems()); } public function getItems(): array { return $this->paginated ? collect($this->items)->forPage($this->page, $this->perPage)->all() : $this->items; } public function add(): void { $this->validate(); $order = $this->menu->menuItems->max('order') ?? 0; $selectedItems = collect($this->items) ->filter(fn ($item) => in_array($item['linkable_id'] ?? $item['title'], $this->data)) ->map(function ($item) use (&$order) { return [ ...$item, 'order' => ++$order, ]; }); if ($selectedItems->isEmpty()) { return; } $this->menu->menuItems()->createMany($selectedItems); $this->reset('data'); $this->dispatch('menu:created'); Notification::make() ->title(__('filament-menu-builder::menu-builder.notifications.created.title')) ->success() ->send(); } public function form(Form $form): Form { $items = collect($this->getItems())->mapWithKeys(fn ($item) => [$item['linkable_id'] ?? $item['title'] => $item['title']]); return $form ->schema([ Components\View::make('filament-tables::components.empty-state.index') ->viewData([ 'heading' => __('filament-menu-builder::menu-builder.panel.empty.heading'), 'description' => __('filament-menu-builder::menu-builder.panel.empty.description'), 'icon' => 'heroicon-o-link-slash', ]) ->visible($items->isEmpty()), Components\CheckboxList::make('data') ->hiddenLabel() ->required() ->bulkToggleable() ->searchable() ->live(condition: $this->paginated) ->visible($items->isNotEmpty()) ->options($items), ]); } public function getTotalPages(): int { return (int) ceil(count($this->items) / $this->perPage); } public function nextPage(): void { $this->page = min($this->getTotalPages(), $this->page + 1); } public function previousPage(): void { $this->page = max(1, $this->page - 1); } public function hasNextPage(): bool { return $this->page < $this->getTotalPages(); } public function hasPreviousPage(): bool { return $this->page > 1; } public function hasPages(): bool { return $this->paginated && $this->getTotalPages() > 1; } public function render(): View { return view('filament-menu-builder::livewire.panel'); } }
php
MIT
9e1236f11a11419d4e226cac9ba2d59fa122f084
2026-01-05T05:21:51.412797Z
false
datlechin/filament-menu-builder
https://github.com/datlechin/filament-menu-builder/blob/9e1236f11a11419d4e226cac9ba2d59fa122f084/src/Livewire/CreateCustomText.php
src/Livewire/CreateCustomText.php
<?php declare(strict_types=1); namespace Datlechin\FilamentMenuBuilder\Livewire; use Datlechin\FilamentMenuBuilder\Models\Menu; use Filament\Forms\Components\TextInput; use Filament\Forms\Concerns\InteractsWithForms; use Filament\Forms\Contracts\HasForms; use Filament\Forms\Form; use Filament\Notifications\Notification; use Illuminate\Contracts\View\View; use Livewire\Component; class CreateCustomText extends Component implements HasForms { use InteractsWithForms; public Menu $menu; public string $title = ''; public function save(): void { $this->validate([ 'title' => ['required', 'string'], ]); $this->menu ->menuItems() ->create([ 'title' => $this->title, 'order' => $this->menu->menuItems->max('order') + 1, ]); Notification::make() ->title(__('filament-menu-builder::menu-builder.notifications.created.title')) ->success() ->send(); $this->reset('title'); $this->dispatch('menu:created'); } public function form(Form $form): Form { return $form ->schema([ TextInput::make('title') ->label(__('filament-menu-builder::menu-builder.form.title')) ->required(), ]); } public function render(): View { return view('filament-menu-builder::livewire.create-custom-text'); } }
php
MIT
9e1236f11a11419d4e226cac9ba2d59fa122f084
2026-01-05T05:21:51.412797Z
false
datlechin/filament-menu-builder
https://github.com/datlechin/filament-menu-builder/blob/9e1236f11a11419d4e226cac9ba2d59fa122f084/src/Livewire/MenuItems.php
src/Livewire/MenuItems.php
<?php declare(strict_types=1); namespace Datlechin\FilamentMenuBuilder\Livewire; use Datlechin\FilamentMenuBuilder\Concerns\ManagesMenuItemHierarchy; use Datlechin\FilamentMenuBuilder\Enums\LinkTarget; use Datlechin\FilamentMenuBuilder\FilamentMenuBuilderPlugin; use Datlechin\FilamentMenuBuilder\Models\Menu; use Filament\Actions\Action; use Filament\Actions\Concerns\InteractsWithActions; use Filament\Actions\Contracts\HasActions; use Filament\Forms\Components\Component as FormComponent; use Filament\Forms\Components\Group; use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; use Filament\Forms\Concerns\InteractsWithForms; use Filament\Forms\Contracts\HasForms; use Filament\Forms\Get; use Filament\Support\Enums\ActionSize; use Filament\Support\Enums\MaxWidth; use Filament\Support\Facades\FilamentIcon; use Illuminate\Contracts\View\View; use Illuminate\Support\Collection; use Livewire\Attributes\Computed; use Livewire\Attributes\On; use Livewire\Component; class MenuItems extends Component implements HasActions, HasForms { use InteractsWithActions; use InteractsWithForms; use ManagesMenuItemHierarchy; public Menu $menu; #[Computed] #[On('menu:created')] public function menuItems(): Collection { return $this->menu->menuItems; } public function reorder(array $order, ?string $parentId = null): void { $this->getMenuItemService()->updateOrder($order, $parentId); } public function reorderAction(): Action { return Action::make('reorder') ->label(__('filament-forms::components.builder.actions.reorder.label')) ->icon(FilamentIcon::resolve('forms::components.builder.actions.reorder') ?? 'heroicon-m-arrows-up-down') ->color('gray') ->iconButton() ->extraAttributes(['data-sortable-handle' => true, 'class' => 'cursor-move']) ->livewireClickHandlerEnabled(false) ->size(ActionSize::Small); } public function indent(int $itemId): void { $item = FilamentMenuBuilderPlugin::get()->getMenuItemModel()::query()->find($itemId); if (! $item) { return; } $previousSibling = FilamentMenuBuilderPlugin::get()->getMenuItemModel()::query() ->where('menu_id', $item->menu_id) ->where('parent_id', $item->parent_id) ->where('order', '<', $item->order) ->orderByDesc('order') ->first(); if (! $previousSibling) { return; } $maxOrder = FilamentMenuBuilderPlugin::get()->getMenuItemModel()::query() ->where('parent_id', $previousSibling->id) ->max('order') ?? 0; $item->update([ 'parent_id' => $previousSibling->id, 'order' => $maxOrder + 1, ]); $this->reorderSiblings($item->getOriginal('parent_id')); } public function unindent(int $itemId): void { $item = FilamentMenuBuilderPlugin::get()->getMenuItemModel()::query()->find($itemId); if (! $item || ! $item->parent_id) { return; } $parent = $item->parent; if (! $parent) { return; } $maxOrder = FilamentMenuBuilderPlugin::get()->getMenuItemModel()::query() ->where('menu_id', $item->menu_id) ->where('parent_id', $parent->parent_id) ->max('order') ?? 0; $oldParentId = $item->parent_id; $item->update([ 'parent_id' => $parent->parent_id, 'order' => $maxOrder + 1, ]); $this->reorderSiblings($oldParentId); } private function reorderSiblings(?int $parentId): void { $siblings = FilamentMenuBuilderPlugin::get()->getMenuItemModel()::query() ->where('parent_id', $parentId) ->orderBy('order') ->get(); $siblings->each(function ($sibling, $index) { $sibling->update(['order' => $index + 1]); }); } public function indentAction(): Action { return Action::make('indent') ->label(__('filament-menu-builder::menu-builder.actions.indent')) ->icon('heroicon-o-arrow-right') ->color('gray') ->iconButton() ->size(ActionSize::Small) ->action(fn (array $arguments) => $this->indent($arguments['id'])) ->visible( fn (array $arguments): bool => FilamentMenuBuilderPlugin::get()->isIndentActionsEnabled() && $this->canIndent($arguments['id']), ); } public function unindentAction(): Action { return Action::make('unindent') ->label(__('filament-menu-builder::menu-builder.actions.unindent')) ->icon('heroicon-o-arrow-left') ->color('gray') ->iconButton() ->size(ActionSize::Small) ->action(fn (array $arguments) => $this->unindent($arguments['id'])) ->visible( fn (array $arguments): bool => FilamentMenuBuilderPlugin::get()->isIndentActionsEnabled() && $this->canUnindent($arguments['id']), ); } public function canIndent(int $itemId): bool { $item = FilamentMenuBuilderPlugin::get()->getMenuItemModel()::query()->find($itemId); if (! $item) { return false; } $previousSibling = FilamentMenuBuilderPlugin::get()->getMenuItemModel()::query() ->where('menu_id', $item->menu_id) ->where('parent_id', $item->parent_id) ->where('order', '<', $item->order) ->orderByDesc('order') ->first(); return $previousSibling !== null; } public function canUnindent(int $itemId): bool { $item = FilamentMenuBuilderPlugin::get()->getMenuItemModel()::query()->find($itemId); return $item && $item->parent_id !== null; } public function editAction(): Action { return Action::make('edit') ->label(__('filament-actions::edit.single.label')) ->iconButton() ->size(ActionSize::Small) ->modalHeading(fn (array $arguments): string => __('filament-actions::edit.single.modal.heading', ['label' => $arguments['title']])) ->icon('heroicon-m-pencil-square') ->fillForm(fn (array $arguments): array => $this->getMenuItemService()->findByIdWithRelations($arguments['id'])->toArray()) ->form($this->getEditFormSchema()) ->action(fn (array $data, array $arguments) => $this->getMenuItemService()->update($arguments['id'], $data)) ->modalWidth(MaxWidth::Medium) ->slideOver(); } public function deleteAction(): Action { return Action::make('delete') ->label(__('filament-actions::delete.single.label')) ->color('danger') ->groupedIcon(FilamentIcon::resolve('actions::delete-action.grouped') ?? 'heroicon-m-trash') ->icon('heroicon-s-trash') ->iconButton() ->size(ActionSize::Small) ->requiresConfirmation() ->modalHeading(fn (array $arguments): string => __('filament-actions::delete.single.modal.heading', ['label' => $arguments['title']])) ->modalSubmitActionLabel(__('filament-actions::delete.single.modal.actions.delete.label')) ->modalIcon(FilamentIcon::resolve('actions::delete-action.modal') ?? 'heroicon-o-trash') ->action(function (array $arguments): void { $this->getMenuItemService()->delete($arguments['id']); }); } public function render(): View { return view('filament-menu-builder::livewire.menu-items'); } protected function getEditFormSchema(): array { return [ TextInput::make('title') ->label(__('filament-menu-builder::menu-builder.form.title')) ->required(), TextInput::make('url') ->hidden(fn (?string $state, Get $get): bool => blank($state) || filled($get('linkable_type'))) ->label(__('filament-menu-builder::menu-builder.form.url')) ->required(), Placeholder::make('linkable_type') ->label(__('filament-menu-builder::menu-builder.form.linkable_type')) ->hidden(fn (?string $state): bool => blank($state)) ->content(fn (string $state) => $state), Placeholder::make('linkable_id') ->label(__('filament-menu-builder::menu-builder.form.linkable_id')) ->hidden(fn (?string $state): bool => blank($state)) ->content(fn (string $state) => $state), Select::make('target') ->label(__('filament-menu-builder::menu-builder.open_in.label')) ->options(LinkTarget::class) ->default(LinkTarget::Self), Group::make() ->visible(fn (FormComponent $component) => $component->evaluate(FilamentMenuBuilderPlugin::get()->getMenuItemFields()) !== []) ->schema(FilamentMenuBuilderPlugin::get()->getMenuItemFields()), ]; } }
php
MIT
9e1236f11a11419d4e226cac9ba2d59fa122f084
2026-01-05T05:21:51.412797Z
false
datlechin/filament-menu-builder
https://github.com/datlechin/filament-menu-builder/blob/9e1236f11a11419d4e226cac9ba2d59fa122f084/src/MenuPanel/ModelMenuPanel.php
src/MenuPanel/ModelMenuPanel.php
<?php declare(strict_types=1); namespace Datlechin\FilamentMenuBuilder\MenuPanel; use Closure; use Illuminate\Database\Eloquent\Model; class ModelMenuPanel extends AbstractMenuPanel { /** * @var \Illuminate\Database\Eloquent\Model&\Datlechin\FilamentMenuBuilder\Contracts\MenuPanelable */ protected Model $model; protected Closure $urlUsing; /** * @param class-string<\Illuminate\Database\Eloquent\Model&\Datlechin\FilamentMenuBuilder\Contracts\MenuPanelable> $model */ public function model(string $model): static { $this->model = new $model; return $this; } public function getName(): string { return $this->model->getMenuPanelName(); } public function getItems(): array { return ($this->model->getMenuPanelModifyQueryUsing())($this->model->newQuery()) ->get() ->map(fn (Model $model) => [ 'title' => $model->{$this->model->getMenuPanelTitleColumn()}, 'linkable_type' => $model->getMorphClass(), 'linkable_id' => $model->getKey(), ]) ->all(); } }
php
MIT
9e1236f11a11419d4e226cac9ba2d59fa122f084
2026-01-05T05:21:51.412797Z
false