Question: Is there a function or something in laravel which I can use to make first letter uppercase in breadcrumbs? 

This is what I'm using right now but in my links and routes are all lowercase letters and if I go and try to update all will be very time consuming..

```
<ul class="breadcrumb">
<li>
     <i class="glyphicon glyphicon-home"></i>
     <a href="{{ URL::to('/') }}">Home</a> /
     @for($i = 0; $i <= count(Request::segments()); $i++)
         <a href="">{{Request::segment($i)}}</a>
         @if($i < count(Request::segments()) & $i > 0)
              /
         @endif
</li>
     @endfor
</ul>

```

Or this isn't correct way of making breadcrumbs in laravel 4.2?

Answer: 
If you mean only JavaScript and HTML on the client, there are some third party libraries.

Auth0 is popular and has [instructions for Twitter](https://auth0.com/docs/connections/social/twitter).

Another possible solution is to use Firebase auth. It has a [JavaScript API which can be used as follows](https://firebase.google.com/docs/auth/web/twitter-login#redirect-mode):

> 
> Create an instance of the Twitter provider object:
> 
> 
> 

```
var provider = new firebase.auth.TwitterAuthProvider();

```

> 
> Authenticate with Firebase using the Twitter provider object. You can prompt your users to sign in with their Twitter accounts either by opening a pop-up window or by redirecting to the sign-in page.
> 
> 
>
This javascript snippet is a working example of how to do this. You can try it and tweak it: <https://jsfiddle.net/s3egg5h7/43/>

As pointed out, a Javascript-only solution requires a 3rd-party service, in this case <https://oauth.io>.

Even if you do not want to use the 3rd-party service, the snippet is useful since you do not have to write any code to test out Twitter APIs to see they return what you need

It is pretty short:

```
$('#twitter-button').on('click', function() {
    // Initialize with your OAuth.io app public key
    OAuth.initialize('OAUTH_IO_KEY');
    // Use popup for OAuth
    OAuth.popup('twitter').then(twitter => {
        console.log('twitter:', twitter);
        // Retrieves user data from OAuth provider by using #get() and
        // OAuth provider url    
        twitter.get('/1.1/account/verify_credentials.json?include_email=true').then(data => {
            console.log('self data:', data);
        })    
    });
})

```

It requires a few external references, e.g., bootstrap css, oauthio javascript open-source library, etc.

I think using a 3rd-party service may make sense since it hides all the inconsistencies in the OAuth implementation of different providers, like Twitter, Facebook, etc.

I did not create this code so for attribution purposes, please refer to: <https://coderwall.com/p/t46-ta/javascript-twitter-social-login-button-for-oauth>