I am totally confused right now o.O
Everytime I record the network requests with safari developer tools, the problem doesn't appear and only one entry is created.
But if I stop the recording, the problem starts again:
I deleted the Redirect and replaced it just with "return true;". Hence, I get a blank page when I enter the URL "/public/develop/building/5". Then I look into the database and I see only one entry. That's correct. Then I manually return to "/public/overview" and suddenly a new entry appears in the database.
I know for sure that this is caused by the Code in my Route I posted (where I call the ActionsController) because I tried to delete it before I returned to the overview page (then, no new entry is created).
So, somehow laravel calls this route even if another route is requested. Does it maybe has something to do with my routes in general? Because I use a group of routes:
Route::group(['before' => 'auth'], function()
{
Route::get('/overview', ['as' => 'overview', 'uses' => 'PagesController@showOverview']);
Route::get('/develop/building/{building_id}', ['as' => 'develop.building', function($building_id)
{
// start developing
ActionsController::create(Auth::user()->id, Session::get('location_id'), 1,Session::get('object_id'), $building_id, Carbon::now()->addSeconds(5), 1);
return true;
}]);
});