<?php

Route::prefix('Categories')->name('Categories.')->group(function () {
    Route::get('', 'CategoryController@index')->name('index');
    Route::get('create', 'CategoryController@create')->name('create');
    Route::delete('destroy/{id?}', 'CategoryController@destroy')->name('destroy');
    Route::post('update', 'CategoryController@update')->name('update');
    Route::post('store', 'CategoryController@store')->name('store');
    Route::get('edit/{id}', 'CategoryController@edit')->name('edit');

    Route::any('getImages/{id?}', 'CategoryController@getImages')->name('getImages');
    Route::post('deleteImage', 'CategoryController@deleteImage')->name('deleteImage');
    Route::post('moveTree', 'CategoryController@moveTree')->name('moveTree');

    Route::post('toggleVisible', 'CategoryController@toggleVisible')->name('toggleVisible');
    Route::post('toggleHomepage', 'CategoryController@toggleHomepage')->name('toggleHomepage');
});
