Skip to content

Commit

Permalink
try to create login method
Browse files Browse the repository at this point in the history
  • Loading branch information
puleeno committed Apr 7, 2024
1 parent 617fdcf commit d5fb091
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,9 @@ function get_active_theme_url($theme = null)
);
}
}

if (!function_exists('config')) {
function config($name, $defaultValue = null) {
return Helper::getConfig($name, $defaultValue);
}
}
4 changes: 3 additions & 1 deletion configs/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
'reset' => 'App\Http\Controllers\Auth\ResetPasswordController',
],
'password_timeout' => 10800,
'login_path' => '/auth/login'
'login' => [
'path' => '/auth/login'
]
];
2 changes: 2 additions & 0 deletions configs/cli.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php
return [
];
5 changes: 5 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
$group->get('/{id}', ViewUserAction::class);
});

var_dump(config('auth.login.path', 'test'));die;
$app->any(config('login.path', '/auth/login'), function(){
die('zo');
});


$app->any(
'/',
Expand Down

0 comments on commit d5fb091

Please sign in to comment.