File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 33namespace Nwidart \Modules \Facades ;
44
55use Illuminate \Support \Facades \Facade ;
6+ use Nwidart \Modules \Commands \Database \MigrateFreshCommand ;
7+ use Nwidart \Modules \Commands \Database \MigrateRefreshCommand ;
8+ use Nwidart \Modules \Commands \Database \MigrateResetCommand ;
69
710/**
811 * @method static array all()
1922 * @method static \Nwidart\Modules\Module findOrFail(string $name)
2023 * @method static string getModulePath($moduleName)
2124 * @method static \Illuminate\Filesystem\Filesystem getFiles()
22- * @method static mixed config(string $key, $default = NULL )
25+ * @method static mixed config(string $key, $default = null )
2326 * @method static string getPath()
2427 * @method static void boot()
2528 * @method static void register(): void
3033 */
3134class Module extends Facade
3235{
36+ /**
37+ * Indicate if destructive Artisan commands should be prohibited.
38+ *
39+ * Prohibits: module:migrate-fresh, module:migrate-refresh, and module:migrate-reset
40+ *
41+ * @param bool $prohibit
42+ * @return void
43+ */
44+ public static function prohibitDestructiveCommands (bool $ prohibit = true ): void
45+ {
46+ MigrateFreshCommand::prohibit ($ prohibit );
47+ MigrateRefreshCommand::prohibit ($ prohibit );
48+ MigrateResetCommand::prohibit ($ prohibit );
49+ }
50+
3351 protected static function getFacadeAccessor (): string
3452 {
3553 return 'modules ' ;
You can’t perform that action at this time.
0 commit comments