-
-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/6.0.23: compile assets Apply fixes from StyleCI (#943) wip wip adding tests Apply fixes from StyleCI (#941) wip Apply fixes from StyleCI (#940) cleanup and refactor wip Apply fixes from StyleCI (#936) set strict types
- Loading branch information
Showing
41 changed files
with
1,392 additions
and
1,412 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"/js/app.js": "/js/app.js?id=90af637484ed2deeb568", | ||
"/css/app.css": "/css/app.css?id=a49a08395034a6be9488" | ||
"/js/app.js": "/js/app.js?id=e494ab5415f2d400ab5b", | ||
"/css/app.css": "/css/app.css?id=17b9084a51cfbf270aa4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,86 @@ | ||
<?php | ||
|
||
use Canvas\Http\Controllers\Auth\AuthenticatedSessionController; | ||
use Canvas\Http\Controllers\Auth\NewPasswordController; | ||
use Canvas\Http\Controllers\Auth\PasswordResetLinkController; | ||
use Canvas\Http\Controllers\HomeController; | ||
use Canvas\Http\Controllers\PostController; | ||
use Canvas\Http\Controllers\SearchController; | ||
use Canvas\Http\Controllers\StatsController; | ||
use Canvas\Http\Controllers\TagController; | ||
use Canvas\Http\Controllers\TopicController; | ||
use Canvas\Http\Controllers\UploadsController; | ||
use Canvas\Http\Controllers\UserController; | ||
use Canvas\Http\Middleware\AdminMiddleware; | ||
use Canvas\Http\Middleware\AuthenticatedMiddleware; | ||
use Canvas\Http\Middleware\Admin; | ||
use Canvas\Http\Middleware\Authenticate; | ||
use Illuminate\Support\Facades\Route; | ||
|
||
// Authentication routes... | ||
Route::namespace('Auth')->group(function () { | ||
Route::get('login', [AuthenticatedSessionController::class, 'create']) | ||
->name('canvas.login'); | ||
// Login routes... | ||
Route::get('login', 'AuthenticatedSessionController@create')->name('canvas.login'); | ||
Route::post('login', 'AuthenticatedSessionController@store'); | ||
|
||
Route::post('login', [AuthenticatedSessionController::class, 'store']); | ||
// Forgot password routes... | ||
Route::get('forgot-password', 'PasswordResetLinkController@create')->name('canvas.password.request'); | ||
Route::post('forgot-password', 'PasswordResetLinkController@store')->name('canvas.password.email'); | ||
|
||
Route::get('forgot-password', [PasswordResetLinkController::class, 'create']) | ||
->name('canvas.password.request'); | ||
// Reset password routes... | ||
Route::get('reset-password/{token}', 'NewPasswordController@create')->name('canvas.password.reset'); | ||
Route::post('reset-password', 'NewPasswordController@store')->name('canvas.password.update'); | ||
|
||
Route::post('forgot-password', [PasswordResetLinkController::class, 'store']) | ||
->name('canvas.password.email'); | ||
|
||
Route::get('reset-password/{token}', [NewPasswordController::class, 'create']) | ||
->name('canvas.password.reset'); | ||
|
||
Route::post('reset-password', [NewPasswordController::class, 'store']) | ||
->name('canvas.password.update'); | ||
|
||
Route::get('logout', [AuthenticatedSessionController::class, 'destroy']) | ||
->name('canvas.logout'); | ||
// Logout routes... | ||
Route::get('logout', 'AuthenticatedSessionController@destroy')->name('canvas.logout'); | ||
}); | ||
|
||
// API routes... | ||
Route::middleware([AuthenticatedMiddleware::class])->group(function () { | ||
Route::middleware([Authenticate::class])->group(function () { | ||
Route::prefix('api')->group(function () { | ||
// Stats routes... | ||
Route::get('stats', 'StatsController'); | ||
|
||
// Upload routes... | ||
Route::prefix('uploads')->group(function () { | ||
Route::post('/', [UploadsController::class, 'store']); | ||
Route::delete('/', [UploadsController::class, 'destroy']); | ||
Route::post('/', 'UploadsController@store'); | ||
Route::delete('/', 'UploadsController@destroy'); | ||
}); | ||
|
||
// Post routes... | ||
Route::prefix('posts')->group(function () { | ||
Route::get('/', [PostController::class, 'index']); | ||
Route::get('create', [PostController::class, 'create']); | ||
Route::get('{id}', [PostController::class, 'show']); | ||
Route::post('{id}', [PostController::class, 'store']); | ||
Route::delete('{id}', [PostController::class, 'destroy']); | ||
}); | ||
|
||
Route::prefix('stats')->group(function () { | ||
Route::get('/', [StatsController::class, 'index']); | ||
Route::get('{id}', [StatsController::class, 'show']); | ||
Route::get('/', 'PostController@index'); | ||
Route::get('create', 'PostController@create'); | ||
Route::get('{id}', 'PostController@show'); | ||
Route::get('{id}/stats', 'PostController@stats'); | ||
Route::post('{id}', 'PostController@store'); | ||
Route::delete('{id}', 'PostController@destroy'); | ||
}); | ||
|
||
Route::prefix('tags')->middleware([AdminMiddleware::class])->group(function () { | ||
Route::get('/', [TagController::class, 'index']); | ||
Route::get('create', [TagController::class, 'create']); | ||
Route::get('{id}', [TagController::class, 'show']); | ||
Route::get('{id}/posts', [TagController::class, 'showPosts']); | ||
Route::post('{id}', [TagController::class, 'store']); | ||
Route::delete('{id}', [TagController::class, 'destroy']); | ||
// Tag routes... | ||
Route::prefix('tags')->middleware([Admin::class])->group(function () { | ||
Route::get('/', 'TagController@index'); | ||
Route::get('create', 'TagController@create'); | ||
Route::get('{id}', 'TagController@show'); | ||
Route::get('{id}/posts', 'TagController@posts'); | ||
Route::post('{id}', 'TagController@store'); | ||
Route::delete('{id}', 'TagController@destroy'); | ||
}); | ||
|
||
Route::prefix('topics')->middleware([AdminMiddleware::class])->group(function () { | ||
Route::get('/', [TopicController::class, 'index']); | ||
Route::get('create', [TopicController::class, 'create']); | ||
Route::get('{id}', [TopicController::class, 'show']); | ||
Route::get('{id}/posts', [TopicController::class, 'showPosts']); | ||
Route::post('{id}', [TopicController::class, 'store']); | ||
Route::delete('{id}', [TopicController::class, 'destroy']); | ||
// Topic routes... | ||
Route::prefix('topics')->middleware([Admin::class])->group(function () { | ||
Route::get('/', 'TopicController@index'); | ||
Route::get('create', 'TopicController@create'); | ||
Route::get('{id}', 'TopicController@show'); | ||
Route::get('{id}/posts', 'TopicController@posts'); | ||
Route::post('{id}', 'TopicController@store'); | ||
Route::delete('{id}', 'TopicController@destroy'); | ||
}); | ||
|
||
// User routes... | ||
Route::prefix('users')->group(function () { | ||
Route::get('/', [UserController::class, 'index'])->middleware([AdminMiddleware::class]); | ||
Route::get('create', [UserController::class, 'create'])->middleware([AdminMiddleware::class]); | ||
Route::get('{id}', [UserController::class, 'show']); | ||
Route::get('{id}/posts', [UserController::class, 'showPosts']); | ||
Route::post('{id}', [UserController::class, 'store']); | ||
Route::delete('{id}', [UserController::class, 'destroy'])->middleware([AdminMiddleware::class]); | ||
Route::get('/', 'UserController@index')->middleware([Admin::class]); | ||
Route::get('create', 'UserController@create')->middleware([Admin::class]); | ||
Route::get('{id}', 'UserController@show'); | ||
Route::get('{id}/posts', 'UserController@posts'); | ||
Route::post('{id}', 'UserController@store'); | ||
Route::delete('{id}', 'UserController@destroy')->middleware([Admin::class]); | ||
}); | ||
|
||
// Search routes... | ||
Route::prefix('search')->group(function () { | ||
Route::get('posts', [SearchController::class, 'showPosts']); | ||
Route::get('tags', [SearchController::class, 'showTags'])->middleware([AdminMiddleware::class]); | ||
Route::get('topics', [SearchController::class, 'showTopics'])->middleware([AdminMiddleware::class]); | ||
Route::get('users', [SearchController::class, 'showUsers'])->middleware([AdminMiddleware::class]); | ||
Route::get('posts', 'SearchController@posts'); | ||
Route::get('tags', 'SearchController@tags')->middleware([Admin::class]); | ||
Route::get('topics', 'SearchController@topics')->middleware([Admin::class]); | ||
Route::get('users', 'SearchController@users')->middleware([Admin::class]); | ||
}); | ||
}); | ||
|
||
// Catch-all route... | ||
Route::get('/{view?}', [HomeController::class, 'index']) | ||
->where('view', '(.*)') | ||
->name('canvas'); | ||
Route::get('/{view?}', 'ViewController')->where('view', '(.*)')->name('canvas'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.