<?php

use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;

Auth::routes(['register' => false]);
Route::get('/', 'HomeController@index')->name('admin');

// Language
Route::resource('language', 'Admin\LanguageController', ['as' => 'admin'])->except(['show']);

// Options
Route::resource('option', 'Admin\OptionController', ['as' => 'admin'])->only(['index', 'store']);
Route::post('purging-cache', 'Admin\OptionController@purgingCached')->name('admin.option.purgingcache');

// Split
Route::resource('split', 'Admin\SplitController', ['as' => 'admin'])->except(['show']);

// Page
Route::resource('page', 'Admin\PageController', ['as' => 'admin'])->except(['show']);

// Template
Route::resource('template', 'Admin\TemplateController', ['as' => 'admin'])->except(['show']);
Route::get('export', 'Admin\ExportController@index')->name('admin.export.index');

// Translations
Route::resource('translation', 'Admin\TranslationController', ['as' => 'admin'])->except(['show']);
Route::get('translation/create-group', 'Admin\TranslationController@createGroup')->name('admin.translation.create.group');
Route::post('translation/store-group', 'Admin\TranslationController@storeGroup')->name('admin.translation.store.group');
Route::get('translation/delete-group', 'Admin\TranslationController@deleteGroup')->name('admin.translation.delete.group');
Route::post('translation/destroy-group', 'Admin\TranslationController@destroyGroup')->name('admin.translation.destroy.group');
