Where does the code of the config method ('auth.default.domain') come from in LARAVEL?

0

I have a question since I installed laravel 5.4 and the template adminLTE 3.0, in which after everything was working I put it in Spanish, everything normal up there, then I wanted to change the html code of the login, but I found that the code is generated by a function inside the login.blade.php view

the path of the file is: resoruces / views / vendor / adminlte / auth / login.blade.php

  @extends('adminlte::layouts.auth')
  @section('htmlheader_title')
   Log in
  @endsection
 @section('content')
 <body class="hold-transition login-page">
 <div id="app" v-cloak>
    <div class="login-box">
        <div class="login-logo">
            <a href="{{ url('/home') }}"><b><span style="font-size: 50px">Admin</span></b>LTE</a>
        </div><!-- /.login-logo -->

    @if (count($errors) > 0)
        <div class="alert alert-danger">
            <strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
      <div class="login-box-body">
    <p class="login-box-msg"> {{ trans('adminlte_lang::message.siginsession') }} </p>

    <login-form name="{{ config('auth.providers.users.field','email') }}"
                domain="{{ config('auth.defaults.domain','') }}"></login-form>

    @include('adminlte::auth.partials.social_login')

    <a href="{{ url('/password/reset') }}">{{ trans('adminlte_lang::message.forgotpassword') }}</a><br>
    <a href="{{ url('/register') }}" class="text-center">{{ trans('adminlte_lang::message.registermember') }}</a>

</div>

</div>
</div>
@include('adminlte::layouts.partials.scripts_auth')

<script>
    $(function () {
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' // optional
        });
    });
</script>
 </body>
@endsection

Where this piece of code generates the form and I want to change the styles with the div classes but I do not know where it comes from I want to know how to change the classes or where it comes from so I can edit them:

       <login-form name="{{ config('auth.providers.users.field','email') }}"
                domain="{{ config('auth.defaults.domain','') }}"></login-form>

What I want to know is how I can edit the classes of the generated divs or where the div generated with that function come out to edit them.

    
asked by Paulker 14.06.2017 в 00:19
source

1 answer

1

The helper config () will search within the app / config directory for what you specify as the first parameter, the notation of. implies that the first parameter is the file name, and then the values within the file's array.

In other words, config('auth.defaults.domain','') will search within the file app/config/auth.php the value of domain within the array defaults , and if it does not find that value, it will use a default value of% '' .

If you want to change the content of <login form name="..." domain="..."></login-form> , you find it in resources/assets/js/components/auth/LoginForm.vue , it's a template of vue.js

<template>
 <form method="post" @submit.prevent="submit" @keydown="clearErrors($event.target.name)">
  <div class="alert alert-success text-center" v-show="form.succeeded" id="result"> {{ trans('adminlte_lang_message.loggedin') }} <i class="fa fa-refresh fa-spin"></i> {{ trans('adminlte_lang_message.entering') }}</div>
  <div class="form-group has-feedback" :class="{ 'has-error': form.errors.has('email') }" v-if="type === 'email'">
   <input type="email" class="form-control" :placeholder="placeholder" :name="name" value="" v-model="form.email" @change="adddomain" autofocus/>
   <span class="glyphicon form-control-feedback" :class="[icon]"></span>
   <transition name="fade">
    <span class="help-block" v-if="form.errors.has('email')" v-text="form.errors.get('email')" id="validation_error_email"></span>
   </transition>
  </div>

  <div class="form-group has-feedback" :class="{ 'has-error': form.errors.has('username') }" v-else>
   <input type="text" class="form-control" :placeholder="placeholder" :name="name" v-model="form.username" @change="adddomain" autofocus/>
   <span class="glyphicon form-control-feedback" :class="[icon]"></span>
   <transition name="fade">
    <span class="help-block" v-if="form.errors.has('username')" v-text="form.errors.get('username')" id="validation_error_username"></span>
   </transition>
  </div>


  <div class="form-group has-feedback" :class="{ 'has-error': form.errors.has('password') }">
   <input type="password" class="form-control" :placeholder="trans('adminlte_lang_message.password')" name="password" v-model="form.password"/>
   <span class="glyphicon glyphicon-lock form-control-feedback"></span>
   <transition name="fade">
    <span class="help-block" v-if="form.errors.has('password')" v-text="form.errors.get('password')" id="validation_error_password"></span>
   </transition>
  </div>
  <div class="row">
   <div class="col-xs-8">
    <div class="checkbox icheck">
     <label>
      <input style="display:none;" type="checkbox" name="remember" v-model="form.remember"> {{ trans('adminlte_lang_message.remember') }}
     </label>
    </div>
   </div>
   <div class="col-xs-4">
    <button type="submit" class="btn btn-primary btn-block btn-flat" v-text="trans('adminlte_lang_message.buttonsign')" :disabled="form.errors.any()"><i v-if="form.submitting" class="fa fa-refresh fa-spin"></i></button>
   </div>
  </div>
 </form>
</template>

link

    
answered by 14.06.2017 / 04:10
source