Laravel中的ERR_TOO_MANY_REDIRECTS

时间:2015-12-18 19:26:40

标签: laravel routes http-status-code-302

我正在学习Laravel。我对基础知识有疑问。我得到一个ERR_TOO_MANY_REDIRECTS。

我的routes.php:

Route::get('/','WelcomeController@index');

索引功能:

public function index(){
    return view('welcome');
}

网址有一个额外的部分,我不知道为什么。

http://localhost/dev.todoparrot.com/publichttp://localhost/dev.todoparrot.com/public/home

<?php

namespace todoparrot\Http\Controllers;

use Illuminate\Http\Request;

use todoparrot\Http\Requests;
use todoparrot\Http\Controllers\Controller;

class WelcomeController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index(){
        return view('welcome');
    }


    public function contact(){
        echo "we are in contacts";
        return view('welcome');
    }


    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, $id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        //
    }
}

0 个答案:

没有答案