This repository has been archived by the owner on Jun 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.php
113 lines (78 loc) · 4.27 KB
/
web.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| 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!
|
*/
// Index page
Route::get('/', 'App\Http\Controllers\IndexController@index');
// Register page
Route::get('/register', 'App\Http\Controllers\RegisterController@index');
// Register form
Route::post('/register', 'App\Http\Controllers\RegisterController@register');
// Login page
Route::get('/login', 'App\Http\Controllers\LoginController@index');
// Login form validation
Route::post('/login', 'App\Http\Controllers\LoginController@login');
// User page
Route::get('/{username}/profile', 'App\Http\Controllers\UserController@index');
// User profile individual publication
Route::get('/{username}/publication/{idPublicacion}', 'App\Http\Controllers\UserController@publication');
// New comment form
Route::post('/{idUsuario}/comment/newcomment/{idPublicacion}', 'App\Http\Controllers\PublicationController@newcomment');
// Edit a publication
Route::get('/{username}/publication/{idPublicacion}/edit', 'App\Http\Controllers\PublicationController@edit');
// Edit a publication form
Route::post('/{username}/publication/{idPublicacion}/edit', 'App\Http\Controllers\PublicationController@update');
// Publicaciones de los usuarios que sigue el usuario logueado
Route::get('/{username}', 'App\Http\Controllers\UserFeedController@index');
// Logout
Route::get('/{username}/logout', 'App\Http\Controllers\LoginController@logout');
// Create a new publication
Route::post('/publication/new/{idUsuario}', 'App\Http\Controllers\PublicationController@newPublication');
// Create a new publication page
Route::get('/publication/new', 'App\Http\Controllers\PublicationController@index');
// Create a new history
Route::post('/history/new/{idUsuario}', 'App\Http\Controllers\HistoryController@newHistory');
// Create a new history page
Route::get('/history/new', 'App\Http\Controllers\HistoryController@index');
// User settings page
Route::get('/{username}/settings', 'App\Http\Controllers\UserSettingsController@index');
// User settings form
Route::post('/{username}/settings', 'App\Http\Controllers\UserSettingsController@update');
// User notifications page !(TODO)
Route::get('/{username}/notifications', 'App\Http\Controllers\UserNotificationsController@index');
// User search page
Route::get('/{username}/search', 'App\Http\Controllers\UserSearchController@index');
// Follow user
Route::post('/{username}/follow/{usernamefollow}', 'App\Http\Controllers\UserController@follow');
// Unfollow user
Route::post('/{username}/unfollow/{usernameunfollow}', 'App\Http\Controllers\UserController@unfollow');
// Stories page
Route::get('/{username}/story/{idHistoria}', 'App\Http\Controllers\HistoryController@viewHistory');
// Stories page edit
Route::get('/{username}/story/{idHistoria}/edit', 'App\Http\Controllers\HistoryController@editHistory');
// Stories page edit form
Route::post('/{username}/story/{idHistoria}/edit', 'App\Http\Controllers\HistoryController@updateHistory');
// Stories page delete
Route::post('/{username}/story/{idHistoria}/delete', 'App\Http\Controllers\HistoryController@deleteHistory');
// Rt a publication
Route::post('/{username}/rt/{idPublicacion}', 'App\Http\Controllers\PublicationController@rt');
// Delete a publication
Route::post('/{username}/publication/{idPublicacion}/delete', 'App\Http\Controllers\PublicationController@delete');
// See all users that follow the user
Route::get('/{username}/followers', 'App\Http\Controllers\UserController@followers');
// See all users that the user follows
Route::get('/{username}/following', 'App\Http\Controllers\UserController@following');
// Delete an account
Route::post('/{username}/account/delete', 'App\Http\Controllers\UserController@deleteAccount');
// Mark notification as read
Route::post('/{username}/notification/{idMensaje}/read', 'App\Http\Controllers\UserNotificationsController@read');
// Delete notification
Route::post('/{username}/notification/{idMensaje}/delete', 'App\Http\Controllers\UserNotificationsController@delete');