Closed chegmarco1989 closed 3 months ago
Hi @chegmarco1989 , to customize the package views, you need to publish them first. Once published, you can change the registering form at: resources/views/vendor/adminlte/auth/register.blade.php
.
Changing the controller logic will depend on the authentication scaffolding you're using, it's external to this package. Assuming that you're using the legacy laravel/ui
, you should look at file app/Http/Controllers/Auth/RegisterController.php
.
To add custom CSS
and JS
to the login form, for example, you need to configure a plugin entry for your files. Example:
'plugins' => [
...
'MyCompanyFiles' => [
'active' => false,
'files' => [
[
'type' => 'js',
'asset' => true,
'location' => 'vendor/my-company-files/js/file.js',
],
[
'type' => 'css',
'asset' => true,
'location' => 'vendor/my-company-files/css/file.css',
],
],
],
...
],
Then, enable this plugin entry in the published login form by adding the next line after @extends('adminlte::auth.auth-page', ['auth_type' => 'login'])
:
@section('plugins.MyCompanyFiles', true)
Ok Thanks for your answer
Hello.
I added "
phone
" and "country
" columns to "users
" Migrations. But I didn't find in "Auth/RegisterController
" and "resources/views/Auth/Register.blade.php
" where to handle (add) these news fields in Controller and Views.1. So, How to add them ("
phone
" and "country
") inController
andViews
for registering ???2. How to add My Custum
CSS
andJS
files inRegister.blade.php
andLogin.blade.php
because I want to add my own files in their Header ???Thanks to answer me. Awaiting.