Overriding view files in Bagisto is a very easy task!!! With just a few configurations we can override the files in Custom modules and use them in our way. There are some simple steps we can follow to achieve the above goal
Let’s get Started
In this Blog, we are adding a new field on the below login page
Step 1
Firstly check out the where above view file is located in the code end as you can see in the below screenshot
Step 2
Copy and paste the above view file with the same path and name in the Custom module and add the changes you want in the file as illustrated in the below screenshot
Step 3
Now publish the same file from Service Provider by following the code
1 2 3 4 5 6 7 8 9 10 11 12 |
/** * Bootstrap services. * * @return void */ public function boot() { $this->publishes([ __DIR__ . '/../Resources/views/shop/velocity/customers/session/index.blade.php' => resource_path('themes/velocity/views/customers/session/index.blade.php') ]); } |
Step 4
Run the following command
1 2 3 |
php artisan vendor:publish --force Press 0 and then press enter to publish all assets and configurations. |
In below screenshot, you can see the changes
We will consistently update blog posts, so don’t forget to keep a check on it regularly. Also for any queries or doubts reach out to us at support@webkul.com. You can also raise a ticket at our HelpDesk System.