File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -90,11 +90,26 @@ protected function offerPublishing()
9090
9191 // Publishing the translation files.
9292 $ this ->publishes ([
93- __DIR__ . '/../resources/lang ' => resource_path ( ' lang/vendor/invoices ' ),
93+ __DIR__ . '/../resources/lang ' => $ this -> getPublishableLangPath ( ),
9494 ], 'invoices.translations ' );
9595 }
9696 }
9797
98+ private function getPublishableLangPath (): string
99+ {
100+ if (function_exists ('lang_path ' )) {
101+ return lang_path ('vendor/invoices ' );
102+ }
103+
104+ $ splipVersion = explode ('. ' , $ this ->app ->version ());
105+
106+ if ((int ) $ splipVersion [0 ] >= 9 ) {
107+ return base_path ('lang/vendor/invoices ' );
108+ }
109+
110+ return base_path ('resources/lang/vendor/invoices ' );
111+ }
112+
98113 /**
99114 * Register Invoices' services in the container.
100115 *
You can’t perform that action at this time.
0 commit comments