app/Http/Controllers/Auth/EntrepriseRegisterController.php
/**
     * Create a new user instance after a valid registration.
     *
     * @param  array  $data
     * @return Entreprise
     */
Create a new user instance after a valid registration.
@param  array  $data
@return Entreprise
Create a new user instance after a valid registration . @param array $data @return Entreprise
protected function create(array $data)
    {
        return Entreprise::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'raison_social' => $data['raison_social'],
            'password' => bcrypt($data['password']),
        ]);
        if(Auth::guard('entreprise')->attempt(['email' => $request->email, 'password' => $request->password], $request->remember)){
            return redirect()->intended(route('entreprise.dashboard'));
        }
    }
protected function create ( array $ data ) { return Entreprise :: create ( [ 'name' => $ data [ 'name' ] , 'email' => $ data [ 'email' ] , 'raison_social' => $ data [ 'raison_social' ] , 'password' => bcrypt ( $ data [ 'password' ] ) , ] ) ; if ( Auth :: guard ( 'entreprise' ) -> attempt ( [ 'email' => $ request -> email , 'password' => $ request -> password ] , $ request -> remember ) ) { return redirect ( ) -> intended ( route ( 'entreprise.dashboard' ) ) ; } }
Create a new user instance after a valid registration.
Create a new user instance after a valid registration .
// if successful, then redirect to their intended location