Dab tsi yog DD () hauv laravel?
Dab tsi yog DD () hauv laravel?

Video: Dab tsi yog DD () hauv laravel?

Video: Dab tsi yog DD () hauv laravel?
Video: Leng Yang - Yog Vim Dab Tsi (Official Full Song | Nkauj Tawm Tshiab) 2020/05/24 2024, Hlis ntuj nqeg
Anonim

Laravel muaj lub luag haujlwm tshwj xeeb luv luv qhia txog kev hloov pauv - dd() - stands rau "Dump thiab Tuag", tab sis nws tsis yog ib txwm yooj yim.

Kuj nug, DD yog dab tsi hauv laravel?

Lub VarDumper tivthaiv muab cov txheej txheem rau kev taug kev hla txhua qhov sib txawv ntawm PHP. Ua rau saum, nws muab abetter dump() muaj nuj nqi uas koj tuaj yeem siv tsis yog var_dump. Laravel 5 tau hloov lub dd (), pov tseg thiab tuag, ua haujlwm yog li nws yuav suav nrog qhov no hauv qab hood.

Tsis tas li ntawd, dab tsi yog pab hauv laravel? Laravel suav nrog ntau yam thoob ntiaj teb " tus pab " PHP functions. Yog li, hauv paus, pab hauv Laravel yog cov khoom siv hluav taws xob built-in uas koj tuaj yeem hu los ntawm txhua qhov chaw hauv koj daim ntawv thov. Yog tias lawv tsis tau muab los ntawm lub hauv paus ntsiab lus, tej zaum koj yuav tau ua tiav los tsim koj tus kheej tus pab chav kawm.

Hauv qhov no, kev siv slug hauv laravel yog dab tsi?

A slug yog ib qho yooj yim version ntawm ib txoj hlua, feem ntau URL-phooj ywg. Txoj cai ntawm "slugging" ib txoj hlua feem ntau yuav hloov nws mus rau ib rooj plaub, thiab tshem tawm cov cim tsis zoo URL (qhov chaw, cov ntawv sau npe, ampersands, thiab lwm yam). Cov hlua uas tshwm sim tuaj yeem yog siv raws li anidentifier rau ib qho kev pab.

Print_r yog dab tsi?

Cov print_r () muaj nuj nqi yog ib tug built-in muaj nuj nqi nyob rau hauv PHP thiab yog siv los luam los yog tso saib cov ntaub ntawv khaws tseg rau hauv avariable. Qhov parameter no yog hom boolean uas nws tus nqi pib yogFALSE thiab siv los khaws cov khoom tso tawm ntawm print_r () ua haujlwm hauv qhov sib txawv ntau dua li luam tawm.

Pom zoo: