Customer.php 1.14 KB
<?php

/**
 * This overwrites the Log Viewer Package routes so we can use middleware to protect it the way we want
 * You shouldn't have to change anything
 */
Route::group([
    'namespace' => 'Customer',
    'middleware' => 'access.routeNeedsPermission:manage-customer',
], function() {
    Route::resource('customer', 'CustomerController', ['except' => ['show']]);

    Route::get('customer/get', 'CustomerTableController')->name('customer.get');

    Route::group(['prefix' => 'customer/{customer}'], function() {
        Route::get('consumeOrders', 'CustomerController@consumeOrders')->name('customer.consumeOrders');
        Route::get('consumeOrders/get', 'CustomerTableController@getConsumeOrders')->name('customer.getConsumeOrders');
        Route::get('info', 'CustomerController@info')->name('customer.info');
        Route::get('mark/{status}', 'CustomerController@mark')->name('customer.mark')->where(['status' => '[0,1]']);
        Route::get('password/change', 'CustomerController@changePassword')->name('customer.change-password');
        Route::post('password/change', 'CustomerController@updatePassword')->name('customer.change-password');
    });
});