How can I access a Project path (URL) written in Laravel from another project (URL) that does not use Laravel?

0

Let's say I have myApp1.com and myApp2.com , and that only the second project is written in Laravel.

My question is:

Considering that myApp2.com has login authentication, would it be possible to create a link in myApp1.com that would direct to a route in myApp2.com ?

//myApp1.com
<a href="http://myApp2.com/fazerAlgo/">Faça algo em myApp2.com</a>

//myApp2.com
Route::get('/fazerAlgo', 'outConttroler@fazerendoAlgo')
    
asked by anonymous 03.08.2016 / 20:39

1 answer

0

Completely,

It would look like this:

myApp1.com

<a href="http://myApp2.com/do-something/">Faça algo em myApp2.com</a>

myApp2.com
Route

 Route::get('do-something', 'DoSomethingController@do_something');

Controller

public function do_something()
{
    echo "Hello World";
}

I just tested it worked out perfect here. NOTE: It is clear that your authentication session would not be passed to myApp2.com

I hope I have helped.

    
03.08.2016 / 20:51