https://stackoverflow.com/questions/41513882/laravel-5-how-do-you-catch-an-mailsend-error
https://stackoverflow.com/questions/64578392/laravel-8-render-exception-as-html-for-email
https://www.itsolutionstuff.com/post/laravel-send-an-email-on-error-exceptions-tutorialexample.html
https://stackoverflow.com/questions/45819536/laravel-5-swiftmailers-send-how-to-get-error-code
https://stackoverflow.com/questions/33163893/laravel-5-send-errors-to-email
how to setup mail in holidaylandmark
step 1:change in env
step 2:change in modal (mail from)
step 3:send username and pswrd,port,mail from et in database via admin panel
=====mail failure======
https://www.elitechsystems.com/laravel-7-8-send-error-exceptions-on-email/
https://stackoverflow.com/questions/23980979/laravel-not-sending-email-and-not-giving-errors
================================================
how to publish trip with or without sending email
or
to bypass not effect entire code
use try and catch
use if and else
method 1: In laravel controller where u write mail logic place inside try and catch
try{
Mail::to($OperatorMailadmin['email'])->send(new Tripcreated($OperatorMailadmin));
log::info('after mail if hai naa');
}
catch()
{
}
method 2:In laravel controller where u write mail logic place inside function where u return and apply if else condition
if(checkMailCreds())
{
try {
\Notification::locale(\App::getLocale())->send($users, new MailNotification($mail));
} catch (\Throwable $th) {
log::info('inside second catch');
}
}
TASK
flutter and laravel performance and security
how to create library or funtion
regular check encryption and decryption
root have all kind of access like grant and revoke so dont delete root in linux while setup laravel project on linux
*find command in laravel will work with id
*
Problem
If http.ssl.conf inside lampp/extra not comment default SSL then error if u open wizbrand/phpmyadmin then valid not certificate.
If u have already grant all database and now u want to privilege some database then revoke first then grant some using astrik command (ask question)
(Doubt) also phpmyadmin and u created password but not work 1045 error come inside phpmyadmin folder vi config.inc.php
===================================================
wizbrand
login register functionality
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
==================================================================
protected $redirectTo = '/home';
========================================================
C:\xampp\htdocs\wz-account-admin-ms\app\Http\Controllers\Auth\LoginController.php
================================================
https://www.wizbrand.com/user/seo/activation/4d9bcfc74f40daba6557fe2111832bfdc6d7f6af360328296/pigabev440@fahih.com/rakeshji
C:\xampp\htdocs\wz-account-admin-ms\resources\views\activate.blade.php
public function registerUser(Request $request)
C:\xampp\htdocs\wz-account-admin-ms\app\Http\Controllers\AuthController.php
C:\xampp\htdocs\wz-account-admin-ms\resources\views\auth\verify.blade.php
public function userActivateStore(Request $request)
C:\xampp\htdocs\wz-account-admin-ms\resources\views\org.blade.php
===============================================
homepage with how to increse
*After keycloack login enter otp *
C:\myworkspace\holidaylandmarks\hl-profile\routes\web.php
Route::get('/auth/keycloak/callback', function (\Illuminate\Http\Request $request, KeycloakService $kc) {
\Illuminate\Support\Facades\Log::info('[CB] Callback hit', [
'host' => $request->getHost(),
'scheme' => $request->getScheme(),
'full_url' => $request->fullUrl(),
'query' => $request->query(),
'configured_uri' => config('keycloak.redirect_uri'),
'configured_base' => config('keycloak.base_url'),
]);
$code = (string) $request->query('code', '');
$state = (string) $request->query('state', 'sign_in');
$error = (string) $request->query('error', '');
if ($error !== '') {
\Illuminate\Support\Facades\Log::warning('[CB] Keycloak returned error', [
'error' => $error,
'error_description' => $request->query('error_description'),
'state' => $state,
]);
return redirect()->route('home')->with('flash', "Keycloak error: {$error}");
}
if ($code === '') {
\Illuminate\Support\Facades\Log::warning('[CB] Missing code param', ['query' => $request->query()]);
return redirect()->route('home')->with('flash', 'Keycloak returned no code — login aborted.');
}
\Illuminate\Support\Facades\Log::info('[CB] Calling handleCallback', [
'code_prefix' => substr($code, 0, 12) . '...',
'state' => $state,
'redirect_uri' => (string) config('keycloak.redirect_uri'),
]);
$user = $kc->handleCallback($code, (string) config('keycloak.redirect_uri'), $state);
if (!$user) {
\Illuminate\Support\Facades\Log::error('[CB] handleCallback returned null — see [KC] entries above');
return redirect()->route('home')->with('flash', 'Could not complete sign-in — check Keycloak logs.');
}
$request->session()->regenerate();
\Illuminate\Support\Facades\Log::info('[CB] Login OK, deciding redirect', [
'user_id' => $user->id,
'role' => $user->role,
'profile_completed_at' => $user->profile_completed_at,
]);
if ($user->profile_completed_at) {
// Admin-side roles land on the admin dashboard; organizers with a
// completed profile land on their own dashboard; tourists go to
// the public trips marketplace. Hardcoded /trips/* because
// profile-service has no APP_URL for public-site's mount, and
// prod Apache only aliases /organizer/dashboard via the /trips
// prefix (bare /organizer/dashboard 404s).
$role = (string) $user->role;
if (in_array($role, ['super_admin', 'admin', 'country_admin'], true)) {
return redirect('/trips/admin/dashboard');
}
if ($role === 'organizer') {
return redirect('/trips/organizer/dashboard');
}
return redirect('/trips');
}
$roleSlug = match ((string) $user->role) {
'organizer' => 'organizer',
'country_admin' => 'country-admin',
default => 'tourist',
};
return redirect()->route('profile.complete.show', ['role' => $roleSlug]);
})->name('auth.callback');
Navbar menu
C:\myworkspace\holidaylandmarks\holidaylandmark\resources\views\partials\header.blade.php
<nav class="hidden xl:flex items-center gap-1 bg-white/60 border border-cream-300 p-1.5 rounded-pill" aria-label="Primary">
@foreach ($primaryNav as $item)
<a href="{{ $item['href'] }}"
class="px-4 py-2 rounded-pill text-[14.5px] font-medium {{ $item['active'] ? 'text-ink-soft bg-brand-soft text-brand-dark' : 'text-ink-soft hover:bg-brand/10 transition' }}">
{{ $item['label'] }}
</a>
@endforeach
</nav>
@if (! empty($accountMenu))
<div class="h-px bg-cream-300 my-1.5" aria-hidden="true"></div>
@foreach ($accountMenu as $item)
<a href="{{ $item['href'] }}" role="menuitem"
class="flex items-center gap-2.5 px-3 py-2 rounded-lg text-sm text-ink-soft hover:bg-brand-soft">
<svg viewBox="0 0 24 24" class="w-4 h-4 text-brand" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>
</svg>
{{ $item['label'] }}
</a>
@endforeach
@endif
@if (! empty($accountMenu))
<div class="h-px bg-cream-300 my-1.5" aria-hidden="true"></div>
@foreach ($accountMenu as $item)
<a href="{{ $item['href'] }}" role="menuitem"
class="flex items-center gap-2.5 px-3 py-2 rounded-lg text-sm text-ink-soft hover:bg-brand-soft">
<svg viewBox="0 0 24 24" class="w-4 h-4 text-brand" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>
</svg>
{{ $item['label'] }}
</a>
@endforeach
@endif
C:\myworkspace\holidaylandmarks\holidaylandmark\app\View\Composers\NavbarComposer.php
public function compose(View $view): void
{
$view->with([
'active' => $this->locale->resolveActive(
$this->request->query('country'),
$this->request->query('lang'),
$this->request->query('currency'),
),
'countries' => $this->locale->getActiveCountries(),
'languages' => $this->locale->getSupportedLanguages(),
'currencies' => $this->locale->getSupportedCurrencies(),
// Profile-service routes — mounted under holidaylandmark
// via Apache AliasMatch. profile-service decides where to send
// the browser (OIDC redirect, promotion, logout).
'signInUrl' => '/auth/start',
'becomeOrganizerUrl' => '/become-organizer',
'logoutUrl' => '/keycloak/logout',
'accountMenu' => $this->buildAccountMenu($this->request->user()),
'primaryNav' => $this->decoratePrimaryNav($this->nav->getPrimaryNav()),
]);
}
C:\myworkspace\holidaylandmarks\holidaylandmark\app\Repositories\NavRepository.php
public function getPrimaryNav(): array
{
return [
// `/` renders the trips marketplace directly, so "Home" was
// folded into "Discover Trips" to avoid two nav links
// pointing at the same URL. route('home') resolves to /trips/
// in production via APP_URL's /trips prefix —
// route('trips.index') would double-mount to /trips/trips
// through Apache's alias, so we deliberately use the home
// route. No bypass flag is needed: TripsController no longer
// bounces organizers (that redirect lives in profile-service's
// OIDC callback now).
['label' => 'Discover Trips', 'href' => route('home'), 'route' => 'home'],
['label' => 'Discover Organizers', 'href' => route('organizers.index'), 'route' => 'organizers.index'],
// Travel Blog / Forum / Contact are owned by separate WordPress
// (or similar) properties under the same parent domain, so they
// are intentionally hardcoded absolute URLs rather than Laravel
// routes. The trailing slash matches the Apache config on the
// target hosts and avoids a redirect hop.
['label' => 'Travel Blog', 'href' => 'https://www.holidaylandmark.com/blog/', 'route' => null],
['label' => 'Forum', 'href' => 'https://www.holidaylandmark.com/forum/', 'route' => null],
['label' => 'Contact', 'href' => 'https://www.holidaylandmark.com/contact/', 'route' => null],
];
}




Top comments (0)