Hello

Closed
Vanguard - Advanced PHP Login and User Management Vanguard - Advanced PHP Login and User Management May 18, 2018
Login to reply
Milos Stojanovic Support Agent
5 years ago
Resolved.
Milos Stojanovic Support Agent
5 years ago

Hey,

Have you checked the Installation article, the "Changing Application's Public Directory" section. It's explained there how you can change the public directory. In your case, since you are just renaming it, all you need to do is to add the following code to index.php file: 

$app->instance('path.public', __DIR__);
Cristian Ioan Alexandru
5 years ago

Hello Milos

I need to rename / public with folder / panel.

I tried but as I did, it does not work anymore avatar upload. 


You tell me how you can do with your script


Regards

Milos Stojanovic Support Agent
5 years ago

Hey,

As I said in my previous reply, you need to add that Auth::login($user);  code before the return redirect statement, not to replace it with it.

There are no header.php and footer.php. The main layout of the application is in resources/views/layouts/app.blade.php blade file. I would recommend you to learn more about Blade templates from Laravel documentation: https://laravel.com/docs/5.6/blade

I understand that you don't know Laravel but, Vanguard is a Laravel application which means that if you want to customize and modify it, at least some basic Laravel knowledge is required. I've explained everything you need to do in my previous reply.

Cristian Ioan Alexandru
5 years ago

http://prntscr.com/jjmcpm

I did it but it does not work.

I do not know well how you laravel

if you send code, that is replace, let's do it first  . REGARDS



where I find header.php. and footer.php?

Milos Stojanovic Support Agent
5 years ago

Hey,

1) You can update the postRegister method app/Http/Controllers/Web/Auth/AuthController.php file and log the user with Auth::login($user);  before the redirect.

2) You can do it by modifying the handleUserWasAuthenticated method in the above-mentioned controller and by replacing 

return redirect()->intended();

with 

return redirect()->to('your url here');

3) It is not recommended to delete the password confirmation field since it is a standard way to make sure that users entered their password correctly but, if you want, you will need to update the resources/views/auth/register.blade.php view file and remove it manually.  

Also, in this case, you will have to update app/Http/Requests/Auth/RegisterRequest.php validation rules and remove the confirmed rule for the password field.

Cristian Ioan Alexandru
5 years ago

Hello


how can I do.

1. after registering a user, redirect directly in the control panel without logging in again.

2. it is possible after login to send a user to a new page (without? To =)

3. you can, delete the second password in registration form


Regards