Server : Apache System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64 User : tradze ( 1001) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/tradze/public_html/app/Modules/Blog/Http/ |
<?php
/*
|--------------------------------------------------------------------------
| Module Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for the module.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
Route::group(['prefix' => 'admin', 'as' => 'admin.', 'namespace'=>'Admin', 'middleware'=>['auth','user.permission','menu']], function() {
Route::group(['prefix'=>'blog','as' => 'blog.',], function() {
//categories
Route::get('/categories/data',['as'=>'categories.data', 'uses'=>'CategoriesController@data'] );
Route::get('/categories/{categories}/delete',['as'=>'categories.delete', 'uses'=>'CategoriesController@delete'] );
Route::post('/categories/create_slug',['as'=>'categories.create_slug', 'uses'=>'CategoriesController@create_slug'] );
Route::resource('categories', 'CategoriesController', ['except' => ['show']]);
//posts
Route::get('/posts/data',['as'=>'posts.data', 'uses'=>'PostsController@data'] );
Route::get('/posts/{posts}/delete',['as'=>'posts.delete', 'uses'=>'PostsController@delete'] );
Route::post('/posts/create_slug',['as'=>'posts.create_slug', 'uses'=>'PostsController@create_slug'] );
Route::get('/posts/comments/{posts}',['as'=>'posts.comments', 'uses'=>'PostsController@comments'] );
Route::get('/post/comments/data/{posts}',['as'=>'admin.comments_data', 'uses'=>'PostsController@comments_data'] );
Route::post('/posts/comments',['as'=>'posts.comment_update', 'uses'=>'PostsController@comment_update'] );
Route::resource('posts', 'PostsController', ['except' => ['show']]);
});
});
//FRONTEND
Route::group(['namespace'=>'Frontend'], function() {
Route::get('/blog', ['as'=>'blog.index', 'uses'=>'BlogController@index']);
Route::get('/blog/{slug}', ['as'=>'blog.category', 'uses'=>'BlogController@category'] )->where('slug', '[A-Za-z-0-9]+');
Route::get('/blog/{category}/{slug}', ['as'=>'blog.show', 'uses'=>'BlogController@show'] )->where('slug', '[A-Za-z-0-9]+');
Route::post('/blog/addcomment', ['as'=>'blog.addcomment', 'uses'=>'BlogController@add_comment'] );
});