]> BookStack Code Mirror - bookstack/blobdiff - routes/web.php
Fixed model extending mis-use
[bookstack] / routes / web.php
index 3b311d3f80287f155b92e9edaa6f965a168cacc6..8ecfd9465ec6c2962375248722031e4a2daa3270 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-Route::get('/translations.js', 'HomeController@getTranslations');
+Route::get('/translations', 'HomeController@getTranslations');
 
 // Authenticated routes...
 Route::group(['middleware' => 'auth'], function () {
@@ -26,6 +26,9 @@ Route::group(['middleware' => 'auth'], function () {
         Route::get('/{slug}/delete', 'BookController@showDelete');
         Route::get('/{bookSlug}/sort', 'BookController@sort');
         Route::put('/{bookSlug}/sort', 'BookController@saveSort');
+        Route::get('/{bookSlug}/export/html', 'BookController@exportHtml');
+        Route::get('/{bookSlug}/export/pdf', 'BookController@exportPdf');
+        Route::get('/{bookSlug}/export/plaintext', 'BookController@exportPlainText');
 
         // Pages
         Route::get('/{bookSlug}/page/create', 'PageController@create');
@@ -64,6 +67,9 @@ Route::group(['middleware' => 'auth'], function () {
         Route::put('/{bookSlug}/chapter/{chapterSlug}/move', 'ChapterController@move');
         Route::get('/{bookSlug}/chapter/{chapterSlug}/edit', 'ChapterController@edit');
         Route::get('/{bookSlug}/chapter/{chapterSlug}/permissions', 'ChapterController@showRestrict');
+        Route::get('/{bookSlug}/chapter/{chapterSlug}/export/pdf', 'ChapterController@exportPdf');
+        Route::get('/{bookSlug}/chapter/{chapterSlug}/export/html', 'ChapterController@exportHtml');
+        Route::get('/{bookSlug}/chapter/{chapterSlug}/export/plaintext', 'ChapterController@exportPlainText');
         Route::put('/{bookSlug}/chapter/{chapterSlug}/permissions', 'ChapterController@restrict');
         Route::get('/{bookSlug}/chapter/{chapterSlug}/delete', 'ChapterController@showDelete');
         Route::delete('/{bookSlug}/chapter/{chapterSlug}', 'ChapterController@destroy');
@@ -117,11 +123,9 @@ Route::group(['middleware' => 'auth'], function () {
     Route::get('/link/{id}', 'PageController@redirectFromLink');
 
     // Search
-    Route::get('/search/all', 'SearchController@searchAll');
-    Route::get('/search/pages', 'SearchController@searchPages');
-    Route::get('/search/books', 'SearchController@searchBooks');
-    Route::get('/search/chapters', 'SearchController@searchChapters');
+    Route::get('/search', 'SearchController@search');
     Route::get('/search/book/{bookId}', 'SearchController@searchBook');
+    Route::get('/search/chapter/{bookId}', 'SearchController@searchChapter');
 
     // Other Pages
     Route::get('/', 'HomeController@index');
@@ -129,7 +133,7 @@ Route::group(['middleware' => 'auth'], function () {
 
     // Settings
     Route::group(['prefix' => 'settings'], function() {
-        Route::get('/', 'SettingController@index');
+        Route::get('/', 'SettingController@index')->name('settings');
         Route::post('/', 'SettingController@update');
 
         // Users
@@ -154,7 +158,7 @@ Route::group(['middleware' => 'auth'], function () {
 });
 
 // Social auth routes
-Route::get('/login/service/{socialDriver}', 'Auth\RegisterController@getSocialLogin');
+Route::get('/login/service/{socialDriver}', 'Auth\LoginController@getSocialLogin');
 Route::get('/login/service/{socialDriver}/callback', 'Auth\RegisterController@socialCallback');
 Route::get('/login/service/{socialDriver}/detach', 'Auth\RegisterController@detachSocialAccount');
 Route::get('/register/service/{socialDriver}', 'Auth\RegisterController@socialRegister');