Change Route::get('/', function () { return view('welcome2'); }); line with
Route::get('/', function () { return View::make('welcome2'); });.
Dear Saurabh,
Your solution will not work for me . I modify my question some amount. Please advise . I am stucked on that point still...
Thanks
Anes
You have to fetch your GET data from the request object: https://laravel.com/docs/5.3/requests#retrieving-input
$number_of_cats = $request->input('number_of_cats');
So basically you have to do your logic in a controller:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class CatsController extends Controller
{
/**
* Show the number of cats
*
* @param Request $request
* @return Response
*/
public function update(Request $request)
{
$number_of_cats = $request->input('number_of_cats', 0); // the second parameter is a default value
return view('about', compact('number_of_cats'));
}
}
Call your URL like this: http://localhost/about?number_of_cats=9028
Hi Anes,
You can study/check this with example Views & Responses.
P.S. You can select laravel version from there given version drop list.
Regards
Dear gpluess,
I am a basic level beginner . I try according to you. But it's not working. Do you please provide complete file path, code to run a "Hello World". I have not yet run the code yet. waiting a complete code
Anes
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community