Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120824181
ForceDeleteCommand.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
947 B
Referenced Files
None
Subscribers
None
ForceDeleteCommand.php
View Options
<?php
namespace
App\Console\Commands\Group
;
use
App\Console\Command
;
use
Illuminate\Support\Facades\DB
;
class
ForceDeleteCommand
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'group:force-delete {group}'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'Delete a group for realz'
;
/**
* Execute the console command.
*
* @return mixed
*/
public
function
handle
()
{
$group
=
$this
->
getGroup
(
$this
->
argument
(
'group'
),
true
);
if
(!
$group
)
{
$this
->
error
(
"Group not found."
);
return
1
;
}
if
(!
$group
->
trashed
())
{
$this
->
error
(
"The group is not yet deleted."
);
return
1
;
}
DB
::
beginTransaction
();
$group
->
forceDelete
();
DB
::
commit
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 10:18 AM (23 h, 58 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18741453
Default Alt Text
ForceDeleteCommand.php (947 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline