laravel and api assignment