| | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */ Route::group(['namespace' => 'Admin', 'middleware' => 'auth'], function () { Route::controller('/admin/dashboard', 'DashboardController'); Route::controller('/admin/agent', 'AgentController'); Route::controller('/admin/message', 'MessageController'); Route::controller('/admin/destination', 'DestinationController'); }); Route::controller('home', 'HomeController'); Route::controller('agent', 'AgentController'); Route::get('/change-captcha-image', function () { return captcha_src(); }); Route::resource('project-comment', 'ProjectCommentController'); Route::controller('checkout', 'CheckoutController'); Route::controller('cron', 'CronController'); Route::controller('user', 'UserController'); Route::post('home/refund', 'HomeController@postRefund'); Route::get('auth/login', function (SammyK\LaravelFacebookSdk\LaravelFacebookSdk $fb) { $menuItems = App\Models\Menu::where('active', '1')->orderBy('weight', 'asc')->get(); $login_url = $fb->getLoginUrl(['email']); return view('auth.login', ['setClass' => 'grayBody', 'login_url' => $login_url, '_menus' => $menuItems]); }); Route::get('auth/register', function (SammyK\LaravelFacebookSdk\LaravelFacebookSdk $fb) { $menuItems = App\Models\Menu::where('active', '1')->orderBy('weight', 'asc')->get(); $login_url = $fb->getLoginUrl(['email']); return view('auth.register', ['setClass' => 'grayBody', 'login_url' => $login_url, '_menus' => $menuItems]);
} ?> <form action="/feedback" method="POST"> <input type="hidden" name="_token" value="<?php echo csrf_token(); ?> "> <p>Напишите отзыв: </p> <div class="form-group"> <textarea required name="feedback_text" placeholder="Write something here" rows="10" cols="50"><?php if (Session::has('feedback_text')) { echo Session::pull('feedback_text'); } ?> </textarea> </div> <div class="form-group"> <a href="javascript:void(0)" onclick="captcha_reload()"><img src="<?php echo captcha_src(); ?> " name="captcha_img" alt="captcha"> </a> <input type="text" name="captcha"> </div> <input type="submit" name="auth" value="Отправить" class="btn btn-default"/> </form>
public function getCaptcha() { $captcha = captcha_src(); return ['error' => 0, 'captcha' => $captcha, 'message' => '']; }