Obala
Obala
Explore posts from servers
TLCTuto's Laravel Corner
Created by Obala on 9/3/2024 in #💡filament
Multiple sub domain session sharing
it's was just browser cache
4 replies
FFilament
Created by Obala on 9/3/2024 in #❓┊help
Multi sub domain session sharing
I think I had issues with the browser caching, cos it's working perfectly fine on another browser
5 replies
FFilament
Created by Obala on 9/3/2024 in #❓┊help
Multi sub domain session sharing
let me look it through, thanks
5 replies
TLCTuto's Laravel Corner
Created by Obala on 2/9/2024 in #🚀laravel
Error in running npm install in wsl2
this works, thanks
10 replies
TLCTuto's Laravel Corner
Created by Obala on 2/9/2024 in #🚀laravel
Error in running npm install in wsl2
alright, let me try it out
10 replies
TLCTuto's Laravel Corner
Created by Obala on 10/3/2023 in #🚀laravel
my routes protected by auth middleware don't redirect to login page
Deleted all the default files and installed fresh installation of Laravel 10, added all the custom codes run composer install and every started working perfectly fine
15 replies
TLCTuto's Laravel Corner
Created by Obala on 10/3/2023 in #🚀laravel
my routes protected by auth middleware don't redirect to login page
this happens when i run php artisan route:cache
15 replies
TLCTuto's Laravel Corner
Created by Obala on 10/3/2023 in #🚀laravel
my routes protected by auth middleware don't redirect to login page
there's this issue with the api routes
Unable to prepare route [password/email] for serialization. Another route has already been assigned name [password.email].

at D:\ivan\chcc-update\vendor\laravel\framework\src\Illuminate\Routing\AbstractRouteCollection.php:247
243▕ $route->name($this->generateRouteName());
244▕
245▕ $this->add($route);
246▕ } elseif (! is_null($symfonyRoutes->get($name))) {
➜ 247▕ throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}].");
248▕ }
249▕
250▕ $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute());
251▕

1 D:\ivan\chcc-update\vendor\laravel\framework\src\Illuminate\Routing\AbstractRouteCollection.php:208
Illuminate\Routing\AbstractRouteCollection::addToSymfonyRoutesCollection(Object(Symfony\Component\Routing\RouteCollection), Object(Illuminate\Routing\Route))

2 D:\ivan\chcc-update\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php:246
Illuminate\Routing\AbstractRouteCollection::toSymfonyRouteCollection()
Unable to prepare route [password/email] for serialization. Another route has already been assigned name [password.email].

at D:\ivan\chcc-update\vendor\laravel\framework\src\Illuminate\Routing\AbstractRouteCollection.php:247
243▕ $route->name($this->generateRouteName());
244▕
245▕ $this->add($route);
246▕ } elseif (! is_null($symfonyRoutes->get($name))) {
➜ 247▕ throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}].");
248▕ }
249▕
250▕ $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute());
251▕

1 D:\ivan\chcc-update\vendor\laravel\framework\src\Illuminate\Routing\AbstractRouteCollection.php:208
Illuminate\Routing\AbstractRouteCollection::addToSymfonyRoutesCollection(Object(Symfony\Component\Routing\RouteCollection), Object(Illuminate\Routing\Route))

2 D:\ivan\chcc-update\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php:246
Illuminate\Routing\AbstractRouteCollection::toSymfonyRouteCollection()
i don't if its the cause of this mess
15 replies
TLCTuto's Laravel Corner
Created by Obala on 10/3/2023 in #🚀laravel
my routes protected by auth middleware don't redirect to login page
usercontroller\
15 replies
TLCTuto's Laravel Corner
Created by Obala on 10/3/2023 in #🚀laravel
my routes protected by auth middleware don't redirect to login page
class CheckUserStatus
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$response = $next($request);

if (Auth::check() && ! $request->user()->status) {
Auth::logout();
Flash::error('Your Account is currently disabled, please contact to administrator.');

return redirect()->back();
}

return $response;
}
}
class CheckUserStatus
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$response = $next($request);

if (Auth::check() && ! $request->user()->status) {
Auth::logout();
Flash::error('Your Account is currently disabled, please contact to administrator.');

return redirect()->back();
}

return $response;
}
}
CheckuserStatus middleware
15 replies
TLCTuto's Laravel Corner
Created by Obala on 10/3/2023 in #🚀laravel
my routes protected by auth middleware don't redirect to login page
thats the app\http\kernel.php
15 replies
TLCTuto's Laravel Corner
Created by Obala on 10/3/2023 in #🚀laravel
my routes protected by auth middleware don't redirect to login page
Let me do so in a minute
15 replies
TLCTuto's Laravel Corner
Created by Obala on 9/14/2023 in #💡filament
how to set a value of an input field using values in a repeater
I have another though in Laravel , hope you can take a look at it, on middleware
12 replies
TLCTuto's Laravel Corner
Created by Obala on 9/14/2023 in #💡filament
how to set a value of an input field using values in a repeater
Oh yah totally forgot
12 replies
TLCTuto's Laravel Corner
Created by Obala on 10/3/2023 in #🚀laravel
my routes protected by auth middleware don't redirect to login page
yes, they are all setup and working, i only get the error say when i visit /profile without logging in first, butt when i visit route like /login or /register or the front routes which does not require authentication i don't get any error
15 replies
TLCTuto's Laravel Corner
Created by Obala on 10/3/2023 in #🚀laravel
my routes protected by auth middleware don't redirect to login page
here is my route and the middleware used
Route::middleware(['auth', 'verified', 'xss', 'checkUserStatus'])->group(function () {
Route::get('profile', [UserController::class, 'editProfile']);
Route::post('change-password', [UserController::class, 'changePassword']);
Route::post('profile-update', [UserController::class, 'profileUpdate']);
Route::post('update-language', [UserController::class, 'updateLanguage']);
});
Route::middleware(['auth', 'verified', 'xss', 'checkUserStatus'])->group(function () {
Route::get('profile', [UserController::class, 'editProfile']);
Route::post('change-password', [UserController::class, 'changePassword']);
Route::post('profile-update', [UserController::class, 'profileUpdate']);
Route::post('update-language', [UserController::class, 'updateLanguage']);
});
15 replies
TLCTuto's Laravel Corner
Created by Obala on 9/14/2023 in #💡filament
how to set a value of an input field using values in a repeater
Let me test it out
12 replies
TLCTuto's Laravel Corner
Created by Obala on 9/14/2023 in #💡filament
how to set a value of an input field using values in a repeater
Ok thanks, i await ur findings
12 replies
FFilament
Created by Obala on 9/14/2023 in #❓┊help
how to set a value of an input field using values in a repeater
Thank you, let me test it out
9 replies
TLCTuto's Laravel Corner
Created by Obala on 9/14/2023 in #💡filament
how to set a value of an input field using values in a repeater
it works with this but the problem when more that a single product is order for
TextInput::make('quantity')
->required()
->afterStateUpdated(fn ($state, Get $get, Set $set) => empty($get('../../total')) ? $set('../../total', $get('unit_price') * $state) : ($get('unit_price') * $state) + $get('../../total'))
->numeric(),
TextInput::make('quantity')
->required()
->afterStateUpdated(fn ($state, Get $get, Set $set) => empty($get('../../total')) ? $set('../../total', $get('unit_price') * $state) : ($get('unit_price') * $state) + $get('../../total'))
->numeric(),
12 replies