Laravel TimeZone not working

I am using Lumen framework. How can I change Timezone to Europe/Paris CEST?

I added a variable in my .env file:

APP_TIMEZONE=Asia/Jakarta
 

here it's

 

If you want to manage your timezone from .env file, then you can add below code in your config.php file.

'timezone' => env('APP_TIMEZONE', 'UTC'),

and add the below line in your .env file.

APP_TIMEZONE='Asia/Jakarta'

Remove “api” Prefix from URL on Laravel

PHP Laravel Framework makes it easy for us to create a Restful API. We just set the routing in the Routes -> api.php section.

By default we will find that we will be given a url like this http://ourdomain.com/api/[end-point]

This is to distinguish between urls that can be accessed via the web or can only be accessed through api. We want to change it to http://ourdomain.com/[end-point] by removing the “api” prefix.

To change it we just go to the RouteServiceProvider.php file in the app/Providers folder

Then in the mapApiRoutes method function section, we can eliminate the prefix (‘api’)

 

public function boot(): void
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});

$this->routes(function () {
Route::middleware('api')
// ->prefix('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));

Route::middleware('web')
->group(base_path('routes/web.php'));
});
}
 

 

#source : https://medium.com/@arthajonar/remove-api-prefix-from-url-on-laravel-35ed585f3a53