vanilophp / framework

The truly Laravel E-commerce Framework
https://vanilo.io
MIT License
818 stars 102 forks source link

Http admin controllers #116

Closed mfilin closed 2 years ago

mfilin commented 2 years ago

hi how we can extend the functions of admins controllers? for example, if i want to move properties from show-view to edit-view, then i need to add taxonomies parametres into vendor\vanilo\framework\src\Http\Controllers\ProductController.php ...

edotxxx commented 2 years ago

Hi!

https://konekt.dev/concord/1.9/controllers In short:

Create your controller: class ProductController extends \Vanilo\Framework\Http\Controllers\ProductController

Then in your RouteServiceProvider register your new controller:

        $route = Route::getRoutes()->getByName('vanilo.product.store');
        $routeAction = array_merge($route->getAction(), [
            'uses'       => '\App\Http\Controllers\Admin\ProductController@store',
            'controller' => '\App\Http\Controllers\Admin\ProductController@store',
        ]);
        $route->setAction($routeAction);
mfilin commented 2 years ago

thx :) good solution

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs. Thank you for your contributions.