Support the ongoing development of Laravel.io →
Configuration Views Installation
Last updated 2 years ago.
0

Change Route::get('/', function () { return view('welcome2'); }); line with

Route::get('/', function () { return View::make('welcome2'); });.

Last updated 7 years ago.
0

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

0

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

0

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

0

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

0

Sign in to participate in this thread!

Eventy

Your banner here too?

flipmedia flipmedia Joined 22 Nov 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.