How can I change theme and write own html for front-end section not the admin panel?
-
@Naresh-webkul Thanks for replay.
However, when I try to create a module after following the steps in the link you provided, I get that the provider class not found error after artisan serve :Class 'packageACME\HelloWorld\Providers\HelloWorldServiceProvider' not found
In composer.json file in my projects root directory, I added this line for the ps-4 autoload :
"psr-4": { .. "ACME\\HelloWorld\\": "packages/ACME/HelloWorld/src", .. }
HelloWorldServiceProvider.php
<?php namespace ACME\HelloWorld\Providers; use Illuminate\Support\ServiceProvider; /** * HelloWorld service provider * * @author Jane Doe <[email protected]> * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) */ class HelloWorldServiceProvider extends ServiceProvider { /** * Bootstrap services. * * @return void */ public function boot() { include __DIR__ . '/../Http/routes.php'; $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'helloworld'); $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'helloworld'); } /** * Register services. * * @return void */ public function register() { } }
the providers in config/app.php:
routes.php :
The new package directory :
Any suggestions ?
-
Hello @yaser-az
change the packageACME\HelloWorld\Providers\HelloWorldServiceProvider::class
to
ACME\HelloWorld\Providers\HelloWorldServiceProvider::classThank You
-
@prateek-webkul Hi,
Actually I already changed it to ACME\HelloWorld\Providers\HelloWorldServiceProvider::classBut still throwing the same error in console.
Do I have to do anything with the composer ? can you check the syntax I added in the composer ? Do I have to implement any commands to make it work first ?Thanks
-
Hi,
@yaser-az .you can try these following commands
1- composer dump-autoload
2- php artisan route:cache
3-php artisan view:clear -
@Naresh-webkul It worked after dump-autoload thank you.
I hope that I'm not bothering you with my issues
Thanks again, I'll let you know if there is any further issues or questions. -
yes sure @yaser-az .
-
Thank you. This was helpful
-
I added a new theme for frontend but CSS is not working. please help me to solve the CSS issue
-
-
@Rafin said in How can I change theme and write own html for front-end section not the admin panel?:
What is the better approach to modify front-end theme without disturbing the core?
Hi guys
The preferred approach to modifying a front-end theme without disrupting the core is to utilize child themes. -
-