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: 
Yes and no. 

It is not possible at the time of writing, if you want to do it only with browser client side javascript, because twitter does not allow cross site requests. 

Browsers execute javascript code in a sandbox environment, which does not allow you to do a request to another domain as yours, except the 3rd party domain explicitly allows it. This is called [Http Access Control (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)

However the twitter api can of course be consumed by a javascript app, which is not running in a browser. 

So if you want this functionality for your website and you want to code it only in javascript, you would have to write a backend api for your website in nodejs or use another 3rd party service like @RationalDev suggested
If you check the twitter's api documentation, you can see how to do the login.

I think your question is how insert a plugin to login similar than facebook but I think they don't did any library.

When the user clicks the loggin button you must send a post request to twitter to get the oauth\_token:
Example: POST request to "api.twitter.com/oauth/request\_token"

and then, twitter provides you the oauth\_token and the oauth\_token\_secret (private).

Once you did this step you must to redirect the user to twitter.
Example: GET request to "api.twitter.com/oauth/authenticate?oauth\_token=YOUR\_OAUTH\_TOKEN\_GIVEN\_IN\_STEP\_1"

If everything has gone well twitter response you with the oauth\_token and a verifier oauth token.

Let's set up the last step!

Send a post request to twitter api endpoint with the verifier oauth token provided in the response of step 2.
Example: POST request to "api.twitter.com/oauth/access\_token" sending the verifier oauth token as post parameter.

And then twitter response with a secret token and the user token, you can save it and feel free to use it in any twitter endpoint.

Login documentation: <https://dev.twitter.com/web/sign-in/implementing>
Browser auth flow: <https://dev.twitter.com/web/sign-in/desktop-browser>

Regards!