Skip to content

Commit 7132c50

Browse files
committed
Update Commands
1 parent 25ac878 commit 7132c50

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

src/Commands/InstallPermissionDemo.php

-24
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,6 @@ class InstallPermissionDemo extends Command
2424

2525
protected $routesPath = __DIR__.'/../../routes/';
2626

27-
/**
28-
* Get the composer command for the environment.
29-
*
30-
* @return string
31-
*/
32-
protected function findComposer()
33-
{
34-
if (file_exists(getcwd().'/composer.phar')) {
35-
return '"'.PHP_BINARY.'" '.getcwd().'/composer.phar';
36-
}
37-
return 'composer';
38-
}
39-
// public function fire(Filesystem $filesystem)
40-
// {
41-
// return $this->handle($filesystem);
42-
// }
4327
/**
4428
* Execute the console command.
4529
*
@@ -49,11 +33,6 @@ protected function findComposer()
4933
*/
5034
public function handle( Filesystem $filesystem)
5135
{
52-
$this->info('Dumping the autoloaded files and reloading all new files');
53-
$composer = $this->findComposer();
54-
$process = new Process($composer.' dump-autoload');
55-
$process->setTimeout(null); // Setting timeout to null to prevent installation from stopping at a certain point in time
56-
$process->setWorkingDirectory(base_path())->run();
5736

5837
$this->info('Adding Demo Routes and resources');
5938
$demo_routes = $this->routesPath.'demo.php';
@@ -68,8 +47,5 @@ public function handle( Filesystem $filesystem)
6847
);
6948
}
7049
}
71-
72-
$this->info('Publishing resources');
73-
$this->call('vendor:publish', ['--provider' => PermissionServiceProvider::class, '--tag' => ['permission.resources']]);
7450
}
7551
}

src/Commands/installPermission.php

-28
Original file line numberDiff line numberDiff line change
@@ -107,33 +107,5 @@ public function handle( Filesystem $filesystem)
107107
with(new $class())->run();
108108

109109
$this->info('Seeding Completed');
110-
111-
// $this->call('db:seed', ['--class' => 'PermissionDatabaseSeeder']);
112-
113-
if ($this->option('with-demo')) {
114-
$this->info('Adding Demo Routes and resources');
115-
$demo_routes = $this->routesPath.'demo.php';
116-
$original_routes = $this->routesPath.'permission.php';
117-
if( file_exists($original_routes) && file_exists( $demo_routes ) ) {
118-
$original_contents = $filesystem->get($original_routes);
119-
$demo_contents = $filesystem->get($demo_routes);
120-
if (false === strpos($original_contents, '/* Demo Routes */')) {
121-
$filesystem->append(
122-
$original_routes,
123-
"\n\n".$demo_contents."\n"
124-
);
125-
}
126-
}
127-
128-
$this->info('Publishing resources');
129-
$this->call('vendor:publish', ['--provider' => PermissionServiceProvider::class, '--tag' => ['permission.views']]);
130-
131-
}
132-
133-
// $this->info('Setting up the hooks');
134-
// $this->call('hook:setup');
135-
// $this->info('Adding the storage symlink to your public folder');
136-
// $this->call('storage:link');
137-
// $this->info('Successfully installed Voyager! Enjoy');
138110
}
139111
}

0 commit comments

Comments
 (0)