<?php

Route::prefix('MailTemplate')->name('MailTemplate.')->group(function () {
    Route::any('destroy/{id?}', 'MailTemplateController@destroy')->name('delete');
    Route::get('modalCreate', 'MailTemplateController@modalCreate')->name('modalCreate');
    Route::any('modalEdit/{id?}', 'MailTemplateController@modalEdit')->name('modalEdit');
    Route::post('storeAjax', 'MailTemplateController@storeAjax')->name('storeAjax');
    Route::any('', 'MailTemplateController@index')->name('index');
    Route::get('getVars/{mailable?}', 'MailTemplateController@getVarsByMailable')->name('getVarsByMailable');
    Route::get('preview/{template_id?}/{model_id?}', 'MailTemplateController@preview')->name('preview');
    Route::get('modalPreview/{template_id?}', 'MailTemplateController@modalPreview')->name('modalPreview');
});
