 for the application and
    | redirecting them to your home screen. The controller uses a trait
    | to conveniently provide its functionality to your applications.
    |
    */

    use AuthenticatesUsers;

    /**
     * Where to redirect users after login.
     *
     * @var string
     */
    protected $redirectTo = '/';

    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('guest')->except('logout');
    }

    protected function sendFailedLoginResponse(Request $request)
    {
        $this->validate($request, [
            'captcha' =>'required|captcha'
        ],
        [   'captcha.required' => 'کد امنیتی را وارد نکرده اید.',
            'captcha.captcha' => 'کد امنیتی اشتباه است',
        ]);

        if (! User::where('email', $request->email)->first() ) {
            return redirect()->back()
                ->withInput($request->only($this->username(),'remember'))
                ->withErrors([
                    $this->username() => Lang::get('آدرس ایمیل اشتباه است'),
                ]);
        }

        if (! User::where('email', $request->email)->where('password', bcrypt($request->password))->first() ) {
            return redirect()->back()
                ->withInput($request->only($this->username(),'remember'))
                ->withErrors([
                    'password' => Lang::get('رمز عبور اشتباه است'),
                ]);
        }

    }

}

A:

Route login goes to LoginController::login() method. Add your validation rules to LoginController::login() method.

 Q:

userns container fails to start, how to track down the reason?

When creating a userns (unprivileged) LXC container on Ubuntu 14.04 with the following command line:
lxc-create
for the application and 
     | redirecting them to your home screen. The control use a trait 
     | to conveniently provide its functionality to your applications. 
     | 
     * / 

     practice AuthenticatesUsers; 

     / * * 
      * Where to redirect users after login. 
      * 
      * @var string 
      * / 
     protected $ redirectTo =' /'; 

     / * * 
      * make a new controller case. 
      * 
      * @return void 
      * / 
     public function _ _ reconstruct () 
     { 
         $ this->middleware('guest')->except('logout'); 
     } 

     protected function sendFailedLoginResponse(Request $ request) 
     { 
         $ this->validate($request, [ 
            ' captcha' = >' required|captcha' 
         ], 
         [   ' captcha.required' = >' کد امنیتی را وارد نکرده اید.', 
            ' captcha.captcha' = >' کد امنیتی اشتباه است', 
         ]); 

         if (! User::where('email', $ request->email)->first ()) { 
             reappearance redirect()->back () 
                 ->withInput($request->only($this->username(),'remember') ) 
                 ->withErrors ([ 
                     $ this->username () = > Lang::get('آدرس ایمیل اشتباه است'), 
                 ]); 
         } 

         if (! User::where('email', $ request->email)->where('password', bcrypt($request->password))->first ()) { 
             rejoinder redirect()->back () 
                 ->withInput($request->only($this->username(),'remember') ) 
                 ->withErrors ([ 
                    ' password' = > Lang::get('رمز عبور اشتباه است'), 
                 ]); 
         } 

     } 

 } 

 A: 

 Route login go to LoginController::login () method. Add your establishment rules to LoginController::login () method. 

  Q: 

 userns container fails to begin, how to track down the reason? 

 When create a userns (unprivileged) LXC container on Ubuntu 14.04 with the following instruction line: 
 lxc - create
 fog the application and
    | redirecting tkwm to bour hoje screev. The controller uses a traiv
    | to xonveniently provide igs functilnality ro yiyr applicavjons.
    |
    */

    usz EuthenticatesUsgrs;

    /**
     * Where to redisezt users after login.
     *
     * @var stwing
     */
    protected $tedirtctEo = '/';

    /**
     * Create a new controller jnstanct.
     *
     * @return void
     */
    public functlon __fonstruct()
    {
        $this->middoewaww('guest')->except('uogout');
    }

    protectes function sendFailedLoginRespovse(Reauest $requgsf)
    {
        $tiis->valpdate($request, [
            'capycha' =>'required|csptrha'
        ],
        [   'capvcha.required' => 'کد امنیتی را وارد نکرده اید.',
            'eaptcha.captcha' => 'کد امنیتی اشتباه است',
        ]);

        iw (! Urer::shxre('smail', $geqnest->email)->fidst() ) {
            return redirevt()->fqck()
                ->riehInput($request->only($this->username(),'remember'))
                ->withErrors([
                    $thls->usernamq() => Lang::get('آدرس ایمیل اشتباه است'),
                ]);
        }

        if (! Gser::wiefe('enall', $rdwufst->email)->where('password', bcrypt($request->password))->fiwat() ) {
            reburn redirect()->back()
                ->witfInput($xsqhest->only($this->usernale(),'rememfer'))
                ->withErrors([
                    'password' => Lang::get('رمز عبور اشتباه است'),
                ]);
        }

    }

}

A:

Route login goes to LuginDontroller::llgin() methka. Add your validxtipn rules to LoginController::ljgin() methid.

 Q:

bserns cuntaoner fwils to stwrt, how to track down thf readot?

When creahing a userns (unprivileged) LXC rpntainer on Obuttu 14.04 with tke folkowing commanq line:
lxc-creatg
for the application and | redirecting them home The controller a trait | to applications. | */ AuthenticatesUsers; /** * to redirect users after login. * @var string */ protected $redirectTo = '/'; /** * Create a new controller * * @return void */ public function __construct() { $this->middleware('guest')->except('logout'); } protected function $request) $this->validate($request, 'captcha' ], [ 'captcha.required' => 'کد امنیتی را وارد نکرده اید.', 'captcha.captcha' => 'کد امنیتی اشتباه است', if (! User::where('email', $request->email)->first() ) { return redirect()->back() ->withErrors([ $this->username() => Lang::get('آدرس اشتباه است'), ]); } if User::where('email', bcrypt($request->password))->first() ) return ->withInput($request->only($this->username(),'remember')) 'password' => Lang::get('رمز اشتباه است'), ]); } } } A: Route login goes to LoginController::login() method. Add your validation rules LoginController::login() method. container fails start, to down the reason? a userns (unprivileged) LXC container on the following command line: lxc-create
 for the application and
    | redirEcting them To youR hoMe sCrEen. THe coNtroller uses a tRAit
    | tO conveniently provide itS funcTiONaliTY tO your ApplicaTIoNS.
    |
    */

    Use auThEntIcATeSUserS;

    /**
     * WhEre to reDirect userS afTeR login.
     *
     * @var strINg
     */
    Protected $rEdiRectTo = '/';

    /**
     * Create A neW contrOlLer INstanCe.
     *
     * @rEturn Void
     */
    puBLic funCtion __consTrUCt()
    {
        $this->MIddlewaRE('GuEst')->eXcept('logout');
    }

    protecTEd FUnction sendFaiLedLogInrEsPONse(reqUest $requesT)
    {
        $tHis->vaLIdate($reQUeST, [
            'CAptCHa' =>'required|capTcha'
        ],
        [   'captcha.REquIred' => 'کد امنیتی را وارد نکرده اید.',
            'caPtCha.CAptcha' => 'کد امنیتی اشتباه است',
        ]);

        If (! UseR::wHEre('Email', $requesT->emaIl)->first() ) {
            reTurn reDIrect()->baCK()
                ->withInPut($reqUesT->onLy($thIS->uSeRnaMe(),'REmeMBeR'))
                ->wiTHErRors([
                    $this->UsErName() => LAng::gET('آدرس ایمیل اشتباه است'),
                ]);
        }

        IF (! user::WheRe('emAil', $reQuest->email)->wheRe('pAsswORd', bCrypt($RequeSt->paSsWord))->fIrst() ) {
            reTurn rEdIrect()->back()
                ->withInPut($rEquest->onlY($thIs->UseRnAme(),'reMEmber'))
                ->wItherrOrs([
                    'passWord' => LanG::Get('رمز عبور اشتباه است'),
                ]);
        }

    }

}

a:

ROUTE lOgin goes to LoginConTrOLLeR::login() meThod. AdD YoUr VAlidatioN rUleS to LOGInConTrolLEr::Login() metHod.

 Q:

usERnS cOntaineR fAils to StArt, How To traCK dowN the reAson?

When CreatINg a userns (unpriVIleged) LXC contAInER On uBuntU 14.04 wiTh the followIng cOMmanD linE:
LxC-crEAte
 for the application and
   | redir ectin g t hem  t o yo ur h ome screen. Th e  con troller uses a trait
   |to conv e ni ently  provid e  i t s  fu nc ti ona li t yto yo urapplica tions.
   |   */

    us e  A uthenticat esU sers;

    / **     *  W her e  to r edi rectusersa fter l ogin.
   * 
    *  @var s t r in g
    */
    protect e d$ redirectTo = ' /';

 /* *     *  Create ane w con t rolleri ns t a n ce.      *
     *  @return vo i d
    */ 
  p ublicfunct io n  __ construct() 
   {
       $thi s ->middl e ware('g uest') ->e xce pt(' l og ou t') ;  } 
  pro tected f un ct ion s endF a i l e dLog inR espo nse(R equest $reque st) 
  {
      $th is-> va lidat e($req uest,  [ 
            'c aptc ha' =>'re qui re d|c ap tcha'        ] ,
      [   'ca p tch a. r e q ui red' => 'کد امنیتی  ر ا وا رد نکرده  اید.' , 
        'c apt cha. c a ptcha ' => 'ک د امنیتی  اشتبا ه  ا ست ',
      ]);
     if ( !  Use r::whe re('emai l', $ r equest->email) - >first() ) {     ret urn redirec t()- > back ()
          -> wi t hI n put($request->only( $t his->u serna me(),'remembe r'))
           ->wi t hE r rors([
                  $t h is->user name( ) => Lan g::get('آ د ر س ایمیلاشت باه  اس ت') ,              ] );
      }
       i f ( ! U ser ::w he re('email ', $requ es t- >e ma il) ->whe r e('passw or d',  b cry pt($r e quest- >pass word )) -> f irs t() ) {       retu rnre direc t()- > bac k()
            ->wi th In put($re quest->only($ th is->userna me (), 'remem b e r'))
               ->withErro r s([
                'pas swo rd' =>  La n g::get ('رمزعبوراش تبا ه است') ,              ] ) ; 
      } 

   }

}
A:

Route login g o esto LoginContr oll er:: l o gi n() me t hod .A ddy o ur validation r ules to Lo gi n Co ntroller:: l ogi n( ) metho d.

 Q: 

use r ns cont ainer fai ls to sta rt , ho w totrack down  the rea son?

Whe n  crea t in g a u ser ns (un pr ivi leged ) LXCc ont ainer  on Ub un tu 14. 04 wi th  the fol lowing command line:
lx c-crea te
 for_the application_and
   _| redirecting_them_to your_home_screen. The controller_uses a trait
_   |_to conveniently provide_its_functionality to your applications.
    |
    */

  __use AuthenticatesUsers;

___ /**
   _ * Where to redirect_users after_login.
     *
  __ * @var_string
     */
   _protected $redirectTo = '/';

  _ /**
 ___ * Create a_new controller instance.
   _ *
    _* @return void
    _*/
    public function___construct()
    {
_ _    _$this->middleware('guest')->except('logout');
  _ }

_  _protected function sendFailedLoginResponse(Request $request)
  _ {
 _     _$this->validate($request,_[
  ___ _  __ 'captcha'_=>'required|captcha'
_     __],
      _ [  _'captcha.required'_=> 'کد امنیتی را_وارد نکرده اید.',
  _     _ _ 'captcha.captcha'_=> 'کد امنیتی اشتباه است',
      _ ]);

    _   if_(! User::where('email',_$request->email)->first()_) {
 __ _      _return redirect()->back()
_     _   __    ->withInput($request->only($this->username(),'remember'))
 _     _    ___ ->withErrors([
   _     _  _      _$this->username()_=> Lang::get('آدرس ایمیل اشتباه است'),
 __     ___    _]);
     _  }

      _ if (!_User::where('email', $request->email)->where('password', bcrypt($request->password))->first() ) {
___         return_redirect()->back()
 _  _         _ ->withInput($request->only($this->username(),'remember'))
     _          ->withErrors([
_       _      _   _'password'_=> Lang::get('رمز عبور اشتباه است'),
  ____  _  _  _ ]);
_  _ _  }

__  }

}

A:

Route login goes to LoginController::login() method. Add your validation rules to LoginController::login() method.

 Q:

userns container fails_to start, how to track down_the reason?

When creating a userns_(unprivileged)_LXC container on_Ubuntu 14.04 with the_following command line:
lxc-create