Я использую Laravel
с Nginx
, PHP 7.1
и Ubuntu 18
.
У меня есть форма входа в систему:
Login.blade.php:
{!! Form::open(['action' => 'LoginController@login'],['class' => 'form'])!!}
<h2 style="text-align: center;">{{__("Login to your account")}}</h2>
{!! Form::text('timezone', null,
array('style'=>'display:none',
'class'=>'form-control',
'id'=>'timezone',
'placeholder'=>__('timezone'))) !!}
{!! Form::text('pushToken', null,
array('style'=>'display:none',
'class'=>'form-control',
'id'=>'pushToken',
'placeholder'=>__('Token'))) !!}
{!! Form::text('email', null,
array('required',
'class'=>'form-control',
'placeholder'=>__('Email'))) !!}
{!! Form::password('password',
array('required','placeholder' => __('Password'))) !!}
{!! Form::checkbox('remember_me', null, null, array(
'class'=>'checkbox',
'style'=>'width: fit-content; display: inline-block'
))!!}{{__("Remember Me")}}
{!! Form::Submit(__('Login'), null,
array(
'class'=>'form-control'
)) !!}
{!! Form::close() !!}
В моем контроллере, когда я пытаюсь проверить значения email
и password
, они всегда пусты.Зная, что при тестировании на ubuntu 16.04
все в порядке
Код контроллера:
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Request as Req;
use Session;
use Cookie;
use Config;
use Redirect;
class LoginController extends Controller
{
public function login(Request $request)
{
$email = Req::input('email');
$password = Req::input('password');
echo $email;
}}
Composer.json
"require": {
"php": ">=5.6.4",
"guzzlehttp/guzzle": "^6.2",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.4",
"maatwebsite/excel": "~2.1.0",
"mariuzzo/laravel-js-localization": "^1.4",
"nesbot/carbon": "^1.25",
"symfony/psr-http-message-bridge": "^1.0"
},