v1.5.24bb Added comments
This commit is contained in:
@@ -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 ]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user