Русское сообщество разработки на PHP-фреймворке Laravel.
Ты не вошёл. Вход тут.
Страницы 1
Password Reminder Controller
Laravel also includes an Auth\PasswordController that contains the logic necessary to reset user passwords. We've even provided views to get you started! The views are located in the resources/views/auth directory. You are free to modify these views as you wish to suit your own application's design.
Your user will receive an e-mail with a link that points to the getReset method of the PasswordController. This method will render the password reset form and allow users to reset their passwords. After the password is reset, the user will automatically be logged into the application and redirected to /home. You can customize the post-reset redirect location by defining a redirectTo property on the PasswordController:
protected $redirectTo = '/dashboard';
Note: By default, password reset tokens expire after one hour. You may change this via the reminder.expire option of your config/auth.php file.
Делаю все по инструкции, вызываю Route::get('password/remind', 'Auth\PasswordController@getRemind');
Route::get('password/remind', 'Auth\PasswordController@getReset');
все в пустую, никаких blade шаблонов не цепляет а сразу кидает на /home ?????!!!!!!!!
В контроллере PasswordController пусто, нет функций getRemind, postRemind, getReset, postRemind, postReset !!!!!!!!!!!?????????
В 4.2 эти функции автоматически создавались при создании этого контроллера!
Как же теперь делать?
Пытался сам прописать функцию getRemind - не помогает, кидает опять в /home ?????!!!!!!!!
Разобрался, теперь нет этих функций!!!
Так и другим подскажи решение проблемы
Да какое решение... Думал, что они есть, а их, оказывается, нет. Ну, нету, и не надо :-)
"Теперича не то, что давеча" (с)
Не в сети
php artisan make:auth
все вьюхи, контроллеры и роуты сам проставит.
роут для Auth
Auth::routes();
Не в сети
Когда ставлю Auth::routes(); в конце роутов, получаю:
ErrorException in AuthManager.php line 292:
call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Auth\SessionGuard' does not have a method 'routes'
===========
ниже привожу файл routes.php
===========
<?php
Route::group(['prefix' => 'makemeadmin'], function(){
Route::group(['middleware' => 'admin'], function(){
Route::get('/logout', 'Auth\AuthController@logout');
Route::get('/', function(){
return redirect()->intended('/makemeadmin/home');
});
Route::get('/home', 'AdminController@index');
Route::get('/users', 'AdminController@showUsersTable');
});
Route::group(['middleware' => 'admin.auth'], function(){
Route::get('/signin', 'AdminController@getSignin');
Route::post('/signin', 'AdminController@signin');
});
});
/**
* Routes for ajax requests
*/
Route::group(['prefix' => 'ajax'], function() {
Route::post('/getStates', 'MainController@getStates');
Route::post('/getCities', 'MainController@getCities');
Route::post('/getPostCode', 'MainController@getPostCode');
Route::post('/getCityStateCountry', 'MainController@getCityStateCountry');
// Authentification and registration
Route::post('/signin', 'Auth\AuthController@signin');
Route::post('/signup', 'Auth\AuthController@signup');
//change info about locale and language in session;
Route::post('/changeLocation', 'MainController@changeLocation');
Route::post('/changeLanguage', 'MainController@changeLanguage');
Route::post('/typeCountry', 'MainController@typeCountry');
Route::post('/getCompanyTypes', 'MainController@getCompanyTypes');
//profile settings
Route::post('/profileSettingsSave', 'ProfileController@saveSettings');
Route::post('/profileCompanyInfoSave', 'ProfileController@saveCompanyInfo');
Route::post('/createCompany', 'ProfileController@createCompany');
Route::post('/removeCompany', 'ProfileController@removeCompany');
Route::post('/removeCompanyLogo', 'ProfileController@removeCompanyLogo');
});
/**
* End ajax
*/
Route::group(['middleware' => 'web'], function(){
Route::get('/', 'MainController@welcome');
Route::get('/goods', 'MainController@welcome');
Route::get('/services', 'MainController@welcome');
Route::get('/companies', 'CompanyController@showView');
Route::get('/about', 'AboutController@showView');
Route::get('/stats', 'ArticleController@showView');
Route::get('/faq', 'FaqController@showView');
Route::get('/contacts', 'ContactController@showView');
Route::group(['prefix' => 'category'], function() { // throw this two rows we have a Bug (user can`t change language).
Route::get('/{url}', 'CategoryController@showCategoryPageView');
Route::get('/{url}/horizontal', 'CategoryController@showCategoryPageHorizontalView');
});
// Authentification
Route::get('/signin', 'Auth\AuthController@getSignin');
Route::get('{url}/logout', 'Auth\AuthController@logout'); // после логаута не остается на странице а переходит на '/'
Route::get('/logout', 'Auth\AuthController@logout');
// Routes query link to reset your password
Route::get('password/email', 'Auth\PasswordController@getEmail');
Route::post('password/email', 'Auth\PasswordController@postEmail');
// Password reset routes
Route::get('password/reset/{token}', 'Auth\PasswordController@getReset');
Route::post('password/reset', 'Auth\PasswordController@postReset');
Route::group(['prefix' => 'profile', 'middleware' => 'auth'], function() {
Route::get('/', 'ProfileController@showUserProfileView');
Route::get('/create_company', 'ProfileController@showCreateCompanyView');
Route::get('/companies', 'ProfileController@showMyCompanies');
Route::get('/companies/{id}', 'ProfileController@showCompanyData');
Route::get('/cards', 'ProfileController@showCards');
Route::group(['prefix' => 'articles'], function() {
Route::get('/', 'ArticleController@showProfileArticles');
Route::get('/create', 'ArticleController@showArticleCreate');
});
});
// Registration
Route::get('signup', 'Auth\AuthController@getSignup');
Route::post('signup', 'Auth\AuthController@signup');
});
Auth::routes();
Когда ставлю Auth::routes(); в конце роутов, получаю:
ErrorException in AuthManager.php line 292:
call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Auth\SessionGuard' does not have a method 'routes'
===========
ниже привожу файл routes.php
===========
Route::group(['prefix' => 'makemeadmin'], function(){
Route::group(['middleware' => 'admin'], function(){
Route::get('/logout', 'Auth\AuthController@logout');
Route::get('/', function(){
return redirect()->intended('/makemeadmin/home');
});
Route::get('/home', 'AdminController@index');
Route::get('/users', 'AdminController@showUsersTable');
});
Route::group(['middleware' => 'admin.auth'], function(){
Route::get('/signin', 'AdminController@getSignin');
Route::post('/signin', 'AdminController@signin');
});
});
/**
* Routes for ajax requests
*/
Route::group(['prefix' => 'ajax'], function() {
Route::post('/getStates', 'MainController@getStates');
Route::post('/getCities', 'MainController@getCities');
Route::post('/getPostCode', 'MainController@getPostCode');
Route::post('/getCityStateCountry', 'MainController@getCityStateCountry');
// Authentification and registration
Route::post('/signin', 'Auth\AuthController@signin');
Route::post('/signup', 'Auth\AuthController@signup');
//change info about locale and language in session;
Route::post('/changeLocation', 'MainController@changeLocation');
Route::post('/changeLanguage', 'MainController@changeLanguage');
Route::post('/typeCountry', 'MainController@typeCountry');
Route::post('/getCompanyTypes', 'MainController@getCompanyTypes');
//profile settings
Route::post('/profileSettingsSave', 'ProfileController@saveSettings');
Route::post('/profileCompanyInfoSave', 'ProfileController@saveCompanyInfo');
Route::post('/createCompany', 'ProfileController@createCompany');
Route::post('/removeCompany', 'ProfileController@removeCompany');
Route::post('/removeCompanyLogo', 'ProfileController@removeCompanyLogo');
});
/**
* End ajax
*/
Route::group(['middleware' => 'web'], function(){
Route::get('/', 'MainController@welcome');
Route::get('/goods', 'MainController@welcome');
Route::get('/services', 'MainController@welcome');
Route::get('/companies', 'CompanyController@showView');
Route::get('/about', 'AboutController@showView');
Route::get('/stats', 'ArticleController@showView');
Route::get('/faq', 'FaqController@showView');
Route::get('/contacts', 'ContactController@showView');
Route::group(['prefix' => 'category'], function() { // throw this two rows we have a Bug (user can`t change language).
Route::get('/{url}', 'CategoryController@showCategoryPageView');
Route::get('/{url}/horizontal', 'CategoryController@showCategoryPageHorizontalView');
});
// Authentification
Route::get('/signin', 'Auth\AuthController@getSignin');
Route::get('{url}/logout', 'Auth\AuthController@logout'); // после логаута не остается на странице а переходит на '/'
Route::get('/logout', 'Auth\AuthController@logout');
// Routes query link to reset your password
Route::get('password/email', 'Auth\PasswordController@getEmail');
Route::post('password/email', 'Auth\PasswordController@postEmail');
// Password reset routes
Route::get('password/reset/{token}', 'Auth\PasswordController@getReset');
Route::post('password/reset', 'Auth\PasswordController@postReset');
Route::group(['prefix' => 'profile', 'middleware' => 'auth'], function() {
Route::get('/', 'ProfileController@showUserProfileView');
Route::get('/create_company', 'ProfileController@showCreateCompanyView');
Route::get('/companies', 'ProfileController@showMyCompanies');
Route::get('/companies/{id}', 'ProfileController@showCompanyData');
Route::get('/cards', 'ProfileController@showCards');
Route::group(['prefix' => 'articles'], function() {
Route::get('/', 'ArticleController@showProfileArticles');
Route::get('/create', 'ArticleController@showArticleCreate');
});
});
// Registration
Route::get('signup', 'Auth\AuthController@getSignup');
Route::post('signup', 'Auth\AuthController@signup');
});
Auth::routes();
ну а теперь, когда никто ничего не понимает, давай ты расскажешь, какая версия рнр и лары у тебя установлены и на какой платформе.
и впредь будь ласка сообщать подобное первой строкой перед вопросом.
Не в сети
Страницы 1