File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
tests/PackageServiceProviderTests Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public function name(string $name): self
31
31
32
32
public function hasConfigFile (string $ configFileName = null ): self
33
33
{
34
- $ this ->configFileName = $ configFileName ?? $ this ->shortPackageName ();
34
+ $ this ->configFileName = $ configFileName ?? $ this ->shortName ();
35
35
36
36
return $ this ;
37
37
}
@@ -101,7 +101,7 @@ public function setBasePath(string $path): self
101
101
return $ this ;
102
102
}
103
103
104
- public function shortPackageName (): string
104
+ public function shortName (): string
105
105
{
106
106
return Str::after ($ this ->name , 'laravel- ' );
107
107
}
Original file line number Diff line number Diff line change @@ -63,13 +63,13 @@ public function boot()
63
63
64
64
if ($ this ->package ->hasTranslations ) {
65
65
$ this ->publishes ([
66
- $ this ->package ->basePath ('/../resources/lang ' ) => resource_path ("lang/vendor/ {$ this ->package ->shortPackageName ()}" ),
66
+ $ this ->package ->basePath ('/../resources/lang ' ) => resource_path ("lang/vendor/ {$ this ->package ->shortName ()}" ),
67
67
], "{$ this ->package ->name }-translations " );
68
68
}
69
69
70
70
if ($ this ->package ->hasAssets ) {
71
71
$ this ->publishes ([
72
- $ this ->package ->basePath ('/../resources/dist ' ) => public_path ("vendor/ {$ this ->package ->shortPackageName ()}" ),
72
+ $ this ->package ->basePath ('/../resources/dist ' ) => public_path ("vendor/ {$ this ->package ->shortName ()}" ),
73
73
], "{$ this ->package ->name }-assets " );
74
74
}
75
75
@@ -79,13 +79,13 @@ public function boot()
79
79
if ($ this ->package ->hasTranslations ) {
80
80
$ this ->loadTranslationsFrom (
81
81
$ this ->package ->basePath ('/../resources/lang/ ' ),
82
- $ this ->package ->shortPackageName ()
82
+ $ this ->package ->shortName ()
83
83
);
84
84
}
85
85
86
86
87
87
if ($ this ->package ->hasViews ) {
88
- $ this ->loadViewsFrom ($ this ->package ->basePath ('/../resources/views ' ), $ this ->package ->name );
88
+ $ this ->loadViewsFrom ($ this ->package ->basePath ('/../resources/views ' ), $ this ->package ->shortName () );
89
89
}
90
90
91
91
$ this ->packageBooted ();
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public function configurePackage(Package $package)
16
16
/** @test */
17
17
public function it_can_load_the_views ()
18
18
{
19
- $ content = view ('laravel- package-tools::test ' )->render ();
19
+ $ content = view ('package-tools::test ' )->render ();
20
20
21
21
$ this ->assertStringStartsWith ('This is a blade view ' , $ content );
22
22
}
You can’t perform that action at this time.
0 commit comments