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-13 00:28:45 +01:00
|
|
|
if (!session()->has('user'))
|
|
|
|
{
|
|
|
|
return redirect()->route('public');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return redirect()->route('home');
|
|
|
|
}
|
2018-08-12 15:26:26 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::get('/timeline/public', 'TimelineController@public_timeline')
|
|
|
|
->name('public');
|
|
|
|
|
2018-08-13 00:28:45 +01:00
|
|
|
Route::get('/timeline/home', 'TimelineController@home_timeline')
|
|
|
|
->name('home');
|
2018-08-12 15:26:26 +01:00
|
|
|
|
2018-08-14 05:31:20 +01:00
|
|
|
Route::post('/timeline/home', 'TimelineController@post_status');
|
|
|
|
|
2018-08-14 06:19:55 +01:00
|
|
|
Route::get('/status/{status_id}', 'StatusController@show_status');
|
|
|
|
|
2018-08-12 15:40:07 +01:00
|
|
|
Route::get('/login', 'LoginController@login')
|
|
|
|
->name('login');
|
2018-08-12 15:26:26 +01:00
|
|
|
|
|
|
|
Route::get('/callback', 'LoginController@callback');
|