thesimons started a new conversation+100 XP
4mos ago
Hello,
I'm dev mode locally using Herd Pro. I'm working with a pretty heavy panel powered by Filament 4.
I have tweaked the tweak-able things. I have max exec time at 300 seconds. But it keeps going timeout.
Any idea how to avoid it? I have hard this issue before but the solution was for Windows.
Thanks, Simom
thesimons wrote a reply+100 XP
4mos ago
thesimons wrote a reply+100 XP
4mos ago
thesimons started a new conversation+100 XP
4mos ago
Hello,
don't kill me please. I tried the Laravel "validation" style but I'm unable to get the same result for the following (dirty) code.
public function update(Request $request)
{
if (empty($request->current_password)) {
return back()->withInput()
->with('error', 'lang.profile.settings.preferences.password.current_password.error.required')
->with('hasLinkBack', true);
}
if (empty($request->new_password)) {
return back()->withInput()
->with('error', 'lang.profile.settings.preferences.password.new_password.error.required')
->with('hasLinkBack', true);
}
if (strlen($request->new_password) < 8) {
return back()->withInput()
->with('error', 'lang.profile.settings.preferences.password.new_password.error.min')
->with('hasLinkBack', true);
}
if (empty($request->new_password_verify)) {
return back()->withInput()
->with('error', 'lang.profile.settings.preferences.password.new_password_verify.error.required')
->with('hasLinkBack', true);
}
if ($request->new_password !== $request->new_password_verify) {
return back()->withInput()
->with('error', 'lang.profile.settings.preferences.password.new_password_verify.error.different')
->with('hasLinkBack', true);
}
// Check current password
if (!Hash::check($request->current_password, auth('foo')->user()->password)) {
return back()->withInput()
->with('error', 'lang.profile.settings.preferences.password.current_password.error.incorrect')
->with('hasLinkBack', true);
}
// Update password
auth('foo')->user()->update(['password' => Hash::make($request->new_password)]);
return redirect()
->route('my.profile.settings.preferences.password.edit')
->with('success', 'lang.profile.settings.preferences.password.updated_successfully');
}
Basically I want to flash one error at time. Could you please suggest a cleaner approach?
Thanks Simon
thesimons started a new conversation+100 XP
5mos ago
thesimons wrote a reply+100 XP
5mos ago
thesimons started a new conversation+100 XP
5mos ago
Hello,
Yesterday - while deploying a new server - I have the funny idea to install PHP8.5 just released.
As result for that I got a list of errors. I think it'd be better to give it few weeks before thinking about deploying in production.
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- brianium/paratest[v7.8.3, ..., v7.8.4] require php ~8.2.0 || ~8.3.0 || ~8.4.0 -> your php version (8.5.0) does not satisfy that requirement.
- brianium/paratest[v7.9.0, ..., v7.11.2] require php ~8.3.0 || ~8.4.0 -> your php version (8.5.0) does not satisfy that requirement.
- pestphp/pest v3.8.2 requires brianium/paratest ^7.8.3 -> satisfiable by brianium/paratest[v7.8.3, ..., v7.14.2].
- brianium/paratest v7.14.2 requires phpunit/phpunit ^12.4.1 -> satisfiable by phpunit/phpunit[12.4.1, 12.4.2, 12.4.3, 12.4.4].
- brianium/paratest v7.14.1 requires phpunit/phpunit ^12.4.0 -> satisfiable by phpunit/phpunit[12.4.0, ..., 12.4.4].
- brianium/paratest v7.14.0 requires phpunit/phpunit ^12.3.15 -> satisfiable by phpunit/phpunit[12.3.15, ..., 12.4.4].
- brianium/paratest v7.13.0 requires phpunit/phpunit ^12.3.9 -> satisfiable by phpunit/phpunit[12.3.9, ..., 12.4.4].
- brianium/paratest v7.12.0 requires phpunit/phpunit ^12.3.6 -> satisfiable by phpunit/phpunit[12.3.6, ..., 12.4.4].
- pestphp/pest v3.8.2 conflicts with phpunit/phpunit 12.4.4.
- pestphp/pest v3.8.2 conflicts with phpunit/phpunit 12.3.14.
- pestphp/pest v3.8.2 conflicts with phpunit/phpunit 12.3.13.
- pestphp/pest v3.8.2 conflicts with phpunit/phpunit 12.3.12.
- pestphp/pest v3.8.2 conflicts with phpunit/phpunit 12.3.11.
- pestphp/pest v3.8.2 conflicts with phpunit/phpunit 12.3.10.
- pestphp/pest v3.8.2 conflicts with phpunit/phpunit 12.3.8.
- pestphp/pest v3.8.2 conflicts with phpunit/phpunit 12.3.7.
- pestphp/pest v3.8.2 conflicts with phpunit/phpunit 12.3.6.
- pestphp/pest-plugin-laravel v3.2.0 requires pestphp/pest ^3.8.2 -> satisfiable by pestphp/pest[v3.8.2, v3.8.3, v3.8.4].
- Conclusion: don't install pestphp/pest v3.8.3 (conflict analysis result)
- Conclusion: don't install pestphp/pest v3.8.4 (conflict analysis result)
- Root composer.json requires pestphp/pest-plugin-laravel ^3.2 -> satisfiable by pestphp/pest-plugin-laravel[v3.2.0].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Thanks, Simon
thesimons started a new conversation+100 XP
5mos ago
Hello,
what's the best way to share a private function among different controllers?
I have an area of my about Working Hours with partners: always, everyday (same hours for every day), custom. I have split the logic in 3 different controllers. However there are 3 private functions to be used in each controller.
What's the best approach to share them?
Thanks, Simon
thesimons wrote a reply+100 XP
5mos ago
thesimons wrote a reply+100 XP
5mos ago
thesimons started a new conversation+100 XP
5mos ago
Hello,
I have problems with the following middleware.
The aim is whatever HTTP call outside https://my.site.com/profile/settings/spoken-languages/wizard (+ sub sections) would make sessions spoken_language_id and spoken_language_proficiency_id to be forgotten.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class ClearSpokenLanguageWizardSession
{
public function handle(Request $request, Closure $next)
{
$response = $next($request);
// If user navigates away from wizard routes, clear session keys
if (! $request->is('profile/settings/spoken-languages/wizard*')) {
session()->forget([
'spoken_language_id',
'spoken_language_proficiency_id',
]);
}
return $response;
}
}
and it's registered in the following way into bootstrap/app.php
->withMiddleware(function (Middleware $middleware): void {
$middleware->validateCsrfTokens(except: []);
$middleware->append(ClearSpokenLanguageWizardSession::class);
})
Thanks, Simon
thesimons wrote a reply+100 XP
5mos ago
thesimons wrote a reply+100 XP
5mos ago
Thanks for your terrific answers. I fell better knowing that I'm not alone.
With "big" I mean "large". I have created many other apps in Laravel before. Some of them really "mission critical". I have developed a full payment gateway handling 3DS etc etc. A CMS able to encoding videos and many other smaller things.
This is the first I face a so huge amount of data.
Thanks also for the advices :)
thesimons wrote a reply+100 XP
5mos ago
thesimons started a new conversation+100 XP
5mos ago
Hey everyone,
This isn’t really a help request — more of a curiosity.
I’m currently working on my first big project with Laravel, and sometimes I feel like I get a bit lost inside my own app — jumping between controllers, structures, and so on.
Is that something everyone goes through at some point, or does it mean I’m doing something wrong in how I’m structuring things?
Thanks, Simon
thesimons wrote a reply+100 XP
6mos ago