를 사용하는 경우 Laravel BadMethodCallException를 해결하는 방법. RegisterController에내가이이 오류를 생성 저장 기능이 포함 데이터베이스 명령을 실행하려고하고 내가 생각하는 이제까지 때문에 러스트의 경우 항상</p> <pre><code>[BadMethodCallException] This cache store does not support tagging. </code></pre> <p>점점 러스트
그것은
[BadMethodCallException]
This cache store does not support tagging.
같은 오류를 표시하지만 여전히 사용자를 등록합니다. 동일하지만 코드의 다른 부분은 모두 중지됩니다. 이 오류를 어떻게 수정합니까? 당신의 .env
파일에
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
class RegisterController extends Controller
{
/*
|--------------------------------------------------------------------------
| Register Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users as well as their
| validation and creation. By default this controller uses a trait to
| provide this functionality without requiring any additional code.
|
*/
use RegistersUsers;
/**
* Where to redirect users after registration.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
}
레지스터 컨트롤러 코드
이 작동하지 않습니다. 나는 ROLE 및 PERMISSION MODEL을 만들어야하고, 패키지를 입히려면 패키지를 작동시켜야한다. – dagogodboss