public function boot() { // Define the path for the view files $this->loadViewsFrom(__DIR__ . '/../resources/views', cd_ecommerce_tag()); $this->publishes([__DIR__ . '/../resources/assets' => public_path('assets/ecommerce')], 'public'); $this->publishes([__DIR__ . '/../resources/views' => base_path('resources/views/claremontdesign/ecommerce')], 'views'); $this->publishes([__DIR__ . '/../database/migrations' => base_path('database/migrations'), __DIR__ . '/../database/factories' => base_path('database/factories'), __DIR__ . '/../database/seeds' => base_path('database/seeds')], 'migrations'); // Loading the routes file require __DIR__ . '/Http/routes.php'; }
/** * Return the public path to an asset. * path to return is relative to package template folder. * If you want to return an asset relative to the public folder, * use larvel's asset() instead * @param string $asset The asset * @return string */ function cd_ecommerce_asset($asset = null) { return asset('assets') . '/' . fixDoubleSlash(cd_ecommerce_tag() . '/templates/' . cd_template() . '/' . $asset); }