You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.5 KiB
24 lines
1.5 KiB
<?php
|
|
|
|
Route::group(['middleware' => ['web','role:admin']], function() {
|
|
/*
|
|
* Invoice Draft Routes
|
|
*/
|
|
Route::get('invoices/create', 'InvoiceDraftController@index')->name('invoices.create-empty');
|
|
Route::get('invoices/create/{draftKey?}', 'InvoiceDraftController@show')->name('invoices.create');
|
|
Route::post('invoices/create/{draftKey}', 'InvoiceDraftController@store')->name('invoices.store');
|
|
Route::post('invoices/add-draft', 'InvoiceDraftController@add')->name('invoices.add');
|
|
Route::post('cart/add-draft-item/{draftKey}', 'InvoiceDraftController@addDraftItem')->name('cart.add-draft-item');
|
|
Route::patch('cart/update-draft-item/{draftKey}', 'InvoiceDraftController@updateDraftItem')->name('cart.update-draft-item');
|
|
Route::patch('cart/{draftKey}/proccess', 'InvoiceDraftController@proccess')->name('cart.draft-proccess');
|
|
Route::delete('cart/remove-draft-item/{draftKey}', 'InvoiceDraftController@removeDraftItem')->name('cart.remove-draft-item');
|
|
Route::delete('cart/empty/{draftKey}', 'InvoiceDraftController@empty')->name('cart.empty');
|
|
Route::delete('cart/remove', 'InvoiceDraftController@remove')->name('cart.remove');
|
|
Route::delete('cart/destroy', 'InvoiceDraftController@destroy')->name('cart.destroy');
|
|
|
|
/*
|
|
* Invoices Routes
|
|
*/
|
|
Route::get('invoices/{invoice}', ['as' => 'invoices.show', 'uses' => 'InvoicesController@show']);
|
|
Route::get('invoices/{invoice}/pdf', ['as' => 'invoices.pdf', 'uses' => 'InvoicesController@pdf']);
|
|
});
|