test function of laravel and angular js