<?php

Route::prefix('Articles')->name('Articles.')->group(function () {
    Route::get('', 'ArticleController@index')->name('index');
    Route::get('create', 'ArticleController@create')->name('create');
    Route::delete('destroy/{id?}', 'ArticleController@destroy')->name('destroy');
    Route::post('store', 'ArticleController@store')->name('store');
    Route::get('edit/{id}', 'ArticleController@edit')->name('edit');
    Route::any('getImages/{id?}', 'ArticleController@getImages')->name('getImages');
    Route::post('deleteImage', 'ArticleController@deleteImage')->name('deleteImage');
    Route::any('autocomplete/{q?}', 'ArticleController@autocomplete')->name('autocomplete');
    Route::get('getProductDescription/{product_id?}/{model?}', 'ArticleController@getProductDescription')->name('getProductDescription');
    Route::get('getProductTags/{product_id?}/{model?}', 'ArticleController@getProductTags')->name('getProductTags');
    Route::get('getProductImages/{product_id?}/{model?}', 'ArticleController@getProductImages')->name('getProductImages');
    Route::post('toggleVisible', 'ArticleController@toggleVisible')->name('toggleVisible');
    Route::post('toggleHomepage', 'ArticleController@toggleHomepage')->name('toggleHomepage');
    Route::get('duplicate/{id}', 'ArticleController@duplicate')->name('duplicate');
});
