woking on laravel and db logic