I have a issue with passing data.
I create a get request in controller
function path to send data
and blade template to receive some content
but that is not working :D
i try changing web.php few times but, last error i got is non static method
web.php
Route::get('/test2', function () {
return view('test2')->with('testGet@show');;
});
testGet
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class testGet extends Controller
{
public function show(Request $request)
{
$data = $request -> input();
}
}
and test2.blade.php
<body>
@php
use App\Http\Controllers\testGet ;
echo testGet::show();
@endphp
<div class="emptySpace"> {{$data}}</div>
I expecting to load blade view with data get from url, i already create view but now i need to pass some data... any idea?