In this example i'm creating an Static function in my Test class and passing it, inside the test function of TestController
Test.php
<?php
namespace App\My;
class Test
{
public static function my()
{
return "hello world";
}
}
TestController.php
<?php
namespace App\Http\Controllers\Test;
use App\My\
Test;
class TestController extends Controller
{
public function test()
{
return Test::my();
Output
Comments
Post a Comment
If you any doubt of any topic then you can comment me.