Skip to content

Commit 3f5730e

Browse files
committed
IMPROVEMENTS WITH VIEWS
Allow customing the auth password reset, login views by adding "views" publish tags
1 parent 6a62c05 commit 3f5730e

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

src/Darryldecode/Backend/BackendServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public function boot(Router $router)
4141
__DIR__.'/Database/Migrations' => database_path('migrations'),
4242
__DIR__.'/Database/Seeders' => database_path('seeds'),
4343
], 'migrations');
44+
45+
$this->publishes([
46+
__DIR__.'/Components/Auth/Views' => base_path('resources/views/backend/auth'),
47+
], 'views');
4448
}
4549

4650
/**

src/Darryldecode/Backend/Base/Registrar/Registrar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Registrar {
1313
/**
1414
* the laravel backend version
1515
*/
16-
const VERSION = '1.0.22';
16+
const VERSION = '1.0.23';
1717
const VERSION_NAME = 'Alpha';
1818

1919
/**

src/Darryldecode/Backend/Components/Auth/Controllers/AuthController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ public function __construct()
2727
*/
2828
public function getLogin()
2929
{
30+
if (view()->exists('backend.auth.login'))
31+
{
32+
return view('backend.auth.password');
33+
}
34+
3035
return view('authManager::login');
3136
}
3237

src/Darryldecode/Backend/Components/Auth/Controllers/PasswordController.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ public function __construct()
3333
*/
3434
public function getEmail()
3535
{
36-
return view('authManager.password');
36+
if (view()->exists('backend.auth.password'))
37+
{
38+
return view('backend.auth.password');
39+
}
40+
41+
return view('authManager::password');
3742
}
3843

3944
/**
@@ -71,7 +76,12 @@ public function getReset($token = null)
7176
throw new NotFoundHttpException;
7277
}
7378

74-
return view('authManager.reset')->with('token', $token);
79+
if (view()->exists('backend.auth.reset'))
80+
{
81+
return view('backend.auth.password');
82+
}
83+
84+
return view('authManager::reset')->with('token', $token);
7585
}
7686

7787
/**

0 commit comments

Comments
 (0)