-
-
Save scoumbourdis/4e0e3d00d1d6721f6e8db1a01dca98c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Publishers; | |
use CodeIgniter\Publisher\Publisher; | |
class GroceryCrudPublisher extends Publisher | |
{ | |
/** | |
* Tell Publisher where to get the files. | |
* Since we will use Composer to download | |
* them we point to the "vendor" directory. | |
* | |
* @var string | |
*/ | |
protected $source = FCPATH . '/../vendor/grocery-crud/enterprise/public/'; | |
/** | |
* FCPATH is always the default destination, | |
* but just to be explicit, we'll set it here. | |
* | |
* @var string | |
*/ | |
protected $destination = FCPATH; | |
/** | |
* Use the "publish" method to indicate that this | |
* class is ready to be discovered and automated. | |
*/ | |
public function publish(): bool | |
{ | |
return $this | |
// Add all the files relative to $source | |
->addPath('./') | |
->removePattern('#\.gitkeep#') | |
->removePattern('#\.txt#') | |
// Merge-and-replace to retain the original directory structure | |
->merge(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment