laravel-learn-bbs/routes/web.php

44 lines
2.0 KiB
PHP
Raw Permalink Normal View History

2017-12-24 14:17:18 +00:00
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
2018-06-02 15:48:42 +00:00
Route::get('/', 'TopicsController@index')->name('home');
2017-12-30 15:45:21 +00:00
Route::resource('users', 'UsersController', ['only' => ['update', 'show', 'edit']])
->middleware('auth');
2017-12-30 20:23:09 +00:00
2017-12-30 15:45:21 +00:00
// Authentication Routes...
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout')->name('logout');
// Registration Routes...
Route::get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
Route::post('register', 'Auth\RegisterController@register');
// Password Reset Routes...
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
2018-01-01 04:00:45 +00:00
Route::post('password/reset', 'Auth\ResetPasswordController@reset');
2018-01-01 13:22:16 +00:00
Route::resource('topics', 'TopicsController', ['only' => ['index', 'create', 'store', 'update', 'edit', 'destroy']]);
Route::get('topics/{topic}/{slug?}', 'TopicsController@show')->name('topics.show');
2018-01-01 06:51:46 +00:00
Route::resource('categories', 'CategoriesController', ['only' => ['show']]);
2018-01-01 10:48:03 +00:00
Route::post('upload_image', 'TopicsController@uploadImage')->name('topics.upload_image');
2018-01-15 15:24:11 +00:00
2018-01-27 10:35:56 +00:00
Route::resource('replies', 'RepliesController', ['only' => ['store', 'destroy']]);
2018-06-02 08:28:28 +00:00
Route::resource('notifications', 'NotificationsController', ['only' => ['index']])->middleware('auth');
Route::get('permission-denied', 'PagesController@permissionDenied')->name('permission-denied');