|
|
|
@ -127,9 +127,7 @@ class {$this->model_name}Controller extends Controller |
|
|
|
]); |
|
|
|
|
|
|
|
if (request('{$this->lang_name}_id') == \${$this->single_model_var_name}->id && \${$this->single_model_var_name}->delete()) { |
|
|
|
\$routeParam = request()->only('page', 'q'); |
|
|
|
|
|
|
|
return redirect()->route('{$this->table_name}.index', \$routeParam); |
|
|
|
return redirect()->route('{$this->table_name}.index'); |
|
|
|
} |
|
|
|
|
|
|
|
return back(); |
|
|
|
@ -260,9 +258,7 @@ class CategoryController extends Controller |
|
|
|
]); |
|
|
|
|
|
|
|
if (request('category_id') == \$category->id && \$category->delete()) { |
|
|
|
\$routeParam = request()->only('page', 'q'); |
|
|
|
|
|
|
|
return redirect()->route('categories.index', \$routeParam); |
|
|
|
return redirect()->route('categories.index'); |
|
|
|
} |
|
|
|
|
|
|
|
return back(); |
|
|
|
@ -394,9 +390,7 @@ class CategoryController extends Controller |
|
|
|
]); |
|
|
|
|
|
|
|
if (request('category_id') == \$category->id && \$category->delete()) { |
|
|
|
\$routeParam = request()->only('page', 'q'); |
|
|
|
|
|
|
|
return redirect()->route('categories.index', \$routeParam); |
|
|
|
return redirect()->route('categories.index'); |
|
|
|
} |
|
|
|
|
|
|
|
return back(); |
|
|
|
|