I know this question may sound stupid, but I'm working with Laravel, and I want to return an alert message for one of my route which is placed inside of a group route:
Route::middleware('auth')->group(function(){
Route::get('profile', [App\Http\Controllers\ProfileController::class, 'index'])->name('profile'){
alert()->success('welcome','message')->persistent('Ok');
}
Route::get('profile/twofactor', [App\Http\Controllers\ProfileController::class, 'manageTwoFactor'])->name('profile.2fa.manage');
Route::post('profile/twofactor', [App\Http\Controllers\ProfileController::class, 'postManageTwoFactor']);
});
As you can see for the route profile I have set this message but I get ParseError syntax error, unexpected ';'.
Unfortunately I don't know how to do this in a proper way.
So if you know, please help me out.
Thanks!
alert()->success('welcome','message')->persistent('Ok');, then it is ended with;