File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -23,5 +23,32 @@ public function register()
2323 });
2424
2525 $ this ->app ->alias (Package::class, 'creasi.package ' );
26+
27+ if ($ this ->app ->runningInConsole ()) {
28+ $ this ->registerPublishables ();
29+
30+ $ this ->registerCommands ();
31+ }
32+ }
33+
34+ protected function registerPublishables ()
35+ {
36+ $ this ->publishes ([
37+ self ::LIB_PATH .'/config/package.php ' => \config_path ('package.php ' ),
38+ ], 'creasi-config ' );
39+
40+ $ timestamp = date ('Y_m_d_His ' , time ());
41+ $ migrations = self ::LIB_PATH .'/database/migrations ' ;
42+
43+ $ this ->publishes ([
44+ $ migrations .'/create_package_table.php ' => database_path ('migrations/ ' .$ timestamp .'_create_package_table.php ' ),
45+ ], 'creasi-migrations ' );
46+
47+ $ this ->loadMigrationsFrom ($ migrations );
48+ }
49+
50+ protected function registerCommands ()
51+ {
52+ $ this ->commands ([]);
2653 }
2754}
You can’t perform that action at this time.
0 commit comments