v1.5.24bb Added comments

This commit is contained in:
2021-05-21 12:28:38 +02:00
parent 20fe7dbcee
commit 3b0b2ff759
7 changed files with 99 additions and 8 deletions
@@ -7,8 +7,20 @@ use Illuminate\Http\Request;
class AllowActionController extends Controller
{
/*We use $request to get the data from the HTMl pages*/
function AllowActionRegistering(Request $request) {
/*
Here we use our model AllowAction and the Laravel function "find",
in the "find" functions parameter we pass "$request->id" to find out what
number the it contains.
*/
$action = AllowAction::find($request->id);
/*Call the Laravel "update" function to update number in the database
If the allow column in the database is equal to 1 there is open for registration
If the allow column is equal to 0 there is closed for registration
*/
$action->update([ 'allow' => $request->allow ]);
}
}