axotion /
TaskManager
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace TaskManager\Http\Controllers; |
||||
| 4 | |||||
| 5 | use Illuminate\Http\Request; |
||||
| 6 | use TaskManager\Http\Requests\RegisterForm; |
||||
| 7 | use TaskManager\Mail\WelcomeNewUser; |
||||
| 8 | |||||
| 9 | class RegisterController extends Controller |
||||
| 10 | { |
||||
| 11 | public function __construct() |
||||
| 12 | { |
||||
| 13 | $this->middleware('guest'); |
||||
| 14 | } |
||||
| 15 | |||||
| 16 | /** |
||||
| 17 | * Show the form for creating a new resource. |
||||
| 18 | * |
||||
| 19 | * @return \Illuminate\Http\Response |
||||
| 20 | */ |
||||
| 21 | public function create() |
||||
| 22 | { |
||||
| 23 | return view('register'); |
||||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||||
| 24 | } |
||||
| 25 | |||||
| 26 | /** |
||||
| 27 | * Store a newly created resource in storage. |
||||
| 28 | * |
||||
| 29 | * @param \Illuminate\Http\Request $request |
||||
| 30 | * @param RegisterForm $form |
||||
| 31 | * @return \Illuminate\Http\Response |
||||
| 32 | */ |
||||
| 33 | public function store(Request $request, RegisterForm $form) |
||||
|
0 ignored issues
–
show
The parameter
$form is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 34 | { |
||||
| 35 | $user = \TaskManager\User::create($request->only('email','name','password')); |
||||
| 36 | auth()->login($user); |
||||
|
0 ignored issues
–
show
The method
login() does not exist on Illuminate\Contracts\Auth\Factory.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||
| 37 | \Mail::to($user)->send(new WelcomeNewUser($user)); |
||||
| 38 | return redirect()->home(); |
||||
|
0 ignored issues
–
show
|
|||||
| 39 | } |
||||
| 40 | |||||
| 41 | } |
||||
| 42 |