web.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Web Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register web routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | contains the "web" middleware group. Now create something great!
  11. |
  12. */
  13. Route::get('/clear-all', function() {
  14. Artisan::call('cache:clear');
  15. Artisan::call('view:clear');
  16. Artisan::call('clear-compiled');
  17. Artisan::call('config:cache');
  18. Artisan::call('config:clear');
  19. return "All is cleared";
  20. });
  21. Auth::routes();
  22. //Admin
  23. Route::get('/', [App\Http\Controllers\AdminAuth\LoginController::class,'showLoginForm']);
  24. Route::post('/create-login', [App\Http\Controllers\AdminAuth\LoginController::class,'login'])->name('create-login');
  25. Route::post('admin-logout', [App\Http\Controllers\AdminAuth\LoginController::class,'logout'])->name('admin-logout');
  26. Route::group(['middleware' => ['admin']], function() {
  27. Route::get('/admin/dashboard', [App\Http\Controllers\Admin\AdminController::class,'dashboard']);
  28. Route::get('/admin/dashboard/load_country_list/{text}', [App\Http\Controllers\Admin\AdminController::class,'load_country_list']);
  29. });
  30. Route::get(
  31. 'modal/{name}',
  32. 'ModalController@get'
  33. )->name('modal-get');
  34. Route::post(
  35. 'modal/{name}',
  36. 'ModalController@post'
  37. )->name('modal-post');
  38. Route::get(
  39. 'ajax/{name}',
  40. 'AjaxController@get'
  41. )->name('ajax-get');
  42. Route::post(
  43. 'ajax/{name}',
  44. 'AjaxController@post'
  45. )->name('ajax-post');
  46. Route::get(
  47. 'sub-content/{name}', [App\Http\Controllers\Admin\SubContentController::class, 'get']
  48. )->name('sub-content');