laravel route

to config your route in your router/web.php


example one:
detail route

Route:get("/hello",function(){
    echo "hello world";
});

blade template map ;
you should create a file named hello.php in your views/hello.blade.php
hello..blade.php

<?php
	echo "hello world";
?>


route:

Route.get("/hello",function({
   return view("hello");
});

dynamist route

Route::get("/id/{id}",function($id){
    echo $id;
});


optionad route

Route::get("/option/{name?}",function($name="abcd"){
    echo $name;
});

if you do not pass paramter to route,it will


posted @   cyany_blue  阅读(349)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示