2018-08-11 18:32:56 +01: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-08-12 15:26:26 +01:00
|
|
|
Route::get('/', function() {
|
2018-08-26 22:34:01 +01:00
|
|
|
if (!session()->has('user'))
|
2018-08-13 00:28:45 +01:00
|
|
|
{
|
|
|
|
return redirect()->route('public');
|
|
|
|
}
|
2018-08-26 22:34:01 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
return redirect()->route('home');
|
|
|
|
}
|
2018-08-12 15:26:26 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::get('/timeline/public', 'TimelineController@public_timeline')
|
2018-08-26 22:34:01 +01:00
|
|
|
->name('public');
|
2018-08-12 15:26:26 +01:00
|
|
|
|
2018-08-13 00:28:45 +01:00
|
|
|
Route::get('/timeline/home', 'TimelineController@home_timeline')
|
2018-08-26 22:34:01 +01:00
|
|
|
->name('home')
|
|
|
|
->middleware('authorize');
|
2018-08-14 05:31:20 +01:00
|
|
|
|
2018-08-18 23:48:00 +01:00
|
|
|
Route::get('/status/{status_id}', 'StatusController@show_status')
|
2018-08-26 22:34:01 +01:00
|
|
|
->name('status');
|
|
|
|
|
|
|
|
Route::get('/status/{status_id}/reblog', 'StatusController@reblog_status')
|
2018-09-10 04:55:08 +01:00
|
|
|
->name('reblog')
|
2018-08-26 22:34:01 +01:00
|
|
|
->middleware('authorize');
|
|
|
|
|
|
|
|
Route::get('/status/{status_id}/unreblog', 'StatusController@unreblog_status')
|
2018-09-10 04:55:08 +01:00
|
|
|
->name('unreblog')
|
2018-08-26 22:34:01 +01:00
|
|
|
->middleware('authorize');
|
|
|
|
|
|
|
|
Route::get('/status/{status_id}/favourite', 'StatusController@favourite_status')
|
2018-09-10 04:55:08 +01:00
|
|
|
->name('favourite')
|
2018-08-26 22:34:01 +01:00
|
|
|
->middleware('authorize');
|
|
|
|
|
|
|
|
Route::get('/status/{status_id}/unfavourite', 'StatusController@unfavourite_status')
|
2018-09-10 04:55:08 +01:00
|
|
|
->name('unfavourite')
|
2018-08-26 22:34:01 +01:00
|
|
|
->middleware('authorize');
|
2018-08-18 23:48:00 +01:00
|
|
|
|
2019-03-24 19:45:36 +00:00
|
|
|
Route::get('/status/{status_id}/delete', 'StatusController@delete_status')
|
|
|
|
->name('delete')
|
|
|
|
->middleware('authorize');
|
|
|
|
|
2018-09-10 04:55:08 +01:00
|
|
|
Route::get('/status/{status_id}/thread', 'StatusController@context')
|
|
|
|
->name('thread');
|
2018-08-26 21:37:55 +01:00
|
|
|
|
2018-08-26 22:34:01 +01:00
|
|
|
Route::post('/status', 'StatusController@post_status')
|
2018-09-10 04:55:08 +01:00
|
|
|
->name('post_status')
|
2018-08-26 22:34:01 +01:00
|
|
|
->middleware('authorize');
|
|
|
|
|
2018-08-26 01:29:36 +01:00
|
|
|
Route::get('/notifications', 'NotificationsController@get_notifications')
|
2018-08-26 22:34:01 +01:00
|
|
|
->name('notifications')
|
|
|
|
->middleware('authorize');
|
2018-08-26 01:29:36 +01:00
|
|
|
|
2018-10-08 04:50:15 +01:00
|
|
|
Route::get('/account/{account_id}', 'AccountController@view_account')
|
|
|
|
->name('account')
|
|
|
|
->middleware('authorize');
|
|
|
|
|
2018-10-08 05:37:09 +01:00
|
|
|
Route::get('/account/{account_id}/follow', 'AccountController@follow_account')
|
|
|
|
->name('follow')
|
|
|
|
->middleware('authorize');
|
|
|
|
|
|
|
|
Route::get('/account/{account_id}/unfollow', 'AccountController@unfollow_account')
|
|
|
|
->name('unfollow')
|
|
|
|
->middleware('authorize');
|
|
|
|
|
2019-02-19 19:57:20 +00:00
|
|
|
Route::match(['get', 'post'], '/search', 'SearchController@search')
|
2019-02-17 16:41:35 +00:00
|
|
|
->name('search')
|
2018-10-10 04:12:14 +01:00
|
|
|
->middleware('authorize');
|
|
|
|
|
2018-08-12 15:40:07 +01:00
|
|
|
Route::get('/login', 'LoginController@login')
|
2018-08-26 22:34:01 +01:00
|
|
|
->name('login');
|
2018-08-12 15:26:26 +01:00
|
|
|
|
|
|
|
Route::get('/callback', 'LoginController@callback');
|