Skip to content

Commit ea1dd10

Browse files
committed
fix smtng
1 parent 9ff8c34 commit ea1dd10

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed
File renamed without changes.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor
2+
.env

public/.htaccess

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<IfModule mod_rewrite.c>
2+
<IfModule mod_negotiation.c>
3+
Options -MultiViews -Indexes
4+
</IfModule>
5+
6+
RewriteEngine On
7+
8+
# Handle Authorization Header
9+
RewriteCond %{HTTP:Authorization} .
10+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
11+
12+
# Redirect Trailing Slashes If Not A Folder...
13+
RewriteCond %{REQUEST_FILENAME} !-d
14+
RewriteCond %{REQUEST_URI} (.+)/$
15+
RewriteRule ^ %1 [L,R=301]
16+
17+
# Send Requests To Front Controller...
18+
RewriteCond %{REQUEST_FILENAME} !-d
19+
RewriteCond %{REQUEST_FILENAME} !-f
20+
RewriteRule ^ index.php [L]
21+
</IfModule>

public/index.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use App\Application;
44
use App\Routing\Route;
5-
use App\Controllers\EmojiController;
5+
use App\Controllers\UserController;
66

77
require __DIR__ . '/../vendor/autoload.php';
88

@@ -11,10 +11,10 @@
1111

1212
$app = new Application();
1313

14-
Route::get('/users', [EmojiController::class, 'index']);
15-
Route::get('/users/{id}', [EmojiController::class, 'show']);
16-
Route::post('/users', [EmojiController::class, 'store']);
17-
Route::put('/users/{id}', [EmojiController::class, 'update']);
18-
Route::delete('/users/{id}', [EmojiController::class, 'destroy']);
14+
Route::get('/users', [UserController::class, 'index']);
15+
Route::get('/users/{id}', [UserController::class, 'show']);
16+
Route::post('/users', [UserController::class, 'store']);
17+
Route::put('/users/{id}', [UserController::class, 'update']);
18+
Route::delete('/users/{id}', [UserController::class, 'destroy']);
1919

2020
$app->run();

0 commit comments

Comments
 (0)