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 @ 2018-11-18 11:33  cyany_blue  阅读(354)  评论(0)    收藏  举报