手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜Qcloud , 注册 | 登陆

Laravel action helper函数用法

首页 > PHP >
本文来源:http://www.metrodub.com/a/www.changzhinews.com/

重庆时时彩定胆 www.metrodub.com,去年中国美国商会也有一个调查,他们的会员中有60%以上的企业把中国作为全球三大投资目的地之一。SmokeisdischargedfromchimneysataplantinHuai'ancity,EastChina'sJiangsuprovince,Jan31,2015.[Photo/IC]TheseveresmogthatshroudsChinesecitiesandthetrafficwoesthathauntUScitiesareremindersofhowmuchthetwocountriescanlearnfromandhelpeachotherintacklingsuchissuesinsteadofengaginginatradewarwhichtheincomingUSadministrationhashinteditwillinitiate.Thisweek,Beijingisonceagainunderaveryhighalert,shortlyafteraredone,themostseveresmogwarninginafour-tiersystem,announcedonDec16.AmidtheNewYearholidaycelebrationsandpartying,thetoxicsmogthathasblanketedtheChinesecapitalhasbecomethemosttalked-aboutsubjectofalldomesticsocialmedia.People'sanxietyhasreachedlevelsneverseenbefore.Theyhavecomparednotesonwhichmasksarethemosteffectiveandmosthaveexpresseddissatisfactionwiththeeffortsmadetotacklethesmoginthepastyears,whichhavemadelittleprogress."Smogterror,""nuclearwinter"and"gaschamber"arejustsomeofthewordsusedtodescribethehorrendousairpollution.Itistruethattheairpollutionsmogmaynotdisappearinthecomingyears,butitwouldreassurepeoplethatthefightwillonedaybeitsseveritylessensratherthanworsens.WhiletheBeijingauthoritiesreportedthisweekthattherehadbeenmoregoodairqualitydayslastyearthanthepreviousyear,thatthesituationisimprovingisnotthegeneralimpressionthepublichas.Therearestrongdoubtsthatalltheenvironmentallawsandregulationsarebeingstrictlyenforced,andwhethertheMinistryofEnvironmentalProtectionanditssubsidiarieshavethenecessaryteeth,astheircounterpartsinothercountrieshave.Forexample,LosAngelessufferedfromsevereairpollution20yearsago.YetaUniversityofSouthernCaliforniastudyreleasedayearagoshowedthatairpollutionhasdeclinedsignificantlyoverthepasttwodecades.Asaresult,residentsarehealthier,especiallyinlungfunctionandlunggrowthamongchildren.Stricterregulationsandstrongenforcementareregardedasamajorcontributortotheimprovement.ThestateofCalifornia,whereLosAngelesislocated,isnowtheleaderinenvironmentaltechnologyandstandards.ThatiswhatChina,Chinesecitiesandprovincesshouldaspiretobeincombatingairpollution.Anditwillbeawin-winifthetwocountriesstrengthencooperationinthisregard.Everyonelovesbluesky.However,itisjoylesstoseefellowChinesetakingandpostingpicturesofclearblueskyinBeijingbecauseit'ssorare.WhileChinesevisitingtheUSoftenmarvelattheclearskyintheUS,manyAmericanswhovisitChinaoftenpraisethehigh-speedtrainsandsmoothsubways.TheWednesdaymorningtraincrashinBrooklyn,NewYork,whichinjuredmorethan100passengers,camethreemonthsafteratraincrashinHoboken,NewJersey,thatkilledonebystanderanddestroyedpartofthehistorictrainterminal.OneofmyfellowChinesejournalistsbasedinWashingtondescribedherrecentrideontheslowandwobblyNo7trainfromFlushing,Queens,totheTimesSquareastorture.AskedwhyNewYorkersdon'tcomplainaboutthis,onefellowAmericanjournalist,aNewYorker,replied:"Maybepeoplearejustusedtothis."ThesameproblemexistsinWashingtonDC'sMetrosystemwhichisfinallyundergoingmassiverepairsafterignoringdecadesofwarning.MajordelayscausedbyscheduledandunscheduledrepairsarecommonplaceintheUScapital.Chinahasdoneamarvelousjobinbuildingitssubwaysystems.BothShanghaiandBeijinghavebuiltsubwaysystemswhosetotallengthisgreaterthanthatoftheoneinNewYorkCityinaboutadecade,whiletheSecondAvenueSubwayinNewYorktookliterallyacenturytobecompletedandopenedtotrafficonJan1.TheauthorisdeputyeditorofChinaDailyUSA.chenweihua@chinadailyusa.com


原本以为是很简单的一个用法。

action('XxxxController@test',['abc'=>1]);
结果,不仅仅是这样的,
 
如果你的XxxxController@test,没有在router里定义过。会直接报错,报:App\Http\Controller\XxxController@test 不存在,虽然 你很明确的知道它就在那里!
 
原来我 写URL的时候都是直接写 url('abc/def'),其实应该用action('xxxcontroller@def'),好处是,action是可以带参数的。url你永远带不进参数!!!
 
纯记录。NND



本站采用创作共享版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"重庆时时彩定胆", 保留原始链接, 此外还必须标注原文标题和链接.

« 上一篇 | 下一篇 »

发表评论

评论内容 (必填):

小说 小说 小说 小说 小说 小说
小说 小说 小说 小说 小说 小说
小说 小说 小说 小说 小说 小说