Skip to content

Instantly share code, notes, and snippets.

@ejntaylor
Created June 26, 2020 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ejntaylor/2a07b14e91d0465706cdf7c6d4eee745 to your computer and use it in GitHub Desktop.
Save ejntaylor/2a07b14e91d0465706cdf7c6d4eee745 to your computer and use it in GitHub Desktop.
Statamic Nova Test 2
<?php
// Auth
Auth::routes();
// Statamic
Route::name('statamic.')->group(function () {
/**
* Glide
* On-the-fly URL-based image transforms.
*/
Route::group(['prefix' => Config::get('statamic.assets.image_manipulation.route')], function () {
Route::get('/asset/{container}/{path?}', 'GlideController@generateByAsset')->where('path', '.*');
Route::get('/http/{url}/{filename?}', 'GlideController@generateByUrl');
Route::get('{path}', 'GlideController@generateByPath')->where('path', '.*');
});
Route::group(['prefix' => config('statamic.routes.action')], function () {
Route::post('forms/{form}', 'FormController@submit')->name('forms.submit');
Route::get('protect/password', '\Statamic\Auth\Protect\Protectors\Password\Controller@show')->name('protect.password.show');
Route::post('protect/password', '\Statamic\Auth\Protect\Protectors\Password\Controller@store')->name('protect.password.store');
Route::group(['prefix' => 'auth'], function () {
Route::post('login', 'UserController@login')->name('login');
Route::get('logout', 'UserController@logout')->name('logout');
Route::post('register', 'UserController@register')->name('register');
Route::post('password/email', 'ForgotPasswordController@sendResetLinkEmail')->name('password.email');
Route::get('password/reset/{token}', 'ResetPasswordController@showResetForm')->name('password.reset');
Route::post('password/reset', 'ResetPasswordController@reset')->name('password.reset.action');
Route::get('activate/{token}', 'ActivateAccountController@showResetForm')->name('account.activate');
Route::post('activate', 'ActivateAccountController@reset')->name('account.activate.action');
});
Statamic::additionalActionRoutes();
});
if (OAuth::enabled()) {
Route::get(config('statamic.oauth.routes.login'), 'OAuthController@redirectToProvider')->name('oauth.login');
Route::get(config('statamic.oauth.routes.callback'), 'OAuthController@handleProviderCallback')->name('oauth.callback');
}
});
// Statamic::additionalWebRoutes();
if (config('statamic.cp.enabled')) {
Route::middleware(SwapCpExceptionHandler::class)->group(function () {
Route::middleware('statamic.cp')
->name('statamic.cp.')
->prefix(config('statamic.cp.route'))
->namespace('Statamic\Http\Controllers\CP')
->group(base_path() . '/vendor/statamic/cms/config/cp.php');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment