Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper functions in laravel mobile api #9

Open
pankaj-ag opened this issue Feb 17, 2019 · 0 comments
Open

Add helper functions in laravel mobile api #9

pankaj-ag opened this issue Feb 17, 2019 · 0 comments
Assignees

Comments

@pankaj-ag
Copy link
Member

pankaj-ag commented Feb 17, 2019

let's create a global helper so that we can use it every where.

if (!function_exists('isApi')) {
    function isApi()
    {
        $requestSegments = collect(request()->segments());
        return $requestSegments->first() == 'api';
    }
}
@pankaj-ag pankaj-ag changed the title Add helper functions in react native mobile api Add helper functions in laravel mobile api Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants