Monday, 14 December 2015

Laravel 5 controller

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class PagesController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        //
        //return 'welcome to our website';
       
        //$lessons=['hai','bye','good'];
        return view('pages/sample');
    }
    public function signup()
    {
        //
        return view('pages/sample1');
    }
    public function signin()
    {
        //
        return view('pages/sample');
    }
      public function about()
    {
        //
        return view('pages/sample1');
    }
    public function data()
    {
        //
        //return 'welcome to our website';

        $lessons=['hai','bye','good'];

        $test='hai pandi';

        //return view('pages.sample3',['lessons'=> $lessons,'test'=>$test]);
        return view('pages.sample3',compact('lessons','test'));
    }


}

No comments:

Post a Comment