admin_toastr('导入成功'); return redirect('/admin/list'); 2、 public function destroy($user_id, $id) { if ($this->form()->destroy($id)) { return response()->json([ 'status' => true, 'message' => trans('admin::lang.delete_succeeded'), ]); } else { return response()->jso...
$config = Config::get('admin-oauth.services.feishu'); $this->redirectUrl = $config['redirect_url']; return sprintf("%s/authen/v1/index?app_id=%s&redirect_uri=%s", $config['base_uri'], $config['app_id'], urlencode($this->redirectUrl)); } /** * 获取app_access_token * @return...
use Illuminate\Http\Request; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Lang; use Illuminate\Support\Facades\Redirect; use Illuminate\Contracts\Session\Session; use Illuminate\Support\Facades\Validator; clas...
* * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { //判断是否重复登录 if ($this->isRelogin($request)) { //重复登录 退出登录状态 Admin::guard()->logout(); return redirect('/admin'); } return ...
],// Add "remember me" to login form'remember'=>true,// 登陆之后的跳转地址'redirect_to'=>'auth/login',// 登陆验证的排除URI'excepts'=> ['auth/login','auth/logout', ], ],/* |--- | Laravel-admin upload setting |--- | |在Form表单中的image...
'redirect_to' => 'auth/login', // 无需用户认证即可访问的地址 'excepts' => [ 'auth/login', 'auth/logout', '_handle_action_', ] ], /* * Laravel-Admin 文件上传设置 */ 'upload' => [ // 对应 filesystem.php 中的 disks
LoginController extends BaseAuthController{public function autoLogin (Request $request) {$user_id = $request->input("user_id");$user = Administrator::where("id", $user_id)->first();if ($user) {$this->guard()->login($user);return redirect()->intended("admin");}return redirect()->...
('admin.new'),$form))->style('success'));});});}publicfunctionshow($id,Content$content){returnredirect()->route('admin.menus.edit',['menu'=>$id]);}protectedfunctiontreeView(){$tree=newTree(newMenu());$tree->disableCreate();$tree->branch(function($branch){$payload=" {$branch['...
在使用laravel-admin的模型表单的时候,有个字段是json格式,新增的时候总是不能成功,经过排查源代码,发现他在校验有效column的时候,会根据form提交的字段进行null判断,源码位置如下: D:\WWW\xxx\vendor\encore\laravel-admin\src\Form.php line :900 protected function prepareInsert($inserts): array ...
$form->saved(function (Form $form) use($pid2) { // 跳转页面 return redirect('/admin/page/' . $pid2 . '#tab_9'); });问题是:跳转后的url变成了'/admin/page/' . $pid2,后面的#tab_9被删除了,但是我这边需要保留,请问要如何处理?