HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33
System: Linux li317-225.members.linode.com 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64
User: apache (48)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //var/www/kosmicfarms/routes/web.php
<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('index');
    
});

Route::post('newsletter','NewsletterController@store');
Route::post('contactus','ContactusController@store');

Route::get('/contact{contact?}', function () { return view('contact'); })
->where('contact', '(s|_us|us)')
->name('contact');
   
Route::get('/about{about?}', function () { return view('about'); })
->where('about', '(s|_us|us)')
->name('about');

Route::get('/demo', function () {
    return view('index');
});


Route::group(['prefix' => 'blog', 'as' => 'blog.'], function () {
    Route::get('/', 'BlogController@index')->name('home');
    Route::get('/article/{article}', 'BlogController@show')->name('article');
    Route::get('/category/{category}','BlogController@index')->name('category');
    Route::get('/tag/{tag}','BlogController@tag')->name('tag');
    Route::get('/search','BlogController@search')->name('search');
    
});


Route::group(['prefix' => 'admin', 'as' => 'admin.'], function () {
    Route::group(['prefix' => 'blog', 'as' => 'blog.'], function () {
        Route::get('/', 'Admin\BlogController@index')->name('index');
        Route::get('/create', 'Admin\BlogController@create')->name('create');
        Route::post('/store', 'Admin\BlogController@store')->name('store');
        
        Route::group(['prefix' => 'article', 'as' => 'article.'], function () {
            Route::get('/{id}/edit', 'Admin\BlogController@edit')->name('edit');
            Route::post('/{id}/delete', 'Admin\BlogController@delete')->name('delete');
            Route::post('/{id}/update', 'Admin\BlogController@update')->name('update');
            Route::get('/{id}/publish','Admin\BlogController@publish')->name('publish');
            Route::get('/{id}/unpublish','Admin\BlogController@unpublish')->name('ubpublish');
        });
        
        
        Route::group(['prefix' => 'category', 'as' => 'category.'], function () {
            Route::get('/', 'Admin\CategoryController@index')->name('index');
            Route::get('/create', 'Admin\CategoryController@create')->name('create');
            Route::post('/store', 'Admin\CategoryController@store')->name('store');
            Route::get('/{id}/edit', 'Admin\CategoryController@edit')->name('edit');
            Route::post('{id}/delete', 'Admin\CategoryController@delete')->name('delete');
            Route::post('/{id}/update', 'Admin\CategoryController@edit')->name('update');
            Route::get('/{category}','Admin\CategoryController@index')->name('categories');
        });
        
        
    });
    
});
        

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
Route::group(['prefix' => 'dashboard', 'as' => 'dashboard.'], function () {
    Route::get('/products', 'HomeController@products')->name('products');
    Route::get('/productions', 'HomeController@index')->name('production');
    Route::get('/sensors','HomeController@index')->name('sensors');
    Route::get('/motors', 'HomeController@index')->name('motors');
});
    


Route::group(['prefix' => 'devices', 'as' => 'devices.'], function () {
    
    Route::get('/', 'DeviceController@index')->name('device');
    Route::get('/create', 'DeviceController@create')->name('create');
    Route::post('/store', 'DeviceController@store')->name('store');
    Route::post('/{id}/update', 'DeviceController@update')->name('update');
    Route::post('/{id}/delete', 'DeviceController@destroy')->name('delete');
    Route::get('/{id}/edit', 'DeviceController@edit')->name('edit');
    Route::get('/{id}/show', 'DeviceController@show')->name('show');
    
    Route::group(['prefix' => '{device}/sensors', 'as' => 'sensors.'], function () {        
        Route::get('/create', 'SensorController@create')->name('create');
        Route::post('/store', 'SensorController@store')->name('store');
        Route::post('/{id}/update', 'SensorController@update')->name('update');
        Route::post('/{id}/delete', 'SensorController@destroy')->name('delete');
        Route::get('/{id}/edit', 'SensorController@edit')->name('edit');
    });
    
    Route::group(['prefix' => '{device}/motors', 'as' => 'motors.'], function () {        
        Route::get('/create', 'MotorController@create')->name('create');
        Route::post('/store', 'MotorController@store')->name('store');
        Route::post('/{id}/update', 'MotorController@update')->name('update');
        Route::post('/{id}/delete', 'MotorController@destroy')->name('delete');
        Route::get('/{id}/edit', 'MotorController@edit')->name('edit');
    });
});

Route::group(['prefix' => 'products', 'as' => 'products.'], function () {
    Route::get('/', 'ProductController@index')->name('products');
    
    Route::get('/create', 'ProductController@create')->name('create');
    Route::post('/store', 'ProductController@store')->name('store');
    Route::post('/{id}/update', 'ProductController@update')->name('update');
    Route::post('/{id}/delete', 'ProductController@destroy')->name('delete');
    Route::get('/{id}/edit', 'ProductController@edit')->name('edit');
    
    
    
    Route::group(['prefix' => 'categories', 'as' => 'categories.'], function () {
        Route::get('/', 'CategoryController@index')->name('categories');
        Route::get('/create', 'CategoryController@create')->name('create');
        Route::post('/store', 'CategoryController@store')->name('store');
        Route::post('/{id}/update', 'CategoryController@update')->name('update');
        Route::post('/{id}/delete', 'CategoryController@destroy')->name('delete');
        Route::get('/{id}/edit', 'CategoryController@edit')->name('edit');
    });
    
    
        Route::group(['prefix' => 'types', 'as' => 'types.'], function () {
            Route::get('/', 'TypeController@index')->name('types');
            Route::get('/create', 'TypeController@create')->name('create');
            Route::post('/store', 'TypeController@store')->name('store');
            Route::post('/{id}/update', 'TypeController@update')->name('update');
            Route::post('/{id}/delete', 'TypeController@destroy')->name('delete');
            Route::get('/{id}/edit', 'TypeController@edit')->name('edit');
        });
    
});



Route::group(['prefix' => 'production', 'as' => 'production.'], function () {
   
    Route::group(['prefix' => '{production}/sensors', 'as' => 'sensors.'], function () {
        Route::get('/', 'ProductionController@sensorIndex')->name('types');
        Route::get('/create', 'ProductionController@sensorCreate')->name('add');
        Route::post('/store', 'ProductionController@sensorStore')->name('store');
        Route::post('/{id}/update', 'ProductionController@sensorUpdate')->name('update');
        Route::post('/{id}/delete', 'ProductionController@sensorDestroy')->name('delete');
        Route::get('/{id}/edit', 'ProductionController@sensorEdit')->name('edit');
        Route::get('/{id}/show', 'ProductionController@sensorShow')->name('show');
    });
    
    Route::group(['prefix' => 'motors', 'as' => 'motors.'], function () {
        Route::get('/', 'ProductionController@motorIndex')->name('types');
        Route::get('{id}/create', 'ProductionController@smotorCreate')->name('add');
        Route::post('/{id}/store', 'ProductionController@motorStore')->name('store');
        Route::post('/{id}/update', 'ProductionController@motorUpdate')->name('update');
        Route::post('/{id}/delete', 'ProductionController@motorDestroy')->name('delete');
        Route::get('/{id}/edit', 'ProductionController@motorEdit')->name('edit');
    });
    
    Route::get('/', 'ProductionController@index')->name('production');
    Route::get('/create', 'ProductionController@create')->name('create');
    Route::post('/store', 'ProductionController@store')->name('store');
    Route::post('/{id}/update', 'ProductionController@update')->name('update');
    Route::post('/{id}/delete', 'ProductionController@destroy')->name('delete');
    Route::get('/{id}/edit', 'ProductionController@edit')->name('edit');
    Route::get('/{id}/show', 'ProductionController@show')->name('edit');
    
    
});


Route::group(['prefix' => 'users', 'as' => 'users.'], function () {
    Route::get('/', 'UserController@index')->name('users');
    Route::get('/create', 'UserController@create')->name('create');
    Route::post('/store', 'UserController@store')->name('store');
    Route::post('/{id}/update', 'UserController@update')->name('update');
    Route::post('/{id}/delete', 'UserController@destroy')->name('delete');
    Route::get('/{id}/edit', 'UserController@edit')->name('edit');
});