_ide_helper.php 876 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722
  1. <?php
  2. /* @noinspection ALL */
  3. // @formatter:off
  4. // phpcs:ignoreFile
  5. /**
  6. * A helper file for Laravel, to provide autocomplete information to your IDE
  7. * Generated for Laravel 12.20.0.
  8. *
  9. * This file should not be included in your code, only analyzed by your IDE!
  10. *
  11. * @author Barry vd. Heuvel <barryvdh@gmail.com>
  12. * @see https://github.com/barryvdh/laravel-ide-helper
  13. */
  14. namespace Illuminate\Support\Facades {
  15. /**
  16. * @see \Illuminate\Foundation\Application
  17. */
  18. class App {
  19. /**
  20. * Begin configuring a new Laravel application instance.
  21. *
  22. * @param string|null $basePath
  23. * @return \Illuminate\Foundation\Configuration\ApplicationBuilder
  24. * @static
  25. */
  26. public static function configure($basePath = null)
  27. {
  28. return \Illuminate\Foundation\Application::configure($basePath);
  29. }
  30. /**
  31. * Infer the application's base directory from the environment.
  32. *
  33. * @return string
  34. * @static
  35. */
  36. public static function inferBasePath()
  37. {
  38. return \Illuminate\Foundation\Application::inferBasePath();
  39. }
  40. /**
  41. * Get the version number of the application.
  42. *
  43. * @return string
  44. * @static
  45. */
  46. public static function version()
  47. {
  48. /** @var \Illuminate\Foundation\Application $instance */
  49. return $instance->version();
  50. }
  51. /**
  52. * Run the given array of bootstrap classes.
  53. *
  54. * @param string[] $bootstrappers
  55. * @return void
  56. * @static
  57. */
  58. public static function bootstrapWith($bootstrappers)
  59. {
  60. /** @var \Illuminate\Foundation\Application $instance */
  61. $instance->bootstrapWith($bootstrappers);
  62. }
  63. /**
  64. * Register a callback to run after loading the environment.
  65. *
  66. * @param \Closure $callback
  67. * @return void
  68. * @static
  69. */
  70. public static function afterLoadingEnvironment($callback)
  71. {
  72. /** @var \Illuminate\Foundation\Application $instance */
  73. $instance->afterLoadingEnvironment($callback);
  74. }
  75. /**
  76. * Register a callback to run before a bootstrapper.
  77. *
  78. * @param string $bootstrapper
  79. * @param \Closure $callback
  80. * @return void
  81. * @static
  82. */
  83. public static function beforeBootstrapping($bootstrapper, $callback)
  84. {
  85. /** @var \Illuminate\Foundation\Application $instance */
  86. $instance->beforeBootstrapping($bootstrapper, $callback);
  87. }
  88. /**
  89. * Register a callback to run after a bootstrapper.
  90. *
  91. * @param string $bootstrapper
  92. * @param \Closure $callback
  93. * @return void
  94. * @static
  95. */
  96. public static function afterBootstrapping($bootstrapper, $callback)
  97. {
  98. /** @var \Illuminate\Foundation\Application $instance */
  99. $instance->afterBootstrapping($bootstrapper, $callback);
  100. }
  101. /**
  102. * Determine if the application has been bootstrapped before.
  103. *
  104. * @return bool
  105. * @static
  106. */
  107. public static function hasBeenBootstrapped()
  108. {
  109. /** @var \Illuminate\Foundation\Application $instance */
  110. return $instance->hasBeenBootstrapped();
  111. }
  112. /**
  113. * Set the base path for the application.
  114. *
  115. * @param string $basePath
  116. * @return \Illuminate\Foundation\Application
  117. * @static
  118. */
  119. public static function setBasePath($basePath)
  120. {
  121. /** @var \Illuminate\Foundation\Application $instance */
  122. return $instance->setBasePath($basePath);
  123. }
  124. /**
  125. * Get the path to the application "app" directory.
  126. *
  127. * @param string $path
  128. * @return string
  129. * @static
  130. */
  131. public static function path($path = '')
  132. {
  133. /** @var \Illuminate\Foundation\Application $instance */
  134. return $instance->path($path);
  135. }
  136. /**
  137. * Set the application directory.
  138. *
  139. * @param string $path
  140. * @return \Illuminate\Foundation\Application
  141. * @static
  142. */
  143. public static function useAppPath($path)
  144. {
  145. /** @var \Illuminate\Foundation\Application $instance */
  146. return $instance->useAppPath($path);
  147. }
  148. /**
  149. * Get the base path of the Laravel installation.
  150. *
  151. * @param string $path
  152. * @return string
  153. * @static
  154. */
  155. public static function basePath($path = '')
  156. {
  157. /** @var \Illuminate\Foundation\Application $instance */
  158. return $instance->basePath($path);
  159. }
  160. /**
  161. * Get the path to the bootstrap directory.
  162. *
  163. * @param string $path
  164. * @return string
  165. * @static
  166. */
  167. public static function bootstrapPath($path = '')
  168. {
  169. /** @var \Illuminate\Foundation\Application $instance */
  170. return $instance->bootstrapPath($path);
  171. }
  172. /**
  173. * Get the path to the service provider list in the bootstrap directory.
  174. *
  175. * @return string
  176. * @static
  177. */
  178. public static function getBootstrapProvidersPath()
  179. {
  180. /** @var \Illuminate\Foundation\Application $instance */
  181. return $instance->getBootstrapProvidersPath();
  182. }
  183. /**
  184. * Set the bootstrap file directory.
  185. *
  186. * @param string $path
  187. * @return \Illuminate\Foundation\Application
  188. * @static
  189. */
  190. public static function useBootstrapPath($path)
  191. {
  192. /** @var \Illuminate\Foundation\Application $instance */
  193. return $instance->useBootstrapPath($path);
  194. }
  195. /**
  196. * Get the path to the application configuration files.
  197. *
  198. * @param string $path
  199. * @return string
  200. * @static
  201. */
  202. public static function configPath($path = '')
  203. {
  204. /** @var \Illuminate\Foundation\Application $instance */
  205. return $instance->configPath($path);
  206. }
  207. /**
  208. * Set the configuration directory.
  209. *
  210. * @param string $path
  211. * @return \Illuminate\Foundation\Application
  212. * @static
  213. */
  214. public static function useConfigPath($path)
  215. {
  216. /** @var \Illuminate\Foundation\Application $instance */
  217. return $instance->useConfigPath($path);
  218. }
  219. /**
  220. * Get the path to the database directory.
  221. *
  222. * @param string $path
  223. * @return string
  224. * @static
  225. */
  226. public static function databasePath($path = '')
  227. {
  228. /** @var \Illuminate\Foundation\Application $instance */
  229. return $instance->databasePath($path);
  230. }
  231. /**
  232. * Set the database directory.
  233. *
  234. * @param string $path
  235. * @return \Illuminate\Foundation\Application
  236. * @static
  237. */
  238. public static function useDatabasePath($path)
  239. {
  240. /** @var \Illuminate\Foundation\Application $instance */
  241. return $instance->useDatabasePath($path);
  242. }
  243. /**
  244. * Get the path to the language files.
  245. *
  246. * @param string $path
  247. * @return string
  248. * @static
  249. */
  250. public static function langPath($path = '')
  251. {
  252. /** @var \Illuminate\Foundation\Application $instance */
  253. return $instance->langPath($path);
  254. }
  255. /**
  256. * Set the language file directory.
  257. *
  258. * @param string $path
  259. * @return \Illuminate\Foundation\Application
  260. * @static
  261. */
  262. public static function useLangPath($path)
  263. {
  264. /** @var \Illuminate\Foundation\Application $instance */
  265. return $instance->useLangPath($path);
  266. }
  267. /**
  268. * Get the path to the public / web directory.
  269. *
  270. * @param string $path
  271. * @return string
  272. * @static
  273. */
  274. public static function publicPath($path = '')
  275. {
  276. /** @var \Illuminate\Foundation\Application $instance */
  277. return $instance->publicPath($path);
  278. }
  279. /**
  280. * Set the public / web directory.
  281. *
  282. * @param string $path
  283. * @return \Illuminate\Foundation\Application
  284. * @static
  285. */
  286. public static function usePublicPath($path)
  287. {
  288. /** @var \Illuminate\Foundation\Application $instance */
  289. return $instance->usePublicPath($path);
  290. }
  291. /**
  292. * Get the path to the storage directory.
  293. *
  294. * @param string $path
  295. * @return string
  296. * @static
  297. */
  298. public static function storagePath($path = '')
  299. {
  300. /** @var \Illuminate\Foundation\Application $instance */
  301. return $instance->storagePath($path);
  302. }
  303. /**
  304. * Set the storage directory.
  305. *
  306. * @param string $path
  307. * @return \Illuminate\Foundation\Application
  308. * @static
  309. */
  310. public static function useStoragePath($path)
  311. {
  312. /** @var \Illuminate\Foundation\Application $instance */
  313. return $instance->useStoragePath($path);
  314. }
  315. /**
  316. * Get the path to the resources directory.
  317. *
  318. * @param string $path
  319. * @return string
  320. * @static
  321. */
  322. public static function resourcePath($path = '')
  323. {
  324. /** @var \Illuminate\Foundation\Application $instance */
  325. return $instance->resourcePath($path);
  326. }
  327. /**
  328. * Get the path to the views directory.
  329. *
  330. * This method returns the first configured path in the array of view paths.
  331. *
  332. * @param string $path
  333. * @return string
  334. * @static
  335. */
  336. public static function viewPath($path = '')
  337. {
  338. /** @var \Illuminate\Foundation\Application $instance */
  339. return $instance->viewPath($path);
  340. }
  341. /**
  342. * Join the given paths together.
  343. *
  344. * @param string $basePath
  345. * @param string $path
  346. * @return string
  347. * @static
  348. */
  349. public static function joinPaths($basePath, $path = '')
  350. {
  351. /** @var \Illuminate\Foundation\Application $instance */
  352. return $instance->joinPaths($basePath, $path);
  353. }
  354. /**
  355. * Get the path to the environment file directory.
  356. *
  357. * @return string
  358. * @static
  359. */
  360. public static function environmentPath()
  361. {
  362. /** @var \Illuminate\Foundation\Application $instance */
  363. return $instance->environmentPath();
  364. }
  365. /**
  366. * Set the directory for the environment file.
  367. *
  368. * @param string $path
  369. * @return \Illuminate\Foundation\Application
  370. * @static
  371. */
  372. public static function useEnvironmentPath($path)
  373. {
  374. /** @var \Illuminate\Foundation\Application $instance */
  375. return $instance->useEnvironmentPath($path);
  376. }
  377. /**
  378. * Set the environment file to be loaded during bootstrapping.
  379. *
  380. * @param string $file
  381. * @return \Illuminate\Foundation\Application
  382. * @static
  383. */
  384. public static function loadEnvironmentFrom($file)
  385. {
  386. /** @var \Illuminate\Foundation\Application $instance */
  387. return $instance->loadEnvironmentFrom($file);
  388. }
  389. /**
  390. * Get the environment file the application is using.
  391. *
  392. * @return string
  393. * @static
  394. */
  395. public static function environmentFile()
  396. {
  397. /** @var \Illuminate\Foundation\Application $instance */
  398. return $instance->environmentFile();
  399. }
  400. /**
  401. * Get the fully qualified path to the environment file.
  402. *
  403. * @return string
  404. * @static
  405. */
  406. public static function environmentFilePath()
  407. {
  408. /** @var \Illuminate\Foundation\Application $instance */
  409. return $instance->environmentFilePath();
  410. }
  411. /**
  412. * Get or check the current application environment.
  413. *
  414. * @param string|array $environments
  415. * @return string|bool
  416. * @static
  417. */
  418. public static function environment(...$environments)
  419. {
  420. /** @var \Illuminate\Foundation\Application $instance */
  421. return $instance->environment(...$environments);
  422. }
  423. /**
  424. * Determine if the application is in the local environment.
  425. *
  426. * @return bool
  427. * @static
  428. */
  429. public static function isLocal()
  430. {
  431. /** @var \Illuminate\Foundation\Application $instance */
  432. return $instance->isLocal();
  433. }
  434. /**
  435. * Determine if the application is in the production environment.
  436. *
  437. * @return bool
  438. * @static
  439. */
  440. public static function isProduction()
  441. {
  442. /** @var \Illuminate\Foundation\Application $instance */
  443. return $instance->isProduction();
  444. }
  445. /**
  446. * Detect the application's current environment.
  447. *
  448. * @param \Closure $callback
  449. * @return string
  450. * @static
  451. */
  452. public static function detectEnvironment($callback)
  453. {
  454. /** @var \Illuminate\Foundation\Application $instance */
  455. return $instance->detectEnvironment($callback);
  456. }
  457. /**
  458. * Determine if the application is running in the console.
  459. *
  460. * @return bool
  461. * @static
  462. */
  463. public static function runningInConsole()
  464. {
  465. /** @var \Illuminate\Foundation\Application $instance */
  466. return $instance->runningInConsole();
  467. }
  468. /**
  469. * Determine if the application is running any of the given console commands.
  470. *
  471. * @param string|array $commands
  472. * @return bool
  473. * @static
  474. */
  475. public static function runningConsoleCommand(...$commands)
  476. {
  477. /** @var \Illuminate\Foundation\Application $instance */
  478. return $instance->runningConsoleCommand(...$commands);
  479. }
  480. /**
  481. * Determine if the application is running unit tests.
  482. *
  483. * @return bool
  484. * @static
  485. */
  486. public static function runningUnitTests()
  487. {
  488. /** @var \Illuminate\Foundation\Application $instance */
  489. return $instance->runningUnitTests();
  490. }
  491. /**
  492. * Determine if the application is running with debug mode enabled.
  493. *
  494. * @return bool
  495. * @static
  496. */
  497. public static function hasDebugModeEnabled()
  498. {
  499. /** @var \Illuminate\Foundation\Application $instance */
  500. return $instance->hasDebugModeEnabled();
  501. }
  502. /**
  503. * Register a new registered listener.
  504. *
  505. * @param callable $callback
  506. * @return void
  507. * @static
  508. */
  509. public static function registered($callback)
  510. {
  511. /** @var \Illuminate\Foundation\Application $instance */
  512. $instance->registered($callback);
  513. }
  514. /**
  515. * Register all of the configured providers.
  516. *
  517. * @return void
  518. * @static
  519. */
  520. public static function registerConfiguredProviders()
  521. {
  522. /** @var \Illuminate\Foundation\Application $instance */
  523. $instance->registerConfiguredProviders();
  524. }
  525. /**
  526. * Register a service provider with the application.
  527. *
  528. * @param \Illuminate\Support\ServiceProvider|string $provider
  529. * @param bool $force
  530. * @return \Illuminate\Support\ServiceProvider
  531. * @static
  532. */
  533. public static function register($provider, $force = false)
  534. {
  535. /** @var \Illuminate\Foundation\Application $instance */
  536. return $instance->register($provider, $force);
  537. }
  538. /**
  539. * Get the registered service provider instance if it exists.
  540. *
  541. * @param \Illuminate\Support\ServiceProvider|string $provider
  542. * @return \Illuminate\Support\ServiceProvider|null
  543. * @static
  544. */
  545. public static function getProvider($provider)
  546. {
  547. /** @var \Illuminate\Foundation\Application $instance */
  548. return $instance->getProvider($provider);
  549. }
  550. /**
  551. * Get the registered service provider instances if any exist.
  552. *
  553. * @param \Illuminate\Support\ServiceProvider|string $provider
  554. * @return array
  555. * @static
  556. */
  557. public static function getProviders($provider)
  558. {
  559. /** @var \Illuminate\Foundation\Application $instance */
  560. return $instance->getProviders($provider);
  561. }
  562. /**
  563. * Resolve a service provider instance from the class name.
  564. *
  565. * @param string $provider
  566. * @return \Illuminate\Support\ServiceProvider
  567. * @static
  568. */
  569. public static function resolveProvider($provider)
  570. {
  571. /** @var \Illuminate\Foundation\Application $instance */
  572. return $instance->resolveProvider($provider);
  573. }
  574. /**
  575. * Load and boot all of the remaining deferred providers.
  576. *
  577. * @return void
  578. * @static
  579. */
  580. public static function loadDeferredProviders()
  581. {
  582. /** @var \Illuminate\Foundation\Application $instance */
  583. $instance->loadDeferredProviders();
  584. }
  585. /**
  586. * Load the provider for a deferred service.
  587. *
  588. * @param string $service
  589. * @return void
  590. * @static
  591. */
  592. public static function loadDeferredProvider($service)
  593. {
  594. /** @var \Illuminate\Foundation\Application $instance */
  595. $instance->loadDeferredProvider($service);
  596. }
  597. /**
  598. * Register a deferred provider and service.
  599. *
  600. * @param string $provider
  601. * @param string|null $service
  602. * @return void
  603. * @static
  604. */
  605. public static function registerDeferredProvider($provider, $service = null)
  606. {
  607. /** @var \Illuminate\Foundation\Application $instance */
  608. $instance->registerDeferredProvider($provider, $service);
  609. }
  610. /**
  611. * Resolve the given type from the container.
  612. *
  613. * @template TClass of object
  614. * @param string|class-string<TClass> $abstract
  615. * @param array $parameters
  616. * @return ($abstract is class-string<TClass> ? TClass : mixed)
  617. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  618. * @static
  619. */
  620. public static function make($abstract, $parameters = [])
  621. {
  622. /** @var \Illuminate\Foundation\Application $instance */
  623. return $instance->make($abstract, $parameters);
  624. }
  625. /**
  626. * Determine if the given abstract type has been bound.
  627. *
  628. * @param string $abstract
  629. * @return bool
  630. * @static
  631. */
  632. public static function bound($abstract)
  633. {
  634. /** @var \Illuminate\Foundation\Application $instance */
  635. return $instance->bound($abstract);
  636. }
  637. /**
  638. * Determine if the application has booted.
  639. *
  640. * @return bool
  641. * @static
  642. */
  643. public static function isBooted()
  644. {
  645. /** @var \Illuminate\Foundation\Application $instance */
  646. return $instance->isBooted();
  647. }
  648. /**
  649. * Boot the application's service providers.
  650. *
  651. * @return void
  652. * @static
  653. */
  654. public static function boot()
  655. {
  656. /** @var \Illuminate\Foundation\Application $instance */
  657. $instance->boot();
  658. }
  659. /**
  660. * Register a new boot listener.
  661. *
  662. * @param callable $callback
  663. * @return void
  664. * @static
  665. */
  666. public static function booting($callback)
  667. {
  668. /** @var \Illuminate\Foundation\Application $instance */
  669. $instance->booting($callback);
  670. }
  671. /**
  672. * Register a new "booted" listener.
  673. *
  674. * @param callable $callback
  675. * @return void
  676. * @static
  677. */
  678. public static function booted($callback)
  679. {
  680. /** @var \Illuminate\Foundation\Application $instance */
  681. $instance->booted($callback);
  682. }
  683. /**
  684. * {@inheritdoc}
  685. *
  686. * @return \Symfony\Component\HttpFoundation\Response
  687. * @static
  688. */
  689. public static function handle($request, $type = 1, $catch = true)
  690. {
  691. /** @var \Illuminate\Foundation\Application $instance */
  692. return $instance->handle($request, $type, $catch);
  693. }
  694. /**
  695. * Handle the incoming HTTP request and send the response to the browser.
  696. *
  697. * @param \Illuminate\Http\Request $request
  698. * @return void
  699. * @static
  700. */
  701. public static function handleRequest($request)
  702. {
  703. /** @var \Illuminate\Foundation\Application $instance */
  704. $instance->handleRequest($request);
  705. }
  706. /**
  707. * Handle the incoming Artisan command.
  708. *
  709. * @param \Symfony\Component\Console\Input\InputInterface $input
  710. * @return int
  711. * @static
  712. */
  713. public static function handleCommand($input)
  714. {
  715. /** @var \Illuminate\Foundation\Application $instance */
  716. return $instance->handleCommand($input);
  717. }
  718. /**
  719. * Determine if the framework's base configuration should be merged.
  720. *
  721. * @return bool
  722. * @static
  723. */
  724. public static function shouldMergeFrameworkConfiguration()
  725. {
  726. /** @var \Illuminate\Foundation\Application $instance */
  727. return $instance->shouldMergeFrameworkConfiguration();
  728. }
  729. /**
  730. * Indicate that the framework's base configuration should not be merged.
  731. *
  732. * @return \Illuminate\Foundation\Application
  733. * @static
  734. */
  735. public static function dontMergeFrameworkConfiguration()
  736. {
  737. /** @var \Illuminate\Foundation\Application $instance */
  738. return $instance->dontMergeFrameworkConfiguration();
  739. }
  740. /**
  741. * Determine if middleware has been disabled for the application.
  742. *
  743. * @return bool
  744. * @static
  745. */
  746. public static function shouldSkipMiddleware()
  747. {
  748. /** @var \Illuminate\Foundation\Application $instance */
  749. return $instance->shouldSkipMiddleware();
  750. }
  751. /**
  752. * Get the path to the cached services.php file.
  753. *
  754. * @return string
  755. * @static
  756. */
  757. public static function getCachedServicesPath()
  758. {
  759. /** @var \Illuminate\Foundation\Application $instance */
  760. return $instance->getCachedServicesPath();
  761. }
  762. /**
  763. * Get the path to the cached packages.php file.
  764. *
  765. * @return string
  766. * @static
  767. */
  768. public static function getCachedPackagesPath()
  769. {
  770. /** @var \Illuminate\Foundation\Application $instance */
  771. return $instance->getCachedPackagesPath();
  772. }
  773. /**
  774. * Determine if the application configuration is cached.
  775. *
  776. * @return bool
  777. * @static
  778. */
  779. public static function configurationIsCached()
  780. {
  781. /** @var \Illuminate\Foundation\Application $instance */
  782. return $instance->configurationIsCached();
  783. }
  784. /**
  785. * Get the path to the configuration cache file.
  786. *
  787. * @return string
  788. * @static
  789. */
  790. public static function getCachedConfigPath()
  791. {
  792. /** @var \Illuminate\Foundation\Application $instance */
  793. return $instance->getCachedConfigPath();
  794. }
  795. /**
  796. * Determine if the application routes are cached.
  797. *
  798. * @return bool
  799. * @static
  800. */
  801. public static function routesAreCached()
  802. {
  803. /** @var \Illuminate\Foundation\Application $instance */
  804. return $instance->routesAreCached();
  805. }
  806. /**
  807. * Get the path to the routes cache file.
  808. *
  809. * @return string
  810. * @static
  811. */
  812. public static function getCachedRoutesPath()
  813. {
  814. /** @var \Illuminate\Foundation\Application $instance */
  815. return $instance->getCachedRoutesPath();
  816. }
  817. /**
  818. * Determine if the application events are cached.
  819. *
  820. * @return bool
  821. * @static
  822. */
  823. public static function eventsAreCached()
  824. {
  825. /** @var \Illuminate\Foundation\Application $instance */
  826. return $instance->eventsAreCached();
  827. }
  828. /**
  829. * Get the path to the events cache file.
  830. *
  831. * @return string
  832. * @static
  833. */
  834. public static function getCachedEventsPath()
  835. {
  836. /** @var \Illuminate\Foundation\Application $instance */
  837. return $instance->getCachedEventsPath();
  838. }
  839. /**
  840. * Add new prefix to list of absolute path prefixes.
  841. *
  842. * @param string $prefix
  843. * @return \Illuminate\Foundation\Application
  844. * @static
  845. */
  846. public static function addAbsoluteCachePathPrefix($prefix)
  847. {
  848. /** @var \Illuminate\Foundation\Application $instance */
  849. return $instance->addAbsoluteCachePathPrefix($prefix);
  850. }
  851. /**
  852. * Get an instance of the maintenance mode manager implementation.
  853. *
  854. * @return \Illuminate\Contracts\Foundation\MaintenanceMode
  855. * @static
  856. */
  857. public static function maintenanceMode()
  858. {
  859. /** @var \Illuminate\Foundation\Application $instance */
  860. return $instance->maintenanceMode();
  861. }
  862. /**
  863. * Determine if the application is currently down for maintenance.
  864. *
  865. * @return bool
  866. * @static
  867. */
  868. public static function isDownForMaintenance()
  869. {
  870. /** @var \Illuminate\Foundation\Application $instance */
  871. return $instance->isDownForMaintenance();
  872. }
  873. /**
  874. * Throw an HttpException with the given data.
  875. *
  876. * @param int $code
  877. * @param string $message
  878. * @param array $headers
  879. * @return never
  880. * @throws \Symfony\Component\HttpKernel\Exception\HttpException
  881. * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  882. * @static
  883. */
  884. public static function abort($code, $message = '', $headers = [])
  885. {
  886. /** @var \Illuminate\Foundation\Application $instance */
  887. return $instance->abort($code, $message, $headers);
  888. }
  889. /**
  890. * Register a terminating callback with the application.
  891. *
  892. * @param callable|string $callback
  893. * @return \Illuminate\Foundation\Application
  894. * @static
  895. */
  896. public static function terminating($callback)
  897. {
  898. /** @var \Illuminate\Foundation\Application $instance */
  899. return $instance->terminating($callback);
  900. }
  901. /**
  902. * Terminate the application.
  903. *
  904. * @return void
  905. * @static
  906. */
  907. public static function terminate()
  908. {
  909. /** @var \Illuminate\Foundation\Application $instance */
  910. $instance->terminate();
  911. }
  912. /**
  913. * Get the service providers that have been loaded.
  914. *
  915. * @return array<string, bool>
  916. * @static
  917. */
  918. public static function getLoadedProviders()
  919. {
  920. /** @var \Illuminate\Foundation\Application $instance */
  921. return $instance->getLoadedProviders();
  922. }
  923. /**
  924. * Determine if the given service provider is loaded.
  925. *
  926. * @param string $provider
  927. * @return bool
  928. * @static
  929. */
  930. public static function providerIsLoaded($provider)
  931. {
  932. /** @var \Illuminate\Foundation\Application $instance */
  933. return $instance->providerIsLoaded($provider);
  934. }
  935. /**
  936. * Get the application's deferred services.
  937. *
  938. * @return array
  939. * @static
  940. */
  941. public static function getDeferredServices()
  942. {
  943. /** @var \Illuminate\Foundation\Application $instance */
  944. return $instance->getDeferredServices();
  945. }
  946. /**
  947. * Set the application's deferred services.
  948. *
  949. * @param array $services
  950. * @return void
  951. * @static
  952. */
  953. public static function setDeferredServices($services)
  954. {
  955. /** @var \Illuminate\Foundation\Application $instance */
  956. $instance->setDeferredServices($services);
  957. }
  958. /**
  959. * Determine if the given service is a deferred service.
  960. *
  961. * @param string $service
  962. * @return bool
  963. * @static
  964. */
  965. public static function isDeferredService($service)
  966. {
  967. /** @var \Illuminate\Foundation\Application $instance */
  968. return $instance->isDeferredService($service);
  969. }
  970. /**
  971. * Add an array of services to the application's deferred services.
  972. *
  973. * @param array $services
  974. * @return void
  975. * @static
  976. */
  977. public static function addDeferredServices($services)
  978. {
  979. /** @var \Illuminate\Foundation\Application $instance */
  980. $instance->addDeferredServices($services);
  981. }
  982. /**
  983. * Remove an array of services from the application's deferred services.
  984. *
  985. * @param array $services
  986. * @return void
  987. * @static
  988. */
  989. public static function removeDeferredServices($services)
  990. {
  991. /** @var \Illuminate\Foundation\Application $instance */
  992. $instance->removeDeferredServices($services);
  993. }
  994. /**
  995. * Configure the real-time facade namespace.
  996. *
  997. * @param string $namespace
  998. * @return void
  999. * @static
  1000. */
  1001. public static function provideFacades($namespace)
  1002. {
  1003. /** @var \Illuminate\Foundation\Application $instance */
  1004. $instance->provideFacades($namespace);
  1005. }
  1006. /**
  1007. * Get the current application locale.
  1008. *
  1009. * @return string
  1010. * @static
  1011. */
  1012. public static function getLocale()
  1013. {
  1014. /** @var \Illuminate\Foundation\Application $instance */
  1015. return $instance->getLocale();
  1016. }
  1017. /**
  1018. * Get the current application locale.
  1019. *
  1020. * @return string
  1021. * @static
  1022. */
  1023. public static function currentLocale()
  1024. {
  1025. /** @var \Illuminate\Foundation\Application $instance */
  1026. return $instance->currentLocale();
  1027. }
  1028. /**
  1029. * Get the current application fallback locale.
  1030. *
  1031. * @return string
  1032. * @static
  1033. */
  1034. public static function getFallbackLocale()
  1035. {
  1036. /** @var \Illuminate\Foundation\Application $instance */
  1037. return $instance->getFallbackLocale();
  1038. }
  1039. /**
  1040. * Set the current application locale.
  1041. *
  1042. * @param string $locale
  1043. * @return void
  1044. * @static
  1045. */
  1046. public static function setLocale($locale)
  1047. {
  1048. /** @var \Illuminate\Foundation\Application $instance */
  1049. $instance->setLocale($locale);
  1050. }
  1051. /**
  1052. * Set the current application fallback locale.
  1053. *
  1054. * @param string $fallbackLocale
  1055. * @return void
  1056. * @static
  1057. */
  1058. public static function setFallbackLocale($fallbackLocale)
  1059. {
  1060. /** @var \Illuminate\Foundation\Application $instance */
  1061. $instance->setFallbackLocale($fallbackLocale);
  1062. }
  1063. /**
  1064. * Determine if the application locale is the given locale.
  1065. *
  1066. * @param string $locale
  1067. * @return bool
  1068. * @static
  1069. */
  1070. public static function isLocale($locale)
  1071. {
  1072. /** @var \Illuminate\Foundation\Application $instance */
  1073. return $instance->isLocale($locale);
  1074. }
  1075. /**
  1076. * Register the core class aliases in the container.
  1077. *
  1078. * @return void
  1079. * @static
  1080. */
  1081. public static function registerCoreContainerAliases()
  1082. {
  1083. /** @var \Illuminate\Foundation\Application $instance */
  1084. $instance->registerCoreContainerAliases();
  1085. }
  1086. /**
  1087. * Flush the container of all bindings and resolved instances.
  1088. *
  1089. * @return void
  1090. * @static
  1091. */
  1092. public static function flush()
  1093. {
  1094. /** @var \Illuminate\Foundation\Application $instance */
  1095. $instance->flush();
  1096. }
  1097. /**
  1098. * Get the application namespace.
  1099. *
  1100. * @return string
  1101. * @throws \RuntimeException
  1102. * @static
  1103. */
  1104. public static function getNamespace()
  1105. {
  1106. /** @var \Illuminate\Foundation\Application $instance */
  1107. return $instance->getNamespace();
  1108. }
  1109. /**
  1110. * Define a contextual binding.
  1111. *
  1112. * @param array|string $concrete
  1113. * @return \Illuminate\Contracts\Container\ContextualBindingBuilder
  1114. * @static
  1115. */
  1116. public static function when($concrete)
  1117. {
  1118. //Method inherited from \Illuminate\Container\Container
  1119. /** @var \Illuminate\Foundation\Application $instance */
  1120. return $instance->when($concrete);
  1121. }
  1122. /**
  1123. * Define a contextual binding based on an attribute.
  1124. *
  1125. * @param string $attribute
  1126. * @param \Closure $handler
  1127. * @return void
  1128. * @static
  1129. */
  1130. public static function whenHasAttribute($attribute, $handler)
  1131. {
  1132. //Method inherited from \Illuminate\Container\Container
  1133. /** @var \Illuminate\Foundation\Application $instance */
  1134. $instance->whenHasAttribute($attribute, $handler);
  1135. }
  1136. /**
  1137. * Returns true if the container can return an entry for the given identifier.
  1138. *
  1139. * Returns false otherwise.
  1140. *
  1141. * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
  1142. * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
  1143. *
  1144. * @return bool
  1145. * @param string $id Identifier of the entry to look for.
  1146. * @return bool
  1147. * @static
  1148. */
  1149. public static function has($id)
  1150. {
  1151. //Method inherited from \Illuminate\Container\Container
  1152. /** @var \Illuminate\Foundation\Application $instance */
  1153. return $instance->has($id);
  1154. }
  1155. /**
  1156. * Determine if the given abstract type has been resolved.
  1157. *
  1158. * @param string $abstract
  1159. * @return bool
  1160. * @static
  1161. */
  1162. public static function resolved($abstract)
  1163. {
  1164. //Method inherited from \Illuminate\Container\Container
  1165. /** @var \Illuminate\Foundation\Application $instance */
  1166. return $instance->resolved($abstract);
  1167. }
  1168. /**
  1169. * Determine if a given type is shared.
  1170. *
  1171. * @param string $abstract
  1172. * @return bool
  1173. * @static
  1174. */
  1175. public static function isShared($abstract)
  1176. {
  1177. //Method inherited from \Illuminate\Container\Container
  1178. /** @var \Illuminate\Foundation\Application $instance */
  1179. return $instance->isShared($abstract);
  1180. }
  1181. /**
  1182. * Determine if a given string is an alias.
  1183. *
  1184. * @param string $name
  1185. * @return bool
  1186. * @static
  1187. */
  1188. public static function isAlias($name)
  1189. {
  1190. //Method inherited from \Illuminate\Container\Container
  1191. /** @var \Illuminate\Foundation\Application $instance */
  1192. return $instance->isAlias($name);
  1193. }
  1194. /**
  1195. * Register a binding with the container.
  1196. *
  1197. * @param \Closure|string $abstract
  1198. * @param \Closure|string|null $concrete
  1199. * @param bool $shared
  1200. * @return void
  1201. * @throws \TypeError
  1202. * @throws ReflectionException
  1203. * @static
  1204. */
  1205. public static function bind($abstract, $concrete = null, $shared = false)
  1206. {
  1207. //Method inherited from \Illuminate\Container\Container
  1208. /** @var \Illuminate\Foundation\Application $instance */
  1209. $instance->bind($abstract, $concrete, $shared);
  1210. }
  1211. /**
  1212. * Determine if the container has a method binding.
  1213. *
  1214. * @param string $method
  1215. * @return bool
  1216. * @static
  1217. */
  1218. public static function hasMethodBinding($method)
  1219. {
  1220. //Method inherited from \Illuminate\Container\Container
  1221. /** @var \Illuminate\Foundation\Application $instance */
  1222. return $instance->hasMethodBinding($method);
  1223. }
  1224. /**
  1225. * Bind a callback to resolve with Container::call.
  1226. *
  1227. * @param array|string $method
  1228. * @param \Closure $callback
  1229. * @return void
  1230. * @static
  1231. */
  1232. public static function bindMethod($method, $callback)
  1233. {
  1234. //Method inherited from \Illuminate\Container\Container
  1235. /** @var \Illuminate\Foundation\Application $instance */
  1236. $instance->bindMethod($method, $callback);
  1237. }
  1238. /**
  1239. * Get the method binding for the given method.
  1240. *
  1241. * @param string $method
  1242. * @param mixed $instance
  1243. * @return mixed
  1244. * @static
  1245. */
  1246. public static function callMethodBinding($method, $instance)
  1247. {
  1248. //Method inherited from \Illuminate\Container\Container
  1249. /** @var \Illuminate\Foundation\Application $instance */
  1250. return $instance->callMethodBinding($method, $instance);
  1251. }
  1252. /**
  1253. * Add a contextual binding to the container.
  1254. *
  1255. * @param string $concrete
  1256. * @param \Closure|string $abstract
  1257. * @param \Closure|string $implementation
  1258. * @return void
  1259. * @static
  1260. */
  1261. public static function addContextualBinding($concrete, $abstract, $implementation)
  1262. {
  1263. //Method inherited from \Illuminate\Container\Container
  1264. /** @var \Illuminate\Foundation\Application $instance */
  1265. $instance->addContextualBinding($concrete, $abstract, $implementation);
  1266. }
  1267. /**
  1268. * Register a binding if it hasn't already been registered.
  1269. *
  1270. * @param \Closure|string $abstract
  1271. * @param \Closure|string|null $concrete
  1272. * @param bool $shared
  1273. * @return void
  1274. * @static
  1275. */
  1276. public static function bindIf($abstract, $concrete = null, $shared = false)
  1277. {
  1278. //Method inherited from \Illuminate\Container\Container
  1279. /** @var \Illuminate\Foundation\Application $instance */
  1280. $instance->bindIf($abstract, $concrete, $shared);
  1281. }
  1282. /**
  1283. * Register a shared binding in the container.
  1284. *
  1285. * @param \Closure|string $abstract
  1286. * @param \Closure|string|null $concrete
  1287. * @return void
  1288. * @static
  1289. */
  1290. public static function singleton($abstract, $concrete = null)
  1291. {
  1292. //Method inherited from \Illuminate\Container\Container
  1293. /** @var \Illuminate\Foundation\Application $instance */
  1294. $instance->singleton($abstract, $concrete);
  1295. }
  1296. /**
  1297. * Register a shared binding if it hasn't already been registered.
  1298. *
  1299. * @param \Closure|string $abstract
  1300. * @param \Closure|string|null $concrete
  1301. * @return void
  1302. * @static
  1303. */
  1304. public static function singletonIf($abstract, $concrete = null)
  1305. {
  1306. //Method inherited from \Illuminate\Container\Container
  1307. /** @var \Illuminate\Foundation\Application $instance */
  1308. $instance->singletonIf($abstract, $concrete);
  1309. }
  1310. /**
  1311. * Register a scoped binding in the container.
  1312. *
  1313. * @param \Closure|string $abstract
  1314. * @param \Closure|string|null $concrete
  1315. * @return void
  1316. * @static
  1317. */
  1318. public static function scoped($abstract, $concrete = null)
  1319. {
  1320. //Method inherited from \Illuminate\Container\Container
  1321. /** @var \Illuminate\Foundation\Application $instance */
  1322. $instance->scoped($abstract, $concrete);
  1323. }
  1324. /**
  1325. * Register a scoped binding if it hasn't already been registered.
  1326. *
  1327. * @param \Closure|string $abstract
  1328. * @param \Closure|string|null $concrete
  1329. * @return void
  1330. * @static
  1331. */
  1332. public static function scopedIf($abstract, $concrete = null)
  1333. {
  1334. //Method inherited from \Illuminate\Container\Container
  1335. /** @var \Illuminate\Foundation\Application $instance */
  1336. $instance->scopedIf($abstract, $concrete);
  1337. }
  1338. /**
  1339. * "Extend" an abstract type in the container.
  1340. *
  1341. * @param string $abstract
  1342. * @param \Closure $closure
  1343. * @return void
  1344. * @throws \InvalidArgumentException
  1345. * @static
  1346. */
  1347. public static function extend($abstract, $closure)
  1348. {
  1349. //Method inherited from \Illuminate\Container\Container
  1350. /** @var \Illuminate\Foundation\Application $instance */
  1351. $instance->extend($abstract, $closure);
  1352. }
  1353. /**
  1354. * Register an existing instance as shared in the container.
  1355. *
  1356. * @template TInstance of mixed
  1357. * @param string $abstract
  1358. * @param TInstance $instance
  1359. * @return TInstance
  1360. * @static
  1361. */
  1362. public static function instance($abstract, $instance)
  1363. {
  1364. //Method inherited from \Illuminate\Container\Container
  1365. /** @var \Illuminate\Foundation\Application $instance */
  1366. return $instance->instance($abstract, $instance);
  1367. }
  1368. /**
  1369. * Assign a set of tags to a given binding.
  1370. *
  1371. * @param array|string $abstracts
  1372. * @param array|mixed $tags
  1373. * @return void
  1374. * @static
  1375. */
  1376. public static function tag($abstracts, $tags)
  1377. {
  1378. //Method inherited from \Illuminate\Container\Container
  1379. /** @var \Illuminate\Foundation\Application $instance */
  1380. $instance->tag($abstracts, $tags);
  1381. }
  1382. /**
  1383. * Resolve all of the bindings for a given tag.
  1384. *
  1385. * @param string $tag
  1386. * @return iterable
  1387. * @static
  1388. */
  1389. public static function tagged($tag)
  1390. {
  1391. //Method inherited from \Illuminate\Container\Container
  1392. /** @var \Illuminate\Foundation\Application $instance */
  1393. return $instance->tagged($tag);
  1394. }
  1395. /**
  1396. * Alias a type to a different name.
  1397. *
  1398. * @param string $abstract
  1399. * @param string $alias
  1400. * @return void
  1401. * @throws \LogicException
  1402. * @static
  1403. */
  1404. public static function alias($abstract, $alias)
  1405. {
  1406. //Method inherited from \Illuminate\Container\Container
  1407. /** @var \Illuminate\Foundation\Application $instance */
  1408. $instance->alias($abstract, $alias);
  1409. }
  1410. /**
  1411. * Bind a new callback to an abstract's rebind event.
  1412. *
  1413. * @param string $abstract
  1414. * @param \Closure $callback
  1415. * @return mixed
  1416. * @static
  1417. */
  1418. public static function rebinding($abstract, $callback)
  1419. {
  1420. //Method inherited from \Illuminate\Container\Container
  1421. /** @var \Illuminate\Foundation\Application $instance */
  1422. return $instance->rebinding($abstract, $callback);
  1423. }
  1424. /**
  1425. * Refresh an instance on the given target and method.
  1426. *
  1427. * @param string $abstract
  1428. * @param mixed $target
  1429. * @param string $method
  1430. * @return mixed
  1431. * @static
  1432. */
  1433. public static function refresh($abstract, $target, $method)
  1434. {
  1435. //Method inherited from \Illuminate\Container\Container
  1436. /** @var \Illuminate\Foundation\Application $instance */
  1437. return $instance->refresh($abstract, $target, $method);
  1438. }
  1439. /**
  1440. * Wrap the given closure such that its dependencies will be injected when executed.
  1441. *
  1442. * @param \Closure $callback
  1443. * @param array $parameters
  1444. * @return \Closure
  1445. * @static
  1446. */
  1447. public static function wrap($callback, $parameters = [])
  1448. {
  1449. //Method inherited from \Illuminate\Container\Container
  1450. /** @var \Illuminate\Foundation\Application $instance */
  1451. return $instance->wrap($callback, $parameters);
  1452. }
  1453. /**
  1454. * Call the given Closure / class@method and inject its dependencies.
  1455. *
  1456. * @param callable|string $callback
  1457. * @param array<string, mixed> $parameters
  1458. * @param string|null $defaultMethod
  1459. * @return mixed
  1460. * @throws \InvalidArgumentException
  1461. * @static
  1462. */
  1463. public static function call($callback, $parameters = [], $defaultMethod = null)
  1464. {
  1465. //Method inherited from \Illuminate\Container\Container
  1466. /** @var \Illuminate\Foundation\Application $instance */
  1467. return $instance->call($callback, $parameters, $defaultMethod);
  1468. }
  1469. /**
  1470. * Get a closure to resolve the given type from the container.
  1471. *
  1472. * @template TClass of object
  1473. * @param string|class-string<TClass> $abstract
  1474. * @return ($abstract is class-string<TClass> ? \Closure(): TClass : \Closure(): mixed)
  1475. * @static
  1476. */
  1477. public static function factory($abstract)
  1478. {
  1479. //Method inherited from \Illuminate\Container\Container
  1480. /** @var \Illuminate\Foundation\Application $instance */
  1481. return $instance->factory($abstract);
  1482. }
  1483. /**
  1484. * An alias function name for make().
  1485. *
  1486. * @template TClass of object
  1487. * @param string|class-string<TClass>|callable $abstract
  1488. * @param array $parameters
  1489. * @return ($abstract is class-string<TClass> ? TClass : mixed)
  1490. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  1491. * @static
  1492. */
  1493. public static function makeWith($abstract, $parameters = [])
  1494. {
  1495. //Method inherited from \Illuminate\Container\Container
  1496. /** @var \Illuminate\Foundation\Application $instance */
  1497. return $instance->makeWith($abstract, $parameters);
  1498. }
  1499. /**
  1500. * {@inheritdoc}
  1501. *
  1502. * @template TClass of object
  1503. * @param string|class-string<TClass> $id
  1504. * @return ($id is class-string<TClass> ? TClass : mixed)
  1505. * @static
  1506. */
  1507. public static function get($id)
  1508. {
  1509. //Method inherited from \Illuminate\Container\Container
  1510. /** @var \Illuminate\Foundation\Application $instance */
  1511. return $instance->get($id);
  1512. }
  1513. /**
  1514. * Instantiate a concrete instance of the given type.
  1515. *
  1516. * @template TClass of object
  1517. * @param \Closure(static, array): TClass|class-string<TClass> $concrete
  1518. * @return TClass
  1519. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  1520. * @throws \Illuminate\Contracts\Container\CircularDependencyException
  1521. * @static
  1522. */
  1523. public static function build($concrete)
  1524. {
  1525. //Method inherited from \Illuminate\Container\Container
  1526. /** @var \Illuminate\Foundation\Application $instance */
  1527. return $instance->build($concrete);
  1528. }
  1529. /**
  1530. * Resolve a dependency based on an attribute.
  1531. *
  1532. * @param \ReflectionAttribute $attribute
  1533. * @return mixed
  1534. * @static
  1535. */
  1536. public static function resolveFromAttribute($attribute)
  1537. {
  1538. //Method inherited from \Illuminate\Container\Container
  1539. /** @var \Illuminate\Foundation\Application $instance */
  1540. return $instance->resolveFromAttribute($attribute);
  1541. }
  1542. /**
  1543. * Register a new before resolving callback for all types.
  1544. *
  1545. * @param \Closure|string $abstract
  1546. * @param \Closure|null $callback
  1547. * @return void
  1548. * @static
  1549. */
  1550. public static function beforeResolving($abstract, $callback = null)
  1551. {
  1552. //Method inherited from \Illuminate\Container\Container
  1553. /** @var \Illuminate\Foundation\Application $instance */
  1554. $instance->beforeResolving($abstract, $callback);
  1555. }
  1556. /**
  1557. * Register a new resolving callback.
  1558. *
  1559. * @param \Closure|string $abstract
  1560. * @param \Closure|null $callback
  1561. * @return void
  1562. * @static
  1563. */
  1564. public static function resolving($abstract, $callback = null)
  1565. {
  1566. //Method inherited from \Illuminate\Container\Container
  1567. /** @var \Illuminate\Foundation\Application $instance */
  1568. $instance->resolving($abstract, $callback);
  1569. }
  1570. /**
  1571. * Register a new after resolving callback for all types.
  1572. *
  1573. * @param \Closure|string $abstract
  1574. * @param \Closure|null $callback
  1575. * @return void
  1576. * @static
  1577. */
  1578. public static function afterResolving($abstract, $callback = null)
  1579. {
  1580. //Method inherited from \Illuminate\Container\Container
  1581. /** @var \Illuminate\Foundation\Application $instance */
  1582. $instance->afterResolving($abstract, $callback);
  1583. }
  1584. /**
  1585. * Register a new after resolving attribute callback for all types.
  1586. *
  1587. * @param string $attribute
  1588. * @param \Closure $callback
  1589. * @return void
  1590. * @static
  1591. */
  1592. public static function afterResolvingAttribute($attribute, $callback)
  1593. {
  1594. //Method inherited from \Illuminate\Container\Container
  1595. /** @var \Illuminate\Foundation\Application $instance */
  1596. $instance->afterResolvingAttribute($attribute, $callback);
  1597. }
  1598. /**
  1599. * Fire all of the after resolving attribute callbacks.
  1600. *
  1601. * @param \ReflectionAttribute[] $attributes
  1602. * @param mixed $object
  1603. * @return void
  1604. * @static
  1605. */
  1606. public static function fireAfterResolvingAttributeCallbacks($attributes, $object)
  1607. {
  1608. //Method inherited from \Illuminate\Container\Container
  1609. /** @var \Illuminate\Foundation\Application $instance */
  1610. $instance->fireAfterResolvingAttributeCallbacks($attributes, $object);
  1611. }
  1612. /**
  1613. * Get the name of the binding the container is currently resolving.
  1614. *
  1615. * @return class-string|string|null
  1616. * @static
  1617. */
  1618. public static function currentlyResolving()
  1619. {
  1620. //Method inherited from \Illuminate\Container\Container
  1621. /** @var \Illuminate\Foundation\Application $instance */
  1622. return $instance->currentlyResolving();
  1623. }
  1624. /**
  1625. * Get the container's bindings.
  1626. *
  1627. * @return array
  1628. * @static
  1629. */
  1630. public static function getBindings()
  1631. {
  1632. //Method inherited from \Illuminate\Container\Container
  1633. /** @var \Illuminate\Foundation\Application $instance */
  1634. return $instance->getBindings();
  1635. }
  1636. /**
  1637. * Get the alias for an abstract if available.
  1638. *
  1639. * @param string $abstract
  1640. * @return string
  1641. * @static
  1642. */
  1643. public static function getAlias($abstract)
  1644. {
  1645. //Method inherited from \Illuminate\Container\Container
  1646. /** @var \Illuminate\Foundation\Application $instance */
  1647. return $instance->getAlias($abstract);
  1648. }
  1649. /**
  1650. * Remove all of the extender callbacks for a given type.
  1651. *
  1652. * @param string $abstract
  1653. * @return void
  1654. * @static
  1655. */
  1656. public static function forgetExtenders($abstract)
  1657. {
  1658. //Method inherited from \Illuminate\Container\Container
  1659. /** @var \Illuminate\Foundation\Application $instance */
  1660. $instance->forgetExtenders($abstract);
  1661. }
  1662. /**
  1663. * Remove a resolved instance from the instance cache.
  1664. *
  1665. * @param string $abstract
  1666. * @return void
  1667. * @static
  1668. */
  1669. public static function forgetInstance($abstract)
  1670. {
  1671. //Method inherited from \Illuminate\Container\Container
  1672. /** @var \Illuminate\Foundation\Application $instance */
  1673. $instance->forgetInstance($abstract);
  1674. }
  1675. /**
  1676. * Clear all of the instances from the container.
  1677. *
  1678. * @return void
  1679. * @static
  1680. */
  1681. public static function forgetInstances()
  1682. {
  1683. //Method inherited from \Illuminate\Container\Container
  1684. /** @var \Illuminate\Foundation\Application $instance */
  1685. $instance->forgetInstances();
  1686. }
  1687. /**
  1688. * Clear all of the scoped instances from the container.
  1689. *
  1690. * @return void
  1691. * @static
  1692. */
  1693. public static function forgetScopedInstances()
  1694. {
  1695. //Method inherited from \Illuminate\Container\Container
  1696. /** @var \Illuminate\Foundation\Application $instance */
  1697. $instance->forgetScopedInstances();
  1698. }
  1699. /**
  1700. * Get the globally available instance of the container.
  1701. *
  1702. * @return static
  1703. * @static
  1704. */
  1705. public static function getInstance()
  1706. {
  1707. //Method inherited from \Illuminate\Container\Container
  1708. return \Illuminate\Foundation\Application::getInstance();
  1709. }
  1710. /**
  1711. * Set the shared instance of the container.
  1712. *
  1713. * @param \Illuminate\Contracts\Container\Container|null $container
  1714. * @return \Illuminate\Contracts\Container\Container|static
  1715. * @static
  1716. */
  1717. public static function setInstance($container = null)
  1718. {
  1719. //Method inherited from \Illuminate\Container\Container
  1720. return \Illuminate\Foundation\Application::setInstance($container);
  1721. }
  1722. /**
  1723. * Determine if a given offset exists.
  1724. *
  1725. * @param string $key
  1726. * @return bool
  1727. * @static
  1728. */
  1729. public static function offsetExists($key)
  1730. {
  1731. //Method inherited from \Illuminate\Container\Container
  1732. /** @var \Illuminate\Foundation\Application $instance */
  1733. return $instance->offsetExists($key);
  1734. }
  1735. /**
  1736. * Get the value at a given offset.
  1737. *
  1738. * @param string $key
  1739. * @return mixed
  1740. * @static
  1741. */
  1742. public static function offsetGet($key)
  1743. {
  1744. //Method inherited from \Illuminate\Container\Container
  1745. /** @var \Illuminate\Foundation\Application $instance */
  1746. return $instance->offsetGet($key);
  1747. }
  1748. /**
  1749. * Set the value at a given offset.
  1750. *
  1751. * @param string $key
  1752. * @param mixed $value
  1753. * @return void
  1754. * @static
  1755. */
  1756. public static function offsetSet($key, $value)
  1757. {
  1758. //Method inherited from \Illuminate\Container\Container
  1759. /** @var \Illuminate\Foundation\Application $instance */
  1760. $instance->offsetSet($key, $value);
  1761. }
  1762. /**
  1763. * Unset the value at a given offset.
  1764. *
  1765. * @param string $key
  1766. * @return void
  1767. * @static
  1768. */
  1769. public static function offsetUnset($key)
  1770. {
  1771. //Method inherited from \Illuminate\Container\Container
  1772. /** @var \Illuminate\Foundation\Application $instance */
  1773. $instance->offsetUnset($key);
  1774. }
  1775. /**
  1776. * Register a custom macro.
  1777. *
  1778. * @param string $name
  1779. * @param object|callable $macro
  1780. * @param-closure-this static $macro
  1781. * @return void
  1782. * @static
  1783. */
  1784. public static function macro($name, $macro)
  1785. {
  1786. \Illuminate\Foundation\Application::macro($name, $macro);
  1787. }
  1788. /**
  1789. * Mix another object into the class.
  1790. *
  1791. * @param object $mixin
  1792. * @param bool $replace
  1793. * @return void
  1794. * @throws \ReflectionException
  1795. * @static
  1796. */
  1797. public static function mixin($mixin, $replace = true)
  1798. {
  1799. \Illuminate\Foundation\Application::mixin($mixin, $replace);
  1800. }
  1801. /**
  1802. * Checks if macro is registered.
  1803. *
  1804. * @param string $name
  1805. * @return bool
  1806. * @static
  1807. */
  1808. public static function hasMacro($name)
  1809. {
  1810. return \Illuminate\Foundation\Application::hasMacro($name);
  1811. }
  1812. /**
  1813. * Flush the existing macros.
  1814. *
  1815. * @return void
  1816. * @static
  1817. */
  1818. public static function flushMacros()
  1819. {
  1820. \Illuminate\Foundation\Application::flushMacros();
  1821. }
  1822. }
  1823. /**
  1824. * @see \Illuminate\Foundation\Console\Kernel
  1825. */
  1826. class Artisan {
  1827. /**
  1828. * Re-route the Symfony command events to their Laravel counterparts.
  1829. *
  1830. * @internal
  1831. * @return \Illuminate\Foundation\Console\Kernel
  1832. * @static
  1833. */
  1834. public static function rerouteSymfonyCommandEvents()
  1835. {
  1836. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1837. return $instance->rerouteSymfonyCommandEvents();
  1838. }
  1839. /**
  1840. * Run the console application.
  1841. *
  1842. * @param \Symfony\Component\Console\Input\InputInterface $input
  1843. * @param \Symfony\Component\Console\Output\OutputInterface|null $output
  1844. * @return int
  1845. * @static
  1846. */
  1847. public static function handle($input, $output = null)
  1848. {
  1849. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1850. return $instance->handle($input, $output);
  1851. }
  1852. /**
  1853. * Terminate the application.
  1854. *
  1855. * @param \Symfony\Component\Console\Input\InputInterface $input
  1856. * @param int $status
  1857. * @return void
  1858. * @static
  1859. */
  1860. public static function terminate($input, $status)
  1861. {
  1862. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1863. $instance->terminate($input, $status);
  1864. }
  1865. /**
  1866. * Register a callback to be invoked when the command lifecycle duration exceeds a given amount of time.
  1867. *
  1868. * @param \DateTimeInterface|\Carbon\CarbonInterval|float|int $threshold
  1869. * @param callable $handler
  1870. * @return void
  1871. * @static
  1872. */
  1873. public static function whenCommandLifecycleIsLongerThan($threshold, $handler)
  1874. {
  1875. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1876. $instance->whenCommandLifecycleIsLongerThan($threshold, $handler);
  1877. }
  1878. /**
  1879. * When the command being handled started.
  1880. *
  1881. * @return \Illuminate\Support\Carbon|null
  1882. * @static
  1883. */
  1884. public static function commandStartedAt()
  1885. {
  1886. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1887. return $instance->commandStartedAt();
  1888. }
  1889. /**
  1890. * Resolve a console schedule instance.
  1891. *
  1892. * @return \Illuminate\Console\Scheduling\Schedule
  1893. * @static
  1894. */
  1895. public static function resolveConsoleSchedule()
  1896. {
  1897. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1898. return $instance->resolveConsoleSchedule();
  1899. }
  1900. /**
  1901. * Register a Closure based command with the application.
  1902. *
  1903. * @param string $signature
  1904. * @param \Closure $callback
  1905. * @return \Illuminate\Foundation\Console\ClosureCommand
  1906. * @static
  1907. */
  1908. public static function command($signature, $callback)
  1909. {
  1910. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1911. return $instance->command($signature, $callback);
  1912. }
  1913. /**
  1914. * Register the given command with the console application.
  1915. *
  1916. * @param \Symfony\Component\Console\Command\Command $command
  1917. * @return void
  1918. * @static
  1919. */
  1920. public static function registerCommand($command)
  1921. {
  1922. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1923. $instance->registerCommand($command);
  1924. }
  1925. /**
  1926. * Run an Artisan console command by name.
  1927. *
  1928. * @param string $command
  1929. * @param array $parameters
  1930. * @param \Symfony\Component\Console\Output\OutputInterface|null $outputBuffer
  1931. * @return int
  1932. * @throws \Symfony\Component\Console\Exception\CommandNotFoundException
  1933. * @static
  1934. */
  1935. public static function call($command, $parameters = [], $outputBuffer = null)
  1936. {
  1937. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1938. return $instance->call($command, $parameters, $outputBuffer);
  1939. }
  1940. /**
  1941. * Queue the given console command.
  1942. *
  1943. * @param string $command
  1944. * @param array $parameters
  1945. * @return \Illuminate\Foundation\Bus\PendingDispatch
  1946. * @static
  1947. */
  1948. public static function queue($command, $parameters = [])
  1949. {
  1950. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1951. return $instance->queue($command, $parameters);
  1952. }
  1953. /**
  1954. * Get all of the commands registered with the console.
  1955. *
  1956. * @return array
  1957. * @static
  1958. */
  1959. public static function all()
  1960. {
  1961. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1962. return $instance->all();
  1963. }
  1964. /**
  1965. * Get the output for the last run command.
  1966. *
  1967. * @return string
  1968. * @static
  1969. */
  1970. public static function output()
  1971. {
  1972. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1973. return $instance->output();
  1974. }
  1975. /**
  1976. * Bootstrap the application for artisan commands.
  1977. *
  1978. * @return void
  1979. * @static
  1980. */
  1981. public static function bootstrap()
  1982. {
  1983. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1984. $instance->bootstrap();
  1985. }
  1986. /**
  1987. * Bootstrap the application without booting service providers.
  1988. *
  1989. * @return void
  1990. * @static
  1991. */
  1992. public static function bootstrapWithoutBootingProviders()
  1993. {
  1994. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1995. $instance->bootstrapWithoutBootingProviders();
  1996. }
  1997. /**
  1998. * Set the Artisan application instance.
  1999. *
  2000. * @param \Illuminate\Console\Application|null $artisan
  2001. * @return void
  2002. * @static
  2003. */
  2004. public static function setArtisan($artisan)
  2005. {
  2006. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2007. $instance->setArtisan($artisan);
  2008. }
  2009. /**
  2010. * Set the Artisan commands provided by the application.
  2011. *
  2012. * @param array $commands
  2013. * @return \Illuminate\Foundation\Console\Kernel
  2014. * @static
  2015. */
  2016. public static function addCommands($commands)
  2017. {
  2018. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2019. return $instance->addCommands($commands);
  2020. }
  2021. /**
  2022. * Set the paths that should have their Artisan commands automatically discovered.
  2023. *
  2024. * @param array $paths
  2025. * @return \Illuminate\Foundation\Console\Kernel
  2026. * @static
  2027. */
  2028. public static function addCommandPaths($paths)
  2029. {
  2030. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2031. return $instance->addCommandPaths($paths);
  2032. }
  2033. /**
  2034. * Set the paths that should have their Artisan "routes" automatically discovered.
  2035. *
  2036. * @param array $paths
  2037. * @return \Illuminate\Foundation\Console\Kernel
  2038. * @static
  2039. */
  2040. public static function addCommandRoutePaths($paths)
  2041. {
  2042. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2043. return $instance->addCommandRoutePaths($paths);
  2044. }
  2045. }
  2046. /**
  2047. * @see \Illuminate\Auth\AuthManager
  2048. * @see \Illuminate\Auth\SessionGuard
  2049. */
  2050. class Auth {
  2051. /**
  2052. * Attempt to get the guard from the local cache.
  2053. *
  2054. * @param string|null $name
  2055. * @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
  2056. * @static
  2057. */
  2058. public static function guard($name = null)
  2059. {
  2060. /** @var \Illuminate\Auth\AuthManager $instance */
  2061. return $instance->guard($name);
  2062. }
  2063. /**
  2064. * Create a session based authentication guard.
  2065. *
  2066. * @param string $name
  2067. * @param array $config
  2068. * @return \Illuminate\Auth\SessionGuard
  2069. * @static
  2070. */
  2071. public static function createSessionDriver($name, $config)
  2072. {
  2073. /** @var \Illuminate\Auth\AuthManager $instance */
  2074. return $instance->createSessionDriver($name, $config);
  2075. }
  2076. /**
  2077. * Create a token based authentication guard.
  2078. *
  2079. * @param string $name
  2080. * @param array $config
  2081. * @return \Illuminate\Auth\TokenGuard
  2082. * @static
  2083. */
  2084. public static function createTokenDriver($name, $config)
  2085. {
  2086. /** @var \Illuminate\Auth\AuthManager $instance */
  2087. return $instance->createTokenDriver($name, $config);
  2088. }
  2089. /**
  2090. * Get the default authentication driver name.
  2091. *
  2092. * @return string
  2093. * @static
  2094. */
  2095. public static function getDefaultDriver()
  2096. {
  2097. /** @var \Illuminate\Auth\AuthManager $instance */
  2098. return $instance->getDefaultDriver();
  2099. }
  2100. /**
  2101. * Set the default guard driver the factory should serve.
  2102. *
  2103. * @param string $name
  2104. * @return void
  2105. * @static
  2106. */
  2107. public static function shouldUse($name)
  2108. {
  2109. /** @var \Illuminate\Auth\AuthManager $instance */
  2110. $instance->shouldUse($name);
  2111. }
  2112. /**
  2113. * Set the default authentication driver name.
  2114. *
  2115. * @param string $name
  2116. * @return void
  2117. * @static
  2118. */
  2119. public static function setDefaultDriver($name)
  2120. {
  2121. /** @var \Illuminate\Auth\AuthManager $instance */
  2122. $instance->setDefaultDriver($name);
  2123. }
  2124. /**
  2125. * Register a new callback based request guard.
  2126. *
  2127. * @param string $driver
  2128. * @param callable $callback
  2129. * @return \Illuminate\Auth\AuthManager
  2130. * @static
  2131. */
  2132. public static function viaRequest($driver, $callback)
  2133. {
  2134. /** @var \Illuminate\Auth\AuthManager $instance */
  2135. return $instance->viaRequest($driver, $callback);
  2136. }
  2137. /**
  2138. * Get the user resolver callback.
  2139. *
  2140. * @return \Closure
  2141. * @static
  2142. */
  2143. public static function userResolver()
  2144. {
  2145. /** @var \Illuminate\Auth\AuthManager $instance */
  2146. return $instance->userResolver();
  2147. }
  2148. /**
  2149. * Set the callback to be used to resolve users.
  2150. *
  2151. * @param \Closure $userResolver
  2152. * @return \Illuminate\Auth\AuthManager
  2153. * @static
  2154. */
  2155. public static function resolveUsersUsing($userResolver)
  2156. {
  2157. /** @var \Illuminate\Auth\AuthManager $instance */
  2158. return $instance->resolveUsersUsing($userResolver);
  2159. }
  2160. /**
  2161. * Register a custom driver creator Closure.
  2162. *
  2163. * @param string $driver
  2164. * @param \Closure $callback
  2165. * @return \Illuminate\Auth\AuthManager
  2166. * @static
  2167. */
  2168. public static function extend($driver, $callback)
  2169. {
  2170. /** @var \Illuminate\Auth\AuthManager $instance */
  2171. return $instance->extend($driver, $callback);
  2172. }
  2173. /**
  2174. * Register a custom provider creator Closure.
  2175. *
  2176. * @param string $name
  2177. * @param \Closure $callback
  2178. * @return \Illuminate\Auth\AuthManager
  2179. * @static
  2180. */
  2181. public static function provider($name, $callback)
  2182. {
  2183. /** @var \Illuminate\Auth\AuthManager $instance */
  2184. return $instance->provider($name, $callback);
  2185. }
  2186. /**
  2187. * Determines if any guards have already been resolved.
  2188. *
  2189. * @return bool
  2190. * @static
  2191. */
  2192. public static function hasResolvedGuards()
  2193. {
  2194. /** @var \Illuminate\Auth\AuthManager $instance */
  2195. return $instance->hasResolvedGuards();
  2196. }
  2197. /**
  2198. * Forget all of the resolved guard instances.
  2199. *
  2200. * @return \Illuminate\Auth\AuthManager
  2201. * @static
  2202. */
  2203. public static function forgetGuards()
  2204. {
  2205. /** @var \Illuminate\Auth\AuthManager $instance */
  2206. return $instance->forgetGuards();
  2207. }
  2208. /**
  2209. * Set the application instance used by the manager.
  2210. *
  2211. * @param \Illuminate\Contracts\Foundation\Application $app
  2212. * @return \Illuminate\Auth\AuthManager
  2213. * @static
  2214. */
  2215. public static function setApplication($app)
  2216. {
  2217. /** @var \Illuminate\Auth\AuthManager $instance */
  2218. return $instance->setApplication($app);
  2219. }
  2220. /**
  2221. * Create the user provider implementation for the driver.
  2222. *
  2223. * @param string|null $provider
  2224. * @return \Illuminate\Contracts\Auth\UserProvider|null
  2225. * @throws \InvalidArgumentException
  2226. * @static
  2227. */
  2228. public static function createUserProvider($provider = null)
  2229. {
  2230. /** @var \Illuminate\Auth\AuthManager $instance */
  2231. return $instance->createUserProvider($provider);
  2232. }
  2233. /**
  2234. * Get the default user provider name.
  2235. *
  2236. * @return string
  2237. * @static
  2238. */
  2239. public static function getDefaultUserProvider()
  2240. {
  2241. /** @var \Illuminate\Auth\AuthManager $instance */
  2242. return $instance->getDefaultUserProvider();
  2243. }
  2244. /**
  2245. * Get the currently authenticated user.
  2246. *
  2247. * @return \App\Models\User|null
  2248. * @static
  2249. */
  2250. public static function user()
  2251. {
  2252. /** @var \Illuminate\Auth\SessionGuard $instance */
  2253. return $instance->user();
  2254. }
  2255. /**
  2256. * Get the ID for the currently authenticated user.
  2257. *
  2258. * @return int|string|null
  2259. * @static
  2260. */
  2261. public static function id()
  2262. {
  2263. /** @var \Illuminate\Auth\SessionGuard $instance */
  2264. return $instance->id();
  2265. }
  2266. /**
  2267. * Log a user into the application without sessions or cookies.
  2268. *
  2269. * @param array $credentials
  2270. * @return bool
  2271. * @static
  2272. */
  2273. public static function once($credentials = [])
  2274. {
  2275. /** @var \Illuminate\Auth\SessionGuard $instance */
  2276. return $instance->once($credentials);
  2277. }
  2278. /**
  2279. * Log the given user ID into the application without sessions or cookies.
  2280. *
  2281. * @param mixed $id
  2282. * @return \App\Models\User|false
  2283. * @static
  2284. */
  2285. public static function onceUsingId($id)
  2286. {
  2287. /** @var \Illuminate\Auth\SessionGuard $instance */
  2288. return $instance->onceUsingId($id);
  2289. }
  2290. /**
  2291. * Validate a user's credentials.
  2292. *
  2293. * @param array $credentials
  2294. * @return bool
  2295. * @static
  2296. */
  2297. public static function validate($credentials = [])
  2298. {
  2299. /** @var \Illuminate\Auth\SessionGuard $instance */
  2300. return $instance->validate($credentials);
  2301. }
  2302. /**
  2303. * Attempt to authenticate using HTTP Basic Auth.
  2304. *
  2305. * @param string $field
  2306. * @param array $extraConditions
  2307. * @return \Symfony\Component\HttpFoundation\Response|null
  2308. * @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
  2309. * @static
  2310. */
  2311. public static function basic($field = 'email', $extraConditions = [])
  2312. {
  2313. /** @var \Illuminate\Auth\SessionGuard $instance */
  2314. return $instance->basic($field, $extraConditions);
  2315. }
  2316. /**
  2317. * Perform a stateless HTTP Basic login attempt.
  2318. *
  2319. * @param string $field
  2320. * @param array $extraConditions
  2321. * @return \Symfony\Component\HttpFoundation\Response|null
  2322. * @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
  2323. * @static
  2324. */
  2325. public static function onceBasic($field = 'email', $extraConditions = [])
  2326. {
  2327. /** @var \Illuminate\Auth\SessionGuard $instance */
  2328. return $instance->onceBasic($field, $extraConditions);
  2329. }
  2330. /**
  2331. * Attempt to authenticate a user using the given credentials.
  2332. *
  2333. * @param array $credentials
  2334. * @param bool $remember
  2335. * @return bool
  2336. * @static
  2337. */
  2338. public static function attempt($credentials = [], $remember = false)
  2339. {
  2340. /** @var \Illuminate\Auth\SessionGuard $instance */
  2341. return $instance->attempt($credentials, $remember);
  2342. }
  2343. /**
  2344. * Attempt to authenticate a user with credentials and additional callbacks.
  2345. *
  2346. * @param array $credentials
  2347. * @param array|callable|null $callbacks
  2348. * @param bool $remember
  2349. * @return bool
  2350. * @static
  2351. */
  2352. public static function attemptWhen($credentials = [], $callbacks = null, $remember = false)
  2353. {
  2354. /** @var \Illuminate\Auth\SessionGuard $instance */
  2355. return $instance->attemptWhen($credentials, $callbacks, $remember);
  2356. }
  2357. /**
  2358. * Log the given user ID into the application.
  2359. *
  2360. * @param mixed $id
  2361. * @param bool $remember
  2362. * @return \App\Models\User|false
  2363. * @static
  2364. */
  2365. public static function loginUsingId($id, $remember = false)
  2366. {
  2367. /** @var \Illuminate\Auth\SessionGuard $instance */
  2368. return $instance->loginUsingId($id, $remember);
  2369. }
  2370. /**
  2371. * Log a user into the application.
  2372. *
  2373. * @param \Illuminate\Contracts\Auth\Authenticatable $user
  2374. * @param bool $remember
  2375. * @return void
  2376. * @static
  2377. */
  2378. public static function login($user, $remember = false)
  2379. {
  2380. /** @var \Illuminate\Auth\SessionGuard $instance */
  2381. $instance->login($user, $remember);
  2382. }
  2383. /**
  2384. * Log the user out of the application.
  2385. *
  2386. * @return void
  2387. * @static
  2388. */
  2389. public static function logout()
  2390. {
  2391. /** @var \Illuminate\Auth\SessionGuard $instance */
  2392. $instance->logout();
  2393. }
  2394. /**
  2395. * Log the user out of the application on their current device only.
  2396. *
  2397. * This method does not cycle the "remember" token.
  2398. *
  2399. * @return void
  2400. * @static
  2401. */
  2402. public static function logoutCurrentDevice()
  2403. {
  2404. /** @var \Illuminate\Auth\SessionGuard $instance */
  2405. $instance->logoutCurrentDevice();
  2406. }
  2407. /**
  2408. * Invalidate other sessions for the current user.
  2409. *
  2410. * The application must be using the AuthenticateSession middleware.
  2411. *
  2412. * @param string $password
  2413. * @return \App\Models\User|null
  2414. * @throws \Illuminate\Auth\AuthenticationException
  2415. * @static
  2416. */
  2417. public static function logoutOtherDevices($password)
  2418. {
  2419. /** @var \Illuminate\Auth\SessionGuard $instance */
  2420. return $instance->logoutOtherDevices($password);
  2421. }
  2422. /**
  2423. * Register an authentication attempt event listener.
  2424. *
  2425. * @param mixed $callback
  2426. * @return void
  2427. * @static
  2428. */
  2429. public static function attempting($callback)
  2430. {
  2431. /** @var \Illuminate\Auth\SessionGuard $instance */
  2432. $instance->attempting($callback);
  2433. }
  2434. /**
  2435. * Get the last user we attempted to authenticate.
  2436. *
  2437. * @return \App\Models\User
  2438. * @static
  2439. */
  2440. public static function getLastAttempted()
  2441. {
  2442. /** @var \Illuminate\Auth\SessionGuard $instance */
  2443. return $instance->getLastAttempted();
  2444. }
  2445. /**
  2446. * Get a unique identifier for the auth session value.
  2447. *
  2448. * @return string
  2449. * @static
  2450. */
  2451. public static function getName()
  2452. {
  2453. /** @var \Illuminate\Auth\SessionGuard $instance */
  2454. return $instance->getName();
  2455. }
  2456. /**
  2457. * Get the name of the cookie used to store the "recaller".
  2458. *
  2459. * @return string
  2460. * @static
  2461. */
  2462. public static function getRecallerName()
  2463. {
  2464. /** @var \Illuminate\Auth\SessionGuard $instance */
  2465. return $instance->getRecallerName();
  2466. }
  2467. /**
  2468. * Determine if the user was authenticated via "remember me" cookie.
  2469. *
  2470. * @return bool
  2471. * @static
  2472. */
  2473. public static function viaRemember()
  2474. {
  2475. /** @var \Illuminate\Auth\SessionGuard $instance */
  2476. return $instance->viaRemember();
  2477. }
  2478. /**
  2479. * Set the number of minutes the remember me cookie should be valid for.
  2480. *
  2481. * @param int $minutes
  2482. * @return \Illuminate\Auth\SessionGuard
  2483. * @static
  2484. */
  2485. public static function setRememberDuration($minutes)
  2486. {
  2487. /** @var \Illuminate\Auth\SessionGuard $instance */
  2488. return $instance->setRememberDuration($minutes);
  2489. }
  2490. /**
  2491. * Get the cookie creator instance used by the guard.
  2492. *
  2493. * @return \Illuminate\Contracts\Cookie\QueueingFactory
  2494. * @throws \RuntimeException
  2495. * @static
  2496. */
  2497. public static function getCookieJar()
  2498. {
  2499. /** @var \Illuminate\Auth\SessionGuard $instance */
  2500. return $instance->getCookieJar();
  2501. }
  2502. /**
  2503. * Set the cookie creator instance used by the guard.
  2504. *
  2505. * @param \Illuminate\Contracts\Cookie\QueueingFactory $cookie
  2506. * @return void
  2507. * @static
  2508. */
  2509. public static function setCookieJar($cookie)
  2510. {
  2511. /** @var \Illuminate\Auth\SessionGuard $instance */
  2512. $instance->setCookieJar($cookie);
  2513. }
  2514. /**
  2515. * Get the event dispatcher instance.
  2516. *
  2517. * @return \Illuminate\Contracts\Events\Dispatcher
  2518. * @static
  2519. */
  2520. public static function getDispatcher()
  2521. {
  2522. /** @var \Illuminate\Auth\SessionGuard $instance */
  2523. return $instance->getDispatcher();
  2524. }
  2525. /**
  2526. * Set the event dispatcher instance.
  2527. *
  2528. * @param \Illuminate\Contracts\Events\Dispatcher $events
  2529. * @return void
  2530. * @static
  2531. */
  2532. public static function setDispatcher($events)
  2533. {
  2534. /** @var \Illuminate\Auth\SessionGuard $instance */
  2535. $instance->setDispatcher($events);
  2536. }
  2537. /**
  2538. * Get the session store used by the guard.
  2539. *
  2540. * @return \Illuminate\Contracts\Session\Session
  2541. * @static
  2542. */
  2543. public static function getSession()
  2544. {
  2545. /** @var \Illuminate\Auth\SessionGuard $instance */
  2546. return $instance->getSession();
  2547. }
  2548. /**
  2549. * Return the currently cached user.
  2550. *
  2551. * @return \App\Models\User|null
  2552. * @static
  2553. */
  2554. public static function getUser()
  2555. {
  2556. /** @var \Illuminate\Auth\SessionGuard $instance */
  2557. return $instance->getUser();
  2558. }
  2559. /**
  2560. * Set the current user.
  2561. *
  2562. * @param \Illuminate\Contracts\Auth\Authenticatable $user
  2563. * @return \Illuminate\Auth\SessionGuard
  2564. * @static
  2565. */
  2566. public static function setUser($user)
  2567. {
  2568. /** @var \Illuminate\Auth\SessionGuard $instance */
  2569. return $instance->setUser($user);
  2570. }
  2571. /**
  2572. * Get the current request instance.
  2573. *
  2574. * @return \Symfony\Component\HttpFoundation\Request
  2575. * @static
  2576. */
  2577. public static function getRequest()
  2578. {
  2579. /** @var \Illuminate\Auth\SessionGuard $instance */
  2580. return $instance->getRequest();
  2581. }
  2582. /**
  2583. * Set the current request instance.
  2584. *
  2585. * @param \Symfony\Component\HttpFoundation\Request $request
  2586. * @return \Illuminate\Auth\SessionGuard
  2587. * @static
  2588. */
  2589. public static function setRequest($request)
  2590. {
  2591. /** @var \Illuminate\Auth\SessionGuard $instance */
  2592. return $instance->setRequest($request);
  2593. }
  2594. /**
  2595. * Get the timebox instance used by the guard.
  2596. *
  2597. * @return \Illuminate\Support\Timebox
  2598. * @static
  2599. */
  2600. public static function getTimebox()
  2601. {
  2602. /** @var \Illuminate\Auth\SessionGuard $instance */
  2603. return $instance->getTimebox();
  2604. }
  2605. /**
  2606. * Determine if the current user is authenticated. If not, throw an exception.
  2607. *
  2608. * @return \App\Models\User
  2609. * @throws \Illuminate\Auth\AuthenticationException
  2610. * @static
  2611. */
  2612. public static function authenticate()
  2613. {
  2614. /** @var \Illuminate\Auth\SessionGuard $instance */
  2615. return $instance->authenticate();
  2616. }
  2617. /**
  2618. * Determine if the guard has a user instance.
  2619. *
  2620. * @return bool
  2621. * @static
  2622. */
  2623. public static function hasUser()
  2624. {
  2625. /** @var \Illuminate\Auth\SessionGuard $instance */
  2626. return $instance->hasUser();
  2627. }
  2628. /**
  2629. * Determine if the current user is authenticated.
  2630. *
  2631. * @return bool
  2632. * @static
  2633. */
  2634. public static function check()
  2635. {
  2636. /** @var \Illuminate\Auth\SessionGuard $instance */
  2637. return $instance->check();
  2638. }
  2639. /**
  2640. * Determine if the current user is a guest.
  2641. *
  2642. * @return bool
  2643. * @static
  2644. */
  2645. public static function guest()
  2646. {
  2647. /** @var \Illuminate\Auth\SessionGuard $instance */
  2648. return $instance->guest();
  2649. }
  2650. /**
  2651. * Forget the current user.
  2652. *
  2653. * @return \Illuminate\Auth\SessionGuard
  2654. * @static
  2655. */
  2656. public static function forgetUser()
  2657. {
  2658. /** @var \Illuminate\Auth\SessionGuard $instance */
  2659. return $instance->forgetUser();
  2660. }
  2661. /**
  2662. * Get the user provider used by the guard.
  2663. *
  2664. * @return \Illuminate\Contracts\Auth\UserProvider
  2665. * @static
  2666. */
  2667. public static function getProvider()
  2668. {
  2669. /** @var \Illuminate\Auth\SessionGuard $instance */
  2670. return $instance->getProvider();
  2671. }
  2672. /**
  2673. * Set the user provider used by the guard.
  2674. *
  2675. * @param \Illuminate\Contracts\Auth\UserProvider $provider
  2676. * @return void
  2677. * @static
  2678. */
  2679. public static function setProvider($provider)
  2680. {
  2681. /** @var \Illuminate\Auth\SessionGuard $instance */
  2682. $instance->setProvider($provider);
  2683. }
  2684. /**
  2685. * Register a custom macro.
  2686. *
  2687. * @param string $name
  2688. * @param object|callable $macro
  2689. * @param-closure-this static $macro
  2690. * @return void
  2691. * @static
  2692. */
  2693. public static function macro($name, $macro)
  2694. {
  2695. \Illuminate\Auth\SessionGuard::macro($name, $macro);
  2696. }
  2697. /**
  2698. * Mix another object into the class.
  2699. *
  2700. * @param object $mixin
  2701. * @param bool $replace
  2702. * @return void
  2703. * @throws \ReflectionException
  2704. * @static
  2705. */
  2706. public static function mixin($mixin, $replace = true)
  2707. {
  2708. \Illuminate\Auth\SessionGuard::mixin($mixin, $replace);
  2709. }
  2710. /**
  2711. * Checks if macro is registered.
  2712. *
  2713. * @param string $name
  2714. * @return bool
  2715. * @static
  2716. */
  2717. public static function hasMacro($name)
  2718. {
  2719. return \Illuminate\Auth\SessionGuard::hasMacro($name);
  2720. }
  2721. /**
  2722. * Flush the existing macros.
  2723. *
  2724. * @return void
  2725. * @static
  2726. */
  2727. public static function flushMacros()
  2728. {
  2729. \Illuminate\Auth\SessionGuard::flushMacros();
  2730. }
  2731. }
  2732. /**
  2733. * @see \Illuminate\View\Compilers\BladeCompiler
  2734. */
  2735. class Blade {
  2736. /**
  2737. * Compile the view at the given path.
  2738. *
  2739. * @param string|null $path
  2740. * @return void
  2741. * @static
  2742. */
  2743. public static function compile($path = null)
  2744. {
  2745. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2746. $instance->compile($path);
  2747. }
  2748. /**
  2749. * Get the path currently being compiled.
  2750. *
  2751. * @return string
  2752. * @static
  2753. */
  2754. public static function getPath()
  2755. {
  2756. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2757. return $instance->getPath();
  2758. }
  2759. /**
  2760. * Set the path currently being compiled.
  2761. *
  2762. * @param string $path
  2763. * @return void
  2764. * @static
  2765. */
  2766. public static function setPath($path)
  2767. {
  2768. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2769. $instance->setPath($path);
  2770. }
  2771. /**
  2772. * Compile the given Blade template contents.
  2773. *
  2774. * @param string $value
  2775. * @return string
  2776. * @static
  2777. */
  2778. public static function compileString($value)
  2779. {
  2780. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2781. return $instance->compileString($value);
  2782. }
  2783. /**
  2784. * Evaluate and render a Blade string to HTML.
  2785. *
  2786. * @param string $string
  2787. * @param array $data
  2788. * @param bool $deleteCachedView
  2789. * @return string
  2790. * @static
  2791. */
  2792. public static function render($string, $data = [], $deleteCachedView = false)
  2793. {
  2794. return \Illuminate\View\Compilers\BladeCompiler::render($string, $data, $deleteCachedView);
  2795. }
  2796. /**
  2797. * Render a component instance to HTML.
  2798. *
  2799. * @param \Illuminate\View\Component $component
  2800. * @return string
  2801. * @static
  2802. */
  2803. public static function renderComponent($component)
  2804. {
  2805. return \Illuminate\View\Compilers\BladeCompiler::renderComponent($component);
  2806. }
  2807. /**
  2808. * Strip the parentheses from the given expression.
  2809. *
  2810. * @param string $expression
  2811. * @return string
  2812. * @static
  2813. */
  2814. public static function stripParentheses($expression)
  2815. {
  2816. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2817. return $instance->stripParentheses($expression);
  2818. }
  2819. /**
  2820. * Register a custom Blade compiler.
  2821. *
  2822. * @param callable $compiler
  2823. * @return void
  2824. * @static
  2825. */
  2826. public static function extend($compiler)
  2827. {
  2828. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2829. $instance->extend($compiler);
  2830. }
  2831. /**
  2832. * Get the extensions used by the compiler.
  2833. *
  2834. * @return array
  2835. * @static
  2836. */
  2837. public static function getExtensions()
  2838. {
  2839. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2840. return $instance->getExtensions();
  2841. }
  2842. /**
  2843. * Register an "if" statement directive.
  2844. *
  2845. * @param string $name
  2846. * @param callable $callback
  2847. * @return void
  2848. * @static
  2849. */
  2850. public static function if($name, $callback)
  2851. {
  2852. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2853. $instance->if($name, $callback);
  2854. }
  2855. /**
  2856. * Check the result of a condition.
  2857. *
  2858. * @param string $name
  2859. * @param mixed $parameters
  2860. * @return bool
  2861. * @static
  2862. */
  2863. public static function check($name, ...$parameters)
  2864. {
  2865. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2866. return $instance->check($name, ...$parameters);
  2867. }
  2868. /**
  2869. * Register a class-based component alias directive.
  2870. *
  2871. * @param string $class
  2872. * @param string|null $alias
  2873. * @param string $prefix
  2874. * @return void
  2875. * @static
  2876. */
  2877. public static function component($class, $alias = null, $prefix = '')
  2878. {
  2879. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2880. $instance->component($class, $alias, $prefix);
  2881. }
  2882. /**
  2883. * Register an array of class-based components.
  2884. *
  2885. * @param array $components
  2886. * @param string $prefix
  2887. * @return void
  2888. * @static
  2889. */
  2890. public static function components($components, $prefix = '')
  2891. {
  2892. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2893. $instance->components($components, $prefix);
  2894. }
  2895. /**
  2896. * Get the registered class component aliases.
  2897. *
  2898. * @return array
  2899. * @static
  2900. */
  2901. public static function getClassComponentAliases()
  2902. {
  2903. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2904. return $instance->getClassComponentAliases();
  2905. }
  2906. /**
  2907. * Register a new anonymous component path.
  2908. *
  2909. * @param string $path
  2910. * @param string|null $prefix
  2911. * @return void
  2912. * @static
  2913. */
  2914. public static function anonymousComponentPath($path, $prefix = null)
  2915. {
  2916. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2917. $instance->anonymousComponentPath($path, $prefix);
  2918. }
  2919. /**
  2920. * Register an anonymous component namespace.
  2921. *
  2922. * @param string $directory
  2923. * @param string|null $prefix
  2924. * @return void
  2925. * @static
  2926. */
  2927. public static function anonymousComponentNamespace($directory, $prefix = null)
  2928. {
  2929. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2930. $instance->anonymousComponentNamespace($directory, $prefix);
  2931. }
  2932. /**
  2933. * Register a class-based component namespace.
  2934. *
  2935. * @param string $namespace
  2936. * @param string $prefix
  2937. * @return void
  2938. * @static
  2939. */
  2940. public static function componentNamespace($namespace, $prefix)
  2941. {
  2942. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2943. $instance->componentNamespace($namespace, $prefix);
  2944. }
  2945. /**
  2946. * Get the registered anonymous component paths.
  2947. *
  2948. * @return array
  2949. * @static
  2950. */
  2951. public static function getAnonymousComponentPaths()
  2952. {
  2953. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2954. return $instance->getAnonymousComponentPaths();
  2955. }
  2956. /**
  2957. * Get the registered anonymous component namespaces.
  2958. *
  2959. * @return array
  2960. * @static
  2961. */
  2962. public static function getAnonymousComponentNamespaces()
  2963. {
  2964. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2965. return $instance->getAnonymousComponentNamespaces();
  2966. }
  2967. /**
  2968. * Get the registered class component namespaces.
  2969. *
  2970. * @return array
  2971. * @static
  2972. */
  2973. public static function getClassComponentNamespaces()
  2974. {
  2975. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2976. return $instance->getClassComponentNamespaces();
  2977. }
  2978. /**
  2979. * Register a component alias directive.
  2980. *
  2981. * @param string $path
  2982. * @param string|null $alias
  2983. * @return void
  2984. * @static
  2985. */
  2986. public static function aliasComponent($path, $alias = null)
  2987. {
  2988. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2989. $instance->aliasComponent($path, $alias);
  2990. }
  2991. /**
  2992. * Register an include alias directive.
  2993. *
  2994. * @param string $path
  2995. * @param string|null $alias
  2996. * @return void
  2997. * @static
  2998. */
  2999. public static function include($path, $alias = null)
  3000. {
  3001. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3002. $instance->include($path, $alias);
  3003. }
  3004. /**
  3005. * Register an include alias directive.
  3006. *
  3007. * @param string $path
  3008. * @param string|null $alias
  3009. * @return void
  3010. * @static
  3011. */
  3012. public static function aliasInclude($path, $alias = null)
  3013. {
  3014. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3015. $instance->aliasInclude($path, $alias);
  3016. }
  3017. /**
  3018. * Register a handler for custom directives, binding the handler to the compiler.
  3019. *
  3020. * @param string $name
  3021. * @param callable $handler
  3022. * @return void
  3023. * @throws \InvalidArgumentException
  3024. * @static
  3025. */
  3026. public static function bindDirective($name, $handler)
  3027. {
  3028. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3029. $instance->bindDirective($name, $handler);
  3030. }
  3031. /**
  3032. * Register a handler for custom directives.
  3033. *
  3034. * @param string $name
  3035. * @param callable $handler
  3036. * @param bool $bind
  3037. * @return void
  3038. * @throws \InvalidArgumentException
  3039. * @static
  3040. */
  3041. public static function directive($name, $handler, $bind = false)
  3042. {
  3043. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3044. $instance->directive($name, $handler, $bind);
  3045. }
  3046. /**
  3047. * Get the list of custom directives.
  3048. *
  3049. * @return array
  3050. * @static
  3051. */
  3052. public static function getCustomDirectives()
  3053. {
  3054. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3055. return $instance->getCustomDirectives();
  3056. }
  3057. /**
  3058. * Indicate that the following callable should be used to prepare strings for compilation.
  3059. *
  3060. * @param callable $callback
  3061. * @return \Illuminate\View\Compilers\BladeCompiler
  3062. * @static
  3063. */
  3064. public static function prepareStringsForCompilationUsing($callback)
  3065. {
  3066. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3067. return $instance->prepareStringsForCompilationUsing($callback);
  3068. }
  3069. /**
  3070. * Register a new precompiler.
  3071. *
  3072. * @param callable $precompiler
  3073. * @return void
  3074. * @static
  3075. */
  3076. public static function precompiler($precompiler)
  3077. {
  3078. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3079. $instance->precompiler($precompiler);
  3080. }
  3081. /**
  3082. * Execute the given callback using a custom echo format.
  3083. *
  3084. * @param string $format
  3085. * @param callable $callback
  3086. * @return string
  3087. * @static
  3088. */
  3089. public static function usingEchoFormat($format, $callback)
  3090. {
  3091. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3092. return $instance->usingEchoFormat($format, $callback);
  3093. }
  3094. /**
  3095. * Set the echo format to be used by the compiler.
  3096. *
  3097. * @param string $format
  3098. * @return void
  3099. * @static
  3100. */
  3101. public static function setEchoFormat($format)
  3102. {
  3103. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3104. $instance->setEchoFormat($format);
  3105. }
  3106. /**
  3107. * Set the "echo" format to double encode entities.
  3108. *
  3109. * @return void
  3110. * @static
  3111. */
  3112. public static function withDoubleEncoding()
  3113. {
  3114. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3115. $instance->withDoubleEncoding();
  3116. }
  3117. /**
  3118. * Set the "echo" format to not double encode entities.
  3119. *
  3120. * @return void
  3121. * @static
  3122. */
  3123. public static function withoutDoubleEncoding()
  3124. {
  3125. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3126. $instance->withoutDoubleEncoding();
  3127. }
  3128. /**
  3129. * Indicate that component tags should not be compiled.
  3130. *
  3131. * @return void
  3132. * @static
  3133. */
  3134. public static function withoutComponentTags()
  3135. {
  3136. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3137. $instance->withoutComponentTags();
  3138. }
  3139. /**
  3140. * Get the path to the compiled version of a view.
  3141. *
  3142. * @param string $path
  3143. * @return string
  3144. * @static
  3145. */
  3146. public static function getCompiledPath($path)
  3147. {
  3148. //Method inherited from \Illuminate\View\Compilers\Compiler
  3149. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3150. return $instance->getCompiledPath($path);
  3151. }
  3152. /**
  3153. * Determine if the view at the given path is expired.
  3154. *
  3155. * @param string $path
  3156. * @return bool
  3157. * @throws \ErrorException
  3158. * @static
  3159. */
  3160. public static function isExpired($path)
  3161. {
  3162. //Method inherited from \Illuminate\View\Compilers\Compiler
  3163. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3164. return $instance->isExpired($path);
  3165. }
  3166. /**
  3167. * Get a new component hash for a component name.
  3168. *
  3169. * @param string $component
  3170. * @return string
  3171. * @static
  3172. */
  3173. public static function newComponentHash($component)
  3174. {
  3175. return \Illuminate\View\Compilers\BladeCompiler::newComponentHash($component);
  3176. }
  3177. /**
  3178. * Compile a class component opening.
  3179. *
  3180. * @param string $component
  3181. * @param string $alias
  3182. * @param string $data
  3183. * @param string $hash
  3184. * @return string
  3185. * @static
  3186. */
  3187. public static function compileClassComponentOpening($component, $alias, $data, $hash)
  3188. {
  3189. return \Illuminate\View\Compilers\BladeCompiler::compileClassComponentOpening($component, $alias, $data, $hash);
  3190. }
  3191. /**
  3192. * Compile the end-component statements into valid PHP.
  3193. *
  3194. * @return string
  3195. * @static
  3196. */
  3197. public static function compileEndComponentClass()
  3198. {
  3199. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3200. return $instance->compileEndComponentClass();
  3201. }
  3202. /**
  3203. * Sanitize the given component attribute value.
  3204. *
  3205. * @param mixed $value
  3206. * @return mixed
  3207. * @static
  3208. */
  3209. public static function sanitizeComponentAttribute($value)
  3210. {
  3211. return \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($value);
  3212. }
  3213. /**
  3214. * Compile an end-once block into valid PHP.
  3215. *
  3216. * @return string
  3217. * @static
  3218. */
  3219. public static function compileEndOnce()
  3220. {
  3221. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3222. return $instance->compileEndOnce();
  3223. }
  3224. /**
  3225. * Add a handler to be executed before echoing a given class.
  3226. *
  3227. * @param string|callable $class
  3228. * @param callable|null $handler
  3229. * @return void
  3230. * @static
  3231. */
  3232. public static function stringable($class, $handler = null)
  3233. {
  3234. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3235. $instance->stringable($class, $handler);
  3236. }
  3237. /**
  3238. * Compile Blade echos into valid PHP.
  3239. *
  3240. * @param string $value
  3241. * @return string
  3242. * @static
  3243. */
  3244. public static function compileEchos($value)
  3245. {
  3246. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3247. return $instance->compileEchos($value);
  3248. }
  3249. /**
  3250. * Apply the echo handler for the value if it exists.
  3251. *
  3252. * @param string $value
  3253. * @return string
  3254. * @static
  3255. */
  3256. public static function applyEchoHandler($value)
  3257. {
  3258. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3259. return $instance->applyEchoHandler($value);
  3260. }
  3261. }
  3262. /**
  3263. * @method static mixed auth(\Illuminate\Http\Request $request)
  3264. * @method static mixed validAuthenticationResponse(\Illuminate\Http\Request $request, mixed $result)
  3265. * @method static void broadcast(array $channels, string $event, array $payload = [])
  3266. * @method static array|null resolveAuthenticatedUser(\Illuminate\Http\Request $request)
  3267. * @method static void resolveAuthenticatedUserUsing(\Closure $callback)
  3268. * @method static \Illuminate\Broadcasting\Broadcasters\Broadcaster channel(\Illuminate\Contracts\Broadcasting\HasBroadcastChannel|string $channel, callable|string $callback, array $options = [])
  3269. * @method static \Illuminate\Support\Collection getChannels()
  3270. * @see \Illuminate\Broadcasting\BroadcastManager
  3271. * @see \Illuminate\Broadcasting\Broadcasters\Broadcaster
  3272. */
  3273. class Broadcast {
  3274. /**
  3275. * Register the routes for handling broadcast channel authentication and sockets.
  3276. *
  3277. * @param array|null $attributes
  3278. * @return void
  3279. * @static
  3280. */
  3281. public static function routes($attributes = null)
  3282. {
  3283. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3284. $instance->routes($attributes);
  3285. }
  3286. /**
  3287. * Register the routes for handling broadcast user authentication.
  3288. *
  3289. * @param array|null $attributes
  3290. * @return void
  3291. * @static
  3292. */
  3293. public static function userRoutes($attributes = null)
  3294. {
  3295. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3296. $instance->userRoutes($attributes);
  3297. }
  3298. /**
  3299. * Register the routes for handling broadcast authentication and sockets.
  3300. *
  3301. * Alias of "routes" method.
  3302. *
  3303. * @param array|null $attributes
  3304. * @return void
  3305. * @static
  3306. */
  3307. public static function channelRoutes($attributes = null)
  3308. {
  3309. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3310. $instance->channelRoutes($attributes);
  3311. }
  3312. /**
  3313. * Get the socket ID for the given request.
  3314. *
  3315. * @param \Illuminate\Http\Request|null $request
  3316. * @return string|null
  3317. * @static
  3318. */
  3319. public static function socket($request = null)
  3320. {
  3321. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3322. return $instance->socket($request);
  3323. }
  3324. /**
  3325. * Begin sending an anonymous broadcast to the given channels.
  3326. *
  3327. * @static
  3328. */
  3329. public static function on($channels)
  3330. {
  3331. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3332. return $instance->on($channels);
  3333. }
  3334. /**
  3335. * Begin sending an anonymous broadcast to the given private channels.
  3336. *
  3337. * @static
  3338. */
  3339. public static function private($channel)
  3340. {
  3341. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3342. return $instance->private($channel);
  3343. }
  3344. /**
  3345. * Begin sending an anonymous broadcast to the given presence channels.
  3346. *
  3347. * @static
  3348. */
  3349. public static function presence($channel)
  3350. {
  3351. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3352. return $instance->presence($channel);
  3353. }
  3354. /**
  3355. * Begin broadcasting an event.
  3356. *
  3357. * @param mixed|null $event
  3358. * @return \Illuminate\Broadcasting\PendingBroadcast
  3359. * @static
  3360. */
  3361. public static function event($event = null)
  3362. {
  3363. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3364. return $instance->event($event);
  3365. }
  3366. /**
  3367. * Queue the given event for broadcast.
  3368. *
  3369. * @param mixed $event
  3370. * @return void
  3371. * @static
  3372. */
  3373. public static function queue($event)
  3374. {
  3375. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3376. $instance->queue($event);
  3377. }
  3378. /**
  3379. * Get a driver instance.
  3380. *
  3381. * @param string|null $driver
  3382. * @return mixed
  3383. * @static
  3384. */
  3385. public static function connection($driver = null)
  3386. {
  3387. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3388. return $instance->connection($driver);
  3389. }
  3390. /**
  3391. * Get a driver instance.
  3392. *
  3393. * @param string|null $name
  3394. * @return mixed
  3395. * @static
  3396. */
  3397. public static function driver($name = null)
  3398. {
  3399. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3400. return $instance->driver($name);
  3401. }
  3402. /**
  3403. * Get a Pusher instance for the given configuration.
  3404. *
  3405. * @param array $config
  3406. * @return \Pusher\Pusher
  3407. * @static
  3408. */
  3409. public static function pusher($config)
  3410. {
  3411. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3412. return $instance->pusher($config);
  3413. }
  3414. /**
  3415. * Get an Ably instance for the given configuration.
  3416. *
  3417. * @param array $config
  3418. * @return \Ably\AblyRest
  3419. * @static
  3420. */
  3421. public static function ably($config)
  3422. {
  3423. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3424. return $instance->ably($config);
  3425. }
  3426. /**
  3427. * Get the default driver name.
  3428. *
  3429. * @return string
  3430. * @static
  3431. */
  3432. public static function getDefaultDriver()
  3433. {
  3434. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3435. return $instance->getDefaultDriver();
  3436. }
  3437. /**
  3438. * Set the default driver name.
  3439. *
  3440. * @param string $name
  3441. * @return void
  3442. * @static
  3443. */
  3444. public static function setDefaultDriver($name)
  3445. {
  3446. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3447. $instance->setDefaultDriver($name);
  3448. }
  3449. /**
  3450. * Disconnect the given disk and remove from local cache.
  3451. *
  3452. * @param string|null $name
  3453. * @return void
  3454. * @static
  3455. */
  3456. public static function purge($name = null)
  3457. {
  3458. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3459. $instance->purge($name);
  3460. }
  3461. /**
  3462. * Register a custom driver creator Closure.
  3463. *
  3464. * @param string $driver
  3465. * @param \Closure $callback
  3466. * @return \Illuminate\Broadcasting\BroadcastManager
  3467. * @static
  3468. */
  3469. public static function extend($driver, $callback)
  3470. {
  3471. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3472. return $instance->extend($driver, $callback);
  3473. }
  3474. /**
  3475. * Get the application instance used by the manager.
  3476. *
  3477. * @return \Illuminate\Contracts\Foundation\Application
  3478. * @static
  3479. */
  3480. public static function getApplication()
  3481. {
  3482. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3483. return $instance->getApplication();
  3484. }
  3485. /**
  3486. * Set the application instance used by the manager.
  3487. *
  3488. * @param \Illuminate\Contracts\Foundation\Application $app
  3489. * @return \Illuminate\Broadcasting\BroadcastManager
  3490. * @static
  3491. */
  3492. public static function setApplication($app)
  3493. {
  3494. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3495. return $instance->setApplication($app);
  3496. }
  3497. /**
  3498. * Forget all of the resolved driver instances.
  3499. *
  3500. * @return \Illuminate\Broadcasting\BroadcastManager
  3501. * @static
  3502. */
  3503. public static function forgetDrivers()
  3504. {
  3505. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3506. return $instance->forgetDrivers();
  3507. }
  3508. }
  3509. /**
  3510. * @see \Illuminate\Bus\Dispatcher
  3511. * @see \Illuminate\Support\Testing\Fakes\BusFake
  3512. */
  3513. class Bus {
  3514. /**
  3515. * Dispatch a command to its appropriate handler.
  3516. *
  3517. * @param mixed $command
  3518. * @return mixed
  3519. * @static
  3520. */
  3521. public static function dispatch($command)
  3522. {
  3523. /** @var \Illuminate\Bus\Dispatcher $instance */
  3524. return $instance->dispatch($command);
  3525. }
  3526. /**
  3527. * Dispatch a command to its appropriate handler in the current process.
  3528. *
  3529. * Queueable jobs will be dispatched to the "sync" queue.
  3530. *
  3531. * @param mixed $command
  3532. * @param mixed $handler
  3533. * @return mixed
  3534. * @static
  3535. */
  3536. public static function dispatchSync($command, $handler = null)
  3537. {
  3538. /** @var \Illuminate\Bus\Dispatcher $instance */
  3539. return $instance->dispatchSync($command, $handler);
  3540. }
  3541. /**
  3542. * Dispatch a command to its appropriate handler in the current process without using the synchronous queue.
  3543. *
  3544. * @param mixed $command
  3545. * @param mixed $handler
  3546. * @return mixed
  3547. * @static
  3548. */
  3549. public static function dispatchNow($command, $handler = null)
  3550. {
  3551. /** @var \Illuminate\Bus\Dispatcher $instance */
  3552. return $instance->dispatchNow($command, $handler);
  3553. }
  3554. /**
  3555. * Attempt to find the batch with the given ID.
  3556. *
  3557. * @param string $batchId
  3558. * @return \Illuminate\Bus\Batch|null
  3559. * @static
  3560. */
  3561. public static function findBatch($batchId)
  3562. {
  3563. /** @var \Illuminate\Bus\Dispatcher $instance */
  3564. return $instance->findBatch($batchId);
  3565. }
  3566. /**
  3567. * Create a new batch of queueable jobs.
  3568. *
  3569. * @param \Illuminate\Support\Collection|array|mixed $jobs
  3570. * @return \Illuminate\Bus\PendingBatch
  3571. * @static
  3572. */
  3573. public static function batch($jobs)
  3574. {
  3575. /** @var \Illuminate\Bus\Dispatcher $instance */
  3576. return $instance->batch($jobs);
  3577. }
  3578. /**
  3579. * Create a new chain of queueable jobs.
  3580. *
  3581. * @param \Illuminate\Support\Collection|array $jobs
  3582. * @return \Illuminate\Foundation\Bus\PendingChain
  3583. * @static
  3584. */
  3585. public static function chain($jobs)
  3586. {
  3587. /** @var \Illuminate\Bus\Dispatcher $instance */
  3588. return $instance->chain($jobs);
  3589. }
  3590. /**
  3591. * Determine if the given command has a handler.
  3592. *
  3593. * @param mixed $command
  3594. * @return bool
  3595. * @static
  3596. */
  3597. public static function hasCommandHandler($command)
  3598. {
  3599. /** @var \Illuminate\Bus\Dispatcher $instance */
  3600. return $instance->hasCommandHandler($command);
  3601. }
  3602. /**
  3603. * Retrieve the handler for a command.
  3604. *
  3605. * @param mixed $command
  3606. * @return bool|mixed
  3607. * @static
  3608. */
  3609. public static function getCommandHandler($command)
  3610. {
  3611. /** @var \Illuminate\Bus\Dispatcher $instance */
  3612. return $instance->getCommandHandler($command);
  3613. }
  3614. /**
  3615. * Dispatch a command to its appropriate handler behind a queue.
  3616. *
  3617. * @param mixed $command
  3618. * @return mixed
  3619. * @throws \RuntimeException
  3620. * @static
  3621. */
  3622. public static function dispatchToQueue($command)
  3623. {
  3624. /** @var \Illuminate\Bus\Dispatcher $instance */
  3625. return $instance->dispatchToQueue($command);
  3626. }
  3627. /**
  3628. * Dispatch a command to its appropriate handler after the current process.
  3629. *
  3630. * @param mixed $command
  3631. * @param mixed $handler
  3632. * @return void
  3633. * @static
  3634. */
  3635. public static function dispatchAfterResponse($command, $handler = null)
  3636. {
  3637. /** @var \Illuminate\Bus\Dispatcher $instance */
  3638. $instance->dispatchAfterResponse($command, $handler);
  3639. }
  3640. /**
  3641. * Set the pipes through which commands should be piped before dispatching.
  3642. *
  3643. * @param array $pipes
  3644. * @return \Illuminate\Bus\Dispatcher
  3645. * @static
  3646. */
  3647. public static function pipeThrough($pipes)
  3648. {
  3649. /** @var \Illuminate\Bus\Dispatcher $instance */
  3650. return $instance->pipeThrough($pipes);
  3651. }
  3652. /**
  3653. * Map a command to a handler.
  3654. *
  3655. * @param array $map
  3656. * @return \Illuminate\Bus\Dispatcher
  3657. * @static
  3658. */
  3659. public static function map($map)
  3660. {
  3661. /** @var \Illuminate\Bus\Dispatcher $instance */
  3662. return $instance->map($map);
  3663. }
  3664. /**
  3665. * Allow dispatching after responses.
  3666. *
  3667. * @return \Illuminate\Bus\Dispatcher
  3668. * @static
  3669. */
  3670. public static function withDispatchingAfterResponses()
  3671. {
  3672. /** @var \Illuminate\Bus\Dispatcher $instance */
  3673. return $instance->withDispatchingAfterResponses();
  3674. }
  3675. /**
  3676. * Disable dispatching after responses.
  3677. *
  3678. * @return \Illuminate\Bus\Dispatcher
  3679. * @static
  3680. */
  3681. public static function withoutDispatchingAfterResponses()
  3682. {
  3683. /** @var \Illuminate\Bus\Dispatcher $instance */
  3684. return $instance->withoutDispatchingAfterResponses();
  3685. }
  3686. /**
  3687. * Specify the jobs that should be dispatched instead of faked.
  3688. *
  3689. * @param array|string $jobsToDispatch
  3690. * @return \Illuminate\Support\Testing\Fakes\BusFake
  3691. * @static
  3692. */
  3693. public static function except($jobsToDispatch)
  3694. {
  3695. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3696. return $instance->except($jobsToDispatch);
  3697. }
  3698. /**
  3699. * Assert if a job was dispatched based on a truth-test callback.
  3700. *
  3701. * @param string|\Closure $command
  3702. * @param callable|int|null $callback
  3703. * @return void
  3704. * @static
  3705. */
  3706. public static function assertDispatched($command, $callback = null)
  3707. {
  3708. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3709. $instance->assertDispatched($command, $callback);
  3710. }
  3711. /**
  3712. * Assert if a job was pushed a number of times.
  3713. *
  3714. * @param string|\Closure $command
  3715. * @param int $times
  3716. * @return void
  3717. * @static
  3718. */
  3719. public static function assertDispatchedTimes($command, $times = 1)
  3720. {
  3721. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3722. $instance->assertDispatchedTimes($command, $times);
  3723. }
  3724. /**
  3725. * Determine if a job was dispatched based on a truth-test callback.
  3726. *
  3727. * @param string|\Closure $command
  3728. * @param callable|null $callback
  3729. * @return void
  3730. * @static
  3731. */
  3732. public static function assertNotDispatched($command, $callback = null)
  3733. {
  3734. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3735. $instance->assertNotDispatched($command, $callback);
  3736. }
  3737. /**
  3738. * Assert that no jobs were dispatched.
  3739. *
  3740. * @return void
  3741. * @static
  3742. */
  3743. public static function assertNothingDispatched()
  3744. {
  3745. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3746. $instance->assertNothingDispatched();
  3747. }
  3748. /**
  3749. * Assert if a job was explicitly dispatched synchronously based on a truth-test callback.
  3750. *
  3751. * @param string|\Closure $command
  3752. * @param callable|int|null $callback
  3753. * @return void
  3754. * @static
  3755. */
  3756. public static function assertDispatchedSync($command, $callback = null)
  3757. {
  3758. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3759. $instance->assertDispatchedSync($command, $callback);
  3760. }
  3761. /**
  3762. * Assert if a job was pushed synchronously a number of times.
  3763. *
  3764. * @param string|\Closure $command
  3765. * @param int $times
  3766. * @return void
  3767. * @static
  3768. */
  3769. public static function assertDispatchedSyncTimes($command, $times = 1)
  3770. {
  3771. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3772. $instance->assertDispatchedSyncTimes($command, $times);
  3773. }
  3774. /**
  3775. * Determine if a job was dispatched based on a truth-test callback.
  3776. *
  3777. * @param string|\Closure $command
  3778. * @param callable|null $callback
  3779. * @return void
  3780. * @static
  3781. */
  3782. public static function assertNotDispatchedSync($command, $callback = null)
  3783. {
  3784. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3785. $instance->assertNotDispatchedSync($command, $callback);
  3786. }
  3787. /**
  3788. * Assert if a job was dispatched after the response was sent based on a truth-test callback.
  3789. *
  3790. * @param string|\Closure $command
  3791. * @param callable|int|null $callback
  3792. * @return void
  3793. * @static
  3794. */
  3795. public static function assertDispatchedAfterResponse($command, $callback = null)
  3796. {
  3797. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3798. $instance->assertDispatchedAfterResponse($command, $callback);
  3799. }
  3800. /**
  3801. * Assert if a job was pushed after the response was sent a number of times.
  3802. *
  3803. * @param string|\Closure $command
  3804. * @param int $times
  3805. * @return void
  3806. * @static
  3807. */
  3808. public static function assertDispatchedAfterResponseTimes($command, $times = 1)
  3809. {
  3810. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3811. $instance->assertDispatchedAfterResponseTimes($command, $times);
  3812. }
  3813. /**
  3814. * Determine if a job was dispatched based on a truth-test callback.
  3815. *
  3816. * @param string|\Closure $command
  3817. * @param callable|null $callback
  3818. * @return void
  3819. * @static
  3820. */
  3821. public static function assertNotDispatchedAfterResponse($command, $callback = null)
  3822. {
  3823. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3824. $instance->assertNotDispatchedAfterResponse($command, $callback);
  3825. }
  3826. /**
  3827. * Assert if a chain of jobs was dispatched.
  3828. *
  3829. * @param array $expectedChain
  3830. * @return void
  3831. * @static
  3832. */
  3833. public static function assertChained($expectedChain)
  3834. {
  3835. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3836. $instance->assertChained($expectedChain);
  3837. }
  3838. /**
  3839. * Assert no chained jobs was dispatched.
  3840. *
  3841. * @return void
  3842. * @static
  3843. */
  3844. public static function assertNothingChained()
  3845. {
  3846. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3847. $instance->assertNothingChained();
  3848. }
  3849. /**
  3850. * Assert if a job was dispatched with an empty chain based on a truth-test callback.
  3851. *
  3852. * @param string|\Closure $command
  3853. * @param callable|null $callback
  3854. * @return void
  3855. * @static
  3856. */
  3857. public static function assertDispatchedWithoutChain($command, $callback = null)
  3858. {
  3859. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3860. $instance->assertDispatchedWithoutChain($command, $callback);
  3861. }
  3862. /**
  3863. * Create a new assertion about a chained batch.
  3864. *
  3865. * @param \Closure $callback
  3866. * @return \Illuminate\Support\Testing\Fakes\ChainedBatchTruthTest
  3867. * @static
  3868. */
  3869. public static function chainedBatch($callback)
  3870. {
  3871. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3872. return $instance->chainedBatch($callback);
  3873. }
  3874. /**
  3875. * Assert if a batch was dispatched based on a truth-test callback.
  3876. *
  3877. * @param callable $callback
  3878. * @return void
  3879. * @static
  3880. */
  3881. public static function assertBatched($callback)
  3882. {
  3883. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3884. $instance->assertBatched($callback);
  3885. }
  3886. /**
  3887. * Assert the number of batches that have been dispatched.
  3888. *
  3889. * @param int $count
  3890. * @return void
  3891. * @static
  3892. */
  3893. public static function assertBatchCount($count)
  3894. {
  3895. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3896. $instance->assertBatchCount($count);
  3897. }
  3898. /**
  3899. * Assert that no batched jobs were dispatched.
  3900. *
  3901. * @return void
  3902. * @static
  3903. */
  3904. public static function assertNothingBatched()
  3905. {
  3906. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3907. $instance->assertNothingBatched();
  3908. }
  3909. /**
  3910. * Assert that no jobs were dispatched, chained, or batched.
  3911. *
  3912. * @return void
  3913. * @static
  3914. */
  3915. public static function assertNothingPlaced()
  3916. {
  3917. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3918. $instance->assertNothingPlaced();
  3919. }
  3920. /**
  3921. * Get all of the jobs matching a truth-test callback.
  3922. *
  3923. * @param string $command
  3924. * @param callable|null $callback
  3925. * @return \Illuminate\Support\Collection
  3926. * @static
  3927. */
  3928. public static function dispatched($command, $callback = null)
  3929. {
  3930. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3931. return $instance->dispatched($command, $callback);
  3932. }
  3933. /**
  3934. * Get all of the jobs dispatched synchronously matching a truth-test callback.
  3935. *
  3936. * @param string $command
  3937. * @param callable|null $callback
  3938. * @return \Illuminate\Support\Collection
  3939. * @static
  3940. */
  3941. public static function dispatchedSync($command, $callback = null)
  3942. {
  3943. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3944. return $instance->dispatchedSync($command, $callback);
  3945. }
  3946. /**
  3947. * Get all of the jobs dispatched after the response was sent matching a truth-test callback.
  3948. *
  3949. * @param string $command
  3950. * @param callable|null $callback
  3951. * @return \Illuminate\Support\Collection
  3952. * @static
  3953. */
  3954. public static function dispatchedAfterResponse($command, $callback = null)
  3955. {
  3956. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3957. return $instance->dispatchedAfterResponse($command, $callback);
  3958. }
  3959. /**
  3960. * Get all of the pending batches matching a truth-test callback.
  3961. *
  3962. * @param callable $callback
  3963. * @return \Illuminate\Support\Collection
  3964. * @static
  3965. */
  3966. public static function batched($callback)
  3967. {
  3968. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3969. return $instance->batched($callback);
  3970. }
  3971. /**
  3972. * Determine if there are any stored commands for a given class.
  3973. *
  3974. * @param string $command
  3975. * @return bool
  3976. * @static
  3977. */
  3978. public static function hasDispatched($command)
  3979. {
  3980. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3981. return $instance->hasDispatched($command);
  3982. }
  3983. /**
  3984. * Determine if there are any stored commands for a given class.
  3985. *
  3986. * @param string $command
  3987. * @return bool
  3988. * @static
  3989. */
  3990. public static function hasDispatchedSync($command)
  3991. {
  3992. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3993. return $instance->hasDispatchedSync($command);
  3994. }
  3995. /**
  3996. * Determine if there are any stored commands for a given class.
  3997. *
  3998. * @param string $command
  3999. * @return bool
  4000. * @static
  4001. */
  4002. public static function hasDispatchedAfterResponse($command)
  4003. {
  4004. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4005. return $instance->hasDispatchedAfterResponse($command);
  4006. }
  4007. /**
  4008. * Dispatch an empty job batch for testing.
  4009. *
  4010. * @param string $name
  4011. * @return \Illuminate\Bus\Batch
  4012. * @static
  4013. */
  4014. public static function dispatchFakeBatch($name = '')
  4015. {
  4016. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4017. return $instance->dispatchFakeBatch($name);
  4018. }
  4019. /**
  4020. * Record the fake pending batch dispatch.
  4021. *
  4022. * @param \Illuminate\Bus\PendingBatch $pendingBatch
  4023. * @return \Illuminate\Bus\Batch
  4024. * @static
  4025. */
  4026. public static function recordPendingBatch($pendingBatch)
  4027. {
  4028. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4029. return $instance->recordPendingBatch($pendingBatch);
  4030. }
  4031. /**
  4032. * Specify if commands should be serialized and restored when being batched.
  4033. *
  4034. * @param bool $serializeAndRestore
  4035. * @return \Illuminate\Support\Testing\Fakes\BusFake
  4036. * @static
  4037. */
  4038. public static function serializeAndRestore($serializeAndRestore = true)
  4039. {
  4040. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4041. return $instance->serializeAndRestore($serializeAndRestore);
  4042. }
  4043. /**
  4044. * Get the batches that have been dispatched.
  4045. *
  4046. * @return array
  4047. * @static
  4048. */
  4049. public static function dispatchedBatches()
  4050. {
  4051. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4052. return $instance->dispatchedBatches();
  4053. }
  4054. }
  4055. /**
  4056. * @see \Illuminate\Cache\CacheManager
  4057. * @see \Illuminate\Cache\Repository
  4058. */
  4059. class Cache {
  4060. /**
  4061. * Get a cache store instance by name, wrapped in a repository.
  4062. *
  4063. * @param string|null $name
  4064. * @return \Illuminate\Contracts\Cache\Repository
  4065. * @static
  4066. */
  4067. public static function store($name = null)
  4068. {
  4069. /** @var \Illuminate\Cache\CacheManager $instance */
  4070. return $instance->store($name);
  4071. }
  4072. /**
  4073. * Get a cache driver instance.
  4074. *
  4075. * @param string|null $driver
  4076. * @return \Illuminate\Contracts\Cache\Repository
  4077. * @static
  4078. */
  4079. public static function driver($driver = null)
  4080. {
  4081. /** @var \Illuminate\Cache\CacheManager $instance */
  4082. return $instance->driver($driver);
  4083. }
  4084. /**
  4085. * Get a memoized cache driver instance.
  4086. *
  4087. * @param string|null $driver
  4088. * @return \Illuminate\Contracts\Cache\Repository
  4089. * @static
  4090. */
  4091. public static function memo($driver = null)
  4092. {
  4093. /** @var \Illuminate\Cache\CacheManager $instance */
  4094. return $instance->memo($driver);
  4095. }
  4096. /**
  4097. * Resolve the given store.
  4098. *
  4099. * @param string $name
  4100. * @return \Illuminate\Contracts\Cache\Repository
  4101. * @throws \InvalidArgumentException
  4102. * @static
  4103. */
  4104. public static function resolve($name)
  4105. {
  4106. /** @var \Illuminate\Cache\CacheManager $instance */
  4107. return $instance->resolve($name);
  4108. }
  4109. /**
  4110. * Build a cache repository with the given configuration.
  4111. *
  4112. * @param array $config
  4113. * @return \Illuminate\Cache\Repository
  4114. * @static
  4115. */
  4116. public static function build($config)
  4117. {
  4118. /** @var \Illuminate\Cache\CacheManager $instance */
  4119. return $instance->build($config);
  4120. }
  4121. /**
  4122. * Create a new cache repository with the given implementation.
  4123. *
  4124. * @param \Illuminate\Contracts\Cache\Store $store
  4125. * @param array $config
  4126. * @return \Illuminate\Cache\Repository
  4127. * @static
  4128. */
  4129. public static function repository($store, $config = [])
  4130. {
  4131. /** @var \Illuminate\Cache\CacheManager $instance */
  4132. return $instance->repository($store, $config);
  4133. }
  4134. /**
  4135. * Re-set the event dispatcher on all resolved cache repositories.
  4136. *
  4137. * @return void
  4138. * @static
  4139. */
  4140. public static function refreshEventDispatcher()
  4141. {
  4142. /** @var \Illuminate\Cache\CacheManager $instance */
  4143. $instance->refreshEventDispatcher();
  4144. }
  4145. /**
  4146. * Get the default cache driver name.
  4147. *
  4148. * @return string
  4149. * @static
  4150. */
  4151. public static function getDefaultDriver()
  4152. {
  4153. /** @var \Illuminate\Cache\CacheManager $instance */
  4154. return $instance->getDefaultDriver();
  4155. }
  4156. /**
  4157. * Set the default cache driver name.
  4158. *
  4159. * @param string $name
  4160. * @return void
  4161. * @static
  4162. */
  4163. public static function setDefaultDriver($name)
  4164. {
  4165. /** @var \Illuminate\Cache\CacheManager $instance */
  4166. $instance->setDefaultDriver($name);
  4167. }
  4168. /**
  4169. * Unset the given driver instances.
  4170. *
  4171. * @param array|string|null $name
  4172. * @return \Illuminate\Cache\CacheManager
  4173. * @static
  4174. */
  4175. public static function forgetDriver($name = null)
  4176. {
  4177. /** @var \Illuminate\Cache\CacheManager $instance */
  4178. return $instance->forgetDriver($name);
  4179. }
  4180. /**
  4181. * Disconnect the given driver and remove from local cache.
  4182. *
  4183. * @param string|null $name
  4184. * @return void
  4185. * @static
  4186. */
  4187. public static function purge($name = null)
  4188. {
  4189. /** @var \Illuminate\Cache\CacheManager $instance */
  4190. $instance->purge($name);
  4191. }
  4192. /**
  4193. * Register a custom driver creator Closure.
  4194. *
  4195. * @param string $driver
  4196. * @param \Closure $callback
  4197. * @param-closure-this $this $callback
  4198. * @return \Illuminate\Cache\CacheManager
  4199. * @static
  4200. */
  4201. public static function extend($driver, $callback)
  4202. {
  4203. /** @var \Illuminate\Cache\CacheManager $instance */
  4204. return $instance->extend($driver, $callback);
  4205. }
  4206. /**
  4207. * Set the application instance used by the manager.
  4208. *
  4209. * @param \Illuminate\Contracts\Foundation\Application $app
  4210. * @return \Illuminate\Cache\CacheManager
  4211. * @static
  4212. */
  4213. public static function setApplication($app)
  4214. {
  4215. /** @var \Illuminate\Cache\CacheManager $instance */
  4216. return $instance->setApplication($app);
  4217. }
  4218. /**
  4219. * Determine if an item exists in the cache.
  4220. *
  4221. * @param array|string $key
  4222. * @return bool
  4223. * @static
  4224. */
  4225. public static function has($key)
  4226. {
  4227. /** @var \Illuminate\Cache\Repository $instance */
  4228. return $instance->has($key);
  4229. }
  4230. /**
  4231. * Determine if an item doesn't exist in the cache.
  4232. *
  4233. * @param string $key
  4234. * @return bool
  4235. * @static
  4236. */
  4237. public static function missing($key)
  4238. {
  4239. /** @var \Illuminate\Cache\Repository $instance */
  4240. return $instance->missing($key);
  4241. }
  4242. /**
  4243. * Retrieve an item from the cache by key.
  4244. *
  4245. * @param array|string $key
  4246. * @param mixed $default
  4247. * @return mixed
  4248. * @static
  4249. */
  4250. public static function get($key, $default = null)
  4251. {
  4252. /** @var \Illuminate\Cache\Repository $instance */
  4253. return $instance->get($key, $default);
  4254. }
  4255. /**
  4256. * Retrieve multiple items from the cache by key.
  4257. *
  4258. * Items not found in the cache will have a null value.
  4259. *
  4260. * @param array $keys
  4261. * @return array
  4262. * @static
  4263. */
  4264. public static function many($keys)
  4265. {
  4266. /** @var \Illuminate\Cache\Repository $instance */
  4267. return $instance->many($keys);
  4268. }
  4269. /**
  4270. * Obtains multiple cache items by their unique keys.
  4271. *
  4272. * @return iterable
  4273. * @param iterable<string> $keys A list of keys that can be obtained in a single operation.
  4274. * @param mixed $default Default value to return for keys that do not exist.
  4275. * @return iterable<string, mixed> A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
  4276. * @throws \Psr\SimpleCache\InvalidArgumentException
  4277. * MUST be thrown if $keys is neither an array nor a Traversable,
  4278. * or if any of the $keys are not a legal value.
  4279. * @static
  4280. */
  4281. public static function getMultiple($keys, $default = null)
  4282. {
  4283. /** @var \Illuminate\Cache\Repository $instance */
  4284. return $instance->getMultiple($keys, $default);
  4285. }
  4286. /**
  4287. * Retrieve an item from the cache and delete it.
  4288. *
  4289. * @param array|string $key
  4290. * @param mixed $default
  4291. * @return mixed
  4292. * @static
  4293. */
  4294. public static function pull($key, $default = null)
  4295. {
  4296. /** @var \Illuminate\Cache\Repository $instance */
  4297. return $instance->pull($key, $default);
  4298. }
  4299. /**
  4300. * Store an item in the cache.
  4301. *
  4302. * @param array|string $key
  4303. * @param mixed $value
  4304. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  4305. * @return bool
  4306. * @static
  4307. */
  4308. public static function put($key, $value, $ttl = null)
  4309. {
  4310. /** @var \Illuminate\Cache\Repository $instance */
  4311. return $instance->put($key, $value, $ttl);
  4312. }
  4313. /**
  4314. * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
  4315. *
  4316. * @return bool
  4317. * @param string $key The key of the item to store.
  4318. * @param mixed $value The value of the item to store, must be serializable.
  4319. * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
  4320. * the driver supports TTL then the library may set a default value
  4321. * for it or let the driver take care of that.
  4322. * @return bool True on success and false on failure.
  4323. * @throws \Psr\SimpleCache\InvalidArgumentException
  4324. * MUST be thrown if the $key string is not a legal value.
  4325. * @static
  4326. */
  4327. public static function set($key, $value, $ttl = null)
  4328. {
  4329. /** @var \Illuminate\Cache\Repository $instance */
  4330. return $instance->set($key, $value, $ttl);
  4331. }
  4332. /**
  4333. * Store multiple items in the cache for a given number of seconds.
  4334. *
  4335. * @param array $values
  4336. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  4337. * @return bool
  4338. * @static
  4339. */
  4340. public static function putMany($values, $ttl = null)
  4341. {
  4342. /** @var \Illuminate\Cache\Repository $instance */
  4343. return $instance->putMany($values, $ttl);
  4344. }
  4345. /**
  4346. * Persists a set of key => value pairs in the cache, with an optional TTL.
  4347. *
  4348. * @return bool
  4349. * @param iterable $values A list of key => value pairs for a multiple-set operation.
  4350. * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
  4351. * the driver supports TTL then the library may set a default value
  4352. * for it or let the driver take care of that.
  4353. * @return bool True on success and false on failure.
  4354. * @throws \Psr\SimpleCache\InvalidArgumentException
  4355. * MUST be thrown if $values is neither an array nor a Traversable,
  4356. * or if any of the $values are not a legal value.
  4357. * @static
  4358. */
  4359. public static function setMultiple($values, $ttl = null)
  4360. {
  4361. /** @var \Illuminate\Cache\Repository $instance */
  4362. return $instance->setMultiple($values, $ttl);
  4363. }
  4364. /**
  4365. * Store an item in the cache if the key does not exist.
  4366. *
  4367. * @param string $key
  4368. * @param mixed $value
  4369. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  4370. * @return bool
  4371. * @static
  4372. */
  4373. public static function add($key, $value, $ttl = null)
  4374. {
  4375. /** @var \Illuminate\Cache\Repository $instance */
  4376. return $instance->add($key, $value, $ttl);
  4377. }
  4378. /**
  4379. * Increment the value of an item in the cache.
  4380. *
  4381. * @param string $key
  4382. * @param mixed $value
  4383. * @return int|bool
  4384. * @static
  4385. */
  4386. public static function increment($key, $value = 1)
  4387. {
  4388. /** @var \Illuminate\Cache\Repository $instance */
  4389. return $instance->increment($key, $value);
  4390. }
  4391. /**
  4392. * Decrement the value of an item in the cache.
  4393. *
  4394. * @param string $key
  4395. * @param mixed $value
  4396. * @return int|bool
  4397. * @static
  4398. */
  4399. public static function decrement($key, $value = 1)
  4400. {
  4401. /** @var \Illuminate\Cache\Repository $instance */
  4402. return $instance->decrement($key, $value);
  4403. }
  4404. /**
  4405. * Store an item in the cache indefinitely.
  4406. *
  4407. * @param string $key
  4408. * @param mixed $value
  4409. * @return bool
  4410. * @static
  4411. */
  4412. public static function forever($key, $value)
  4413. {
  4414. /** @var \Illuminate\Cache\Repository $instance */
  4415. return $instance->forever($key, $value);
  4416. }
  4417. /**
  4418. * Get an item from the cache, or execute the given Closure and store the result.
  4419. *
  4420. * @template TCacheValue
  4421. * @param string $key
  4422. * @param \Closure|\DateTimeInterface|\DateInterval|int|null $ttl
  4423. * @param \Closure(): TCacheValue $callback
  4424. * @return TCacheValue
  4425. * @static
  4426. */
  4427. public static function remember($key, $ttl, $callback)
  4428. {
  4429. /** @var \Illuminate\Cache\Repository $instance */
  4430. return $instance->remember($key, $ttl, $callback);
  4431. }
  4432. /**
  4433. * Get an item from the cache, or execute the given Closure and store the result forever.
  4434. *
  4435. * @template TCacheValue
  4436. * @param string $key
  4437. * @param \Closure(): TCacheValue $callback
  4438. * @return TCacheValue
  4439. * @static
  4440. */
  4441. public static function sear($key, $callback)
  4442. {
  4443. /** @var \Illuminate\Cache\Repository $instance */
  4444. return $instance->sear($key, $callback);
  4445. }
  4446. /**
  4447. * Get an item from the cache, or execute the given Closure and store the result forever.
  4448. *
  4449. * @template TCacheValue
  4450. * @param string $key
  4451. * @param \Closure(): TCacheValue $callback
  4452. * @return TCacheValue
  4453. * @static
  4454. */
  4455. public static function rememberForever($key, $callback)
  4456. {
  4457. /** @var \Illuminate\Cache\Repository $instance */
  4458. return $instance->rememberForever($key, $callback);
  4459. }
  4460. /**
  4461. * Retrieve an item from the cache by key, refreshing it in the background if it is stale.
  4462. *
  4463. * @template TCacheValue
  4464. * @param string $key
  4465. * @param array{ 0: \DateTimeInterface|\DateInterval|int, 1: \DateTimeInterface|\DateInterval|int } $ttl
  4466. * @param (callable(): TCacheValue) $callback
  4467. * @param array{ seconds?: int, owner?: string }|null $lock
  4468. * @param bool $alwaysDefer
  4469. * @return TCacheValue
  4470. * @static
  4471. */
  4472. public static function flexible($key, $ttl, $callback, $lock = null, $alwaysDefer = false)
  4473. {
  4474. /** @var \Illuminate\Cache\Repository $instance */
  4475. return $instance->flexible($key, $ttl, $callback, $lock, $alwaysDefer);
  4476. }
  4477. /**
  4478. * Remove an item from the cache.
  4479. *
  4480. * @param string $key
  4481. * @return bool
  4482. * @static
  4483. */
  4484. public static function forget($key)
  4485. {
  4486. /** @var \Illuminate\Cache\Repository $instance */
  4487. return $instance->forget($key);
  4488. }
  4489. /**
  4490. * Delete an item from the cache by its unique key.
  4491. *
  4492. * @return bool
  4493. * @param string $key The unique cache key of the item to delete.
  4494. * @return bool True if the item was successfully removed. False if there was an error.
  4495. * @throws \Psr\SimpleCache\InvalidArgumentException
  4496. * MUST be thrown if the $key string is not a legal value.
  4497. * @static
  4498. */
  4499. public static function delete($key)
  4500. {
  4501. /** @var \Illuminate\Cache\Repository $instance */
  4502. return $instance->delete($key);
  4503. }
  4504. /**
  4505. * Deletes multiple cache items in a single operation.
  4506. *
  4507. * @return bool
  4508. * @param iterable<string> $keys A list of string-based keys to be deleted.
  4509. * @return bool True if the items were successfully removed. False if there was an error.
  4510. * @throws \Psr\SimpleCache\InvalidArgumentException
  4511. * MUST be thrown if $keys is neither an array nor a Traversable,
  4512. * or if any of the $keys are not a legal value.
  4513. * @static
  4514. */
  4515. public static function deleteMultiple($keys)
  4516. {
  4517. /** @var \Illuminate\Cache\Repository $instance */
  4518. return $instance->deleteMultiple($keys);
  4519. }
  4520. /**
  4521. * Wipes clean the entire cache's keys.
  4522. *
  4523. * @return bool
  4524. * @return bool True on success and false on failure.
  4525. * @static
  4526. */
  4527. public static function clear()
  4528. {
  4529. /** @var \Illuminate\Cache\Repository $instance */
  4530. return $instance->clear();
  4531. }
  4532. /**
  4533. * Begin executing a new tags operation if the store supports it.
  4534. *
  4535. * @param array|mixed $names
  4536. * @return \Illuminate\Cache\TaggedCache
  4537. * @throws \BadMethodCallException
  4538. * @static
  4539. */
  4540. public static function tags($names)
  4541. {
  4542. /** @var \Illuminate\Cache\Repository $instance */
  4543. return $instance->tags($names);
  4544. }
  4545. /**
  4546. * Get the name of the cache store.
  4547. *
  4548. * @return string|null
  4549. * @static
  4550. */
  4551. public static function getName()
  4552. {
  4553. /** @var \Illuminate\Cache\Repository $instance */
  4554. return $instance->getName();
  4555. }
  4556. /**
  4557. * Determine if the current store supports tags.
  4558. *
  4559. * @return bool
  4560. * @static
  4561. */
  4562. public static function supportsTags()
  4563. {
  4564. /** @var \Illuminate\Cache\Repository $instance */
  4565. return $instance->supportsTags();
  4566. }
  4567. /**
  4568. * Get the default cache time.
  4569. *
  4570. * @return int|null
  4571. * @static
  4572. */
  4573. public static function getDefaultCacheTime()
  4574. {
  4575. /** @var \Illuminate\Cache\Repository $instance */
  4576. return $instance->getDefaultCacheTime();
  4577. }
  4578. /**
  4579. * Set the default cache time in seconds.
  4580. *
  4581. * @param int|null $seconds
  4582. * @return \Illuminate\Cache\Repository
  4583. * @static
  4584. */
  4585. public static function setDefaultCacheTime($seconds)
  4586. {
  4587. /** @var \Illuminate\Cache\Repository $instance */
  4588. return $instance->setDefaultCacheTime($seconds);
  4589. }
  4590. /**
  4591. * Get the cache store implementation.
  4592. *
  4593. * @return \Illuminate\Contracts\Cache\Store
  4594. * @static
  4595. */
  4596. public static function getStore()
  4597. {
  4598. /** @var \Illuminate\Cache\Repository $instance */
  4599. return $instance->getStore();
  4600. }
  4601. /**
  4602. * Set the cache store implementation.
  4603. *
  4604. * @param \Illuminate\Contracts\Cache\Store $store
  4605. * @return static
  4606. * @static
  4607. */
  4608. public static function setStore($store)
  4609. {
  4610. /** @var \Illuminate\Cache\Repository $instance */
  4611. return $instance->setStore($store);
  4612. }
  4613. /**
  4614. * Get the event dispatcher instance.
  4615. *
  4616. * @return \Illuminate\Contracts\Events\Dispatcher|null
  4617. * @static
  4618. */
  4619. public static function getEventDispatcher()
  4620. {
  4621. /** @var \Illuminate\Cache\Repository $instance */
  4622. return $instance->getEventDispatcher();
  4623. }
  4624. /**
  4625. * Set the event dispatcher instance.
  4626. *
  4627. * @param \Illuminate\Contracts\Events\Dispatcher $events
  4628. * @return void
  4629. * @static
  4630. */
  4631. public static function setEventDispatcher($events)
  4632. {
  4633. /** @var \Illuminate\Cache\Repository $instance */
  4634. $instance->setEventDispatcher($events);
  4635. }
  4636. /**
  4637. * Determine if a cached value exists.
  4638. *
  4639. * @param string $key
  4640. * @return bool
  4641. * @static
  4642. */
  4643. public static function offsetExists($key)
  4644. {
  4645. /** @var \Illuminate\Cache\Repository $instance */
  4646. return $instance->offsetExists($key);
  4647. }
  4648. /**
  4649. * Retrieve an item from the cache by key.
  4650. *
  4651. * @param string $key
  4652. * @return mixed
  4653. * @static
  4654. */
  4655. public static function offsetGet($key)
  4656. {
  4657. /** @var \Illuminate\Cache\Repository $instance */
  4658. return $instance->offsetGet($key);
  4659. }
  4660. /**
  4661. * Store an item in the cache for the default time.
  4662. *
  4663. * @param string $key
  4664. * @param mixed $value
  4665. * @return void
  4666. * @static
  4667. */
  4668. public static function offsetSet($key, $value)
  4669. {
  4670. /** @var \Illuminate\Cache\Repository $instance */
  4671. $instance->offsetSet($key, $value);
  4672. }
  4673. /**
  4674. * Remove an item from the cache.
  4675. *
  4676. * @param string $key
  4677. * @return void
  4678. * @static
  4679. */
  4680. public static function offsetUnset($key)
  4681. {
  4682. /** @var \Illuminate\Cache\Repository $instance */
  4683. $instance->offsetUnset($key);
  4684. }
  4685. /**
  4686. * Register a custom macro.
  4687. *
  4688. * @param string $name
  4689. * @param object|callable $macro
  4690. * @param-closure-this static $macro
  4691. * @return void
  4692. * @static
  4693. */
  4694. public static function macro($name, $macro)
  4695. {
  4696. \Illuminate\Cache\Repository::macro($name, $macro);
  4697. }
  4698. /**
  4699. * Mix another object into the class.
  4700. *
  4701. * @param object $mixin
  4702. * @param bool $replace
  4703. * @return void
  4704. * @throws \ReflectionException
  4705. * @static
  4706. */
  4707. public static function mixin($mixin, $replace = true)
  4708. {
  4709. \Illuminate\Cache\Repository::mixin($mixin, $replace);
  4710. }
  4711. /**
  4712. * Checks if macro is registered.
  4713. *
  4714. * @param string $name
  4715. * @return bool
  4716. * @static
  4717. */
  4718. public static function hasMacro($name)
  4719. {
  4720. return \Illuminate\Cache\Repository::hasMacro($name);
  4721. }
  4722. /**
  4723. * Flush the existing macros.
  4724. *
  4725. * @return void
  4726. * @static
  4727. */
  4728. public static function flushMacros()
  4729. {
  4730. \Illuminate\Cache\Repository::flushMacros();
  4731. }
  4732. /**
  4733. * Dynamically handle calls to the class.
  4734. *
  4735. * @param string $method
  4736. * @param array $parameters
  4737. * @return mixed
  4738. * @throws \BadMethodCallException
  4739. * @static
  4740. */
  4741. public static function macroCall($method, $parameters)
  4742. {
  4743. /** @var \Illuminate\Cache\Repository $instance */
  4744. return $instance->macroCall($method, $parameters);
  4745. }
  4746. /**
  4747. * Get a lock instance.
  4748. *
  4749. * @param string $name
  4750. * @param int $seconds
  4751. * @param string|null $owner
  4752. * @return \Illuminate\Contracts\Cache\Lock
  4753. * @static
  4754. */
  4755. public static function lock($name, $seconds = 0, $owner = null)
  4756. {
  4757. /** @var \Illuminate\Cache\RedisStore $instance */
  4758. return $instance->lock($name, $seconds, $owner);
  4759. }
  4760. /**
  4761. * Restore a lock instance using the owner identifier.
  4762. *
  4763. * @param string $name
  4764. * @param string $owner
  4765. * @return \Illuminate\Contracts\Cache\Lock
  4766. * @static
  4767. */
  4768. public static function restoreLock($name, $owner)
  4769. {
  4770. /** @var \Illuminate\Cache\RedisStore $instance */
  4771. return $instance->restoreLock($name, $owner);
  4772. }
  4773. /**
  4774. * Remove all items from the cache.
  4775. *
  4776. * @return bool
  4777. * @static
  4778. */
  4779. public static function flush()
  4780. {
  4781. /** @var \Illuminate\Cache\RedisStore $instance */
  4782. return $instance->flush();
  4783. }
  4784. /**
  4785. * Remove all expired tag set entries.
  4786. *
  4787. * @return void
  4788. * @static
  4789. */
  4790. public static function flushStaleTags()
  4791. {
  4792. /** @var \Illuminate\Cache\RedisStore $instance */
  4793. $instance->flushStaleTags();
  4794. }
  4795. /**
  4796. * Get the Redis connection instance.
  4797. *
  4798. * @return \Illuminate\Redis\Connections\Connection
  4799. * @static
  4800. */
  4801. public static function connection()
  4802. {
  4803. /** @var \Illuminate\Cache\RedisStore $instance */
  4804. return $instance->connection();
  4805. }
  4806. /**
  4807. * Get the Redis connection instance that should be used to manage locks.
  4808. *
  4809. * @return \Illuminate\Redis\Connections\Connection
  4810. * @static
  4811. */
  4812. public static function lockConnection()
  4813. {
  4814. /** @var \Illuminate\Cache\RedisStore $instance */
  4815. return $instance->lockConnection();
  4816. }
  4817. /**
  4818. * Specify the name of the connection that should be used to store data.
  4819. *
  4820. * @param string $connection
  4821. * @return void
  4822. * @static
  4823. */
  4824. public static function setConnection($connection)
  4825. {
  4826. /** @var \Illuminate\Cache\RedisStore $instance */
  4827. $instance->setConnection($connection);
  4828. }
  4829. /**
  4830. * Specify the name of the connection that should be used to manage locks.
  4831. *
  4832. * @param string $connection
  4833. * @return \Illuminate\Cache\RedisStore
  4834. * @static
  4835. */
  4836. public static function setLockConnection($connection)
  4837. {
  4838. /** @var \Illuminate\Cache\RedisStore $instance */
  4839. return $instance->setLockConnection($connection);
  4840. }
  4841. /**
  4842. * Get the Redis database instance.
  4843. *
  4844. * @return \Illuminate\Contracts\Redis\Factory
  4845. * @static
  4846. */
  4847. public static function getRedis()
  4848. {
  4849. /** @var \Illuminate\Cache\RedisStore $instance */
  4850. return $instance->getRedis();
  4851. }
  4852. /**
  4853. * Get the cache key prefix.
  4854. *
  4855. * @return string
  4856. * @static
  4857. */
  4858. public static function getPrefix()
  4859. {
  4860. /** @var \Illuminate\Cache\RedisStore $instance */
  4861. return $instance->getPrefix();
  4862. }
  4863. /**
  4864. * Set the cache key prefix.
  4865. *
  4866. * @param string $prefix
  4867. * @return void
  4868. * @static
  4869. */
  4870. public static function setPrefix($prefix)
  4871. {
  4872. /** @var \Illuminate\Cache\RedisStore $instance */
  4873. $instance->setPrefix($prefix);
  4874. }
  4875. }
  4876. /**
  4877. * @method static array run(\Closure|array $tasks)
  4878. * @method static \Illuminate\Support\Defer\DeferredCallback defer(\Closure|array $tasks)
  4879. * @see \Illuminate\Concurrency\ConcurrencyManager
  4880. */
  4881. class Concurrency {
  4882. /**
  4883. * Get a driver instance by name.
  4884. *
  4885. * @param string|null $name
  4886. * @return mixed
  4887. * @static
  4888. */
  4889. public static function driver($name = null)
  4890. {
  4891. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4892. return $instance->driver($name);
  4893. }
  4894. /**
  4895. * Create an instance of the process concurrency driver.
  4896. *
  4897. * @param array $config
  4898. * @return \Illuminate\Concurrency\ProcessDriver
  4899. * @static
  4900. */
  4901. public static function createProcessDriver($config)
  4902. {
  4903. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4904. return $instance->createProcessDriver($config);
  4905. }
  4906. /**
  4907. * Create an instance of the fork concurrency driver.
  4908. *
  4909. * @param array $config
  4910. * @return \Illuminate\Concurrency\ForkDriver
  4911. * @throws \RuntimeException
  4912. * @static
  4913. */
  4914. public static function createForkDriver($config)
  4915. {
  4916. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4917. return $instance->createForkDriver($config);
  4918. }
  4919. /**
  4920. * Create an instance of the sync concurrency driver.
  4921. *
  4922. * @param array $config
  4923. * @return \Illuminate\Concurrency\SyncDriver
  4924. * @static
  4925. */
  4926. public static function createSyncDriver($config)
  4927. {
  4928. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4929. return $instance->createSyncDriver($config);
  4930. }
  4931. /**
  4932. * Get the default instance name.
  4933. *
  4934. * @return string
  4935. * @static
  4936. */
  4937. public static function getDefaultInstance()
  4938. {
  4939. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4940. return $instance->getDefaultInstance();
  4941. }
  4942. /**
  4943. * Set the default instance name.
  4944. *
  4945. * @param string $name
  4946. * @return void
  4947. * @static
  4948. */
  4949. public static function setDefaultInstance($name)
  4950. {
  4951. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4952. $instance->setDefaultInstance($name);
  4953. }
  4954. /**
  4955. * Get the instance specific configuration.
  4956. *
  4957. * @param string $name
  4958. * @return array
  4959. * @static
  4960. */
  4961. public static function getInstanceConfig($name)
  4962. {
  4963. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4964. return $instance->getInstanceConfig($name);
  4965. }
  4966. /**
  4967. * Get an instance by name.
  4968. *
  4969. * @param string|null $name
  4970. * @return mixed
  4971. * @static
  4972. */
  4973. public static function instance($name = null)
  4974. {
  4975. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4976. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4977. return $instance->instance($name);
  4978. }
  4979. /**
  4980. * Unset the given instances.
  4981. *
  4982. * @param array|string|null $name
  4983. * @return \Illuminate\Concurrency\ConcurrencyManager
  4984. * @static
  4985. */
  4986. public static function forgetInstance($name = null)
  4987. {
  4988. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4989. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4990. return $instance->forgetInstance($name);
  4991. }
  4992. /**
  4993. * Disconnect the given instance and remove from local cache.
  4994. *
  4995. * @param string|null $name
  4996. * @return void
  4997. * @static
  4998. */
  4999. public static function purge($name = null)
  5000. {
  5001. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  5002. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  5003. $instance->purge($name);
  5004. }
  5005. /**
  5006. * Register a custom instance creator Closure.
  5007. *
  5008. * @param string $name
  5009. * @param \Closure $callback
  5010. * @param-closure-this $this $callback
  5011. * @return \Illuminate\Concurrency\ConcurrencyManager
  5012. * @static
  5013. */
  5014. public static function extend($name, $callback)
  5015. {
  5016. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  5017. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  5018. return $instance->extend($name, $callback);
  5019. }
  5020. /**
  5021. * Set the application instance used by the manager.
  5022. *
  5023. * @param \Illuminate\Contracts\Foundation\Application $app
  5024. * @return \Illuminate\Concurrency\ConcurrencyManager
  5025. * @static
  5026. */
  5027. public static function setApplication($app)
  5028. {
  5029. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  5030. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  5031. return $instance->setApplication($app);
  5032. }
  5033. }
  5034. /**
  5035. * @see \Illuminate\Config\Repository
  5036. */
  5037. class Config {
  5038. /**
  5039. * Determine if the given configuration value exists.
  5040. *
  5041. * @param string $key
  5042. * @return bool
  5043. * @static
  5044. */
  5045. public static function has($key)
  5046. {
  5047. /** @var \Illuminate\Config\Repository $instance */
  5048. return $instance->has($key);
  5049. }
  5050. /**
  5051. * Get the specified configuration value.
  5052. *
  5053. * @param array|string $key
  5054. * @param mixed $default
  5055. * @return mixed
  5056. * @static
  5057. */
  5058. public static function get($key, $default = null)
  5059. {
  5060. /** @var \Illuminate\Config\Repository $instance */
  5061. return $instance->get($key, $default);
  5062. }
  5063. /**
  5064. * Get many configuration values.
  5065. *
  5066. * @param array<string|int,mixed> $keys
  5067. * @return array<string,mixed>
  5068. * @static
  5069. */
  5070. public static function getMany($keys)
  5071. {
  5072. /** @var \Illuminate\Config\Repository $instance */
  5073. return $instance->getMany($keys);
  5074. }
  5075. /**
  5076. * Get the specified string configuration value.
  5077. *
  5078. * @param string $key
  5079. * @param (\Closure():(string|null))|string|null $default
  5080. * @return string
  5081. * @static
  5082. */
  5083. public static function string($key, $default = null)
  5084. {
  5085. /** @var \Illuminate\Config\Repository $instance */
  5086. return $instance->string($key, $default);
  5087. }
  5088. /**
  5089. * Get the specified integer configuration value.
  5090. *
  5091. * @param string $key
  5092. * @param (\Closure():(int|null))|int|null $default
  5093. * @return int
  5094. * @static
  5095. */
  5096. public static function integer($key, $default = null)
  5097. {
  5098. /** @var \Illuminate\Config\Repository $instance */
  5099. return $instance->integer($key, $default);
  5100. }
  5101. /**
  5102. * Get the specified float configuration value.
  5103. *
  5104. * @param string $key
  5105. * @param (\Closure():(float|null))|float|null $default
  5106. * @return float
  5107. * @static
  5108. */
  5109. public static function float($key, $default = null)
  5110. {
  5111. /** @var \Illuminate\Config\Repository $instance */
  5112. return $instance->float($key, $default);
  5113. }
  5114. /**
  5115. * Get the specified boolean configuration value.
  5116. *
  5117. * @param string $key
  5118. * @param (\Closure():(bool|null))|bool|null $default
  5119. * @return bool
  5120. * @static
  5121. */
  5122. public static function boolean($key, $default = null)
  5123. {
  5124. /** @var \Illuminate\Config\Repository $instance */
  5125. return $instance->boolean($key, $default);
  5126. }
  5127. /**
  5128. * Get the specified array configuration value.
  5129. *
  5130. * @param string $key
  5131. * @param (\Closure():(array<array-key, mixed>|null))|array<array-key, mixed>|null $default
  5132. * @return array<array-key, mixed>
  5133. * @static
  5134. */
  5135. public static function array($key, $default = null)
  5136. {
  5137. /** @var \Illuminate\Config\Repository $instance */
  5138. return $instance->array($key, $default);
  5139. }
  5140. /**
  5141. * Get the specified array configuration value as a collection.
  5142. *
  5143. * @param string $key
  5144. * @param (\Closure():(array<array-key, mixed>|null))|array<array-key, mixed>|null $default
  5145. * @return Collection<array-key, mixed>
  5146. * @static
  5147. */
  5148. public static function collection($key, $default = null)
  5149. {
  5150. /** @var \Illuminate\Config\Repository $instance */
  5151. return $instance->collection($key, $default);
  5152. }
  5153. /**
  5154. * Set a given configuration value.
  5155. *
  5156. * @param array|string $key
  5157. * @param mixed $value
  5158. * @return void
  5159. * @static
  5160. */
  5161. public static function set($key, $value = null)
  5162. {
  5163. /** @var \Illuminate\Config\Repository $instance */
  5164. $instance->set($key, $value);
  5165. }
  5166. /**
  5167. * Prepend a value onto an array configuration value.
  5168. *
  5169. * @param string $key
  5170. * @param mixed $value
  5171. * @return void
  5172. * @static
  5173. */
  5174. public static function prepend($key, $value)
  5175. {
  5176. /** @var \Illuminate\Config\Repository $instance */
  5177. $instance->prepend($key, $value);
  5178. }
  5179. /**
  5180. * Push a value onto an array configuration value.
  5181. *
  5182. * @param string $key
  5183. * @param mixed $value
  5184. * @return void
  5185. * @static
  5186. */
  5187. public static function push($key, $value)
  5188. {
  5189. /** @var \Illuminate\Config\Repository $instance */
  5190. $instance->push($key, $value);
  5191. }
  5192. /**
  5193. * Get all of the configuration items for the application.
  5194. *
  5195. * @return array
  5196. * @static
  5197. */
  5198. public static function all()
  5199. {
  5200. /** @var \Illuminate\Config\Repository $instance */
  5201. return $instance->all();
  5202. }
  5203. /**
  5204. * Determine if the given configuration option exists.
  5205. *
  5206. * @param string $key
  5207. * @return bool
  5208. * @static
  5209. */
  5210. public static function offsetExists($key)
  5211. {
  5212. /** @var \Illuminate\Config\Repository $instance */
  5213. return $instance->offsetExists($key);
  5214. }
  5215. /**
  5216. * Get a configuration option.
  5217. *
  5218. * @param string $key
  5219. * @return mixed
  5220. * @static
  5221. */
  5222. public static function offsetGet($key)
  5223. {
  5224. /** @var \Illuminate\Config\Repository $instance */
  5225. return $instance->offsetGet($key);
  5226. }
  5227. /**
  5228. * Set a configuration option.
  5229. *
  5230. * @param string $key
  5231. * @param mixed $value
  5232. * @return void
  5233. * @static
  5234. */
  5235. public static function offsetSet($key, $value)
  5236. {
  5237. /** @var \Illuminate\Config\Repository $instance */
  5238. $instance->offsetSet($key, $value);
  5239. }
  5240. /**
  5241. * Unset a configuration option.
  5242. *
  5243. * @param string $key
  5244. * @return void
  5245. * @static
  5246. */
  5247. public static function offsetUnset($key)
  5248. {
  5249. /** @var \Illuminate\Config\Repository $instance */
  5250. $instance->offsetUnset($key);
  5251. }
  5252. /**
  5253. * Register a custom macro.
  5254. *
  5255. * @param string $name
  5256. * @param object|callable $macro
  5257. * @param-closure-this static $macro
  5258. * @return void
  5259. * @static
  5260. */
  5261. public static function macro($name, $macro)
  5262. {
  5263. \Illuminate\Config\Repository::macro($name, $macro);
  5264. }
  5265. /**
  5266. * Mix another object into the class.
  5267. *
  5268. * @param object $mixin
  5269. * @param bool $replace
  5270. * @return void
  5271. * @throws \ReflectionException
  5272. * @static
  5273. */
  5274. public static function mixin($mixin, $replace = true)
  5275. {
  5276. \Illuminate\Config\Repository::mixin($mixin, $replace);
  5277. }
  5278. /**
  5279. * Checks if macro is registered.
  5280. *
  5281. * @param string $name
  5282. * @return bool
  5283. * @static
  5284. */
  5285. public static function hasMacro($name)
  5286. {
  5287. return \Illuminate\Config\Repository::hasMacro($name);
  5288. }
  5289. /**
  5290. * Flush the existing macros.
  5291. *
  5292. * @return void
  5293. * @static
  5294. */
  5295. public static function flushMacros()
  5296. {
  5297. \Illuminate\Config\Repository::flushMacros();
  5298. }
  5299. }
  5300. /**
  5301. * @see \Illuminate\Log\Context\Repository
  5302. */
  5303. class Context {
  5304. /**
  5305. * Determine if the given key exists.
  5306. *
  5307. * @param string $key
  5308. * @return bool
  5309. * @static
  5310. */
  5311. public static function has($key)
  5312. {
  5313. /** @var \Illuminate\Log\Context\Repository $instance */
  5314. return $instance->has($key);
  5315. }
  5316. /**
  5317. * Determine if the given key is missing.
  5318. *
  5319. * @param string $key
  5320. * @return bool
  5321. * @static
  5322. */
  5323. public static function missing($key)
  5324. {
  5325. /** @var \Illuminate\Log\Context\Repository $instance */
  5326. return $instance->missing($key);
  5327. }
  5328. /**
  5329. * Determine if the given key exists within the hidden context data.
  5330. *
  5331. * @param string $key
  5332. * @return bool
  5333. * @static
  5334. */
  5335. public static function hasHidden($key)
  5336. {
  5337. /** @var \Illuminate\Log\Context\Repository $instance */
  5338. return $instance->hasHidden($key);
  5339. }
  5340. /**
  5341. * Determine if the given key is missing within the hidden context data.
  5342. *
  5343. * @param string $key
  5344. * @return bool
  5345. * @static
  5346. */
  5347. public static function missingHidden($key)
  5348. {
  5349. /** @var \Illuminate\Log\Context\Repository $instance */
  5350. return $instance->missingHidden($key);
  5351. }
  5352. /**
  5353. * Retrieve all the context data.
  5354. *
  5355. * @return array<string, mixed>
  5356. * @static
  5357. */
  5358. public static function all()
  5359. {
  5360. /** @var \Illuminate\Log\Context\Repository $instance */
  5361. return $instance->all();
  5362. }
  5363. /**
  5364. * Retrieve all the hidden context data.
  5365. *
  5366. * @return array<string, mixed>
  5367. * @static
  5368. */
  5369. public static function allHidden()
  5370. {
  5371. /** @var \Illuminate\Log\Context\Repository $instance */
  5372. return $instance->allHidden();
  5373. }
  5374. /**
  5375. * Retrieve the given key's value.
  5376. *
  5377. * @param string $key
  5378. * @param mixed $default
  5379. * @return mixed
  5380. * @static
  5381. */
  5382. public static function get($key, $default = null)
  5383. {
  5384. /** @var \Illuminate\Log\Context\Repository $instance */
  5385. return $instance->get($key, $default);
  5386. }
  5387. /**
  5388. * Retrieve the given key's hidden value.
  5389. *
  5390. * @param string $key
  5391. * @param mixed $default
  5392. * @return mixed
  5393. * @static
  5394. */
  5395. public static function getHidden($key, $default = null)
  5396. {
  5397. /** @var \Illuminate\Log\Context\Repository $instance */
  5398. return $instance->getHidden($key, $default);
  5399. }
  5400. /**
  5401. * Retrieve the given key's value and then forget it.
  5402. *
  5403. * @param string $key
  5404. * @param mixed $default
  5405. * @return mixed
  5406. * @static
  5407. */
  5408. public static function pull($key, $default = null)
  5409. {
  5410. /** @var \Illuminate\Log\Context\Repository $instance */
  5411. return $instance->pull($key, $default);
  5412. }
  5413. /**
  5414. * Retrieve the given key's hidden value and then forget it.
  5415. *
  5416. * @param string $key
  5417. * @param mixed $default
  5418. * @return mixed
  5419. * @static
  5420. */
  5421. public static function pullHidden($key, $default = null)
  5422. {
  5423. /** @var \Illuminate\Log\Context\Repository $instance */
  5424. return $instance->pullHidden($key, $default);
  5425. }
  5426. /**
  5427. * Retrieve only the values of the given keys.
  5428. *
  5429. * @param array<int, string> $keys
  5430. * @return array<string, mixed>
  5431. * @static
  5432. */
  5433. public static function only($keys)
  5434. {
  5435. /** @var \Illuminate\Log\Context\Repository $instance */
  5436. return $instance->only($keys);
  5437. }
  5438. /**
  5439. * Retrieve only the hidden values of the given keys.
  5440. *
  5441. * @param array<int, string> $keys
  5442. * @return array<string, mixed>
  5443. * @static
  5444. */
  5445. public static function onlyHidden($keys)
  5446. {
  5447. /** @var \Illuminate\Log\Context\Repository $instance */
  5448. return $instance->onlyHidden($keys);
  5449. }
  5450. /**
  5451. * Retrieve all values except those with the given keys.
  5452. *
  5453. * @param array<int, string> $keys
  5454. * @return array<string, mixed>
  5455. * @static
  5456. */
  5457. public static function except($keys)
  5458. {
  5459. /** @var \Illuminate\Log\Context\Repository $instance */
  5460. return $instance->except($keys);
  5461. }
  5462. /**
  5463. * Retrieve all hidden values except those with the given keys.
  5464. *
  5465. * @param array<int, string> $keys
  5466. * @return array<string, mixed>
  5467. * @static
  5468. */
  5469. public static function exceptHidden($keys)
  5470. {
  5471. /** @var \Illuminate\Log\Context\Repository $instance */
  5472. return $instance->exceptHidden($keys);
  5473. }
  5474. /**
  5475. * Add a context value.
  5476. *
  5477. * @param string|array<string, mixed> $key
  5478. * @param mixed $value
  5479. * @return \Illuminate\Log\Context\Repository
  5480. * @static
  5481. */
  5482. public static function add($key, $value = null)
  5483. {
  5484. /** @var \Illuminate\Log\Context\Repository $instance */
  5485. return $instance->add($key, $value);
  5486. }
  5487. /**
  5488. * Add a hidden context value.
  5489. *
  5490. * @param string|array<string, mixed> $key
  5491. * @param mixed $value
  5492. * @return \Illuminate\Log\Context\Repository
  5493. * @static
  5494. */
  5495. public static function addHidden($key, $value = null)
  5496. {
  5497. /** @var \Illuminate\Log\Context\Repository $instance */
  5498. return $instance->addHidden($key, $value);
  5499. }
  5500. /**
  5501. * Add a context value if it does not exist yet, and return the value.
  5502. *
  5503. * @param string $key
  5504. * @param mixed $value
  5505. * @return mixed
  5506. * @static
  5507. */
  5508. public static function remember($key, $value)
  5509. {
  5510. /** @var \Illuminate\Log\Context\Repository $instance */
  5511. return $instance->remember($key, $value);
  5512. }
  5513. /**
  5514. * Add a hidden context value if it does not exist yet, and return the value.
  5515. *
  5516. * @param string $key
  5517. * @param mixed $value
  5518. * @return mixed
  5519. * @static
  5520. */
  5521. public static function rememberHidden($key, $value)
  5522. {
  5523. /** @var \Illuminate\Log\Context\Repository $instance */
  5524. return $instance->rememberHidden($key, $value);
  5525. }
  5526. /**
  5527. * Forget the given context key.
  5528. *
  5529. * @param string|array<int, string> $key
  5530. * @return \Illuminate\Log\Context\Repository
  5531. * @static
  5532. */
  5533. public static function forget($key)
  5534. {
  5535. /** @var \Illuminate\Log\Context\Repository $instance */
  5536. return $instance->forget($key);
  5537. }
  5538. /**
  5539. * Forget the given hidden context key.
  5540. *
  5541. * @param string|array<int, string> $key
  5542. * @return \Illuminate\Log\Context\Repository
  5543. * @static
  5544. */
  5545. public static function forgetHidden($key)
  5546. {
  5547. /** @var \Illuminate\Log\Context\Repository $instance */
  5548. return $instance->forgetHidden($key);
  5549. }
  5550. /**
  5551. * Add a context value if it does not exist yet.
  5552. *
  5553. * @param string $key
  5554. * @param mixed $value
  5555. * @return \Illuminate\Log\Context\Repository
  5556. * @static
  5557. */
  5558. public static function addIf($key, $value)
  5559. {
  5560. /** @var \Illuminate\Log\Context\Repository $instance */
  5561. return $instance->addIf($key, $value);
  5562. }
  5563. /**
  5564. * Add a hidden context value if it does not exist yet.
  5565. *
  5566. * @param string $key
  5567. * @param mixed $value
  5568. * @return \Illuminate\Log\Context\Repository
  5569. * @static
  5570. */
  5571. public static function addHiddenIf($key, $value)
  5572. {
  5573. /** @var \Illuminate\Log\Context\Repository $instance */
  5574. return $instance->addHiddenIf($key, $value);
  5575. }
  5576. /**
  5577. * Push the given values onto the key's stack.
  5578. *
  5579. * @param string $key
  5580. * @param mixed $values
  5581. * @return \Illuminate\Log\Context\Repository
  5582. * @throws \RuntimeException
  5583. * @static
  5584. */
  5585. public static function push($key, ...$values)
  5586. {
  5587. /** @var \Illuminate\Log\Context\Repository $instance */
  5588. return $instance->push($key, ...$values);
  5589. }
  5590. /**
  5591. * Pop the latest value from the key's stack.
  5592. *
  5593. * @param string $key
  5594. * @return mixed
  5595. * @throws \RuntimeException
  5596. * @static
  5597. */
  5598. public static function pop($key)
  5599. {
  5600. /** @var \Illuminate\Log\Context\Repository $instance */
  5601. return $instance->pop($key);
  5602. }
  5603. /**
  5604. * Push the given hidden values onto the key's stack.
  5605. *
  5606. * @param string $key
  5607. * @param mixed $values
  5608. * @return \Illuminate\Log\Context\Repository
  5609. * @throws \RuntimeException
  5610. * @static
  5611. */
  5612. public static function pushHidden($key, ...$values)
  5613. {
  5614. /** @var \Illuminate\Log\Context\Repository $instance */
  5615. return $instance->pushHidden($key, ...$values);
  5616. }
  5617. /**
  5618. * Pop the latest hidden value from the key's stack.
  5619. *
  5620. * @param string $key
  5621. * @return mixed
  5622. * @throws \RuntimeException
  5623. * @static
  5624. */
  5625. public static function popHidden($key)
  5626. {
  5627. /** @var \Illuminate\Log\Context\Repository $instance */
  5628. return $instance->popHidden($key);
  5629. }
  5630. /**
  5631. * Increment a context counter.
  5632. *
  5633. * @param string $key
  5634. * @param int $amount
  5635. * @return \Illuminate\Log\Context\Repository
  5636. * @static
  5637. */
  5638. public static function increment($key, $amount = 1)
  5639. {
  5640. /** @var \Illuminate\Log\Context\Repository $instance */
  5641. return $instance->increment($key, $amount);
  5642. }
  5643. /**
  5644. * Decrement a context counter.
  5645. *
  5646. * @param string $key
  5647. * @param int $amount
  5648. * @return \Illuminate\Log\Context\Repository
  5649. * @static
  5650. */
  5651. public static function decrement($key, $amount = 1)
  5652. {
  5653. /** @var \Illuminate\Log\Context\Repository $instance */
  5654. return $instance->decrement($key, $amount);
  5655. }
  5656. /**
  5657. * Determine if the given value is in the given stack.
  5658. *
  5659. * @param string $key
  5660. * @param mixed $value
  5661. * @param bool $strict
  5662. * @return bool
  5663. * @throws \RuntimeException
  5664. * @static
  5665. */
  5666. public static function stackContains($key, $value, $strict = false)
  5667. {
  5668. /** @var \Illuminate\Log\Context\Repository $instance */
  5669. return $instance->stackContains($key, $value, $strict);
  5670. }
  5671. /**
  5672. * Determine if the given value is in the given hidden stack.
  5673. *
  5674. * @param string $key
  5675. * @param mixed $value
  5676. * @param bool $strict
  5677. * @return bool
  5678. * @throws \RuntimeException
  5679. * @static
  5680. */
  5681. public static function hiddenStackContains($key, $value, $strict = false)
  5682. {
  5683. /** @var \Illuminate\Log\Context\Repository $instance */
  5684. return $instance->hiddenStackContains($key, $value, $strict);
  5685. }
  5686. /**
  5687. * Run the callback function with the given context values and restore the original context state when complete.
  5688. *
  5689. * @param callable $callback
  5690. * @param array<string, mixed> $data
  5691. * @param array<string, mixed> $hidden
  5692. * @return mixed
  5693. * @static
  5694. */
  5695. public static function scope($callback, $data = [], $hidden = [])
  5696. {
  5697. /** @var \Illuminate\Log\Context\Repository $instance */
  5698. return $instance->scope($callback, $data, $hidden);
  5699. }
  5700. /**
  5701. * Determine if the repository is empty.
  5702. *
  5703. * @return bool
  5704. * @static
  5705. */
  5706. public static function isEmpty()
  5707. {
  5708. /** @var \Illuminate\Log\Context\Repository $instance */
  5709. return $instance->isEmpty();
  5710. }
  5711. /**
  5712. * Execute the given callback when context is about to be dehydrated.
  5713. *
  5714. * @param callable $callback
  5715. * @return \Illuminate\Log\Context\Repository
  5716. * @static
  5717. */
  5718. public static function dehydrating($callback)
  5719. {
  5720. /** @var \Illuminate\Log\Context\Repository $instance */
  5721. return $instance->dehydrating($callback);
  5722. }
  5723. /**
  5724. * Execute the given callback when context has been hydrated.
  5725. *
  5726. * @param callable $callback
  5727. * @return \Illuminate\Log\Context\Repository
  5728. * @static
  5729. */
  5730. public static function hydrated($callback)
  5731. {
  5732. /** @var \Illuminate\Log\Context\Repository $instance */
  5733. return $instance->hydrated($callback);
  5734. }
  5735. /**
  5736. * Handle unserialize exceptions using the given callback.
  5737. *
  5738. * @param callable|null $callback
  5739. * @return static
  5740. * @static
  5741. */
  5742. public static function handleUnserializeExceptionsUsing($callback)
  5743. {
  5744. /** @var \Illuminate\Log\Context\Repository $instance */
  5745. return $instance->handleUnserializeExceptionsUsing($callback);
  5746. }
  5747. /**
  5748. * Flush all context data.
  5749. *
  5750. * @return \Illuminate\Log\Context\Repository
  5751. * @static
  5752. */
  5753. public static function flush()
  5754. {
  5755. /** @var \Illuminate\Log\Context\Repository $instance */
  5756. return $instance->flush();
  5757. }
  5758. /**
  5759. * Dehydrate the context data.
  5760. *
  5761. * @internal
  5762. * @return \Illuminate\Log\Context\?array
  5763. * @static
  5764. */
  5765. public static function dehydrate()
  5766. {
  5767. /** @var \Illuminate\Log\Context\Repository $instance */
  5768. return $instance->dehydrate();
  5769. }
  5770. /**
  5771. * Hydrate the context instance.
  5772. *
  5773. * @internal
  5774. * @param \Illuminate\Log\Context\?array $context
  5775. * @return \Illuminate\Log\Context\Repository
  5776. * @throws \RuntimeException
  5777. * @static
  5778. */
  5779. public static function hydrate($context)
  5780. {
  5781. /** @var \Illuminate\Log\Context\Repository $instance */
  5782. return $instance->hydrate($context);
  5783. }
  5784. /**
  5785. * Apply the callback if the given "value" is (or resolves to) truthy.
  5786. *
  5787. * @template TWhenParameter
  5788. * @template TWhenReturnType
  5789. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  5790. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  5791. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  5792. * @return $this|TWhenReturnType
  5793. * @static
  5794. */
  5795. public static function when($value = null, $callback = null, $default = null)
  5796. {
  5797. /** @var \Illuminate\Log\Context\Repository $instance */
  5798. return $instance->when($value, $callback, $default);
  5799. }
  5800. /**
  5801. * Apply the callback if the given "value" is (or resolves to) falsy.
  5802. *
  5803. * @template TUnlessParameter
  5804. * @template TUnlessReturnType
  5805. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  5806. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  5807. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  5808. * @return $this|TUnlessReturnType
  5809. * @static
  5810. */
  5811. public static function unless($value = null, $callback = null, $default = null)
  5812. {
  5813. /** @var \Illuminate\Log\Context\Repository $instance */
  5814. return $instance->unless($value, $callback, $default);
  5815. }
  5816. /**
  5817. * Register a custom macro.
  5818. *
  5819. * @param string $name
  5820. * @param object|callable $macro
  5821. * @param-closure-this static $macro
  5822. * @return void
  5823. * @static
  5824. */
  5825. public static function macro($name, $macro)
  5826. {
  5827. \Illuminate\Log\Context\Repository::macro($name, $macro);
  5828. }
  5829. /**
  5830. * Mix another object into the class.
  5831. *
  5832. * @param object $mixin
  5833. * @param bool $replace
  5834. * @return void
  5835. * @throws \ReflectionException
  5836. * @static
  5837. */
  5838. public static function mixin($mixin, $replace = true)
  5839. {
  5840. \Illuminate\Log\Context\Repository::mixin($mixin, $replace);
  5841. }
  5842. /**
  5843. * Checks if macro is registered.
  5844. *
  5845. * @param string $name
  5846. * @return bool
  5847. * @static
  5848. */
  5849. public static function hasMacro($name)
  5850. {
  5851. return \Illuminate\Log\Context\Repository::hasMacro($name);
  5852. }
  5853. /**
  5854. * Flush the existing macros.
  5855. *
  5856. * @return void
  5857. * @static
  5858. */
  5859. public static function flushMacros()
  5860. {
  5861. \Illuminate\Log\Context\Repository::flushMacros();
  5862. }
  5863. /**
  5864. * Restore the model from the model identifier instance.
  5865. *
  5866. * @param \Illuminate\Contracts\Database\ModelIdentifier $value
  5867. * @return \Illuminate\Database\Eloquent\Model
  5868. * @static
  5869. */
  5870. public static function restoreModel($value)
  5871. {
  5872. /** @var \Illuminate\Log\Context\Repository $instance */
  5873. return $instance->restoreModel($value);
  5874. }
  5875. }
  5876. /**
  5877. * @see \Illuminate\Cookie\CookieJar
  5878. */
  5879. class Cookie {
  5880. /**
  5881. * Create a new cookie instance.
  5882. *
  5883. * @param string $name
  5884. * @param string $value
  5885. * @param int $minutes
  5886. * @param string|null $path
  5887. * @param string|null $domain
  5888. * @param bool|null $secure
  5889. * @param bool $httpOnly
  5890. * @param bool $raw
  5891. * @param string|null $sameSite
  5892. * @return \Symfony\Component\HttpFoundation\Cookie
  5893. * @static
  5894. */
  5895. public static function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
  5896. {
  5897. /** @var \Illuminate\Cookie\CookieJar $instance */
  5898. return $instance->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
  5899. }
  5900. /**
  5901. * Create a cookie that lasts "forever" (400 days).
  5902. *
  5903. * @param string $name
  5904. * @param string $value
  5905. * @param string|null $path
  5906. * @param string|null $domain
  5907. * @param bool|null $secure
  5908. * @param bool $httpOnly
  5909. * @param bool $raw
  5910. * @param string|null $sameSite
  5911. * @return \Symfony\Component\HttpFoundation\Cookie
  5912. * @static
  5913. */
  5914. public static function forever($name, $value, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
  5915. {
  5916. /** @var \Illuminate\Cookie\CookieJar $instance */
  5917. return $instance->forever($name, $value, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
  5918. }
  5919. /**
  5920. * Expire the given cookie.
  5921. *
  5922. * @param string $name
  5923. * @param string|null $path
  5924. * @param string|null $domain
  5925. * @return \Symfony\Component\HttpFoundation\Cookie
  5926. * @static
  5927. */
  5928. public static function forget($name, $path = null, $domain = null)
  5929. {
  5930. /** @var \Illuminate\Cookie\CookieJar $instance */
  5931. return $instance->forget($name, $path, $domain);
  5932. }
  5933. /**
  5934. * Determine if a cookie has been queued.
  5935. *
  5936. * @param string $key
  5937. * @param string|null $path
  5938. * @return bool
  5939. * @static
  5940. */
  5941. public static function hasQueued($key, $path = null)
  5942. {
  5943. /** @var \Illuminate\Cookie\CookieJar $instance */
  5944. return $instance->hasQueued($key, $path);
  5945. }
  5946. /**
  5947. * Get a queued cookie instance.
  5948. *
  5949. * @param string $key
  5950. * @param mixed $default
  5951. * @param string|null $path
  5952. * @return \Symfony\Component\HttpFoundation\Cookie|null
  5953. * @static
  5954. */
  5955. public static function queued($key, $default = null, $path = null)
  5956. {
  5957. /** @var \Illuminate\Cookie\CookieJar $instance */
  5958. return $instance->queued($key, $default, $path);
  5959. }
  5960. /**
  5961. * Queue a cookie to send with the next response.
  5962. *
  5963. * @param mixed $parameters
  5964. * @return void
  5965. * @static
  5966. */
  5967. public static function queue(...$parameters)
  5968. {
  5969. /** @var \Illuminate\Cookie\CookieJar $instance */
  5970. $instance->queue(...$parameters);
  5971. }
  5972. /**
  5973. * Queue a cookie to expire with the next response.
  5974. *
  5975. * @param string $name
  5976. * @param string|null $path
  5977. * @param string|null $domain
  5978. * @return void
  5979. * @static
  5980. */
  5981. public static function expire($name, $path = null, $domain = null)
  5982. {
  5983. /** @var \Illuminate\Cookie\CookieJar $instance */
  5984. $instance->expire($name, $path, $domain);
  5985. }
  5986. /**
  5987. * Remove a cookie from the queue.
  5988. *
  5989. * @param string $name
  5990. * @param string|null $path
  5991. * @return void
  5992. * @static
  5993. */
  5994. public static function unqueue($name, $path = null)
  5995. {
  5996. /** @var \Illuminate\Cookie\CookieJar $instance */
  5997. $instance->unqueue($name, $path);
  5998. }
  5999. /**
  6000. * Set the default path and domain for the jar.
  6001. *
  6002. * @param string $path
  6003. * @param string|null $domain
  6004. * @param bool|null $secure
  6005. * @param string|null $sameSite
  6006. * @return \Illuminate\Cookie\CookieJar
  6007. * @static
  6008. */
  6009. public static function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null)
  6010. {
  6011. /** @var \Illuminate\Cookie\CookieJar $instance */
  6012. return $instance->setDefaultPathAndDomain($path, $domain, $secure, $sameSite);
  6013. }
  6014. /**
  6015. * Get the cookies which have been queued for the next request.
  6016. *
  6017. * @return \Symfony\Component\HttpFoundation\Cookie[]
  6018. * @static
  6019. */
  6020. public static function getQueuedCookies()
  6021. {
  6022. /** @var \Illuminate\Cookie\CookieJar $instance */
  6023. return $instance->getQueuedCookies();
  6024. }
  6025. /**
  6026. * Flush the cookies which have been queued for the next request.
  6027. *
  6028. * @return \Illuminate\Cookie\CookieJar
  6029. * @static
  6030. */
  6031. public static function flushQueuedCookies()
  6032. {
  6033. /** @var \Illuminate\Cookie\CookieJar $instance */
  6034. return $instance->flushQueuedCookies();
  6035. }
  6036. /**
  6037. * Register a custom macro.
  6038. *
  6039. * @param string $name
  6040. * @param object|callable $macro
  6041. * @param-closure-this static $macro
  6042. * @return void
  6043. * @static
  6044. */
  6045. public static function macro($name, $macro)
  6046. {
  6047. \Illuminate\Cookie\CookieJar::macro($name, $macro);
  6048. }
  6049. /**
  6050. * Mix another object into the class.
  6051. *
  6052. * @param object $mixin
  6053. * @param bool $replace
  6054. * @return void
  6055. * @throws \ReflectionException
  6056. * @static
  6057. */
  6058. public static function mixin($mixin, $replace = true)
  6059. {
  6060. \Illuminate\Cookie\CookieJar::mixin($mixin, $replace);
  6061. }
  6062. /**
  6063. * Checks if macro is registered.
  6064. *
  6065. * @param string $name
  6066. * @return bool
  6067. * @static
  6068. */
  6069. public static function hasMacro($name)
  6070. {
  6071. return \Illuminate\Cookie\CookieJar::hasMacro($name);
  6072. }
  6073. /**
  6074. * Flush the existing macros.
  6075. *
  6076. * @return void
  6077. * @static
  6078. */
  6079. public static function flushMacros()
  6080. {
  6081. \Illuminate\Cookie\CookieJar::flushMacros();
  6082. }
  6083. }
  6084. /**
  6085. * @see \Illuminate\Encryption\Encrypter
  6086. */
  6087. class Crypt {
  6088. /**
  6089. * Determine if the given key and cipher combination is valid.
  6090. *
  6091. * @param string $key
  6092. * @param string $cipher
  6093. * @return bool
  6094. * @static
  6095. */
  6096. public static function supported($key, $cipher)
  6097. {
  6098. return \Illuminate\Encryption\Encrypter::supported($key, $cipher);
  6099. }
  6100. /**
  6101. * Create a new encryption key for the given cipher.
  6102. *
  6103. * @param string $cipher
  6104. * @return string
  6105. * @static
  6106. */
  6107. public static function generateKey($cipher)
  6108. {
  6109. return \Illuminate\Encryption\Encrypter::generateKey($cipher);
  6110. }
  6111. /**
  6112. * Encrypt the given value.
  6113. *
  6114. * @param mixed $value
  6115. * @param bool $serialize
  6116. * @return string
  6117. * @throws \Illuminate\Contracts\Encryption\EncryptException
  6118. * @static
  6119. */
  6120. public static function encrypt($value, $serialize = true)
  6121. {
  6122. /** @var \Illuminate\Encryption\Encrypter $instance */
  6123. return $instance->encrypt($value, $serialize);
  6124. }
  6125. /**
  6126. * Encrypt a string without serialization.
  6127. *
  6128. * @param string $value
  6129. * @return string
  6130. * @throws \Illuminate\Contracts\Encryption\EncryptException
  6131. * @static
  6132. */
  6133. public static function encryptString($value)
  6134. {
  6135. /** @var \Illuminate\Encryption\Encrypter $instance */
  6136. return $instance->encryptString($value);
  6137. }
  6138. /**
  6139. * Decrypt the given value.
  6140. *
  6141. * @param string $payload
  6142. * @param bool $unserialize
  6143. * @return mixed
  6144. * @throws \Illuminate\Contracts\Encryption\DecryptException
  6145. * @static
  6146. */
  6147. public static function decrypt($payload, $unserialize = true)
  6148. {
  6149. /** @var \Illuminate\Encryption\Encrypter $instance */
  6150. return $instance->decrypt($payload, $unserialize);
  6151. }
  6152. /**
  6153. * Decrypt the given string without unserialization.
  6154. *
  6155. * @param string $payload
  6156. * @return string
  6157. * @throws \Illuminate\Contracts\Encryption\DecryptException
  6158. * @static
  6159. */
  6160. public static function decryptString($payload)
  6161. {
  6162. /** @var \Illuminate\Encryption\Encrypter $instance */
  6163. return $instance->decryptString($payload);
  6164. }
  6165. /**
  6166. * Get the encryption key that the encrypter is currently using.
  6167. *
  6168. * @return string
  6169. * @static
  6170. */
  6171. public static function getKey()
  6172. {
  6173. /** @var \Illuminate\Encryption\Encrypter $instance */
  6174. return $instance->getKey();
  6175. }
  6176. /**
  6177. * Get the current encryption key and all previous encryption keys.
  6178. *
  6179. * @return array
  6180. * @static
  6181. */
  6182. public static function getAllKeys()
  6183. {
  6184. /** @var \Illuminate\Encryption\Encrypter $instance */
  6185. return $instance->getAllKeys();
  6186. }
  6187. /**
  6188. * Get the previous encryption keys.
  6189. *
  6190. * @return array
  6191. * @static
  6192. */
  6193. public static function getPreviousKeys()
  6194. {
  6195. /** @var \Illuminate\Encryption\Encrypter $instance */
  6196. return $instance->getPreviousKeys();
  6197. }
  6198. /**
  6199. * Set the previous / legacy encryption keys that should be utilized if decryption fails.
  6200. *
  6201. * @param array $keys
  6202. * @return \Illuminate\Encryption\Encrypter
  6203. * @static
  6204. */
  6205. public static function previousKeys($keys)
  6206. {
  6207. /** @var \Illuminate\Encryption\Encrypter $instance */
  6208. return $instance->previousKeys($keys);
  6209. }
  6210. }
  6211. /**
  6212. * @see https://carbon.nesbot.com/docs/
  6213. * @see https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Factory.php
  6214. * @method static bool canBeCreatedFromFormat(?string $date, string $format)
  6215. * @method static \Illuminate\Support\Carbon|null create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $timezone = null)
  6216. * @method static \Illuminate\Support\Carbon createFromDate($year = null, $month = null, $day = null, $timezone = null)
  6217. * @method static \Illuminate\Support\Carbon|null createFromFormat($format, $time, $timezone = null)
  6218. * @method static \Illuminate\Support\Carbon|null createFromIsoFormat(string $format, string $time, $timezone = null, ?string $locale = 'en', ?\Symfony\Contracts\Translation\TranslatorInterface $translator = null)
  6219. * @method static \Illuminate\Support\Carbon|null createFromLocaleFormat(string $format, string $locale, string $time, $timezone = null)
  6220. * @method static \Illuminate\Support\Carbon|null createFromLocaleIsoFormat(string $format, string $locale, string $time, $timezone = null)
  6221. * @method static \Illuminate\Support\Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $timezone = null)
  6222. * @method static \Illuminate\Support\Carbon createFromTimeString(string $time, \DateTimeZone|string|int|null $timezone = null)
  6223. * @method static \Illuminate\Support\Carbon createFromTimestamp(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
  6224. * @method static \Illuminate\Support\Carbon createFromTimestampMs(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
  6225. * @method static \Illuminate\Support\Carbon createFromTimestampMsUTC($timestamp)
  6226. * @method static \Illuminate\Support\Carbon createFromTimestampUTC(string|int|float $timestamp)
  6227. * @method static \Illuminate\Support\Carbon createMidnightDate($year = null, $month = null, $day = null, $timezone = null)
  6228. * @method static \Illuminate\Support\Carbon|null createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $timezone = null)
  6229. * @method static \Illuminate\Support\Carbon createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $timezone = null)
  6230. * @method static void disableHumanDiffOption($humanDiffOption)
  6231. * @method static void enableHumanDiffOption($humanDiffOption)
  6232. * @method static mixed executeWithLocale(string $locale, callable $func)
  6233. * @method static \Illuminate\Support\Carbon fromSerialized($value)
  6234. * @method static array getAvailableLocales()
  6235. * @method static array getAvailableLocalesInfo()
  6236. * @method static array getDays()
  6237. * @method static ?string getFallbackLocale()
  6238. * @method static array getFormatsToIsoReplacements()
  6239. * @method static int getHumanDiffOptions()
  6240. * @method static array getIsoUnits()
  6241. * @method static array|false getLastErrors()
  6242. * @method static string getLocale()
  6243. * @method static int getMidDayAt()
  6244. * @method static string getTimeFormatByPrecision(string $unitPrecision)
  6245. * @method static string|\Closure|null getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null)
  6246. * @method static \Illuminate\Support\Carbon|null getTestNow()
  6247. * @method static \Symfony\Contracts\Translation\TranslatorInterface getTranslator()
  6248. * @method static int getWeekEndsAt(?string $locale = null)
  6249. * @method static int getWeekStartsAt(?string $locale = null)
  6250. * @method static array getWeekendDays()
  6251. * @method static bool hasFormat(string $date, string $format)
  6252. * @method static bool hasFormatWithModifiers(string $date, string $format)
  6253. * @method static bool hasMacro($name)
  6254. * @method static bool hasRelativeKeywords(?string $time)
  6255. * @method static bool hasTestNow()
  6256. * @method static \Illuminate\Support\Carbon instance(\DateTimeInterface $date)
  6257. * @method static bool isImmutable()
  6258. * @method static bool isModifiableUnit($unit)
  6259. * @method static bool isMutable()
  6260. * @method static bool isStrictModeEnabled()
  6261. * @method static bool localeHasDiffOneDayWords(string $locale)
  6262. * @method static bool localeHasDiffSyntax(string $locale)
  6263. * @method static bool localeHasDiffTwoDayWords(string $locale)
  6264. * @method static bool localeHasPeriodSyntax($locale)
  6265. * @method static bool localeHasShortUnits(string $locale)
  6266. * @method static void macro(string $name, ?callable $macro)
  6267. * @method static \Illuminate\Support\Carbon|null make($var, \DateTimeZone|string|null $timezone = null)
  6268. * @method static void mixin(object|string $mixin)
  6269. * @method static \Illuminate\Support\Carbon now(\DateTimeZone|string|int|null $timezone = null)
  6270. * @method static \Illuminate\Support\Carbon parse(\DateTimeInterface|\Carbon\WeekDay|\Carbon\Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
  6271. * @method static \Illuminate\Support\Carbon parseFromLocale(string $time, ?string $locale = null, \DateTimeZone|string|int|null $timezone = null)
  6272. * @method static string pluralUnit(string $unit)
  6273. * @method static \Illuminate\Support\Carbon|null rawCreateFromFormat(string $format, string $time, $timezone = null)
  6274. * @method static \Illuminate\Support\Carbon rawParse(\DateTimeInterface|\Carbon\WeekDay|\Carbon\Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
  6275. * @method static void resetMonthsOverflow()
  6276. * @method static void resetToStringFormat()
  6277. * @method static void resetYearsOverflow()
  6278. * @method static void serializeUsing($callback)
  6279. * @method static void setFallbackLocale(string $locale)
  6280. * @method static void setHumanDiffOptions($humanDiffOptions)
  6281. * @method static void setLocale(string $locale)
  6282. * @method static void setMidDayAt($hour)
  6283. * @method static void setTestNow(mixed $testNow = null)
  6284. * @method static void setTestNowAndTimezone(mixed $testNow = null, $timezone = null)
  6285. * @method static void setToStringFormat(string|\Closure|null $format)
  6286. * @method static void setTranslator(\Symfony\Contracts\Translation\TranslatorInterface $translator)
  6287. * @method static void setWeekEndsAt($day)
  6288. * @method static void setWeekStartsAt($day)
  6289. * @method static void setWeekendDays($days)
  6290. * @method static bool shouldOverflowMonths()
  6291. * @method static bool shouldOverflowYears()
  6292. * @method static string singularUnit(string $unit)
  6293. * @method static void sleep(int|float $seconds)
  6294. * @method static \Illuminate\Support\Carbon today(\DateTimeZone|string|int|null $timezone = null)
  6295. * @method static \Illuminate\Support\Carbon tomorrow(\DateTimeZone|string|int|null $timezone = null)
  6296. * @method static string translateTimeString(string $timeString, ?string $from = null, ?string $to = null, int $mode = \Carbon\CarbonInterface::TRANSLATE_ALL)
  6297. * @method static string translateWith(\Symfony\Contracts\Translation\TranslatorInterface $translator, string $key, array $parameters = [], $number = null)
  6298. * @method static void useMonthsOverflow($monthsOverflow = true)
  6299. * @method static void useStrictMode($strictModeEnabled = true)
  6300. * @method static void useYearsOverflow($yearsOverflow = true)
  6301. * @method static mixed withTestNow(mixed $testNow, callable $callback)
  6302. * @method static static withTimeZone(\DateTimeZone|string|int|null $timezone)
  6303. * @method static \Illuminate\Support\Carbon yesterday(\DateTimeZone|string|int|null $timezone = null)
  6304. * @see \Illuminate\Support\DateFactory
  6305. */
  6306. class Date {
  6307. /**
  6308. * Use the given handler when generating dates (class name, callable, or factory).
  6309. *
  6310. * @param mixed $handler
  6311. * @return mixed
  6312. * @throws \InvalidArgumentException
  6313. * @static
  6314. */
  6315. public static function use($handler)
  6316. {
  6317. return \Illuminate\Support\DateFactory::use($handler);
  6318. }
  6319. /**
  6320. * Use the default date class when generating dates.
  6321. *
  6322. * @return void
  6323. * @static
  6324. */
  6325. public static function useDefault()
  6326. {
  6327. \Illuminate\Support\DateFactory::useDefault();
  6328. }
  6329. /**
  6330. * Execute the given callable on each date creation.
  6331. *
  6332. * @param callable $callable
  6333. * @return void
  6334. * @static
  6335. */
  6336. public static function useCallable($callable)
  6337. {
  6338. \Illuminate\Support\DateFactory::useCallable($callable);
  6339. }
  6340. /**
  6341. * Use the given date type (class) when generating dates.
  6342. *
  6343. * @param string $dateClass
  6344. * @return void
  6345. * @static
  6346. */
  6347. public static function useClass($dateClass)
  6348. {
  6349. \Illuminate\Support\DateFactory::useClass($dateClass);
  6350. }
  6351. /**
  6352. * Use the given Carbon factory when generating dates.
  6353. *
  6354. * @param object $factory
  6355. * @return void
  6356. * @static
  6357. */
  6358. public static function useFactory($factory)
  6359. {
  6360. \Illuminate\Support\DateFactory::useFactory($factory);
  6361. }
  6362. }
  6363. /**
  6364. * @see \Illuminate\Database\DatabaseManager
  6365. */
  6366. class DB {
  6367. /**
  6368. * Get a database connection instance.
  6369. *
  6370. * @param string|null $name
  6371. * @return \Illuminate\Database\Connection
  6372. * @static
  6373. */
  6374. public static function connection($name = null)
  6375. {
  6376. /** @var \Illuminate\Database\DatabaseManager $instance */
  6377. return $instance->connection($name);
  6378. }
  6379. /**
  6380. * Build a database connection instance from the given configuration.
  6381. *
  6382. * @param array $config
  6383. * @return \Illuminate\Database\PostgresConnection
  6384. * @static
  6385. */
  6386. public static function build($config)
  6387. {
  6388. /** @var \Illuminate\Database\DatabaseManager $instance */
  6389. return $instance->build($config);
  6390. }
  6391. /**
  6392. * Calculate the dynamic connection name for an on-demand connection based on its configuration.
  6393. *
  6394. * @param array $config
  6395. * @return string
  6396. * @static
  6397. */
  6398. public static function calculateDynamicConnectionName($config)
  6399. {
  6400. return \Illuminate\Database\DatabaseManager::calculateDynamicConnectionName($config);
  6401. }
  6402. /**
  6403. * Get a database connection instance from the given configuration.
  6404. *
  6405. * @param string $name
  6406. * @param array $config
  6407. * @param bool $force
  6408. * @return \Illuminate\Database\PostgresConnection
  6409. * @static
  6410. */
  6411. public static function connectUsing($name, $config, $force = false)
  6412. {
  6413. /** @var \Illuminate\Database\DatabaseManager $instance */
  6414. return $instance->connectUsing($name, $config, $force);
  6415. }
  6416. /**
  6417. * Disconnect from the given database and remove from local cache.
  6418. *
  6419. * @param string|null $name
  6420. * @return void
  6421. * @static
  6422. */
  6423. public static function purge($name = null)
  6424. {
  6425. /** @var \Illuminate\Database\DatabaseManager $instance */
  6426. $instance->purge($name);
  6427. }
  6428. /**
  6429. * Disconnect from the given database.
  6430. *
  6431. * @param string|null $name
  6432. * @return void
  6433. * @static
  6434. */
  6435. public static function disconnect($name = null)
  6436. {
  6437. /** @var \Illuminate\Database\DatabaseManager $instance */
  6438. $instance->disconnect($name);
  6439. }
  6440. /**
  6441. * Reconnect to the given database.
  6442. *
  6443. * @param string|null $name
  6444. * @return \Illuminate\Database\Connection
  6445. * @static
  6446. */
  6447. public static function reconnect($name = null)
  6448. {
  6449. /** @var \Illuminate\Database\DatabaseManager $instance */
  6450. return $instance->reconnect($name);
  6451. }
  6452. /**
  6453. * Set the default database connection for the callback execution.
  6454. *
  6455. * @param string $name
  6456. * @param callable $callback
  6457. * @return mixed
  6458. * @static
  6459. */
  6460. public static function usingConnection($name, $callback)
  6461. {
  6462. /** @var \Illuminate\Database\DatabaseManager $instance */
  6463. return $instance->usingConnection($name, $callback);
  6464. }
  6465. /**
  6466. * Get the default connection name.
  6467. *
  6468. * @return string
  6469. * @static
  6470. */
  6471. public static function getDefaultConnection()
  6472. {
  6473. /** @var \Illuminate\Database\DatabaseManager $instance */
  6474. return $instance->getDefaultConnection();
  6475. }
  6476. /**
  6477. * Set the default connection name.
  6478. *
  6479. * @param string $name
  6480. * @return void
  6481. * @static
  6482. */
  6483. public static function setDefaultConnection($name)
  6484. {
  6485. /** @var \Illuminate\Database\DatabaseManager $instance */
  6486. $instance->setDefaultConnection($name);
  6487. }
  6488. /**
  6489. * Get all of the supported drivers.
  6490. *
  6491. * @return string[]
  6492. * @static
  6493. */
  6494. public static function supportedDrivers()
  6495. {
  6496. /** @var \Illuminate\Database\DatabaseManager $instance */
  6497. return $instance->supportedDrivers();
  6498. }
  6499. /**
  6500. * Get all of the drivers that are actually available.
  6501. *
  6502. * @return string[]
  6503. * @static
  6504. */
  6505. public static function availableDrivers()
  6506. {
  6507. /** @var \Illuminate\Database\DatabaseManager $instance */
  6508. return $instance->availableDrivers();
  6509. }
  6510. /**
  6511. * Register an extension connection resolver.
  6512. *
  6513. * @param string $name
  6514. * @param callable $resolver
  6515. * @return void
  6516. * @static
  6517. */
  6518. public static function extend($name, $resolver)
  6519. {
  6520. /** @var \Illuminate\Database\DatabaseManager $instance */
  6521. $instance->extend($name, $resolver);
  6522. }
  6523. /**
  6524. * Remove an extension connection resolver.
  6525. *
  6526. * @param string $name
  6527. * @return void
  6528. * @static
  6529. */
  6530. public static function forgetExtension($name)
  6531. {
  6532. /** @var \Illuminate\Database\DatabaseManager $instance */
  6533. $instance->forgetExtension($name);
  6534. }
  6535. /**
  6536. * Return all of the created connections.
  6537. *
  6538. * @return array<string, \Illuminate\Database\Connection>
  6539. * @static
  6540. */
  6541. public static function getConnections()
  6542. {
  6543. /** @var \Illuminate\Database\DatabaseManager $instance */
  6544. return $instance->getConnections();
  6545. }
  6546. /**
  6547. * Set the database reconnector callback.
  6548. *
  6549. * @param callable $reconnector
  6550. * @return void
  6551. * @static
  6552. */
  6553. public static function setReconnector($reconnector)
  6554. {
  6555. /** @var \Illuminate\Database\DatabaseManager $instance */
  6556. $instance->setReconnector($reconnector);
  6557. }
  6558. /**
  6559. * Set the application instance used by the manager.
  6560. *
  6561. * @param \Illuminate\Contracts\Foundation\Application $app
  6562. * @return \Illuminate\Database\DatabaseManager
  6563. * @static
  6564. */
  6565. public static function setApplication($app)
  6566. {
  6567. /** @var \Illuminate\Database\DatabaseManager $instance */
  6568. return $instance->setApplication($app);
  6569. }
  6570. /**
  6571. * Register a custom macro.
  6572. *
  6573. * @param string $name
  6574. * @param object|callable $macro
  6575. * @param-closure-this static $macro
  6576. * @return void
  6577. * @static
  6578. */
  6579. public static function macro($name, $macro)
  6580. {
  6581. \Illuminate\Database\DatabaseManager::macro($name, $macro);
  6582. }
  6583. /**
  6584. * Mix another object into the class.
  6585. *
  6586. * @param object $mixin
  6587. * @param bool $replace
  6588. * @return void
  6589. * @throws \ReflectionException
  6590. * @static
  6591. */
  6592. public static function mixin($mixin, $replace = true)
  6593. {
  6594. \Illuminate\Database\DatabaseManager::mixin($mixin, $replace);
  6595. }
  6596. /**
  6597. * Checks if macro is registered.
  6598. *
  6599. * @param string $name
  6600. * @return bool
  6601. * @static
  6602. */
  6603. public static function hasMacro($name)
  6604. {
  6605. return \Illuminate\Database\DatabaseManager::hasMacro($name);
  6606. }
  6607. /**
  6608. * Flush the existing macros.
  6609. *
  6610. * @return void
  6611. * @static
  6612. */
  6613. public static function flushMacros()
  6614. {
  6615. \Illuminate\Database\DatabaseManager::flushMacros();
  6616. }
  6617. /**
  6618. * Dynamically handle calls to the class.
  6619. *
  6620. * @param string $method
  6621. * @param array $parameters
  6622. * @return mixed
  6623. * @throws \BadMethodCallException
  6624. * @static
  6625. */
  6626. public static function macroCall($method, $parameters)
  6627. {
  6628. /** @var \Illuminate\Database\DatabaseManager $instance */
  6629. return $instance->macroCall($method, $parameters);
  6630. }
  6631. /**
  6632. * Get a human-readable name for the given connection driver.
  6633. *
  6634. * @return string
  6635. * @static
  6636. */
  6637. public static function getDriverTitle()
  6638. {
  6639. /** @var \Illuminate\Database\PostgresConnection $instance */
  6640. return $instance->getDriverTitle();
  6641. }
  6642. /**
  6643. * Get a schema builder instance for the connection.
  6644. *
  6645. * @return \Illuminate\Database\Schema\PostgresBuilder
  6646. * @static
  6647. */
  6648. public static function getSchemaBuilder()
  6649. {
  6650. /** @var \Illuminate\Database\PostgresConnection $instance */
  6651. return $instance->getSchemaBuilder();
  6652. }
  6653. /**
  6654. * Get the schema state for the connection.
  6655. *
  6656. * @param \Illuminate\Filesystem\Filesystem|null $files
  6657. * @param callable|null $processFactory
  6658. * @return \Illuminate\Database\Schema\PostgresSchemaState
  6659. * @static
  6660. */
  6661. public static function getSchemaState($files = null, $processFactory = null)
  6662. {
  6663. /** @var \Illuminate\Database\PostgresConnection $instance */
  6664. return $instance->getSchemaState($files, $processFactory);
  6665. }
  6666. /**
  6667. * Set the query grammar to the default implementation.
  6668. *
  6669. * @return void
  6670. * @static
  6671. */
  6672. public static function useDefaultQueryGrammar()
  6673. {
  6674. //Method inherited from \Illuminate\Database\Connection
  6675. /** @var \Illuminate\Database\PostgresConnection $instance */
  6676. $instance->useDefaultQueryGrammar();
  6677. }
  6678. /**
  6679. * Set the schema grammar to the default implementation.
  6680. *
  6681. * @return void
  6682. * @static
  6683. */
  6684. public static function useDefaultSchemaGrammar()
  6685. {
  6686. //Method inherited from \Illuminate\Database\Connection
  6687. /** @var \Illuminate\Database\PostgresConnection $instance */
  6688. $instance->useDefaultSchemaGrammar();
  6689. }
  6690. /**
  6691. * Set the query post processor to the default implementation.
  6692. *
  6693. * @return void
  6694. * @static
  6695. */
  6696. public static function useDefaultPostProcessor()
  6697. {
  6698. //Method inherited from \Illuminate\Database\Connection
  6699. /** @var \Illuminate\Database\PostgresConnection $instance */
  6700. $instance->useDefaultPostProcessor();
  6701. }
  6702. /**
  6703. * Begin a fluent query against a database table.
  6704. *
  6705. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string $table
  6706. * @param string|null $as
  6707. * @return \Illuminate\Database\Query\Builder
  6708. * @static
  6709. */
  6710. public static function table($table, $as = null)
  6711. {
  6712. //Method inherited from \Illuminate\Database\Connection
  6713. /** @var \Illuminate\Database\PostgresConnection $instance */
  6714. return $instance->table($table, $as);
  6715. }
  6716. /**
  6717. * Get a new query builder instance.
  6718. *
  6719. * @return \Illuminate\Database\Query\Builder
  6720. * @static
  6721. */
  6722. public static function query()
  6723. {
  6724. //Method inherited from \Illuminate\Database\Connection
  6725. /** @var \Illuminate\Database\PostgresConnection $instance */
  6726. return $instance->query();
  6727. }
  6728. /**
  6729. * Run a select statement and return a single result.
  6730. *
  6731. * @param string $query
  6732. * @param array $bindings
  6733. * @param bool $useReadPdo
  6734. * @return mixed
  6735. * @static
  6736. */
  6737. public static function selectOne($query, $bindings = [], $useReadPdo = true)
  6738. {
  6739. //Method inherited from \Illuminate\Database\Connection
  6740. /** @var \Illuminate\Database\PostgresConnection $instance */
  6741. return $instance->selectOne($query, $bindings, $useReadPdo);
  6742. }
  6743. /**
  6744. * Run a select statement and return the first column of the first row.
  6745. *
  6746. * @param string $query
  6747. * @param array $bindings
  6748. * @param bool $useReadPdo
  6749. * @return mixed
  6750. * @throws \Illuminate\Database\MultipleColumnsSelectedException
  6751. * @static
  6752. */
  6753. public static function scalar($query, $bindings = [], $useReadPdo = true)
  6754. {
  6755. //Method inherited from \Illuminate\Database\Connection
  6756. /** @var \Illuminate\Database\PostgresConnection $instance */
  6757. return $instance->scalar($query, $bindings, $useReadPdo);
  6758. }
  6759. /**
  6760. * Run a select statement against the database.
  6761. *
  6762. * @param string $query
  6763. * @param array $bindings
  6764. * @return array
  6765. * @static
  6766. */
  6767. public static function selectFromWriteConnection($query, $bindings = [])
  6768. {
  6769. //Method inherited from \Illuminate\Database\Connection
  6770. /** @var \Illuminate\Database\PostgresConnection $instance */
  6771. return $instance->selectFromWriteConnection($query, $bindings);
  6772. }
  6773. /**
  6774. * Run a select statement against the database.
  6775. *
  6776. * @param string $query
  6777. * @param array $bindings
  6778. * @param bool $useReadPdo
  6779. * @return array
  6780. * @static
  6781. */
  6782. public static function select($query, $bindings = [], $useReadPdo = true)
  6783. {
  6784. //Method inherited from \Illuminate\Database\Connection
  6785. /** @var \Illuminate\Database\PostgresConnection $instance */
  6786. return $instance->select($query, $bindings, $useReadPdo);
  6787. }
  6788. /**
  6789. * Run a select statement against the database and returns all of the result sets.
  6790. *
  6791. * @param string $query
  6792. * @param array $bindings
  6793. * @param bool $useReadPdo
  6794. * @return array
  6795. * @static
  6796. */
  6797. public static function selectResultSets($query, $bindings = [], $useReadPdo = true)
  6798. {
  6799. //Method inherited from \Illuminate\Database\Connection
  6800. /** @var \Illuminate\Database\PostgresConnection $instance */
  6801. return $instance->selectResultSets($query, $bindings, $useReadPdo);
  6802. }
  6803. /**
  6804. * Run a select statement against the database and returns a generator.
  6805. *
  6806. * @param string $query
  6807. * @param array $bindings
  6808. * @param bool $useReadPdo
  6809. * @return \Generator<int, \stdClass>
  6810. * @static
  6811. */
  6812. public static function cursor($query, $bindings = [], $useReadPdo = true)
  6813. {
  6814. //Method inherited from \Illuminate\Database\Connection
  6815. /** @var \Illuminate\Database\PostgresConnection $instance */
  6816. return $instance->cursor($query, $bindings, $useReadPdo);
  6817. }
  6818. /**
  6819. * Run an insert statement against the database.
  6820. *
  6821. * @param string $query
  6822. * @param array $bindings
  6823. * @return bool
  6824. * @static
  6825. */
  6826. public static function insert($query, $bindings = [])
  6827. {
  6828. //Method inherited from \Illuminate\Database\Connection
  6829. /** @var \Illuminate\Database\PostgresConnection $instance */
  6830. return $instance->insert($query, $bindings);
  6831. }
  6832. /**
  6833. * Run an update statement against the database.
  6834. *
  6835. * @param string $query
  6836. * @param array $bindings
  6837. * @return int
  6838. * @static
  6839. */
  6840. public static function update($query, $bindings = [])
  6841. {
  6842. //Method inherited from \Illuminate\Database\Connection
  6843. /** @var \Illuminate\Database\PostgresConnection $instance */
  6844. return $instance->update($query, $bindings);
  6845. }
  6846. /**
  6847. * Run a delete statement against the database.
  6848. *
  6849. * @param string $query
  6850. * @param array $bindings
  6851. * @return int
  6852. * @static
  6853. */
  6854. public static function delete($query, $bindings = [])
  6855. {
  6856. //Method inherited from \Illuminate\Database\Connection
  6857. /** @var \Illuminate\Database\PostgresConnection $instance */
  6858. return $instance->delete($query, $bindings);
  6859. }
  6860. /**
  6861. * Execute an SQL statement and return the boolean result.
  6862. *
  6863. * @param string $query
  6864. * @param array $bindings
  6865. * @return bool
  6866. * @static
  6867. */
  6868. public static function statement($query, $bindings = [])
  6869. {
  6870. //Method inherited from \Illuminate\Database\Connection
  6871. /** @var \Illuminate\Database\PostgresConnection $instance */
  6872. return $instance->statement($query, $bindings);
  6873. }
  6874. /**
  6875. * Run an SQL statement and get the number of rows affected.
  6876. *
  6877. * @param string $query
  6878. * @param array $bindings
  6879. * @return int
  6880. * @static
  6881. */
  6882. public static function affectingStatement($query, $bindings = [])
  6883. {
  6884. //Method inherited from \Illuminate\Database\Connection
  6885. /** @var \Illuminate\Database\PostgresConnection $instance */
  6886. return $instance->affectingStatement($query, $bindings);
  6887. }
  6888. /**
  6889. * Run a raw, unprepared query against the PDO connection.
  6890. *
  6891. * @param string $query
  6892. * @return bool
  6893. * @static
  6894. */
  6895. public static function unprepared($query)
  6896. {
  6897. //Method inherited from \Illuminate\Database\Connection
  6898. /** @var \Illuminate\Database\PostgresConnection $instance */
  6899. return $instance->unprepared($query);
  6900. }
  6901. /**
  6902. * Get the number of open connections for the database.
  6903. *
  6904. * @return int|null
  6905. * @static
  6906. */
  6907. public static function threadCount()
  6908. {
  6909. //Method inherited from \Illuminate\Database\Connection
  6910. /** @var \Illuminate\Database\PostgresConnection $instance */
  6911. return $instance->threadCount();
  6912. }
  6913. /**
  6914. * Execute the given callback in "dry run" mode.
  6915. *
  6916. * @param \Closure $callback
  6917. * @return array
  6918. * @static
  6919. */
  6920. public static function pretend($callback)
  6921. {
  6922. //Method inherited from \Illuminate\Database\Connection
  6923. /** @var \Illuminate\Database\PostgresConnection $instance */
  6924. return $instance->pretend($callback);
  6925. }
  6926. /**
  6927. * Execute the given callback without "pretending".
  6928. *
  6929. * @param \Closure $callback
  6930. * @return mixed
  6931. * @static
  6932. */
  6933. public static function withoutPretending($callback)
  6934. {
  6935. //Method inherited from \Illuminate\Database\Connection
  6936. /** @var \Illuminate\Database\PostgresConnection $instance */
  6937. return $instance->withoutPretending($callback);
  6938. }
  6939. /**
  6940. * Bind values to their parameters in the given statement.
  6941. *
  6942. * @param \PDOStatement $statement
  6943. * @param array $bindings
  6944. * @return void
  6945. * @static
  6946. */
  6947. public static function bindValues($statement, $bindings)
  6948. {
  6949. //Method inherited from \Illuminate\Database\Connection
  6950. /** @var \Illuminate\Database\PostgresConnection $instance */
  6951. $instance->bindValues($statement, $bindings);
  6952. }
  6953. /**
  6954. * Prepare the query bindings for execution.
  6955. *
  6956. * @param array $bindings
  6957. * @return array
  6958. * @static
  6959. */
  6960. public static function prepareBindings($bindings)
  6961. {
  6962. //Method inherited from \Illuminate\Database\Connection
  6963. /** @var \Illuminate\Database\PostgresConnection $instance */
  6964. return $instance->prepareBindings($bindings);
  6965. }
  6966. /**
  6967. * Log a query in the connection's query log.
  6968. *
  6969. * @param string $query
  6970. * @param array $bindings
  6971. * @param float|null $time
  6972. * @return void
  6973. * @static
  6974. */
  6975. public static function logQuery($query, $bindings, $time = null)
  6976. {
  6977. //Method inherited from \Illuminate\Database\Connection
  6978. /** @var \Illuminate\Database\PostgresConnection $instance */
  6979. $instance->logQuery($query, $bindings, $time);
  6980. }
  6981. /**
  6982. * Register a callback to be invoked when the connection queries for longer than a given amount of time.
  6983. *
  6984. * @param \DateTimeInterface|\Carbon\CarbonInterval|float|int $threshold
  6985. * @param callable $handler
  6986. * @return void
  6987. * @static
  6988. */
  6989. public static function whenQueryingForLongerThan($threshold, $handler)
  6990. {
  6991. //Method inherited from \Illuminate\Database\Connection
  6992. /** @var \Illuminate\Database\PostgresConnection $instance */
  6993. $instance->whenQueryingForLongerThan($threshold, $handler);
  6994. }
  6995. /**
  6996. * Allow all the query duration handlers to run again, even if they have already run.
  6997. *
  6998. * @return void
  6999. * @static
  7000. */
  7001. public static function allowQueryDurationHandlersToRunAgain()
  7002. {
  7003. //Method inherited from \Illuminate\Database\Connection
  7004. /** @var \Illuminate\Database\PostgresConnection $instance */
  7005. $instance->allowQueryDurationHandlersToRunAgain();
  7006. }
  7007. /**
  7008. * Get the duration of all run queries in milliseconds.
  7009. *
  7010. * @return float
  7011. * @static
  7012. */
  7013. public static function totalQueryDuration()
  7014. {
  7015. //Method inherited from \Illuminate\Database\Connection
  7016. /** @var \Illuminate\Database\PostgresConnection $instance */
  7017. return $instance->totalQueryDuration();
  7018. }
  7019. /**
  7020. * Reset the duration of all run queries.
  7021. *
  7022. * @return void
  7023. * @static
  7024. */
  7025. public static function resetTotalQueryDuration()
  7026. {
  7027. //Method inherited from \Illuminate\Database\Connection
  7028. /** @var \Illuminate\Database\PostgresConnection $instance */
  7029. $instance->resetTotalQueryDuration();
  7030. }
  7031. /**
  7032. * Reconnect to the database if a PDO connection is missing.
  7033. *
  7034. * @return void
  7035. * @static
  7036. */
  7037. public static function reconnectIfMissingConnection()
  7038. {
  7039. //Method inherited from \Illuminate\Database\Connection
  7040. /** @var \Illuminate\Database\PostgresConnection $instance */
  7041. $instance->reconnectIfMissingConnection();
  7042. }
  7043. /**
  7044. * Register a hook to be run just before a database transaction is started.
  7045. *
  7046. * @param \Closure $callback
  7047. * @return \Illuminate\Database\PostgresConnection
  7048. * @static
  7049. */
  7050. public static function beforeStartingTransaction($callback)
  7051. {
  7052. //Method inherited from \Illuminate\Database\Connection
  7053. /** @var \Illuminate\Database\PostgresConnection $instance */
  7054. return $instance->beforeStartingTransaction($callback);
  7055. }
  7056. /**
  7057. * Register a hook to be run just before a database query is executed.
  7058. *
  7059. * @param \Closure $callback
  7060. * @return \Illuminate\Database\PostgresConnection
  7061. * @static
  7062. */
  7063. public static function beforeExecuting($callback)
  7064. {
  7065. //Method inherited from \Illuminate\Database\Connection
  7066. /** @var \Illuminate\Database\PostgresConnection $instance */
  7067. return $instance->beforeExecuting($callback);
  7068. }
  7069. /**
  7070. * Register a database query listener with the connection.
  7071. *
  7072. * @param \Closure $callback
  7073. * @return void
  7074. * @static
  7075. */
  7076. public static function listen($callback)
  7077. {
  7078. //Method inherited from \Illuminate\Database\Connection
  7079. /** @var \Illuminate\Database\PostgresConnection $instance */
  7080. $instance->listen($callback);
  7081. }
  7082. /**
  7083. * Get a new raw query expression.
  7084. *
  7085. * @param mixed $value
  7086. * @return \Illuminate\Contracts\Database\Query\Expression
  7087. * @static
  7088. */
  7089. public static function raw($value)
  7090. {
  7091. //Method inherited from \Illuminate\Database\Connection
  7092. /** @var \Illuminate\Database\PostgresConnection $instance */
  7093. return $instance->raw($value);
  7094. }
  7095. /**
  7096. * Escape a value for safe SQL embedding.
  7097. *
  7098. * @param string|float|int|bool|null $value
  7099. * @param bool $binary
  7100. * @return string
  7101. * @static
  7102. */
  7103. public static function escape($value, $binary = false)
  7104. {
  7105. //Method inherited from \Illuminate\Database\Connection
  7106. /** @var \Illuminate\Database\PostgresConnection $instance */
  7107. return $instance->escape($value, $binary);
  7108. }
  7109. /**
  7110. * Determine if the database connection has modified any database records.
  7111. *
  7112. * @return bool
  7113. * @static
  7114. */
  7115. public static function hasModifiedRecords()
  7116. {
  7117. //Method inherited from \Illuminate\Database\Connection
  7118. /** @var \Illuminate\Database\PostgresConnection $instance */
  7119. return $instance->hasModifiedRecords();
  7120. }
  7121. /**
  7122. * Indicate if any records have been modified.
  7123. *
  7124. * @param bool $value
  7125. * @return void
  7126. * @static
  7127. */
  7128. public static function recordsHaveBeenModified($value = true)
  7129. {
  7130. //Method inherited from \Illuminate\Database\Connection
  7131. /** @var \Illuminate\Database\PostgresConnection $instance */
  7132. $instance->recordsHaveBeenModified($value);
  7133. }
  7134. /**
  7135. * Set the record modification state.
  7136. *
  7137. * @param bool $value
  7138. * @return \Illuminate\Database\PostgresConnection
  7139. * @static
  7140. */
  7141. public static function setRecordModificationState($value)
  7142. {
  7143. //Method inherited from \Illuminate\Database\Connection
  7144. /** @var \Illuminate\Database\PostgresConnection $instance */
  7145. return $instance->setRecordModificationState($value);
  7146. }
  7147. /**
  7148. * Reset the record modification state.
  7149. *
  7150. * @return void
  7151. * @static
  7152. */
  7153. public static function forgetRecordModificationState()
  7154. {
  7155. //Method inherited from \Illuminate\Database\Connection
  7156. /** @var \Illuminate\Database\PostgresConnection $instance */
  7157. $instance->forgetRecordModificationState();
  7158. }
  7159. /**
  7160. * Indicate that the connection should use the write PDO connection for reads.
  7161. *
  7162. * @param bool $value
  7163. * @return \Illuminate\Database\PostgresConnection
  7164. * @static
  7165. */
  7166. public static function useWriteConnectionWhenReading($value = true)
  7167. {
  7168. //Method inherited from \Illuminate\Database\Connection
  7169. /** @var \Illuminate\Database\PostgresConnection $instance */
  7170. return $instance->useWriteConnectionWhenReading($value);
  7171. }
  7172. /**
  7173. * Get the current PDO connection.
  7174. *
  7175. * @return \PDO
  7176. * @static
  7177. */
  7178. public static function getPdo()
  7179. {
  7180. //Method inherited from \Illuminate\Database\Connection
  7181. /** @var \Illuminate\Database\PostgresConnection $instance */
  7182. return $instance->getPdo();
  7183. }
  7184. /**
  7185. * Get the current PDO connection parameter without executing any reconnect logic.
  7186. *
  7187. * @return \PDO|\Closure|null
  7188. * @static
  7189. */
  7190. public static function getRawPdo()
  7191. {
  7192. //Method inherited from \Illuminate\Database\Connection
  7193. /** @var \Illuminate\Database\PostgresConnection $instance */
  7194. return $instance->getRawPdo();
  7195. }
  7196. /**
  7197. * Get the current PDO connection used for reading.
  7198. *
  7199. * @return \PDO
  7200. * @static
  7201. */
  7202. public static function getReadPdo()
  7203. {
  7204. //Method inherited from \Illuminate\Database\Connection
  7205. /** @var \Illuminate\Database\PostgresConnection $instance */
  7206. return $instance->getReadPdo();
  7207. }
  7208. /**
  7209. * Get the current read PDO connection parameter without executing any reconnect logic.
  7210. *
  7211. * @return \PDO|\Closure|null
  7212. * @static
  7213. */
  7214. public static function getRawReadPdo()
  7215. {
  7216. //Method inherited from \Illuminate\Database\Connection
  7217. /** @var \Illuminate\Database\PostgresConnection $instance */
  7218. return $instance->getRawReadPdo();
  7219. }
  7220. /**
  7221. * Set the PDO connection.
  7222. *
  7223. * @param \PDO|\Closure|null $pdo
  7224. * @return \Illuminate\Database\PostgresConnection
  7225. * @static
  7226. */
  7227. public static function setPdo($pdo)
  7228. {
  7229. //Method inherited from \Illuminate\Database\Connection
  7230. /** @var \Illuminate\Database\PostgresConnection $instance */
  7231. return $instance->setPdo($pdo);
  7232. }
  7233. /**
  7234. * Set the PDO connection used for reading.
  7235. *
  7236. * @param \PDO|\Closure|null $pdo
  7237. * @return \Illuminate\Database\PostgresConnection
  7238. * @static
  7239. */
  7240. public static function setReadPdo($pdo)
  7241. {
  7242. //Method inherited from \Illuminate\Database\Connection
  7243. /** @var \Illuminate\Database\PostgresConnection $instance */
  7244. return $instance->setReadPdo($pdo);
  7245. }
  7246. /**
  7247. * Get the database connection name.
  7248. *
  7249. * @return string|null
  7250. * @static
  7251. */
  7252. public static function getName()
  7253. {
  7254. //Method inherited from \Illuminate\Database\Connection
  7255. /** @var \Illuminate\Database\PostgresConnection $instance */
  7256. return $instance->getName();
  7257. }
  7258. /**
  7259. * Get the database connection full name.
  7260. *
  7261. * @return string|null
  7262. * @static
  7263. */
  7264. public static function getNameWithReadWriteType()
  7265. {
  7266. //Method inherited from \Illuminate\Database\Connection
  7267. /** @var \Illuminate\Database\PostgresConnection $instance */
  7268. return $instance->getNameWithReadWriteType();
  7269. }
  7270. /**
  7271. * Get an option from the configuration options.
  7272. *
  7273. * @param string|null $option
  7274. * @return mixed
  7275. * @static
  7276. */
  7277. public static function getConfig($option = null)
  7278. {
  7279. //Method inherited from \Illuminate\Database\Connection
  7280. /** @var \Illuminate\Database\PostgresConnection $instance */
  7281. return $instance->getConfig($option);
  7282. }
  7283. /**
  7284. * Get the PDO driver name.
  7285. *
  7286. * @return string
  7287. * @static
  7288. */
  7289. public static function getDriverName()
  7290. {
  7291. //Method inherited from \Illuminate\Database\Connection
  7292. /** @var \Illuminate\Database\PostgresConnection $instance */
  7293. return $instance->getDriverName();
  7294. }
  7295. /**
  7296. * Get the query grammar used by the connection.
  7297. *
  7298. * @return \Illuminate\Database\Query\Grammars\Grammar
  7299. * @static
  7300. */
  7301. public static function getQueryGrammar()
  7302. {
  7303. //Method inherited from \Illuminate\Database\Connection
  7304. /** @var \Illuminate\Database\PostgresConnection $instance */
  7305. return $instance->getQueryGrammar();
  7306. }
  7307. /**
  7308. * Set the query grammar used by the connection.
  7309. *
  7310. * @param \Illuminate\Database\Query\Grammars\Grammar $grammar
  7311. * @return \Illuminate\Database\PostgresConnection
  7312. * @static
  7313. */
  7314. public static function setQueryGrammar($grammar)
  7315. {
  7316. //Method inherited from \Illuminate\Database\Connection
  7317. /** @var \Illuminate\Database\PostgresConnection $instance */
  7318. return $instance->setQueryGrammar($grammar);
  7319. }
  7320. /**
  7321. * Get the schema grammar used by the connection.
  7322. *
  7323. * @return \Illuminate\Database\Schema\Grammars\Grammar
  7324. * @static
  7325. */
  7326. public static function getSchemaGrammar()
  7327. {
  7328. //Method inherited from \Illuminate\Database\Connection
  7329. /** @var \Illuminate\Database\PostgresConnection $instance */
  7330. return $instance->getSchemaGrammar();
  7331. }
  7332. /**
  7333. * Set the schema grammar used by the connection.
  7334. *
  7335. * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
  7336. * @return \Illuminate\Database\PostgresConnection
  7337. * @static
  7338. */
  7339. public static function setSchemaGrammar($grammar)
  7340. {
  7341. //Method inherited from \Illuminate\Database\Connection
  7342. /** @var \Illuminate\Database\PostgresConnection $instance */
  7343. return $instance->setSchemaGrammar($grammar);
  7344. }
  7345. /**
  7346. * Get the query post processor used by the connection.
  7347. *
  7348. * @return \Illuminate\Database\Query\Processors\Processor
  7349. * @static
  7350. */
  7351. public static function getPostProcessor()
  7352. {
  7353. //Method inherited from \Illuminate\Database\Connection
  7354. /** @var \Illuminate\Database\PostgresConnection $instance */
  7355. return $instance->getPostProcessor();
  7356. }
  7357. /**
  7358. * Set the query post processor used by the connection.
  7359. *
  7360. * @param \Illuminate\Database\Query\Processors\Processor $processor
  7361. * @return \Illuminate\Database\PostgresConnection
  7362. * @static
  7363. */
  7364. public static function setPostProcessor($processor)
  7365. {
  7366. //Method inherited from \Illuminate\Database\Connection
  7367. /** @var \Illuminate\Database\PostgresConnection $instance */
  7368. return $instance->setPostProcessor($processor);
  7369. }
  7370. /**
  7371. * Get the event dispatcher used by the connection.
  7372. *
  7373. * @return \Illuminate\Contracts\Events\Dispatcher
  7374. * @static
  7375. */
  7376. public static function getEventDispatcher()
  7377. {
  7378. //Method inherited from \Illuminate\Database\Connection
  7379. /** @var \Illuminate\Database\PostgresConnection $instance */
  7380. return $instance->getEventDispatcher();
  7381. }
  7382. /**
  7383. * Set the event dispatcher instance on the connection.
  7384. *
  7385. * @param \Illuminate\Contracts\Events\Dispatcher $events
  7386. * @return \Illuminate\Database\PostgresConnection
  7387. * @static
  7388. */
  7389. public static function setEventDispatcher($events)
  7390. {
  7391. //Method inherited from \Illuminate\Database\Connection
  7392. /** @var \Illuminate\Database\PostgresConnection $instance */
  7393. return $instance->setEventDispatcher($events);
  7394. }
  7395. /**
  7396. * Unset the event dispatcher for this connection.
  7397. *
  7398. * @return void
  7399. * @static
  7400. */
  7401. public static function unsetEventDispatcher()
  7402. {
  7403. //Method inherited from \Illuminate\Database\Connection
  7404. /** @var \Illuminate\Database\PostgresConnection $instance */
  7405. $instance->unsetEventDispatcher();
  7406. }
  7407. /**
  7408. * Set the transaction manager instance on the connection.
  7409. *
  7410. * @param \Illuminate\Database\DatabaseTransactionsManager $manager
  7411. * @return \Illuminate\Database\PostgresConnection
  7412. * @static
  7413. */
  7414. public static function setTransactionManager($manager)
  7415. {
  7416. //Method inherited from \Illuminate\Database\Connection
  7417. /** @var \Illuminate\Database\PostgresConnection $instance */
  7418. return $instance->setTransactionManager($manager);
  7419. }
  7420. /**
  7421. * Unset the transaction manager for this connection.
  7422. *
  7423. * @return void
  7424. * @static
  7425. */
  7426. public static function unsetTransactionManager()
  7427. {
  7428. //Method inherited from \Illuminate\Database\Connection
  7429. /** @var \Illuminate\Database\PostgresConnection $instance */
  7430. $instance->unsetTransactionManager();
  7431. }
  7432. /**
  7433. * Determine if the connection is in a "dry run".
  7434. *
  7435. * @return bool
  7436. * @static
  7437. */
  7438. public static function pretending()
  7439. {
  7440. //Method inherited from \Illuminate\Database\Connection
  7441. /** @var \Illuminate\Database\PostgresConnection $instance */
  7442. return $instance->pretending();
  7443. }
  7444. /**
  7445. * Get the connection query log.
  7446. *
  7447. * @return array
  7448. * @static
  7449. */
  7450. public static function getQueryLog()
  7451. {
  7452. //Method inherited from \Illuminate\Database\Connection
  7453. /** @var \Illuminate\Database\PostgresConnection $instance */
  7454. return $instance->getQueryLog();
  7455. }
  7456. /**
  7457. * Get the connection query log with embedded bindings.
  7458. *
  7459. * @return array
  7460. * @static
  7461. */
  7462. public static function getRawQueryLog()
  7463. {
  7464. //Method inherited from \Illuminate\Database\Connection
  7465. /** @var \Illuminate\Database\PostgresConnection $instance */
  7466. return $instance->getRawQueryLog();
  7467. }
  7468. /**
  7469. * Clear the query log.
  7470. *
  7471. * @return void
  7472. * @static
  7473. */
  7474. public static function flushQueryLog()
  7475. {
  7476. //Method inherited from \Illuminate\Database\Connection
  7477. /** @var \Illuminate\Database\PostgresConnection $instance */
  7478. $instance->flushQueryLog();
  7479. }
  7480. /**
  7481. * Enable the query log on the connection.
  7482. *
  7483. * @return void
  7484. * @static
  7485. */
  7486. public static function enableQueryLog()
  7487. {
  7488. //Method inherited from \Illuminate\Database\Connection
  7489. /** @var \Illuminate\Database\PostgresConnection $instance */
  7490. $instance->enableQueryLog();
  7491. }
  7492. /**
  7493. * Disable the query log on the connection.
  7494. *
  7495. * @return void
  7496. * @static
  7497. */
  7498. public static function disableQueryLog()
  7499. {
  7500. //Method inherited from \Illuminate\Database\Connection
  7501. /** @var \Illuminate\Database\PostgresConnection $instance */
  7502. $instance->disableQueryLog();
  7503. }
  7504. /**
  7505. * Determine whether we're logging queries.
  7506. *
  7507. * @return bool
  7508. * @static
  7509. */
  7510. public static function logging()
  7511. {
  7512. //Method inherited from \Illuminate\Database\Connection
  7513. /** @var \Illuminate\Database\PostgresConnection $instance */
  7514. return $instance->logging();
  7515. }
  7516. /**
  7517. * Get the name of the connected database.
  7518. *
  7519. * @return string
  7520. * @static
  7521. */
  7522. public static function getDatabaseName()
  7523. {
  7524. //Method inherited from \Illuminate\Database\Connection
  7525. /** @var \Illuminate\Database\PostgresConnection $instance */
  7526. return $instance->getDatabaseName();
  7527. }
  7528. /**
  7529. * Set the name of the connected database.
  7530. *
  7531. * @param string $database
  7532. * @return \Illuminate\Database\PostgresConnection
  7533. * @static
  7534. */
  7535. public static function setDatabaseName($database)
  7536. {
  7537. //Method inherited from \Illuminate\Database\Connection
  7538. /** @var \Illuminate\Database\PostgresConnection $instance */
  7539. return $instance->setDatabaseName($database);
  7540. }
  7541. /**
  7542. * Set the read / write type of the connection.
  7543. *
  7544. * @param string|null $readWriteType
  7545. * @return \Illuminate\Database\PostgresConnection
  7546. * @static
  7547. */
  7548. public static function setReadWriteType($readWriteType)
  7549. {
  7550. //Method inherited from \Illuminate\Database\Connection
  7551. /** @var \Illuminate\Database\PostgresConnection $instance */
  7552. return $instance->setReadWriteType($readWriteType);
  7553. }
  7554. /**
  7555. * Get the table prefix for the connection.
  7556. *
  7557. * @return string
  7558. * @static
  7559. */
  7560. public static function getTablePrefix()
  7561. {
  7562. //Method inherited from \Illuminate\Database\Connection
  7563. /** @var \Illuminate\Database\PostgresConnection $instance */
  7564. return $instance->getTablePrefix();
  7565. }
  7566. /**
  7567. * Set the table prefix in use by the connection.
  7568. *
  7569. * @param string $prefix
  7570. * @return \Illuminate\Database\PostgresConnection
  7571. * @static
  7572. */
  7573. public static function setTablePrefix($prefix)
  7574. {
  7575. //Method inherited from \Illuminate\Database\Connection
  7576. /** @var \Illuminate\Database\PostgresConnection $instance */
  7577. return $instance->setTablePrefix($prefix);
  7578. }
  7579. /**
  7580. * Execute the given callback without table prefix.
  7581. *
  7582. * @param \Closure $callback
  7583. * @return mixed
  7584. * @static
  7585. */
  7586. public static function withoutTablePrefix($callback)
  7587. {
  7588. //Method inherited from \Illuminate\Database\Connection
  7589. /** @var \Illuminate\Database\PostgresConnection $instance */
  7590. return $instance->withoutTablePrefix($callback);
  7591. }
  7592. /**
  7593. * Get the server version for the connection.
  7594. *
  7595. * @return string
  7596. * @static
  7597. */
  7598. public static function getServerVersion()
  7599. {
  7600. //Method inherited from \Illuminate\Database\Connection
  7601. /** @var \Illuminate\Database\PostgresConnection $instance */
  7602. return $instance->getServerVersion();
  7603. }
  7604. /**
  7605. * Register a connection resolver.
  7606. *
  7607. * @param string $driver
  7608. * @param \Closure $callback
  7609. * @return void
  7610. * @static
  7611. */
  7612. public static function resolverFor($driver, $callback)
  7613. {
  7614. //Method inherited from \Illuminate\Database\Connection
  7615. \Illuminate\Database\PostgresConnection::resolverFor($driver, $callback);
  7616. }
  7617. /**
  7618. * Get the connection resolver for the given driver.
  7619. *
  7620. * @param string $driver
  7621. * @return \Closure|null
  7622. * @static
  7623. */
  7624. public static function getResolver($driver)
  7625. {
  7626. //Method inherited from \Illuminate\Database\Connection
  7627. return \Illuminate\Database\PostgresConnection::getResolver($driver);
  7628. }
  7629. /**
  7630. * @template TReturn of mixed
  7631. *
  7632. * Execute a Closure within a transaction.
  7633. * @param (\Closure(static): TReturn) $callback
  7634. * @param int $attempts
  7635. * @return TReturn
  7636. * @throws \Throwable
  7637. * @static
  7638. */
  7639. public static function transaction($callback, $attempts = 1)
  7640. {
  7641. //Method inherited from \Illuminate\Database\Connection
  7642. /** @var \Illuminate\Database\PostgresConnection $instance */
  7643. return $instance->transaction($callback, $attempts);
  7644. }
  7645. /**
  7646. * Start a new database transaction.
  7647. *
  7648. * @return void
  7649. * @throws \Throwable
  7650. * @static
  7651. */
  7652. public static function beginTransaction()
  7653. {
  7654. //Method inherited from \Illuminate\Database\Connection
  7655. /** @var \Illuminate\Database\PostgresConnection $instance */
  7656. $instance->beginTransaction();
  7657. }
  7658. /**
  7659. * Commit the active database transaction.
  7660. *
  7661. * @return void
  7662. * @throws \Throwable
  7663. * @static
  7664. */
  7665. public static function commit()
  7666. {
  7667. //Method inherited from \Illuminate\Database\Connection
  7668. /** @var \Illuminate\Database\PostgresConnection $instance */
  7669. $instance->commit();
  7670. }
  7671. /**
  7672. * Rollback the active database transaction.
  7673. *
  7674. * @param int|null $toLevel
  7675. * @return void
  7676. * @throws \Throwable
  7677. * @static
  7678. */
  7679. public static function rollBack($toLevel = null)
  7680. {
  7681. //Method inherited from \Illuminate\Database\Connection
  7682. /** @var \Illuminate\Database\PostgresConnection $instance */
  7683. $instance->rollBack($toLevel);
  7684. }
  7685. /**
  7686. * Get the number of active transactions.
  7687. *
  7688. * @return int
  7689. * @static
  7690. */
  7691. public static function transactionLevel()
  7692. {
  7693. //Method inherited from \Illuminate\Database\Connection
  7694. /** @var \Illuminate\Database\PostgresConnection $instance */
  7695. return $instance->transactionLevel();
  7696. }
  7697. /**
  7698. * Execute the callback after a transaction commits.
  7699. *
  7700. * @param callable $callback
  7701. * @return void
  7702. * @throws \RuntimeException
  7703. * @static
  7704. */
  7705. public static function afterCommit($callback)
  7706. {
  7707. //Method inherited from \Illuminate\Database\Connection
  7708. /** @var \Illuminate\Database\PostgresConnection $instance */
  7709. $instance->afterCommit($callback);
  7710. }
  7711. }
  7712. /**
  7713. * @see \Illuminate\Events\Dispatcher
  7714. * @see \Illuminate\Support\Testing\Fakes\EventFake
  7715. */
  7716. class Event {
  7717. /**
  7718. * Register an event listener with the dispatcher.
  7719. *
  7720. * @param \Illuminate\Events\Queued\Closure|callable|array|class-string|string $events
  7721. * @param \Illuminate\Events\Queued\Closure|callable|array|class-string|null $listener
  7722. * @return void
  7723. * @static
  7724. */
  7725. public static function listen($events, $listener = null)
  7726. {
  7727. /** @var \Illuminate\Events\Dispatcher $instance */
  7728. $instance->listen($events, $listener);
  7729. }
  7730. /**
  7731. * Determine if a given event has listeners.
  7732. *
  7733. * @param string $eventName
  7734. * @return bool
  7735. * @static
  7736. */
  7737. public static function hasListeners($eventName)
  7738. {
  7739. /** @var \Illuminate\Events\Dispatcher $instance */
  7740. return $instance->hasListeners($eventName);
  7741. }
  7742. /**
  7743. * Determine if the given event has any wildcard listeners.
  7744. *
  7745. * @param string $eventName
  7746. * @return bool
  7747. * @static
  7748. */
  7749. public static function hasWildcardListeners($eventName)
  7750. {
  7751. /** @var \Illuminate\Events\Dispatcher $instance */
  7752. return $instance->hasWildcardListeners($eventName);
  7753. }
  7754. /**
  7755. * Register an event and payload to be fired later.
  7756. *
  7757. * @param string $event
  7758. * @param object|array $payload
  7759. * @return void
  7760. * @static
  7761. */
  7762. public static function push($event, $payload = [])
  7763. {
  7764. /** @var \Illuminate\Events\Dispatcher $instance */
  7765. $instance->push($event, $payload);
  7766. }
  7767. /**
  7768. * Flush a set of pushed events.
  7769. *
  7770. * @param string $event
  7771. * @return void
  7772. * @static
  7773. */
  7774. public static function flush($event)
  7775. {
  7776. /** @var \Illuminate\Events\Dispatcher $instance */
  7777. $instance->flush($event);
  7778. }
  7779. /**
  7780. * Register an event subscriber with the dispatcher.
  7781. *
  7782. * @param object|string $subscriber
  7783. * @return void
  7784. * @static
  7785. */
  7786. public static function subscribe($subscriber)
  7787. {
  7788. /** @var \Illuminate\Events\Dispatcher $instance */
  7789. $instance->subscribe($subscriber);
  7790. }
  7791. /**
  7792. * Fire an event until the first non-null response is returned.
  7793. *
  7794. * @param string|object $event
  7795. * @param mixed $payload
  7796. * @return mixed
  7797. * @static
  7798. */
  7799. public static function until($event, $payload = [])
  7800. {
  7801. /** @var \Illuminate\Events\Dispatcher $instance */
  7802. return $instance->until($event, $payload);
  7803. }
  7804. /**
  7805. * Fire an event and call the listeners.
  7806. *
  7807. * @param string|object $event
  7808. * @param mixed $payload
  7809. * @param bool $halt
  7810. * @return array|null
  7811. * @static
  7812. */
  7813. public static function dispatch($event, $payload = [], $halt = false)
  7814. {
  7815. /** @var \Illuminate\Events\Dispatcher $instance */
  7816. return $instance->dispatch($event, $payload, $halt);
  7817. }
  7818. /**
  7819. * Get all of the listeners for a given event name.
  7820. *
  7821. * @param string $eventName
  7822. * @return array
  7823. * @static
  7824. */
  7825. public static function getListeners($eventName)
  7826. {
  7827. /** @var \Illuminate\Events\Dispatcher $instance */
  7828. return $instance->getListeners($eventName);
  7829. }
  7830. /**
  7831. * Register an event listener with the dispatcher.
  7832. *
  7833. * @param \Closure|string|array $listener
  7834. * @param bool $wildcard
  7835. * @return \Closure
  7836. * @static
  7837. */
  7838. public static function makeListener($listener, $wildcard = false)
  7839. {
  7840. /** @var \Illuminate\Events\Dispatcher $instance */
  7841. return $instance->makeListener($listener, $wildcard);
  7842. }
  7843. /**
  7844. * Create a class based listener using the IoC container.
  7845. *
  7846. * @param string $listener
  7847. * @param bool $wildcard
  7848. * @return \Closure
  7849. * @static
  7850. */
  7851. public static function createClassListener($listener, $wildcard = false)
  7852. {
  7853. /** @var \Illuminate\Events\Dispatcher $instance */
  7854. return $instance->createClassListener($listener, $wildcard);
  7855. }
  7856. /**
  7857. * Remove a set of listeners from the dispatcher.
  7858. *
  7859. * @param string $event
  7860. * @return void
  7861. * @static
  7862. */
  7863. public static function forget($event)
  7864. {
  7865. /** @var \Illuminate\Events\Dispatcher $instance */
  7866. $instance->forget($event);
  7867. }
  7868. /**
  7869. * Forget all of the pushed listeners.
  7870. *
  7871. * @return void
  7872. * @static
  7873. */
  7874. public static function forgetPushed()
  7875. {
  7876. /** @var \Illuminate\Events\Dispatcher $instance */
  7877. $instance->forgetPushed();
  7878. }
  7879. /**
  7880. * Set the queue resolver implementation.
  7881. *
  7882. * @param callable $resolver
  7883. * @return \Illuminate\Events\Dispatcher
  7884. * @static
  7885. */
  7886. public static function setQueueResolver($resolver)
  7887. {
  7888. /** @var \Illuminate\Events\Dispatcher $instance */
  7889. return $instance->setQueueResolver($resolver);
  7890. }
  7891. /**
  7892. * Set the database transaction manager resolver implementation.
  7893. *
  7894. * @param callable $resolver
  7895. * @return \Illuminate\Events\Dispatcher
  7896. * @static
  7897. */
  7898. public static function setTransactionManagerResolver($resolver)
  7899. {
  7900. /** @var \Illuminate\Events\Dispatcher $instance */
  7901. return $instance->setTransactionManagerResolver($resolver);
  7902. }
  7903. /**
  7904. * Gets the raw, unprepared listeners.
  7905. *
  7906. * @return array
  7907. * @static
  7908. */
  7909. public static function getRawListeners()
  7910. {
  7911. /** @var \Illuminate\Events\Dispatcher $instance */
  7912. return $instance->getRawListeners();
  7913. }
  7914. /**
  7915. * Register a custom macro.
  7916. *
  7917. * @param string $name
  7918. * @param object|callable $macro
  7919. * @param-closure-this static $macro
  7920. * @return void
  7921. * @static
  7922. */
  7923. public static function macro($name, $macro)
  7924. {
  7925. \Illuminate\Events\Dispatcher::macro($name, $macro);
  7926. }
  7927. /**
  7928. * Mix another object into the class.
  7929. *
  7930. * @param object $mixin
  7931. * @param bool $replace
  7932. * @return void
  7933. * @throws \ReflectionException
  7934. * @static
  7935. */
  7936. public static function mixin($mixin, $replace = true)
  7937. {
  7938. \Illuminate\Events\Dispatcher::mixin($mixin, $replace);
  7939. }
  7940. /**
  7941. * Checks if macro is registered.
  7942. *
  7943. * @param string $name
  7944. * @return bool
  7945. * @static
  7946. */
  7947. public static function hasMacro($name)
  7948. {
  7949. return \Illuminate\Events\Dispatcher::hasMacro($name);
  7950. }
  7951. /**
  7952. * Flush the existing macros.
  7953. *
  7954. * @return void
  7955. * @static
  7956. */
  7957. public static function flushMacros()
  7958. {
  7959. \Illuminate\Events\Dispatcher::flushMacros();
  7960. }
  7961. /**
  7962. * Specify the events that should be dispatched instead of faked.
  7963. *
  7964. * @param array|string $eventsToDispatch
  7965. * @return \Illuminate\Support\Testing\Fakes\EventFake
  7966. * @static
  7967. */
  7968. public static function except($eventsToDispatch)
  7969. {
  7970. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7971. return $instance->except($eventsToDispatch);
  7972. }
  7973. /**
  7974. * Assert if an event has a listener attached to it.
  7975. *
  7976. * @param string $expectedEvent
  7977. * @param string|array $expectedListener
  7978. * @return void
  7979. * @static
  7980. */
  7981. public static function assertListening($expectedEvent, $expectedListener)
  7982. {
  7983. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7984. $instance->assertListening($expectedEvent, $expectedListener);
  7985. }
  7986. /**
  7987. * Assert if an event was dispatched based on a truth-test callback.
  7988. *
  7989. * @param string|\Closure $event
  7990. * @param callable|int|null $callback
  7991. * @return void
  7992. * @static
  7993. */
  7994. public static function assertDispatched($event, $callback = null)
  7995. {
  7996. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7997. $instance->assertDispatched($event, $callback);
  7998. }
  7999. /**
  8000. * Assert if an event was dispatched a number of times.
  8001. *
  8002. * @param string $event
  8003. * @param int $times
  8004. * @return void
  8005. * @static
  8006. */
  8007. public static function assertDispatchedTimes($event, $times = 1)
  8008. {
  8009. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8010. $instance->assertDispatchedTimes($event, $times);
  8011. }
  8012. /**
  8013. * Determine if an event was dispatched based on a truth-test callback.
  8014. *
  8015. * @param string|\Closure $event
  8016. * @param callable|null $callback
  8017. * @return void
  8018. * @static
  8019. */
  8020. public static function assertNotDispatched($event, $callback = null)
  8021. {
  8022. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8023. $instance->assertNotDispatched($event, $callback);
  8024. }
  8025. /**
  8026. * Assert that no events were dispatched.
  8027. *
  8028. * @return void
  8029. * @static
  8030. */
  8031. public static function assertNothingDispatched()
  8032. {
  8033. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8034. $instance->assertNothingDispatched();
  8035. }
  8036. /**
  8037. * Get all of the events matching a truth-test callback.
  8038. *
  8039. * @param string $event
  8040. * @param callable|null $callback
  8041. * @return \Illuminate\Support\Collection
  8042. * @static
  8043. */
  8044. public static function dispatched($event, $callback = null)
  8045. {
  8046. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8047. return $instance->dispatched($event, $callback);
  8048. }
  8049. /**
  8050. * Determine if the given event has been dispatched.
  8051. *
  8052. * @param string $event
  8053. * @return bool
  8054. * @static
  8055. */
  8056. public static function hasDispatched($event)
  8057. {
  8058. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8059. return $instance->hasDispatched($event);
  8060. }
  8061. /**
  8062. * Get the events that have been dispatched.
  8063. *
  8064. * @return array
  8065. * @static
  8066. */
  8067. public static function dispatchedEvents()
  8068. {
  8069. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8070. return $instance->dispatchedEvents();
  8071. }
  8072. }
  8073. /**
  8074. * @see \Illuminate\Filesystem\Filesystem
  8075. */
  8076. class File {
  8077. /**
  8078. * Determine if a file or directory exists.
  8079. *
  8080. * @param string $path
  8081. * @return bool
  8082. * @static
  8083. */
  8084. public static function exists($path)
  8085. {
  8086. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8087. return $instance->exists($path);
  8088. }
  8089. /**
  8090. * Determine if a file or directory is missing.
  8091. *
  8092. * @param string $path
  8093. * @return bool
  8094. * @static
  8095. */
  8096. public static function missing($path)
  8097. {
  8098. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8099. return $instance->missing($path);
  8100. }
  8101. /**
  8102. * Get the contents of a file.
  8103. *
  8104. * @param string $path
  8105. * @param bool $lock
  8106. * @return string
  8107. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8108. * @static
  8109. */
  8110. public static function get($path, $lock = false)
  8111. {
  8112. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8113. return $instance->get($path, $lock);
  8114. }
  8115. /**
  8116. * Get the contents of a file as decoded JSON.
  8117. *
  8118. * @param string $path
  8119. * @param int $flags
  8120. * @param bool $lock
  8121. * @return array
  8122. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8123. * @static
  8124. */
  8125. public static function json($path, $flags = 0, $lock = false)
  8126. {
  8127. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8128. return $instance->json($path, $flags, $lock);
  8129. }
  8130. /**
  8131. * Get contents of a file with shared access.
  8132. *
  8133. * @param string $path
  8134. * @return string
  8135. * @static
  8136. */
  8137. public static function sharedGet($path)
  8138. {
  8139. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8140. return $instance->sharedGet($path);
  8141. }
  8142. /**
  8143. * Get the returned value of a file.
  8144. *
  8145. * @param string $path
  8146. * @param array $data
  8147. * @return mixed
  8148. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8149. * @static
  8150. */
  8151. public static function getRequire($path, $data = [])
  8152. {
  8153. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8154. return $instance->getRequire($path, $data);
  8155. }
  8156. /**
  8157. * Require the given file once.
  8158. *
  8159. * @param string $path
  8160. * @param array $data
  8161. * @return mixed
  8162. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8163. * @static
  8164. */
  8165. public static function requireOnce($path, $data = [])
  8166. {
  8167. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8168. return $instance->requireOnce($path, $data);
  8169. }
  8170. /**
  8171. * Get the contents of a file one line at a time.
  8172. *
  8173. * @param string $path
  8174. * @return \Illuminate\Support\LazyCollection
  8175. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8176. * @static
  8177. */
  8178. public static function lines($path)
  8179. {
  8180. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8181. return $instance->lines($path);
  8182. }
  8183. /**
  8184. * Get the hash of the file at the given path.
  8185. *
  8186. * @param string $path
  8187. * @param string $algorithm
  8188. * @return string|false
  8189. * @static
  8190. */
  8191. public static function hash($path, $algorithm = 'md5')
  8192. {
  8193. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8194. return $instance->hash($path, $algorithm);
  8195. }
  8196. /**
  8197. * Write the contents of a file.
  8198. *
  8199. * @param string $path
  8200. * @param string $contents
  8201. * @param bool $lock
  8202. * @return int|bool
  8203. * @static
  8204. */
  8205. public static function put($path, $contents, $lock = false)
  8206. {
  8207. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8208. return $instance->put($path, $contents, $lock);
  8209. }
  8210. /**
  8211. * Write the contents of a file, replacing it atomically if it already exists.
  8212. *
  8213. * @param string $path
  8214. * @param string $content
  8215. * @param int|null $mode
  8216. * @return void
  8217. * @static
  8218. */
  8219. public static function replace($path, $content, $mode = null)
  8220. {
  8221. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8222. $instance->replace($path, $content, $mode);
  8223. }
  8224. /**
  8225. * Replace a given string within a given file.
  8226. *
  8227. * @param array|string $search
  8228. * @param array|string $replace
  8229. * @param string $path
  8230. * @return void
  8231. * @static
  8232. */
  8233. public static function replaceInFile($search, $replace, $path)
  8234. {
  8235. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8236. $instance->replaceInFile($search, $replace, $path);
  8237. }
  8238. /**
  8239. * Prepend to a file.
  8240. *
  8241. * @param string $path
  8242. * @param string $data
  8243. * @return int
  8244. * @static
  8245. */
  8246. public static function prepend($path, $data)
  8247. {
  8248. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8249. return $instance->prepend($path, $data);
  8250. }
  8251. /**
  8252. * Append to a file.
  8253. *
  8254. * @param string $path
  8255. * @param string $data
  8256. * @param bool $lock
  8257. * @return int
  8258. * @static
  8259. */
  8260. public static function append($path, $data, $lock = false)
  8261. {
  8262. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8263. return $instance->append($path, $data, $lock);
  8264. }
  8265. /**
  8266. * Get or set UNIX mode of a file or directory.
  8267. *
  8268. * @param string $path
  8269. * @param int|null $mode
  8270. * @return mixed
  8271. * @static
  8272. */
  8273. public static function chmod($path, $mode = null)
  8274. {
  8275. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8276. return $instance->chmod($path, $mode);
  8277. }
  8278. /**
  8279. * Delete the file at a given path.
  8280. *
  8281. * @param string|array $paths
  8282. * @return bool
  8283. * @static
  8284. */
  8285. public static function delete($paths)
  8286. {
  8287. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8288. return $instance->delete($paths);
  8289. }
  8290. /**
  8291. * Move a file to a new location.
  8292. *
  8293. * @param string $path
  8294. * @param string $target
  8295. * @return bool
  8296. * @static
  8297. */
  8298. public static function move($path, $target)
  8299. {
  8300. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8301. return $instance->move($path, $target);
  8302. }
  8303. /**
  8304. * Copy a file to a new location.
  8305. *
  8306. * @param string $path
  8307. * @param string $target
  8308. * @return bool
  8309. * @static
  8310. */
  8311. public static function copy($path, $target)
  8312. {
  8313. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8314. return $instance->copy($path, $target);
  8315. }
  8316. /**
  8317. * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file.
  8318. *
  8319. * @param string $target
  8320. * @param string $link
  8321. * @return bool|null
  8322. * @static
  8323. */
  8324. public static function link($target, $link)
  8325. {
  8326. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8327. return $instance->link($target, $link);
  8328. }
  8329. /**
  8330. * Create a relative symlink to the target file or directory.
  8331. *
  8332. * @param string $target
  8333. * @param string $link
  8334. * @return void
  8335. * @throws \RuntimeException
  8336. * @static
  8337. */
  8338. public static function relativeLink($target, $link)
  8339. {
  8340. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8341. $instance->relativeLink($target, $link);
  8342. }
  8343. /**
  8344. * Extract the file name from a file path.
  8345. *
  8346. * @param string $path
  8347. * @return string
  8348. * @static
  8349. */
  8350. public static function name($path)
  8351. {
  8352. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8353. return $instance->name($path);
  8354. }
  8355. /**
  8356. * Extract the trailing name component from a file path.
  8357. *
  8358. * @param string $path
  8359. * @return string
  8360. * @static
  8361. */
  8362. public static function basename($path)
  8363. {
  8364. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8365. return $instance->basename($path);
  8366. }
  8367. /**
  8368. * Extract the parent directory from a file path.
  8369. *
  8370. * @param string $path
  8371. * @return string
  8372. * @static
  8373. */
  8374. public static function dirname($path)
  8375. {
  8376. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8377. return $instance->dirname($path);
  8378. }
  8379. /**
  8380. * Extract the file extension from a file path.
  8381. *
  8382. * @param string $path
  8383. * @return string
  8384. * @static
  8385. */
  8386. public static function extension($path)
  8387. {
  8388. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8389. return $instance->extension($path);
  8390. }
  8391. /**
  8392. * Guess the file extension from the mime-type of a given file.
  8393. *
  8394. * @param string $path
  8395. * @return string|null
  8396. * @throws \RuntimeException
  8397. * @static
  8398. */
  8399. public static function guessExtension($path)
  8400. {
  8401. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8402. return $instance->guessExtension($path);
  8403. }
  8404. /**
  8405. * Get the file type of a given file.
  8406. *
  8407. * @param string $path
  8408. * @return string
  8409. * @static
  8410. */
  8411. public static function type($path)
  8412. {
  8413. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8414. return $instance->type($path);
  8415. }
  8416. /**
  8417. * Get the mime-type of a given file.
  8418. *
  8419. * @param string $path
  8420. * @return string|false
  8421. * @static
  8422. */
  8423. public static function mimeType($path)
  8424. {
  8425. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8426. return $instance->mimeType($path);
  8427. }
  8428. /**
  8429. * Get the file size of a given file.
  8430. *
  8431. * @param string $path
  8432. * @return int
  8433. * @static
  8434. */
  8435. public static function size($path)
  8436. {
  8437. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8438. return $instance->size($path);
  8439. }
  8440. /**
  8441. * Get the file's last modification time.
  8442. *
  8443. * @param string $path
  8444. * @return int
  8445. * @static
  8446. */
  8447. public static function lastModified($path)
  8448. {
  8449. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8450. return $instance->lastModified($path);
  8451. }
  8452. /**
  8453. * Determine if the given path is a directory.
  8454. *
  8455. * @param string $directory
  8456. * @return bool
  8457. * @static
  8458. */
  8459. public static function isDirectory($directory)
  8460. {
  8461. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8462. return $instance->isDirectory($directory);
  8463. }
  8464. /**
  8465. * Determine if the given path is a directory that does not contain any other files or directories.
  8466. *
  8467. * @param string $directory
  8468. * @param bool $ignoreDotFiles
  8469. * @return bool
  8470. * @static
  8471. */
  8472. public static function isEmptyDirectory($directory, $ignoreDotFiles = false)
  8473. {
  8474. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8475. return $instance->isEmptyDirectory($directory, $ignoreDotFiles);
  8476. }
  8477. /**
  8478. * Determine if the given path is readable.
  8479. *
  8480. * @param string $path
  8481. * @return bool
  8482. * @static
  8483. */
  8484. public static function isReadable($path)
  8485. {
  8486. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8487. return $instance->isReadable($path);
  8488. }
  8489. /**
  8490. * Determine if the given path is writable.
  8491. *
  8492. * @param string $path
  8493. * @return bool
  8494. * @static
  8495. */
  8496. public static function isWritable($path)
  8497. {
  8498. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8499. return $instance->isWritable($path);
  8500. }
  8501. /**
  8502. * Determine if two files are the same by comparing their hashes.
  8503. *
  8504. * @param string $firstFile
  8505. * @param string $secondFile
  8506. * @return bool
  8507. * @static
  8508. */
  8509. public static function hasSameHash($firstFile, $secondFile)
  8510. {
  8511. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8512. return $instance->hasSameHash($firstFile, $secondFile);
  8513. }
  8514. /**
  8515. * Determine if the given path is a file.
  8516. *
  8517. * @param string $file
  8518. * @return bool
  8519. * @static
  8520. */
  8521. public static function isFile($file)
  8522. {
  8523. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8524. return $instance->isFile($file);
  8525. }
  8526. /**
  8527. * Find path names matching a given pattern.
  8528. *
  8529. * @param string $pattern
  8530. * @param int $flags
  8531. * @return array
  8532. * @static
  8533. */
  8534. public static function glob($pattern, $flags = 0)
  8535. {
  8536. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8537. return $instance->glob($pattern, $flags);
  8538. }
  8539. /**
  8540. * Get an array of all files in a directory.
  8541. *
  8542. * @param string $directory
  8543. * @param bool $hidden
  8544. * @return \Symfony\Component\Finder\SplFileInfo[]
  8545. * @static
  8546. */
  8547. public static function files($directory, $hidden = false)
  8548. {
  8549. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8550. return $instance->files($directory, $hidden);
  8551. }
  8552. /**
  8553. * Get all of the files from the given directory (recursive).
  8554. *
  8555. * @param string $directory
  8556. * @param bool $hidden
  8557. * @return \Symfony\Component\Finder\SplFileInfo[]
  8558. * @static
  8559. */
  8560. public static function allFiles($directory, $hidden = false)
  8561. {
  8562. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8563. return $instance->allFiles($directory, $hidden);
  8564. }
  8565. /**
  8566. * Get all of the directories within a given directory.
  8567. *
  8568. * @param string $directory
  8569. * @return array
  8570. * @static
  8571. */
  8572. public static function directories($directory)
  8573. {
  8574. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8575. return $instance->directories($directory);
  8576. }
  8577. /**
  8578. * Ensure a directory exists.
  8579. *
  8580. * @param string $path
  8581. * @param int $mode
  8582. * @param bool $recursive
  8583. * @return void
  8584. * @static
  8585. */
  8586. public static function ensureDirectoryExists($path, $mode = 493, $recursive = true)
  8587. {
  8588. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8589. $instance->ensureDirectoryExists($path, $mode, $recursive);
  8590. }
  8591. /**
  8592. * Create a directory.
  8593. *
  8594. * @param string $path
  8595. * @param int $mode
  8596. * @param bool $recursive
  8597. * @param bool $force
  8598. * @return bool
  8599. * @static
  8600. */
  8601. public static function makeDirectory($path, $mode = 493, $recursive = false, $force = false)
  8602. {
  8603. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8604. return $instance->makeDirectory($path, $mode, $recursive, $force);
  8605. }
  8606. /**
  8607. * Move a directory.
  8608. *
  8609. * @param string $from
  8610. * @param string $to
  8611. * @param bool $overwrite
  8612. * @return bool
  8613. * @static
  8614. */
  8615. public static function moveDirectory($from, $to, $overwrite = false)
  8616. {
  8617. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8618. return $instance->moveDirectory($from, $to, $overwrite);
  8619. }
  8620. /**
  8621. * Copy a directory from one location to another.
  8622. *
  8623. * @param string $directory
  8624. * @param string $destination
  8625. * @param int|null $options
  8626. * @return bool
  8627. * @static
  8628. */
  8629. public static function copyDirectory($directory, $destination, $options = null)
  8630. {
  8631. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8632. return $instance->copyDirectory($directory, $destination, $options);
  8633. }
  8634. /**
  8635. * Recursively delete a directory.
  8636. *
  8637. * The directory itself may be optionally preserved.
  8638. *
  8639. * @param string $directory
  8640. * @param bool $preserve
  8641. * @return bool
  8642. * @static
  8643. */
  8644. public static function deleteDirectory($directory, $preserve = false)
  8645. {
  8646. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8647. return $instance->deleteDirectory($directory, $preserve);
  8648. }
  8649. /**
  8650. * Remove all of the directories within a given directory.
  8651. *
  8652. * @param string $directory
  8653. * @return bool
  8654. * @static
  8655. */
  8656. public static function deleteDirectories($directory)
  8657. {
  8658. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8659. return $instance->deleteDirectories($directory);
  8660. }
  8661. /**
  8662. * Empty the specified directory of all files and folders.
  8663. *
  8664. * @param string $directory
  8665. * @return bool
  8666. * @static
  8667. */
  8668. public static function cleanDirectory($directory)
  8669. {
  8670. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8671. return $instance->cleanDirectory($directory);
  8672. }
  8673. /**
  8674. * Apply the callback if the given "value" is (or resolves to) truthy.
  8675. *
  8676. * @template TWhenParameter
  8677. * @template TWhenReturnType
  8678. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  8679. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  8680. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  8681. * @return $this|TWhenReturnType
  8682. * @static
  8683. */
  8684. public static function when($value = null, $callback = null, $default = null)
  8685. {
  8686. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8687. return $instance->when($value, $callback, $default);
  8688. }
  8689. /**
  8690. * Apply the callback if the given "value" is (or resolves to) falsy.
  8691. *
  8692. * @template TUnlessParameter
  8693. * @template TUnlessReturnType
  8694. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  8695. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  8696. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  8697. * @return $this|TUnlessReturnType
  8698. * @static
  8699. */
  8700. public static function unless($value = null, $callback = null, $default = null)
  8701. {
  8702. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8703. return $instance->unless($value, $callback, $default);
  8704. }
  8705. /**
  8706. * Register a custom macro.
  8707. *
  8708. * @param string $name
  8709. * @param object|callable $macro
  8710. * @param-closure-this static $macro
  8711. * @return void
  8712. * @static
  8713. */
  8714. public static function macro($name, $macro)
  8715. {
  8716. \Illuminate\Filesystem\Filesystem::macro($name, $macro);
  8717. }
  8718. /**
  8719. * Mix another object into the class.
  8720. *
  8721. * @param object $mixin
  8722. * @param bool $replace
  8723. * @return void
  8724. * @throws \ReflectionException
  8725. * @static
  8726. */
  8727. public static function mixin($mixin, $replace = true)
  8728. {
  8729. \Illuminate\Filesystem\Filesystem::mixin($mixin, $replace);
  8730. }
  8731. /**
  8732. * Checks if macro is registered.
  8733. *
  8734. * @param string $name
  8735. * @return bool
  8736. * @static
  8737. */
  8738. public static function hasMacro($name)
  8739. {
  8740. return \Illuminate\Filesystem\Filesystem::hasMacro($name);
  8741. }
  8742. /**
  8743. * Flush the existing macros.
  8744. *
  8745. * @return void
  8746. * @static
  8747. */
  8748. public static function flushMacros()
  8749. {
  8750. \Illuminate\Filesystem\Filesystem::flushMacros();
  8751. }
  8752. }
  8753. /**
  8754. * @see \Illuminate\Auth\Access\Gate
  8755. */
  8756. class Gate {
  8757. /**
  8758. * Determine if a given ability has been defined.
  8759. *
  8760. * @param string|array $ability
  8761. * @return bool
  8762. * @static
  8763. */
  8764. public static function has($ability)
  8765. {
  8766. /** @var \Illuminate\Auth\Access\Gate $instance */
  8767. return $instance->has($ability);
  8768. }
  8769. /**
  8770. * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is false.
  8771. *
  8772. * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition
  8773. * @param string|null $message
  8774. * @param string|null $code
  8775. * @return \Illuminate\Auth\Access\Response
  8776. * @throws \Illuminate\Auth\Access\AuthorizationException
  8777. * @static
  8778. */
  8779. public static function allowIf($condition, $message = null, $code = null)
  8780. {
  8781. /** @var \Illuminate\Auth\Access\Gate $instance */
  8782. return $instance->allowIf($condition, $message, $code);
  8783. }
  8784. /**
  8785. * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is true.
  8786. *
  8787. * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition
  8788. * @param string|null $message
  8789. * @param string|null $code
  8790. * @return \Illuminate\Auth\Access\Response
  8791. * @throws \Illuminate\Auth\Access\AuthorizationException
  8792. * @static
  8793. */
  8794. public static function denyIf($condition, $message = null, $code = null)
  8795. {
  8796. /** @var \Illuminate\Auth\Access\Gate $instance */
  8797. return $instance->denyIf($condition, $message, $code);
  8798. }
  8799. /**
  8800. * Define a new ability.
  8801. *
  8802. * @param \UnitEnum|string $ability
  8803. * @param callable|array|string $callback
  8804. * @return \Illuminate\Auth\Access\Gate
  8805. * @throws \InvalidArgumentException
  8806. * @static
  8807. */
  8808. public static function define($ability, $callback)
  8809. {
  8810. /** @var \Illuminate\Auth\Access\Gate $instance */
  8811. return $instance->define($ability, $callback);
  8812. }
  8813. /**
  8814. * Define abilities for a resource.
  8815. *
  8816. * @param string $name
  8817. * @param string $class
  8818. * @param array|null $abilities
  8819. * @return \Illuminate\Auth\Access\Gate
  8820. * @static
  8821. */
  8822. public static function resource($name, $class, $abilities = null)
  8823. {
  8824. /** @var \Illuminate\Auth\Access\Gate $instance */
  8825. return $instance->resource($name, $class, $abilities);
  8826. }
  8827. /**
  8828. * Define a policy class for a given class type.
  8829. *
  8830. * @param string $class
  8831. * @param string $policy
  8832. * @return \Illuminate\Auth\Access\Gate
  8833. * @static
  8834. */
  8835. public static function policy($class, $policy)
  8836. {
  8837. /** @var \Illuminate\Auth\Access\Gate $instance */
  8838. return $instance->policy($class, $policy);
  8839. }
  8840. /**
  8841. * Register a callback to run before all Gate checks.
  8842. *
  8843. * @param callable $callback
  8844. * @return \Illuminate\Auth\Access\Gate
  8845. * @static
  8846. */
  8847. public static function before($callback)
  8848. {
  8849. /** @var \Illuminate\Auth\Access\Gate $instance */
  8850. return $instance->before($callback);
  8851. }
  8852. /**
  8853. * Register a callback to run after all Gate checks.
  8854. *
  8855. * @param callable $callback
  8856. * @return \Illuminate\Auth\Access\Gate
  8857. * @static
  8858. */
  8859. public static function after($callback)
  8860. {
  8861. /** @var \Illuminate\Auth\Access\Gate $instance */
  8862. return $instance->after($callback);
  8863. }
  8864. /**
  8865. * Determine if all of the given abilities should be granted for the current user.
  8866. *
  8867. * @param iterable|\UnitEnum|string $ability
  8868. * @param array|mixed $arguments
  8869. * @return bool
  8870. * @static
  8871. */
  8872. public static function allows($ability, $arguments = [])
  8873. {
  8874. /** @var \Illuminate\Auth\Access\Gate $instance */
  8875. return $instance->allows($ability, $arguments);
  8876. }
  8877. /**
  8878. * Determine if any of the given abilities should be denied for the current user.
  8879. *
  8880. * @param iterable|\UnitEnum|string $ability
  8881. * @param array|mixed $arguments
  8882. * @return bool
  8883. * @static
  8884. */
  8885. public static function denies($ability, $arguments = [])
  8886. {
  8887. /** @var \Illuminate\Auth\Access\Gate $instance */
  8888. return $instance->denies($ability, $arguments);
  8889. }
  8890. /**
  8891. * Determine if all of the given abilities should be granted for the current user.
  8892. *
  8893. * @param iterable|\UnitEnum|string $abilities
  8894. * @param array|mixed $arguments
  8895. * @return bool
  8896. * @static
  8897. */
  8898. public static function check($abilities, $arguments = [])
  8899. {
  8900. /** @var \Illuminate\Auth\Access\Gate $instance */
  8901. return $instance->check($abilities, $arguments);
  8902. }
  8903. /**
  8904. * Determine if any one of the given abilities should be granted for the current user.
  8905. *
  8906. * @param iterable|\UnitEnum|string $abilities
  8907. * @param array|mixed $arguments
  8908. * @return bool
  8909. * @static
  8910. */
  8911. public static function any($abilities, $arguments = [])
  8912. {
  8913. /** @var \Illuminate\Auth\Access\Gate $instance */
  8914. return $instance->any($abilities, $arguments);
  8915. }
  8916. /**
  8917. * Determine if all of the given abilities should be denied for the current user.
  8918. *
  8919. * @param iterable|\UnitEnum|string $abilities
  8920. * @param array|mixed $arguments
  8921. * @return bool
  8922. * @static
  8923. */
  8924. public static function none($abilities, $arguments = [])
  8925. {
  8926. /** @var \Illuminate\Auth\Access\Gate $instance */
  8927. return $instance->none($abilities, $arguments);
  8928. }
  8929. /**
  8930. * Determine if the given ability should be granted for the current user.
  8931. *
  8932. * @param \UnitEnum|string $ability
  8933. * @param array|mixed $arguments
  8934. * @return \Illuminate\Auth\Access\Response
  8935. * @throws \Illuminate\Auth\Access\AuthorizationException
  8936. * @static
  8937. */
  8938. public static function authorize($ability, $arguments = [])
  8939. {
  8940. /** @var \Illuminate\Auth\Access\Gate $instance */
  8941. return $instance->authorize($ability, $arguments);
  8942. }
  8943. /**
  8944. * Inspect the user for the given ability.
  8945. *
  8946. * @param \UnitEnum|string $ability
  8947. * @param array|mixed $arguments
  8948. * @return \Illuminate\Auth\Access\Response
  8949. * @static
  8950. */
  8951. public static function inspect($ability, $arguments = [])
  8952. {
  8953. /** @var \Illuminate\Auth\Access\Gate $instance */
  8954. return $instance->inspect($ability, $arguments);
  8955. }
  8956. /**
  8957. * Get the raw result from the authorization callback.
  8958. *
  8959. * @param string $ability
  8960. * @param array|mixed $arguments
  8961. * @return mixed
  8962. * @throws \Illuminate\Auth\Access\AuthorizationException
  8963. * @static
  8964. */
  8965. public static function raw($ability, $arguments = [])
  8966. {
  8967. /** @var \Illuminate\Auth\Access\Gate $instance */
  8968. return $instance->raw($ability, $arguments);
  8969. }
  8970. /**
  8971. * Get a policy instance for a given class.
  8972. *
  8973. * @param object|string $class
  8974. * @return mixed
  8975. * @static
  8976. */
  8977. public static function getPolicyFor($class)
  8978. {
  8979. /** @var \Illuminate\Auth\Access\Gate $instance */
  8980. return $instance->getPolicyFor($class);
  8981. }
  8982. /**
  8983. * Specify a callback to be used to guess policy names.
  8984. *
  8985. * @param callable $callback
  8986. * @return \Illuminate\Auth\Access\Gate
  8987. * @static
  8988. */
  8989. public static function guessPolicyNamesUsing($callback)
  8990. {
  8991. /** @var \Illuminate\Auth\Access\Gate $instance */
  8992. return $instance->guessPolicyNamesUsing($callback);
  8993. }
  8994. /**
  8995. * Build a policy class instance of the given type.
  8996. *
  8997. * @param object|string $class
  8998. * @return mixed
  8999. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  9000. * @static
  9001. */
  9002. public static function resolvePolicy($class)
  9003. {
  9004. /** @var \Illuminate\Auth\Access\Gate $instance */
  9005. return $instance->resolvePolicy($class);
  9006. }
  9007. /**
  9008. * Get a gate instance for the given user.
  9009. *
  9010. * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user
  9011. * @return static
  9012. * @static
  9013. */
  9014. public static function forUser($user)
  9015. {
  9016. /** @var \Illuminate\Auth\Access\Gate $instance */
  9017. return $instance->forUser($user);
  9018. }
  9019. /**
  9020. * Get all of the defined abilities.
  9021. *
  9022. * @return array
  9023. * @static
  9024. */
  9025. public static function abilities()
  9026. {
  9027. /** @var \Illuminate\Auth\Access\Gate $instance */
  9028. return $instance->abilities();
  9029. }
  9030. /**
  9031. * Get all of the defined policies.
  9032. *
  9033. * @return array
  9034. * @static
  9035. */
  9036. public static function policies()
  9037. {
  9038. /** @var \Illuminate\Auth\Access\Gate $instance */
  9039. return $instance->policies();
  9040. }
  9041. /**
  9042. * Set the default denial response for gates and policies.
  9043. *
  9044. * @param \Illuminate\Auth\Access\Response $response
  9045. * @return \Illuminate\Auth\Access\Gate
  9046. * @static
  9047. */
  9048. public static function defaultDenialResponse($response)
  9049. {
  9050. /** @var \Illuminate\Auth\Access\Gate $instance */
  9051. return $instance->defaultDenialResponse($response);
  9052. }
  9053. /**
  9054. * Set the container instance used by the gate.
  9055. *
  9056. * @param \Illuminate\Contracts\Container\Container $container
  9057. * @return \Illuminate\Auth\Access\Gate
  9058. * @static
  9059. */
  9060. public static function setContainer($container)
  9061. {
  9062. /** @var \Illuminate\Auth\Access\Gate $instance */
  9063. return $instance->setContainer($container);
  9064. }
  9065. /**
  9066. * Deny with a HTTP status code.
  9067. *
  9068. * @param int $status
  9069. * @param string|null $message
  9070. * @param int|null $code
  9071. * @return \Illuminate\Auth\Access\Response
  9072. * @static
  9073. */
  9074. public static function denyWithStatus($status, $message = null, $code = null)
  9075. {
  9076. /** @var \Illuminate\Auth\Access\Gate $instance */
  9077. return $instance->denyWithStatus($status, $message, $code);
  9078. }
  9079. /**
  9080. * Deny with a 404 HTTP status code.
  9081. *
  9082. * @param string|null $message
  9083. * @param int|null $code
  9084. * @return \Illuminate\Auth\Access\Response
  9085. * @static
  9086. */
  9087. public static function denyAsNotFound($message = null, $code = null)
  9088. {
  9089. /** @var \Illuminate\Auth\Access\Gate $instance */
  9090. return $instance->denyAsNotFound($message, $code);
  9091. }
  9092. }
  9093. /**
  9094. * @see \Illuminate\Hashing\HashManager
  9095. * @see \Illuminate\Hashing\AbstractHasher
  9096. */
  9097. class Hash {
  9098. /**
  9099. * Create an instance of the Bcrypt hash Driver.
  9100. *
  9101. * @return \Illuminate\Hashing\BcryptHasher
  9102. * @static
  9103. */
  9104. public static function createBcryptDriver()
  9105. {
  9106. /** @var \Illuminate\Hashing\HashManager $instance */
  9107. return $instance->createBcryptDriver();
  9108. }
  9109. /**
  9110. * Create an instance of the Argon2i hash Driver.
  9111. *
  9112. * @return \Illuminate\Hashing\ArgonHasher
  9113. * @static
  9114. */
  9115. public static function createArgonDriver()
  9116. {
  9117. /** @var \Illuminate\Hashing\HashManager $instance */
  9118. return $instance->createArgonDriver();
  9119. }
  9120. /**
  9121. * Create an instance of the Argon2id hash Driver.
  9122. *
  9123. * @return \Illuminate\Hashing\Argon2IdHasher
  9124. * @static
  9125. */
  9126. public static function createArgon2idDriver()
  9127. {
  9128. /** @var \Illuminate\Hashing\HashManager $instance */
  9129. return $instance->createArgon2idDriver();
  9130. }
  9131. /**
  9132. * Get information about the given hashed value.
  9133. *
  9134. * @param string $hashedValue
  9135. * @return array
  9136. * @static
  9137. */
  9138. public static function info($hashedValue)
  9139. {
  9140. /** @var \Illuminate\Hashing\HashManager $instance */
  9141. return $instance->info($hashedValue);
  9142. }
  9143. /**
  9144. * Hash the given value.
  9145. *
  9146. * @param string $value
  9147. * @param array $options
  9148. * @return string
  9149. * @static
  9150. */
  9151. public static function make($value, $options = [])
  9152. {
  9153. /** @var \Illuminate\Hashing\HashManager $instance */
  9154. return $instance->make($value, $options);
  9155. }
  9156. /**
  9157. * Check the given plain value against a hash.
  9158. *
  9159. * @param string $value
  9160. * @param string $hashedValue
  9161. * @param array $options
  9162. * @return bool
  9163. * @static
  9164. */
  9165. public static function check($value, $hashedValue, $options = [])
  9166. {
  9167. /** @var \Illuminate\Hashing\HashManager $instance */
  9168. return $instance->check($value, $hashedValue, $options);
  9169. }
  9170. /**
  9171. * Check if the given hash has been hashed using the given options.
  9172. *
  9173. * @param string $hashedValue
  9174. * @param array $options
  9175. * @return bool
  9176. * @static
  9177. */
  9178. public static function needsRehash($hashedValue, $options = [])
  9179. {
  9180. /** @var \Illuminate\Hashing\HashManager $instance */
  9181. return $instance->needsRehash($hashedValue, $options);
  9182. }
  9183. /**
  9184. * Determine if a given string is already hashed.
  9185. *
  9186. * @param string $value
  9187. * @return bool
  9188. * @static
  9189. */
  9190. public static function isHashed($value)
  9191. {
  9192. /** @var \Illuminate\Hashing\HashManager $instance */
  9193. return $instance->isHashed($value);
  9194. }
  9195. /**
  9196. * Get the default driver name.
  9197. *
  9198. * @return string
  9199. * @static
  9200. */
  9201. public static function getDefaultDriver()
  9202. {
  9203. /** @var \Illuminate\Hashing\HashManager $instance */
  9204. return $instance->getDefaultDriver();
  9205. }
  9206. /**
  9207. * Verifies that the configuration is less than or equal to what is configured.
  9208. *
  9209. * @param array $value
  9210. * @return bool
  9211. * @internal
  9212. * @static
  9213. */
  9214. public static function verifyConfiguration($value)
  9215. {
  9216. /** @var \Illuminate\Hashing\HashManager $instance */
  9217. return $instance->verifyConfiguration($value);
  9218. }
  9219. /**
  9220. * Get a driver instance.
  9221. *
  9222. * @param string|null $driver
  9223. * @return mixed
  9224. * @throws \InvalidArgumentException
  9225. * @static
  9226. */
  9227. public static function driver($driver = null)
  9228. {
  9229. //Method inherited from \Illuminate\Support\Manager
  9230. /** @var \Illuminate\Hashing\HashManager $instance */
  9231. return $instance->driver($driver);
  9232. }
  9233. /**
  9234. * Register a custom driver creator Closure.
  9235. *
  9236. * @param string $driver
  9237. * @param \Closure $callback
  9238. * @return \Illuminate\Hashing\HashManager
  9239. * @static
  9240. */
  9241. public static function extend($driver, $callback)
  9242. {
  9243. //Method inherited from \Illuminate\Support\Manager
  9244. /** @var \Illuminate\Hashing\HashManager $instance */
  9245. return $instance->extend($driver, $callback);
  9246. }
  9247. /**
  9248. * Get all of the created "drivers".
  9249. *
  9250. * @return array
  9251. * @static
  9252. */
  9253. public static function getDrivers()
  9254. {
  9255. //Method inherited from \Illuminate\Support\Manager
  9256. /** @var \Illuminate\Hashing\HashManager $instance */
  9257. return $instance->getDrivers();
  9258. }
  9259. /**
  9260. * Get the container instance used by the manager.
  9261. *
  9262. * @return \Illuminate\Contracts\Container\Container
  9263. * @static
  9264. */
  9265. public static function getContainer()
  9266. {
  9267. //Method inherited from \Illuminate\Support\Manager
  9268. /** @var \Illuminate\Hashing\HashManager $instance */
  9269. return $instance->getContainer();
  9270. }
  9271. /**
  9272. * Set the container instance used by the manager.
  9273. *
  9274. * @param \Illuminate\Contracts\Container\Container $container
  9275. * @return \Illuminate\Hashing\HashManager
  9276. * @static
  9277. */
  9278. public static function setContainer($container)
  9279. {
  9280. //Method inherited from \Illuminate\Support\Manager
  9281. /** @var \Illuminate\Hashing\HashManager $instance */
  9282. return $instance->setContainer($container);
  9283. }
  9284. /**
  9285. * Forget all of the resolved driver instances.
  9286. *
  9287. * @return \Illuminate\Hashing\HashManager
  9288. * @static
  9289. */
  9290. public static function forgetDrivers()
  9291. {
  9292. //Method inherited from \Illuminate\Support\Manager
  9293. /** @var \Illuminate\Hashing\HashManager $instance */
  9294. return $instance->forgetDrivers();
  9295. }
  9296. }
  9297. /**
  9298. * @method static \Illuminate\Http\Client\PendingRequest baseUrl(string $url)
  9299. * @method static \Illuminate\Http\Client\PendingRequest withBody(\Psr\Http\Message\StreamInterface|string $content, string $contentType = 'application/json')
  9300. * @method static \Illuminate\Http\Client\PendingRequest asJson()
  9301. * @method static \Illuminate\Http\Client\PendingRequest asForm()
  9302. * @method static \Illuminate\Http\Client\PendingRequest attach(string|array $name, string|resource $contents = '', string|null $filename = null, array $headers = [])
  9303. * @method static \Illuminate\Http\Client\PendingRequest asMultipart()
  9304. * @method static \Illuminate\Http\Client\PendingRequest bodyFormat(string $format)
  9305. * @method static \Illuminate\Http\Client\PendingRequest withQueryParameters(array $parameters)
  9306. * @method static \Illuminate\Http\Client\PendingRequest contentType(string $contentType)
  9307. * @method static \Illuminate\Http\Client\PendingRequest acceptJson()
  9308. * @method static \Illuminate\Http\Client\PendingRequest accept(string $contentType)
  9309. * @method static \Illuminate\Http\Client\PendingRequest withHeaders(array $headers)
  9310. * @method static \Illuminate\Http\Client\PendingRequest withHeader(string $name, mixed $value)
  9311. * @method static \Illuminate\Http\Client\PendingRequest replaceHeaders(array $headers)
  9312. * @method static \Illuminate\Http\Client\PendingRequest withBasicAuth(string $username, string $password)
  9313. * @method static \Illuminate\Http\Client\PendingRequest withDigestAuth(string $username, string $password)
  9314. * @method static \Illuminate\Http\Client\PendingRequest withToken(string $token, string $type = 'Bearer')
  9315. * @method static \Illuminate\Http\Client\PendingRequest withUserAgent(string|bool $userAgent)
  9316. * @method static \Illuminate\Http\Client\PendingRequest withUrlParameters(array $parameters = [])
  9317. * @method static \Illuminate\Http\Client\PendingRequest withCookies(array $cookies, string $domain)
  9318. * @method static \Illuminate\Http\Client\PendingRequest maxRedirects(int $max)
  9319. * @method static \Illuminate\Http\Client\PendingRequest withoutRedirecting()
  9320. * @method static \Illuminate\Http\Client\PendingRequest withoutVerifying()
  9321. * @method static \Illuminate\Http\Client\PendingRequest sink(string|resource $to)
  9322. * @method static \Illuminate\Http\Client\PendingRequest timeout(int|float $seconds)
  9323. * @method static \Illuminate\Http\Client\PendingRequest connectTimeout(int|float $seconds)
  9324. * @method static \Illuminate\Http\Client\PendingRequest retry(array|int $times, \Closure|int $sleepMilliseconds = 0, callable|null $when = null, bool $throw = true)
  9325. * @method static \Illuminate\Http\Client\PendingRequest withOptions(array $options)
  9326. * @method static \Illuminate\Http\Client\PendingRequest withMiddleware(callable $middleware)
  9327. * @method static \Illuminate\Http\Client\PendingRequest withRequestMiddleware(callable $middleware)
  9328. * @method static \Illuminate\Http\Client\PendingRequest withResponseMiddleware(callable $middleware)
  9329. * @method static \Illuminate\Http\Client\PendingRequest beforeSending(callable $callback)
  9330. * @method static \Illuminate\Http\Client\PendingRequest throw(callable|null $callback = null)
  9331. * @method static \Illuminate\Http\Client\PendingRequest throwIf(callable|bool $condition)
  9332. * @method static \Illuminate\Http\Client\PendingRequest throwUnless(callable|bool $condition)
  9333. * @method static \Illuminate\Http\Client\PendingRequest dump()
  9334. * @method static \Illuminate\Http\Client\PendingRequest dd()
  9335. * @method static \Illuminate\Http\Client\Response get(string $url, array|string|null $query = null)
  9336. * @method static \Illuminate\Http\Client\Response head(string $url, array|string|null $query = null)
  9337. * @method static \Illuminate\Http\Client\Response post(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9338. * @method static \Illuminate\Http\Client\Response patch(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9339. * @method static \Illuminate\Http\Client\Response put(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9340. * @method static \Illuminate\Http\Client\Response delete(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9341. * @method static array pool(callable $callback)
  9342. * @method static \Illuminate\Http\Client\Response send(string $method, string $url, array $options = [])
  9343. * @method static \GuzzleHttp\Client buildClient()
  9344. * @method static \GuzzleHttp\Client createClient(\GuzzleHttp\HandlerStack $handlerStack)
  9345. * @method static \GuzzleHttp\HandlerStack buildHandlerStack()
  9346. * @method static \GuzzleHttp\HandlerStack pushHandlers(\GuzzleHttp\HandlerStack $handlerStack)
  9347. * @method static \Closure buildBeforeSendingHandler()
  9348. * @method static \Closure buildRecorderHandler()
  9349. * @method static \Closure buildStubHandler()
  9350. * @method static \GuzzleHttp\Psr7\RequestInterface runBeforeSendingCallbacks(\GuzzleHttp\Psr7\RequestInterface $request, array $options)
  9351. * @method static array mergeOptions(array ...$options)
  9352. * @method static \Illuminate\Http\Client\PendingRequest stub(callable $callback)
  9353. * @method static \Illuminate\Http\Client\PendingRequest async(bool $async = true)
  9354. * @method static \GuzzleHttp\Promise\PromiseInterface|null getPromise()
  9355. * @method static \Illuminate\Http\Client\PendingRequest truncateExceptionsAt(int $length)
  9356. * @method static \Illuminate\Http\Client\PendingRequest dontTruncateExceptions()
  9357. * @method static \Illuminate\Http\Client\PendingRequest setClient(\GuzzleHttp\Client $client)
  9358. * @method static \Illuminate\Http\Client\PendingRequest setHandler(callable $handler)
  9359. * @method static array getOptions()
  9360. * @method static \Illuminate\Http\Client\PendingRequest|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  9361. * @method static \Illuminate\Http\Client\PendingRequest|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  9362. * @see \Illuminate\Http\Client\Factory
  9363. */
  9364. class Http {
  9365. /**
  9366. * Add middleware to apply to every request.
  9367. *
  9368. * @param callable $middleware
  9369. * @return \Illuminate\Http\Client\Factory
  9370. * @static
  9371. */
  9372. public static function globalMiddleware($middleware)
  9373. {
  9374. /** @var \Illuminate\Http\Client\Factory $instance */
  9375. return $instance->globalMiddleware($middleware);
  9376. }
  9377. /**
  9378. * Add request middleware to apply to every request.
  9379. *
  9380. * @param callable $middleware
  9381. * @return \Illuminate\Http\Client\Factory
  9382. * @static
  9383. */
  9384. public static function globalRequestMiddleware($middleware)
  9385. {
  9386. /** @var \Illuminate\Http\Client\Factory $instance */
  9387. return $instance->globalRequestMiddleware($middleware);
  9388. }
  9389. /**
  9390. * Add response middleware to apply to every request.
  9391. *
  9392. * @param callable $middleware
  9393. * @return \Illuminate\Http\Client\Factory
  9394. * @static
  9395. */
  9396. public static function globalResponseMiddleware($middleware)
  9397. {
  9398. /** @var \Illuminate\Http\Client\Factory $instance */
  9399. return $instance->globalResponseMiddleware($middleware);
  9400. }
  9401. /**
  9402. * Set the options to apply to every request.
  9403. *
  9404. * @param \Closure|array $options
  9405. * @return \Illuminate\Http\Client\Factory
  9406. * @static
  9407. */
  9408. public static function globalOptions($options)
  9409. {
  9410. /** @var \Illuminate\Http\Client\Factory $instance */
  9411. return $instance->globalOptions($options);
  9412. }
  9413. /**
  9414. * Create a new response instance for use during stubbing.
  9415. *
  9416. * @param array|string|null $body
  9417. * @param int $status
  9418. * @param array $headers
  9419. * @return \GuzzleHttp\Promise\PromiseInterface
  9420. * @static
  9421. */
  9422. public static function response($body = null, $status = 200, $headers = [])
  9423. {
  9424. return \Illuminate\Http\Client\Factory::response($body, $status, $headers);
  9425. }
  9426. /**
  9427. * Create a new PSR-7 response instance for use during stubbing.
  9428. *
  9429. * @param array|string|null $body
  9430. * @param int $status
  9431. * @param array<string, mixed> $headers
  9432. * @return \GuzzleHttp\Psr7\Response
  9433. * @static
  9434. */
  9435. public static function psr7Response($body = null, $status = 200, $headers = [])
  9436. {
  9437. return \Illuminate\Http\Client\Factory::psr7Response($body, $status, $headers);
  9438. }
  9439. /**
  9440. * Create a new RequestException instance for use during stubbing.
  9441. *
  9442. * @param array|string|null $body
  9443. * @param int $status
  9444. * @param array<string, mixed> $headers
  9445. * @return \Illuminate\Http\Client\RequestException
  9446. * @static
  9447. */
  9448. public static function failedRequest($body = null, $status = 200, $headers = [])
  9449. {
  9450. return \Illuminate\Http\Client\Factory::failedRequest($body, $status, $headers);
  9451. }
  9452. /**
  9453. * Create a new connection exception for use during stubbing.
  9454. *
  9455. * @param string|null $message
  9456. * @return \Closure(\Illuminate\Http\Client\Request): \GuzzleHttp\Promise\PromiseInterface
  9457. * @static
  9458. */
  9459. public static function failedConnection($message = null)
  9460. {
  9461. return \Illuminate\Http\Client\Factory::failedConnection($message);
  9462. }
  9463. /**
  9464. * Get an invokable object that returns a sequence of responses in order for use during stubbing.
  9465. *
  9466. * @param array $responses
  9467. * @return \Illuminate\Http\Client\ResponseSequence
  9468. * @static
  9469. */
  9470. public static function sequence($responses = [])
  9471. {
  9472. /** @var \Illuminate\Http\Client\Factory $instance */
  9473. return $instance->sequence($responses);
  9474. }
  9475. /**
  9476. * Register a stub callable that will intercept requests and be able to return stub responses.
  9477. *
  9478. * @param callable|array<string, mixed>|null $callback
  9479. * @return \Illuminate\Http\Client\Factory
  9480. * @static
  9481. */
  9482. public static function fake($callback = null)
  9483. {
  9484. /** @var \Illuminate\Http\Client\Factory $instance */
  9485. return $instance->fake($callback);
  9486. }
  9487. /**
  9488. * Register a response sequence for the given URL pattern.
  9489. *
  9490. * @param string $url
  9491. * @return \Illuminate\Http\Client\ResponseSequence
  9492. * @static
  9493. */
  9494. public static function fakeSequence($url = '*')
  9495. {
  9496. /** @var \Illuminate\Http\Client\Factory $instance */
  9497. return $instance->fakeSequence($url);
  9498. }
  9499. /**
  9500. * Stub the given URL using the given callback.
  9501. *
  9502. * @param string $url
  9503. * @param \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface|callable|int|string|array|\Illuminate\Http\Client\ResponseSequence $callback
  9504. * @return \Illuminate\Http\Client\Factory
  9505. * @static
  9506. */
  9507. public static function stubUrl($url, $callback)
  9508. {
  9509. /** @var \Illuminate\Http\Client\Factory $instance */
  9510. return $instance->stubUrl($url, $callback);
  9511. }
  9512. /**
  9513. * Indicate that an exception should be thrown if any request is not faked.
  9514. *
  9515. * @param bool $prevent
  9516. * @return \Illuminate\Http\Client\Factory
  9517. * @static
  9518. */
  9519. public static function preventStrayRequests($prevent = true)
  9520. {
  9521. /** @var \Illuminate\Http\Client\Factory $instance */
  9522. return $instance->preventStrayRequests($prevent);
  9523. }
  9524. /**
  9525. * Determine if stray requests are being prevented.
  9526. *
  9527. * @return bool
  9528. * @static
  9529. */
  9530. public static function preventingStrayRequests()
  9531. {
  9532. /** @var \Illuminate\Http\Client\Factory $instance */
  9533. return $instance->preventingStrayRequests();
  9534. }
  9535. /**
  9536. * Indicate that an exception should not be thrown if any request is not faked.
  9537. *
  9538. * @return \Illuminate\Http\Client\Factory
  9539. * @static
  9540. */
  9541. public static function allowStrayRequests()
  9542. {
  9543. /** @var \Illuminate\Http\Client\Factory $instance */
  9544. return $instance->allowStrayRequests();
  9545. }
  9546. /**
  9547. * Begin recording request / response pairs.
  9548. *
  9549. * @return \Illuminate\Http\Client\Factory
  9550. * @static
  9551. */
  9552. public static function record()
  9553. {
  9554. /** @var \Illuminate\Http\Client\Factory $instance */
  9555. return $instance->record();
  9556. }
  9557. /**
  9558. * Record a request response pair.
  9559. *
  9560. * @param \Illuminate\Http\Client\Request $request
  9561. * @param \Illuminate\Http\Client\Response|null $response
  9562. * @return void
  9563. * @static
  9564. */
  9565. public static function recordRequestResponsePair($request, $response)
  9566. {
  9567. /** @var \Illuminate\Http\Client\Factory $instance */
  9568. $instance->recordRequestResponsePair($request, $response);
  9569. }
  9570. /**
  9571. * Assert that a request / response pair was recorded matching a given truth test.
  9572. *
  9573. * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
  9574. * @return void
  9575. * @static
  9576. */
  9577. public static function assertSent($callback)
  9578. {
  9579. /** @var \Illuminate\Http\Client\Factory $instance */
  9580. $instance->assertSent($callback);
  9581. }
  9582. /**
  9583. * Assert that the given request was sent in the given order.
  9584. *
  9585. * @param list<string|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)|callable> $callbacks
  9586. * @return void
  9587. * @static
  9588. */
  9589. public static function assertSentInOrder($callbacks)
  9590. {
  9591. /** @var \Illuminate\Http\Client\Factory $instance */
  9592. $instance->assertSentInOrder($callbacks);
  9593. }
  9594. /**
  9595. * Assert that a request / response pair was not recorded matching a given truth test.
  9596. *
  9597. * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
  9598. * @return void
  9599. * @static
  9600. */
  9601. public static function assertNotSent($callback)
  9602. {
  9603. /** @var \Illuminate\Http\Client\Factory $instance */
  9604. $instance->assertNotSent($callback);
  9605. }
  9606. /**
  9607. * Assert that no request / response pair was recorded.
  9608. *
  9609. * @return void
  9610. * @static
  9611. */
  9612. public static function assertNothingSent()
  9613. {
  9614. /** @var \Illuminate\Http\Client\Factory $instance */
  9615. $instance->assertNothingSent();
  9616. }
  9617. /**
  9618. * Assert how many requests have been recorded.
  9619. *
  9620. * @param int $count
  9621. * @return void
  9622. * @static
  9623. */
  9624. public static function assertSentCount($count)
  9625. {
  9626. /** @var \Illuminate\Http\Client\Factory $instance */
  9627. $instance->assertSentCount($count);
  9628. }
  9629. /**
  9630. * Assert that every created response sequence is empty.
  9631. *
  9632. * @return void
  9633. * @static
  9634. */
  9635. public static function assertSequencesAreEmpty()
  9636. {
  9637. /** @var \Illuminate\Http\Client\Factory $instance */
  9638. $instance->assertSequencesAreEmpty();
  9639. }
  9640. /**
  9641. * Get a collection of the request / response pairs matching the given truth test.
  9642. *
  9643. * @param (\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)|callable $callback
  9644. * @return \Illuminate\Support\Collection<int, array{0: \Illuminate\Http\Client\Request, 1: \Illuminate\Http\Client\Response|null}>
  9645. * @static
  9646. */
  9647. public static function recorded($callback = null)
  9648. {
  9649. /** @var \Illuminate\Http\Client\Factory $instance */
  9650. return $instance->recorded($callback);
  9651. }
  9652. /**
  9653. * Create a new pending request instance for this factory.
  9654. *
  9655. * @return \Illuminate\Http\Client\PendingRequest
  9656. * @static
  9657. */
  9658. public static function createPendingRequest()
  9659. {
  9660. /** @var \Illuminate\Http\Client\Factory $instance */
  9661. return $instance->createPendingRequest();
  9662. }
  9663. /**
  9664. * Get the current event dispatcher implementation.
  9665. *
  9666. * @return \Illuminate\Contracts\Events\Dispatcher|null
  9667. * @static
  9668. */
  9669. public static function getDispatcher()
  9670. {
  9671. /** @var \Illuminate\Http\Client\Factory $instance */
  9672. return $instance->getDispatcher();
  9673. }
  9674. /**
  9675. * Get the array of global middleware.
  9676. *
  9677. * @return array
  9678. * @static
  9679. */
  9680. public static function getGlobalMiddleware()
  9681. {
  9682. /** @var \Illuminate\Http\Client\Factory $instance */
  9683. return $instance->getGlobalMiddleware();
  9684. }
  9685. /**
  9686. * Register a custom macro.
  9687. *
  9688. * @param string $name
  9689. * @param object|callable $macro
  9690. * @param-closure-this static $macro
  9691. * @return void
  9692. * @static
  9693. */
  9694. public static function macro($name, $macro)
  9695. {
  9696. \Illuminate\Http\Client\Factory::macro($name, $macro);
  9697. }
  9698. /**
  9699. * Mix another object into the class.
  9700. *
  9701. * @param object $mixin
  9702. * @param bool $replace
  9703. * @return void
  9704. * @throws \ReflectionException
  9705. * @static
  9706. */
  9707. public static function mixin($mixin, $replace = true)
  9708. {
  9709. \Illuminate\Http\Client\Factory::mixin($mixin, $replace);
  9710. }
  9711. /**
  9712. * Checks if macro is registered.
  9713. *
  9714. * @param string $name
  9715. * @return bool
  9716. * @static
  9717. */
  9718. public static function hasMacro($name)
  9719. {
  9720. return \Illuminate\Http\Client\Factory::hasMacro($name);
  9721. }
  9722. /**
  9723. * Flush the existing macros.
  9724. *
  9725. * @return void
  9726. * @static
  9727. */
  9728. public static function flushMacros()
  9729. {
  9730. \Illuminate\Http\Client\Factory::flushMacros();
  9731. }
  9732. /**
  9733. * Dynamically handle calls to the class.
  9734. *
  9735. * @param string $method
  9736. * @param array $parameters
  9737. * @return mixed
  9738. * @throws \BadMethodCallException
  9739. * @static
  9740. */
  9741. public static function macroCall($method, $parameters)
  9742. {
  9743. /** @var \Illuminate\Http\Client\Factory $instance */
  9744. return $instance->macroCall($method, $parameters);
  9745. }
  9746. }
  9747. /**
  9748. * @see \Illuminate\Translation\Translator
  9749. */
  9750. class Lang {
  9751. /**
  9752. * Determine if a translation exists for a given locale.
  9753. *
  9754. * @param string $key
  9755. * @param string|null $locale
  9756. * @return bool
  9757. * @static
  9758. */
  9759. public static function hasForLocale($key, $locale = null)
  9760. {
  9761. /** @var \Illuminate\Translation\Translator $instance */
  9762. return $instance->hasForLocale($key, $locale);
  9763. }
  9764. /**
  9765. * Determine if a translation exists.
  9766. *
  9767. * @param string $key
  9768. * @param string|null $locale
  9769. * @param bool $fallback
  9770. * @return bool
  9771. * @static
  9772. */
  9773. public static function has($key, $locale = null, $fallback = true)
  9774. {
  9775. /** @var \Illuminate\Translation\Translator $instance */
  9776. return $instance->has($key, $locale, $fallback);
  9777. }
  9778. /**
  9779. * Get the translation for the given key.
  9780. *
  9781. * @param string $key
  9782. * @param array $replace
  9783. * @param string|null $locale
  9784. * @param bool $fallback
  9785. * @return string|array
  9786. * @static
  9787. */
  9788. public static function get($key, $replace = [], $locale = null, $fallback = true)
  9789. {
  9790. /** @var \Illuminate\Translation\Translator $instance */
  9791. return $instance->get($key, $replace, $locale, $fallback);
  9792. }
  9793. /**
  9794. * Get a translation according to an integer value.
  9795. *
  9796. * @param string $key
  9797. * @param \Countable|int|float|array $number
  9798. * @param array $replace
  9799. * @param string|null $locale
  9800. * @return string
  9801. * @static
  9802. */
  9803. public static function choice($key, $number, $replace = [], $locale = null)
  9804. {
  9805. /** @var \Illuminate\Translation\Translator $instance */
  9806. return $instance->choice($key, $number, $replace, $locale);
  9807. }
  9808. /**
  9809. * Add translation lines to the given locale.
  9810. *
  9811. * @param array $lines
  9812. * @param string $locale
  9813. * @param string $namespace
  9814. * @return void
  9815. * @static
  9816. */
  9817. public static function addLines($lines, $locale, $namespace = '*')
  9818. {
  9819. /** @var \Illuminate\Translation\Translator $instance */
  9820. $instance->addLines($lines, $locale, $namespace);
  9821. }
  9822. /**
  9823. * Load the specified language group.
  9824. *
  9825. * @param string $namespace
  9826. * @param string $group
  9827. * @param string $locale
  9828. * @return void
  9829. * @static
  9830. */
  9831. public static function load($namespace, $group, $locale)
  9832. {
  9833. /** @var \Illuminate\Translation\Translator $instance */
  9834. $instance->load($namespace, $group, $locale);
  9835. }
  9836. /**
  9837. * Register a callback that is responsible for handling missing translation keys.
  9838. *
  9839. * @param callable|null $callback
  9840. * @return static
  9841. * @static
  9842. */
  9843. public static function handleMissingKeysUsing($callback)
  9844. {
  9845. /** @var \Illuminate\Translation\Translator $instance */
  9846. return $instance->handleMissingKeysUsing($callback);
  9847. }
  9848. /**
  9849. * Add a new namespace to the loader.
  9850. *
  9851. * @param string $namespace
  9852. * @param string $hint
  9853. * @return void
  9854. * @static
  9855. */
  9856. public static function addNamespace($namespace, $hint)
  9857. {
  9858. /** @var \Illuminate\Translation\Translator $instance */
  9859. $instance->addNamespace($namespace, $hint);
  9860. }
  9861. /**
  9862. * Add a new path to the loader.
  9863. *
  9864. * @param string $path
  9865. * @return void
  9866. * @static
  9867. */
  9868. public static function addPath($path)
  9869. {
  9870. /** @var \Illuminate\Translation\Translator $instance */
  9871. $instance->addPath($path);
  9872. }
  9873. /**
  9874. * Add a new JSON path to the loader.
  9875. *
  9876. * @param string $path
  9877. * @return void
  9878. * @static
  9879. */
  9880. public static function addJsonPath($path)
  9881. {
  9882. /** @var \Illuminate\Translation\Translator $instance */
  9883. $instance->addJsonPath($path);
  9884. }
  9885. /**
  9886. * Parse a key into namespace, group, and item.
  9887. *
  9888. * @param string $key
  9889. * @return array
  9890. * @static
  9891. */
  9892. public static function parseKey($key)
  9893. {
  9894. /** @var \Illuminate\Translation\Translator $instance */
  9895. return $instance->parseKey($key);
  9896. }
  9897. /**
  9898. * Specify a callback that should be invoked to determined the applicable locale array.
  9899. *
  9900. * @param callable $callback
  9901. * @return void
  9902. * @static
  9903. */
  9904. public static function determineLocalesUsing($callback)
  9905. {
  9906. /** @var \Illuminate\Translation\Translator $instance */
  9907. $instance->determineLocalesUsing($callback);
  9908. }
  9909. /**
  9910. * Get the message selector instance.
  9911. *
  9912. * @return \Illuminate\Translation\MessageSelector
  9913. * @static
  9914. */
  9915. public static function getSelector()
  9916. {
  9917. /** @var \Illuminate\Translation\Translator $instance */
  9918. return $instance->getSelector();
  9919. }
  9920. /**
  9921. * Set the message selector instance.
  9922. *
  9923. * @param \Illuminate\Translation\MessageSelector $selector
  9924. * @return void
  9925. * @static
  9926. */
  9927. public static function setSelector($selector)
  9928. {
  9929. /** @var \Illuminate\Translation\Translator $instance */
  9930. $instance->setSelector($selector);
  9931. }
  9932. /**
  9933. * Get the language line loader implementation.
  9934. *
  9935. * @return \Illuminate\Contracts\Translation\Loader
  9936. * @static
  9937. */
  9938. public static function getLoader()
  9939. {
  9940. /** @var \Illuminate\Translation\Translator $instance */
  9941. return $instance->getLoader();
  9942. }
  9943. /**
  9944. * Get the default locale being used.
  9945. *
  9946. * @return string
  9947. * @static
  9948. */
  9949. public static function locale()
  9950. {
  9951. /** @var \Illuminate\Translation\Translator $instance */
  9952. return $instance->locale();
  9953. }
  9954. /**
  9955. * Get the default locale being used.
  9956. *
  9957. * @return string
  9958. * @static
  9959. */
  9960. public static function getLocale()
  9961. {
  9962. /** @var \Illuminate\Translation\Translator $instance */
  9963. return $instance->getLocale();
  9964. }
  9965. /**
  9966. * Set the default locale.
  9967. *
  9968. * @param string $locale
  9969. * @return void
  9970. * @throws \InvalidArgumentException
  9971. * @static
  9972. */
  9973. public static function setLocale($locale)
  9974. {
  9975. /** @var \Illuminate\Translation\Translator $instance */
  9976. $instance->setLocale($locale);
  9977. }
  9978. /**
  9979. * Get the fallback locale being used.
  9980. *
  9981. * @return string
  9982. * @static
  9983. */
  9984. public static function getFallback()
  9985. {
  9986. /** @var \Illuminate\Translation\Translator $instance */
  9987. return $instance->getFallback();
  9988. }
  9989. /**
  9990. * Set the fallback locale being used.
  9991. *
  9992. * @param string $fallback
  9993. * @return void
  9994. * @static
  9995. */
  9996. public static function setFallback($fallback)
  9997. {
  9998. /** @var \Illuminate\Translation\Translator $instance */
  9999. $instance->setFallback($fallback);
  10000. }
  10001. /**
  10002. * Set the loaded translation groups.
  10003. *
  10004. * @param array $loaded
  10005. * @return void
  10006. * @static
  10007. */
  10008. public static function setLoaded($loaded)
  10009. {
  10010. /** @var \Illuminate\Translation\Translator $instance */
  10011. $instance->setLoaded($loaded);
  10012. }
  10013. /**
  10014. * Add a handler to be executed in order to format a given class to a string during translation replacements.
  10015. *
  10016. * @param callable|string $class
  10017. * @param callable|null $handler
  10018. * @return void
  10019. * @static
  10020. */
  10021. public static function stringable($class, $handler = null)
  10022. {
  10023. /** @var \Illuminate\Translation\Translator $instance */
  10024. $instance->stringable($class, $handler);
  10025. }
  10026. /**
  10027. * Set the parsed value of a key.
  10028. *
  10029. * @param string $key
  10030. * @param array $parsed
  10031. * @return void
  10032. * @static
  10033. */
  10034. public static function setParsedKey($key, $parsed)
  10035. {
  10036. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  10037. /** @var \Illuminate\Translation\Translator $instance */
  10038. $instance->setParsedKey($key, $parsed);
  10039. }
  10040. /**
  10041. * Flush the cache of parsed keys.
  10042. *
  10043. * @return void
  10044. * @static
  10045. */
  10046. public static function flushParsedKeys()
  10047. {
  10048. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  10049. /** @var \Illuminate\Translation\Translator $instance */
  10050. $instance->flushParsedKeys();
  10051. }
  10052. /**
  10053. * Register a custom macro.
  10054. *
  10055. * @param string $name
  10056. * @param object|callable $macro
  10057. * @param-closure-this static $macro
  10058. * @return void
  10059. * @static
  10060. */
  10061. public static function macro($name, $macro)
  10062. {
  10063. \Illuminate\Translation\Translator::macro($name, $macro);
  10064. }
  10065. /**
  10066. * Mix another object into the class.
  10067. *
  10068. * @param object $mixin
  10069. * @param bool $replace
  10070. * @return void
  10071. * @throws \ReflectionException
  10072. * @static
  10073. */
  10074. public static function mixin($mixin, $replace = true)
  10075. {
  10076. \Illuminate\Translation\Translator::mixin($mixin, $replace);
  10077. }
  10078. /**
  10079. * Checks if macro is registered.
  10080. *
  10081. * @param string $name
  10082. * @return bool
  10083. * @static
  10084. */
  10085. public static function hasMacro($name)
  10086. {
  10087. return \Illuminate\Translation\Translator::hasMacro($name);
  10088. }
  10089. /**
  10090. * Flush the existing macros.
  10091. *
  10092. * @return void
  10093. * @static
  10094. */
  10095. public static function flushMacros()
  10096. {
  10097. \Illuminate\Translation\Translator::flushMacros();
  10098. }
  10099. }
  10100. /**
  10101. * @method static void write(string $level, \Illuminate\Contracts\Support\Arrayable|\Illuminate\Contracts\Support\Jsonable|\Illuminate\Support\Stringable|array|string $message, array $context = [])
  10102. * @method static \Illuminate\Log\Logger withContext(array $context = [])
  10103. * @method static void listen(\Closure $callback)
  10104. * @method static \Psr\Log\LoggerInterface getLogger()
  10105. * @method static \Illuminate\Contracts\Events\Dispatcher getEventDispatcher()
  10106. * @method static void setEventDispatcher(\Illuminate\Contracts\Events\Dispatcher $dispatcher)
  10107. * @method static \Illuminate\Log\Logger|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  10108. * @method static \Illuminate\Log\Logger|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  10109. * @see \Illuminate\Log\LogManager
  10110. */
  10111. class Log {
  10112. /**
  10113. * Build an on-demand log channel.
  10114. *
  10115. * @param array $config
  10116. * @return \Psr\Log\LoggerInterface
  10117. * @static
  10118. */
  10119. public static function build($config)
  10120. {
  10121. /** @var \Illuminate\Log\LogManager $instance */
  10122. return $instance->build($config);
  10123. }
  10124. /**
  10125. * Create a new, on-demand aggregate logger instance.
  10126. *
  10127. * @param array $channels
  10128. * @param string|null $channel
  10129. * @return \Psr\Log\LoggerInterface
  10130. * @static
  10131. */
  10132. public static function stack($channels, $channel = null)
  10133. {
  10134. /** @var \Illuminate\Log\LogManager $instance */
  10135. return $instance->stack($channels, $channel);
  10136. }
  10137. /**
  10138. * Get a log channel instance.
  10139. *
  10140. * @param string|null $channel
  10141. * @return \Psr\Log\LoggerInterface
  10142. * @static
  10143. */
  10144. public static function channel($channel = null)
  10145. {
  10146. /** @var \Illuminate\Log\LogManager $instance */
  10147. return $instance->channel($channel);
  10148. }
  10149. /**
  10150. * Get a log driver instance.
  10151. *
  10152. * @param string|null $driver
  10153. * @return \Psr\Log\LoggerInterface
  10154. * @static
  10155. */
  10156. public static function driver($driver = null)
  10157. {
  10158. /** @var \Illuminate\Log\LogManager $instance */
  10159. return $instance->driver($driver);
  10160. }
  10161. /**
  10162. * Share context across channels and stacks.
  10163. *
  10164. * @param array $context
  10165. * @return \Illuminate\Log\LogManager
  10166. * @static
  10167. */
  10168. public static function shareContext($context)
  10169. {
  10170. /** @var \Illuminate\Log\LogManager $instance */
  10171. return $instance->shareContext($context);
  10172. }
  10173. /**
  10174. * The context shared across channels and stacks.
  10175. *
  10176. * @return array
  10177. * @static
  10178. */
  10179. public static function sharedContext()
  10180. {
  10181. /** @var \Illuminate\Log\LogManager $instance */
  10182. return $instance->sharedContext();
  10183. }
  10184. /**
  10185. * Flush the log context on all currently resolved channels.
  10186. *
  10187. * @param string[]|null $keys
  10188. * @return \Illuminate\Log\LogManager
  10189. * @static
  10190. */
  10191. public static function withoutContext($keys = null)
  10192. {
  10193. /** @var \Illuminate\Log\LogManager $instance */
  10194. return $instance->withoutContext($keys);
  10195. }
  10196. /**
  10197. * Flush the shared context.
  10198. *
  10199. * @return \Illuminate\Log\LogManager
  10200. * @static
  10201. */
  10202. public static function flushSharedContext()
  10203. {
  10204. /** @var \Illuminate\Log\LogManager $instance */
  10205. return $instance->flushSharedContext();
  10206. }
  10207. /**
  10208. * Get the default log driver name.
  10209. *
  10210. * @return string|null
  10211. * @static
  10212. */
  10213. public static function getDefaultDriver()
  10214. {
  10215. /** @var \Illuminate\Log\LogManager $instance */
  10216. return $instance->getDefaultDriver();
  10217. }
  10218. /**
  10219. * Set the default log driver name.
  10220. *
  10221. * @param string $name
  10222. * @return void
  10223. * @static
  10224. */
  10225. public static function setDefaultDriver($name)
  10226. {
  10227. /** @var \Illuminate\Log\LogManager $instance */
  10228. $instance->setDefaultDriver($name);
  10229. }
  10230. /**
  10231. * Register a custom driver creator Closure.
  10232. *
  10233. * @param string $driver
  10234. * @param \Closure $callback
  10235. * @param-closure-this $this $callback
  10236. * @return \Illuminate\Log\LogManager
  10237. * @static
  10238. */
  10239. public static function extend($driver, $callback)
  10240. {
  10241. /** @var \Illuminate\Log\LogManager $instance */
  10242. return $instance->extend($driver, $callback);
  10243. }
  10244. /**
  10245. * Unset the given channel instance.
  10246. *
  10247. * @param string|null $driver
  10248. * @return void
  10249. * @static
  10250. */
  10251. public static function forgetChannel($driver = null)
  10252. {
  10253. /** @var \Illuminate\Log\LogManager $instance */
  10254. $instance->forgetChannel($driver);
  10255. }
  10256. /**
  10257. * Get all of the resolved log channels.
  10258. *
  10259. * @return array
  10260. * @static
  10261. */
  10262. public static function getChannels()
  10263. {
  10264. /** @var \Illuminate\Log\LogManager $instance */
  10265. return $instance->getChannels();
  10266. }
  10267. /**
  10268. * System is unusable.
  10269. *
  10270. * @param string|\Stringable $message
  10271. * @param array $context
  10272. * @return void
  10273. * @static
  10274. */
  10275. public static function emergency($message, $context = [])
  10276. {
  10277. /** @var \Illuminate\Log\LogManager $instance */
  10278. $instance->emergency($message, $context);
  10279. }
  10280. /**
  10281. * Action must be taken immediately.
  10282. *
  10283. * Example: Entire website down, database unavailable, etc. This should
  10284. * trigger the SMS alerts and wake you up.
  10285. *
  10286. * @param string|\Stringable $message
  10287. * @param array $context
  10288. * @return void
  10289. * @static
  10290. */
  10291. public static function alert($message, $context = [])
  10292. {
  10293. /** @var \Illuminate\Log\LogManager $instance */
  10294. $instance->alert($message, $context);
  10295. }
  10296. /**
  10297. * Critical conditions.
  10298. *
  10299. * Example: Application component unavailable, unexpected exception.
  10300. *
  10301. * @param string|\Stringable $message
  10302. * @param array $context
  10303. * @return void
  10304. * @static
  10305. */
  10306. public static function critical($message, $context = [])
  10307. {
  10308. /** @var \Illuminate\Log\LogManager $instance */
  10309. $instance->critical($message, $context);
  10310. }
  10311. /**
  10312. * Runtime errors that do not require immediate action but should typically
  10313. * be logged and monitored.
  10314. *
  10315. * @param string|\Stringable $message
  10316. * @param array $context
  10317. * @return void
  10318. * @static
  10319. */
  10320. public static function error($message, $context = [])
  10321. {
  10322. /** @var \Illuminate\Log\LogManager $instance */
  10323. $instance->error($message, $context);
  10324. }
  10325. /**
  10326. * Exceptional occurrences that are not errors.
  10327. *
  10328. * Example: Use of deprecated APIs, poor use of an API, undesirable things
  10329. * that are not necessarily wrong.
  10330. *
  10331. * @param string|\Stringable $message
  10332. * @param array $context
  10333. * @return void
  10334. * @static
  10335. */
  10336. public static function warning($message, $context = [])
  10337. {
  10338. /** @var \Illuminate\Log\LogManager $instance */
  10339. $instance->warning($message, $context);
  10340. }
  10341. /**
  10342. * Normal but significant events.
  10343. *
  10344. * @param string|\Stringable $message
  10345. * @param array $context
  10346. * @return void
  10347. * @static
  10348. */
  10349. public static function notice($message, $context = [])
  10350. {
  10351. /** @var \Illuminate\Log\LogManager $instance */
  10352. $instance->notice($message, $context);
  10353. }
  10354. /**
  10355. * Interesting events.
  10356. *
  10357. * Example: User logs in, SQL logs.
  10358. *
  10359. * @param string|\Stringable $message
  10360. * @param array $context
  10361. * @return void
  10362. * @static
  10363. */
  10364. public static function info($message, $context = [])
  10365. {
  10366. /** @var \Illuminate\Log\LogManager $instance */
  10367. $instance->info($message, $context);
  10368. }
  10369. /**
  10370. * Detailed debug information.
  10371. *
  10372. * @param string|\Stringable $message
  10373. * @param array $context
  10374. * @return void
  10375. * @static
  10376. */
  10377. public static function debug($message, $context = [])
  10378. {
  10379. /** @var \Illuminate\Log\LogManager $instance */
  10380. $instance->debug($message, $context);
  10381. }
  10382. /**
  10383. * Logs with an arbitrary level.
  10384. *
  10385. * @param mixed $level
  10386. * @param string|\Stringable $message
  10387. * @param array $context
  10388. * @return void
  10389. * @static
  10390. */
  10391. public static function log($level, $message, $context = [])
  10392. {
  10393. /** @var \Illuminate\Log\LogManager $instance */
  10394. $instance->log($level, $message, $context);
  10395. }
  10396. /**
  10397. * Set the application instance used by the manager.
  10398. *
  10399. * @param \Illuminate\Contracts\Foundation\Application $app
  10400. * @return \Illuminate\Log\LogManager
  10401. * @static
  10402. */
  10403. public static function setApplication($app)
  10404. {
  10405. /** @var \Illuminate\Log\LogManager $instance */
  10406. return $instance->setApplication($app);
  10407. }
  10408. }
  10409. /**
  10410. * @method static void alwaysFrom(string $address, string|null $name = null)
  10411. * @method static void alwaysReplyTo(string $address, string|null $name = null)
  10412. * @method static void alwaysReturnPath(string $address)
  10413. * @method static void alwaysTo(string $address, string|null $name = null)
  10414. * @method static \Illuminate\Mail\SentMessage|null html(string $html, mixed $callback)
  10415. * @method static \Illuminate\Mail\SentMessage|null plain(string $view, array $data, mixed $callback)
  10416. * @method static string render(string|array $view, array $data = [])
  10417. * @method static mixed onQueue(\BackedEnum|string|null $queue, \Illuminate\Contracts\Mail\Mailable $view)
  10418. * @method static mixed queueOn(string $queue, \Illuminate\Contracts\Mail\Mailable $view)
  10419. * @method static mixed laterOn(string $queue, \DateTimeInterface|\DateInterval|int $delay, \Illuminate\Contracts\Mail\Mailable $view)
  10420. * @method static \Symfony\Component\Mailer\Transport\TransportInterface getSymfonyTransport()
  10421. * @method static \Illuminate\Contracts\View\Factory getViewFactory()
  10422. * @method static void setSymfonyTransport(\Symfony\Component\Mailer\Transport\TransportInterface $transport)
  10423. * @method static \Illuminate\Mail\Mailer setQueue(\Illuminate\Contracts\Queue\Factory $queue)
  10424. * @method static void macro(string $name, object|callable $macro)
  10425. * @method static void mixin(object $mixin, bool $replace = true)
  10426. * @method static bool hasMacro(string $name)
  10427. * @method static void flushMacros()
  10428. * @see \Illuminate\Mail\MailManager
  10429. * @see \Illuminate\Support\Testing\Fakes\MailFake
  10430. */
  10431. class Mail {
  10432. /**
  10433. * Get a mailer instance by name.
  10434. *
  10435. * @param string|null $name
  10436. * @return \Illuminate\Contracts\Mail\Mailer
  10437. * @static
  10438. */
  10439. public static function mailer($name = null)
  10440. {
  10441. /** @var \Illuminate\Mail\MailManager $instance */
  10442. return $instance->mailer($name);
  10443. }
  10444. /**
  10445. * Get a mailer driver instance.
  10446. *
  10447. * @param string|null $driver
  10448. * @return \Illuminate\Mail\Mailer
  10449. * @static
  10450. */
  10451. public static function driver($driver = null)
  10452. {
  10453. /** @var \Illuminate\Mail\MailManager $instance */
  10454. return $instance->driver($driver);
  10455. }
  10456. /**
  10457. * Build a new mailer instance.
  10458. *
  10459. * @param array $config
  10460. * @return \Illuminate\Mail\Mailer
  10461. * @static
  10462. */
  10463. public static function build($config)
  10464. {
  10465. /** @var \Illuminate\Mail\MailManager $instance */
  10466. return $instance->build($config);
  10467. }
  10468. /**
  10469. * Create a new transport instance.
  10470. *
  10471. * @param array $config
  10472. * @return \Symfony\Component\Mailer\Transport\TransportInterface
  10473. * @throws \InvalidArgumentException
  10474. * @static
  10475. */
  10476. public static function createSymfonyTransport($config)
  10477. {
  10478. /** @var \Illuminate\Mail\MailManager $instance */
  10479. return $instance->createSymfonyTransport($config);
  10480. }
  10481. /**
  10482. * Get the default mail driver name.
  10483. *
  10484. * @return string
  10485. * @static
  10486. */
  10487. public static function getDefaultDriver()
  10488. {
  10489. /** @var \Illuminate\Mail\MailManager $instance */
  10490. return $instance->getDefaultDriver();
  10491. }
  10492. /**
  10493. * Set the default mail driver name.
  10494. *
  10495. * @param string $name
  10496. * @return void
  10497. * @static
  10498. */
  10499. public static function setDefaultDriver($name)
  10500. {
  10501. /** @var \Illuminate\Mail\MailManager $instance */
  10502. $instance->setDefaultDriver($name);
  10503. }
  10504. /**
  10505. * Disconnect the given mailer and remove from local cache.
  10506. *
  10507. * @param string|null $name
  10508. * @return void
  10509. * @static
  10510. */
  10511. public static function purge($name = null)
  10512. {
  10513. /** @var \Illuminate\Mail\MailManager $instance */
  10514. $instance->purge($name);
  10515. }
  10516. /**
  10517. * Register a custom transport creator Closure.
  10518. *
  10519. * @param string $driver
  10520. * @param \Closure $callback
  10521. * @return \Illuminate\Mail\MailManager
  10522. * @static
  10523. */
  10524. public static function extend($driver, $callback)
  10525. {
  10526. /** @var \Illuminate\Mail\MailManager $instance */
  10527. return $instance->extend($driver, $callback);
  10528. }
  10529. /**
  10530. * Get the application instance used by the manager.
  10531. *
  10532. * @return \Illuminate\Contracts\Foundation\Application
  10533. * @static
  10534. */
  10535. public static function getApplication()
  10536. {
  10537. /** @var \Illuminate\Mail\MailManager $instance */
  10538. return $instance->getApplication();
  10539. }
  10540. /**
  10541. * Set the application instance used by the manager.
  10542. *
  10543. * @param \Illuminate\Contracts\Foundation\Application $app
  10544. * @return \Illuminate\Mail\MailManager
  10545. * @static
  10546. */
  10547. public static function setApplication($app)
  10548. {
  10549. /** @var \Illuminate\Mail\MailManager $instance */
  10550. return $instance->setApplication($app);
  10551. }
  10552. /**
  10553. * Forget all of the resolved mailer instances.
  10554. *
  10555. * @return \Illuminate\Mail\MailManager
  10556. * @static
  10557. */
  10558. public static function forgetMailers()
  10559. {
  10560. /** @var \Illuminate\Mail\MailManager $instance */
  10561. return $instance->forgetMailers();
  10562. }
  10563. /**
  10564. * Assert if a mailable was sent based on a truth-test callback.
  10565. *
  10566. * @param string|\Closure $mailable
  10567. * @param callable|array|string|int|null $callback
  10568. * @return void
  10569. * @static
  10570. */
  10571. public static function assertSent($mailable, $callback = null)
  10572. {
  10573. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10574. $instance->assertSent($mailable, $callback);
  10575. }
  10576. /**
  10577. * Determine if a mailable was not sent or queued to be sent based on a truth-test callback.
  10578. *
  10579. * @param string|\Closure $mailable
  10580. * @param callable|null $callback
  10581. * @return void
  10582. * @static
  10583. */
  10584. public static function assertNotOutgoing($mailable, $callback = null)
  10585. {
  10586. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10587. $instance->assertNotOutgoing($mailable, $callback);
  10588. }
  10589. /**
  10590. * Determine if a mailable was not sent based on a truth-test callback.
  10591. *
  10592. * @param string|\Closure $mailable
  10593. * @param callable|array|string|null $callback
  10594. * @return void
  10595. * @static
  10596. */
  10597. public static function assertNotSent($mailable, $callback = null)
  10598. {
  10599. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10600. $instance->assertNotSent($mailable, $callback);
  10601. }
  10602. /**
  10603. * Assert that no mailables were sent or queued to be sent.
  10604. *
  10605. * @return void
  10606. * @static
  10607. */
  10608. public static function assertNothingOutgoing()
  10609. {
  10610. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10611. $instance->assertNothingOutgoing();
  10612. }
  10613. /**
  10614. * Assert that no mailables were sent.
  10615. *
  10616. * @return void
  10617. * @static
  10618. */
  10619. public static function assertNothingSent()
  10620. {
  10621. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10622. $instance->assertNothingSent();
  10623. }
  10624. /**
  10625. * Assert if a mailable was queued based on a truth-test callback.
  10626. *
  10627. * @param string|\Closure $mailable
  10628. * @param callable|array|string|int|null $callback
  10629. * @return void
  10630. * @static
  10631. */
  10632. public static function assertQueued($mailable, $callback = null)
  10633. {
  10634. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10635. $instance->assertQueued($mailable, $callback);
  10636. }
  10637. /**
  10638. * Determine if a mailable was not queued based on a truth-test callback.
  10639. *
  10640. * @param string|\Closure $mailable
  10641. * @param callable|array|string|null $callback
  10642. * @return void
  10643. * @static
  10644. */
  10645. public static function assertNotQueued($mailable, $callback = null)
  10646. {
  10647. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10648. $instance->assertNotQueued($mailable, $callback);
  10649. }
  10650. /**
  10651. * Assert that no mailables were queued.
  10652. *
  10653. * @return void
  10654. * @static
  10655. */
  10656. public static function assertNothingQueued()
  10657. {
  10658. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10659. $instance->assertNothingQueued();
  10660. }
  10661. /**
  10662. * Assert the total number of mailables that were sent.
  10663. *
  10664. * @param int $count
  10665. * @return void
  10666. * @static
  10667. */
  10668. public static function assertSentCount($count)
  10669. {
  10670. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10671. $instance->assertSentCount($count);
  10672. }
  10673. /**
  10674. * Assert the total number of mailables that were queued.
  10675. *
  10676. * @param int $count
  10677. * @return void
  10678. * @static
  10679. */
  10680. public static function assertQueuedCount($count)
  10681. {
  10682. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10683. $instance->assertQueuedCount($count);
  10684. }
  10685. /**
  10686. * Assert the total number of mailables that were sent or queued.
  10687. *
  10688. * @param int $count
  10689. * @return void
  10690. * @static
  10691. */
  10692. public static function assertOutgoingCount($count)
  10693. {
  10694. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10695. $instance->assertOutgoingCount($count);
  10696. }
  10697. /**
  10698. * Get all of the mailables matching a truth-test callback.
  10699. *
  10700. * @param string|\Closure $mailable
  10701. * @param callable|null $callback
  10702. * @return \Illuminate\Support\Collection
  10703. * @static
  10704. */
  10705. public static function sent($mailable, $callback = null)
  10706. {
  10707. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10708. return $instance->sent($mailable, $callback);
  10709. }
  10710. /**
  10711. * Determine if the given mailable has been sent.
  10712. *
  10713. * @param string $mailable
  10714. * @return bool
  10715. * @static
  10716. */
  10717. public static function hasSent($mailable)
  10718. {
  10719. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10720. return $instance->hasSent($mailable);
  10721. }
  10722. /**
  10723. * Get all of the queued mailables matching a truth-test callback.
  10724. *
  10725. * @param string|\Closure $mailable
  10726. * @param callable|null $callback
  10727. * @return \Illuminate\Support\Collection
  10728. * @static
  10729. */
  10730. public static function queued($mailable, $callback = null)
  10731. {
  10732. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10733. return $instance->queued($mailable, $callback);
  10734. }
  10735. /**
  10736. * Determine if the given mailable has been queued.
  10737. *
  10738. * @param string $mailable
  10739. * @return bool
  10740. * @static
  10741. */
  10742. public static function hasQueued($mailable)
  10743. {
  10744. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10745. return $instance->hasQueued($mailable);
  10746. }
  10747. /**
  10748. * Begin the process of mailing a mailable class instance.
  10749. *
  10750. * @param mixed $users
  10751. * @return \Illuminate\Mail\PendingMail
  10752. * @static
  10753. */
  10754. public static function to($users)
  10755. {
  10756. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10757. return $instance->to($users);
  10758. }
  10759. /**
  10760. * Begin the process of mailing a mailable class instance.
  10761. *
  10762. * @param mixed $users
  10763. * @return \Illuminate\Mail\PendingMail
  10764. * @static
  10765. */
  10766. public static function cc($users)
  10767. {
  10768. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10769. return $instance->cc($users);
  10770. }
  10771. /**
  10772. * Begin the process of mailing a mailable class instance.
  10773. *
  10774. * @param mixed $users
  10775. * @return \Illuminate\Mail\PendingMail
  10776. * @static
  10777. */
  10778. public static function bcc($users)
  10779. {
  10780. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10781. return $instance->bcc($users);
  10782. }
  10783. /**
  10784. * Send a new message with only a raw text part.
  10785. *
  10786. * @param string $text
  10787. * @param \Closure|string $callback
  10788. * @return void
  10789. * @static
  10790. */
  10791. public static function raw($text, $callback)
  10792. {
  10793. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10794. $instance->raw($text, $callback);
  10795. }
  10796. /**
  10797. * Send a new message using a view.
  10798. *
  10799. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10800. * @param array $data
  10801. * @param \Closure|string|null $callback
  10802. * @return mixed|void
  10803. * @static
  10804. */
  10805. public static function send($view, $data = [], $callback = null)
  10806. {
  10807. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10808. return $instance->send($view, $data, $callback);
  10809. }
  10810. /**
  10811. * Send a new message synchronously using a view.
  10812. *
  10813. * @param \Illuminate\Contracts\Mail\Mailable|string|array $mailable
  10814. * @param array $data
  10815. * @param \Closure|string|null $callback
  10816. * @return void
  10817. * @static
  10818. */
  10819. public static function sendNow($mailable, $data = [], $callback = null)
  10820. {
  10821. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10822. $instance->sendNow($mailable, $data, $callback);
  10823. }
  10824. /**
  10825. * Queue a new message for sending.
  10826. *
  10827. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10828. * @param string|null $queue
  10829. * @return mixed
  10830. * @static
  10831. */
  10832. public static function queue($view, $queue = null)
  10833. {
  10834. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10835. return $instance->queue($view, $queue);
  10836. }
  10837. /**
  10838. * Queue a new e-mail message for sending after (n) seconds.
  10839. *
  10840. * @param \DateTimeInterface|\DateInterval|int $delay
  10841. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10842. * @param string|null $queue
  10843. * @return mixed
  10844. * @static
  10845. */
  10846. public static function later($delay, $view, $queue = null)
  10847. {
  10848. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10849. return $instance->later($delay, $view, $queue);
  10850. }
  10851. }
  10852. /**
  10853. * @see \Illuminate\Notifications\ChannelManager
  10854. * @see \Illuminate\Support\Testing\Fakes\NotificationFake
  10855. */
  10856. class Notification {
  10857. /**
  10858. * Send the given notification to the given notifiable entities.
  10859. *
  10860. * @param \Illuminate\Support\Collection|array|mixed $notifiables
  10861. * @param mixed $notification
  10862. * @return void
  10863. * @static
  10864. */
  10865. public static function send($notifiables, $notification)
  10866. {
  10867. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10868. $instance->send($notifiables, $notification);
  10869. }
  10870. /**
  10871. * Send the given notification immediately.
  10872. *
  10873. * @param \Illuminate\Support\Collection|array|mixed $notifiables
  10874. * @param mixed $notification
  10875. * @param array|null $channels
  10876. * @return void
  10877. * @static
  10878. */
  10879. public static function sendNow($notifiables, $notification, $channels = null)
  10880. {
  10881. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10882. $instance->sendNow($notifiables, $notification, $channels);
  10883. }
  10884. /**
  10885. * Get a channel instance.
  10886. *
  10887. * @param string|null $name
  10888. * @return mixed
  10889. * @static
  10890. */
  10891. public static function channel($name = null)
  10892. {
  10893. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10894. return $instance->channel($name);
  10895. }
  10896. /**
  10897. * Get the default channel driver name.
  10898. *
  10899. * @return string
  10900. * @static
  10901. */
  10902. public static function getDefaultDriver()
  10903. {
  10904. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10905. return $instance->getDefaultDriver();
  10906. }
  10907. /**
  10908. * Get the default channel driver name.
  10909. *
  10910. * @return string
  10911. * @static
  10912. */
  10913. public static function deliversVia()
  10914. {
  10915. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10916. return $instance->deliversVia();
  10917. }
  10918. /**
  10919. * Set the default channel driver name.
  10920. *
  10921. * @param string $channel
  10922. * @return void
  10923. * @static
  10924. */
  10925. public static function deliverVia($channel)
  10926. {
  10927. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10928. $instance->deliverVia($channel);
  10929. }
  10930. /**
  10931. * Set the locale of notifications.
  10932. *
  10933. * @param string $locale
  10934. * @return \Illuminate\Notifications\ChannelManager
  10935. * @static
  10936. */
  10937. public static function locale($locale)
  10938. {
  10939. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10940. return $instance->locale($locale);
  10941. }
  10942. /**
  10943. * Get a driver instance.
  10944. *
  10945. * @param string|null $driver
  10946. * @return mixed
  10947. * @throws \InvalidArgumentException
  10948. * @static
  10949. */
  10950. public static function driver($driver = null)
  10951. {
  10952. //Method inherited from \Illuminate\Support\Manager
  10953. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10954. return $instance->driver($driver);
  10955. }
  10956. /**
  10957. * Register a custom driver creator Closure.
  10958. *
  10959. * @param string $driver
  10960. * @param \Closure $callback
  10961. * @return \Illuminate\Notifications\ChannelManager
  10962. * @static
  10963. */
  10964. public static function extend($driver, $callback)
  10965. {
  10966. //Method inherited from \Illuminate\Support\Manager
  10967. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10968. return $instance->extend($driver, $callback);
  10969. }
  10970. /**
  10971. * Get all of the created "drivers".
  10972. *
  10973. * @return array
  10974. * @static
  10975. */
  10976. public static function getDrivers()
  10977. {
  10978. //Method inherited from \Illuminate\Support\Manager
  10979. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10980. return $instance->getDrivers();
  10981. }
  10982. /**
  10983. * Get the container instance used by the manager.
  10984. *
  10985. * @return \Illuminate\Contracts\Container\Container
  10986. * @static
  10987. */
  10988. public static function getContainer()
  10989. {
  10990. //Method inherited from \Illuminate\Support\Manager
  10991. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10992. return $instance->getContainer();
  10993. }
  10994. /**
  10995. * Set the container instance used by the manager.
  10996. *
  10997. * @param \Illuminate\Contracts\Container\Container $container
  10998. * @return \Illuminate\Notifications\ChannelManager
  10999. * @static
  11000. */
  11001. public static function setContainer($container)
  11002. {
  11003. //Method inherited from \Illuminate\Support\Manager
  11004. /** @var \Illuminate\Notifications\ChannelManager $instance */
  11005. return $instance->setContainer($container);
  11006. }
  11007. /**
  11008. * Forget all of the resolved driver instances.
  11009. *
  11010. * @return \Illuminate\Notifications\ChannelManager
  11011. * @static
  11012. */
  11013. public static function forgetDrivers()
  11014. {
  11015. //Method inherited from \Illuminate\Support\Manager
  11016. /** @var \Illuminate\Notifications\ChannelManager $instance */
  11017. return $instance->forgetDrivers();
  11018. }
  11019. /**
  11020. * Assert if a notification was sent on-demand based on a truth-test callback.
  11021. *
  11022. * @param string|\Closure $notification
  11023. * @param callable|null $callback
  11024. * @return void
  11025. * @throws \Exception
  11026. * @static
  11027. */
  11028. public static function assertSentOnDemand($notification, $callback = null)
  11029. {
  11030. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11031. $instance->assertSentOnDemand($notification, $callback);
  11032. }
  11033. /**
  11034. * Assert if a notification was sent based on a truth-test callback.
  11035. *
  11036. * @param mixed $notifiable
  11037. * @param string|\Closure $notification
  11038. * @param callable|null $callback
  11039. * @return void
  11040. * @throws \Exception
  11041. * @static
  11042. */
  11043. public static function assertSentTo($notifiable, $notification, $callback = null)
  11044. {
  11045. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11046. $instance->assertSentTo($notifiable, $notification, $callback);
  11047. }
  11048. /**
  11049. * Assert if a notification was sent on-demand a number of times.
  11050. *
  11051. * @param string $notification
  11052. * @param int $times
  11053. * @return void
  11054. * @static
  11055. */
  11056. public static function assertSentOnDemandTimes($notification, $times = 1)
  11057. {
  11058. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11059. $instance->assertSentOnDemandTimes($notification, $times);
  11060. }
  11061. /**
  11062. * Assert if a notification was sent a number of times.
  11063. *
  11064. * @param mixed $notifiable
  11065. * @param string $notification
  11066. * @param int $times
  11067. * @return void
  11068. * @static
  11069. */
  11070. public static function assertSentToTimes($notifiable, $notification, $times = 1)
  11071. {
  11072. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11073. $instance->assertSentToTimes($notifiable, $notification, $times);
  11074. }
  11075. /**
  11076. * Determine if a notification was sent based on a truth-test callback.
  11077. *
  11078. * @param mixed $notifiable
  11079. * @param string|\Closure $notification
  11080. * @param callable|null $callback
  11081. * @return void
  11082. * @throws \Exception
  11083. * @static
  11084. */
  11085. public static function assertNotSentTo($notifiable, $notification, $callback = null)
  11086. {
  11087. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11088. $instance->assertNotSentTo($notifiable, $notification, $callback);
  11089. }
  11090. /**
  11091. * Assert that no notifications were sent.
  11092. *
  11093. * @return void
  11094. * @static
  11095. */
  11096. public static function assertNothingSent()
  11097. {
  11098. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11099. $instance->assertNothingSent();
  11100. }
  11101. /**
  11102. * Assert that no notifications were sent to the given notifiable.
  11103. *
  11104. * @param mixed $notifiable
  11105. * @return void
  11106. * @throws \Exception
  11107. * @static
  11108. */
  11109. public static function assertNothingSentTo($notifiable)
  11110. {
  11111. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11112. $instance->assertNothingSentTo($notifiable);
  11113. }
  11114. /**
  11115. * Assert the total amount of times a notification was sent.
  11116. *
  11117. * @param string $notification
  11118. * @param int $expectedCount
  11119. * @return void
  11120. * @static
  11121. */
  11122. public static function assertSentTimes($notification, $expectedCount)
  11123. {
  11124. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11125. $instance->assertSentTimes($notification, $expectedCount);
  11126. }
  11127. /**
  11128. * Assert the total count of notification that were sent.
  11129. *
  11130. * @param int $expectedCount
  11131. * @return void
  11132. * @static
  11133. */
  11134. public static function assertCount($expectedCount)
  11135. {
  11136. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11137. $instance->assertCount($expectedCount);
  11138. }
  11139. /**
  11140. * Get all of the notifications matching a truth-test callback.
  11141. *
  11142. * @param mixed $notifiable
  11143. * @param string $notification
  11144. * @param callable|null $callback
  11145. * @return \Illuminate\Support\Collection
  11146. * @static
  11147. */
  11148. public static function sent($notifiable, $notification, $callback = null)
  11149. {
  11150. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11151. return $instance->sent($notifiable, $notification, $callback);
  11152. }
  11153. /**
  11154. * Determine if there are more notifications left to inspect.
  11155. *
  11156. * @param mixed $notifiable
  11157. * @param string $notification
  11158. * @return bool
  11159. * @static
  11160. */
  11161. public static function hasSent($notifiable, $notification)
  11162. {
  11163. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11164. return $instance->hasSent($notifiable, $notification);
  11165. }
  11166. /**
  11167. * Specify if notification should be serialized and restored when being "pushed" to the queue.
  11168. *
  11169. * @param bool $serializeAndRestore
  11170. * @return \Illuminate\Support\Testing\Fakes\NotificationFake
  11171. * @static
  11172. */
  11173. public static function serializeAndRestore($serializeAndRestore = true)
  11174. {
  11175. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11176. return $instance->serializeAndRestore($serializeAndRestore);
  11177. }
  11178. /**
  11179. * Get the notifications that have been sent.
  11180. *
  11181. * @return array
  11182. * @static
  11183. */
  11184. public static function sentNotifications()
  11185. {
  11186. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11187. return $instance->sentNotifications();
  11188. }
  11189. /**
  11190. * Register a custom macro.
  11191. *
  11192. * @param string $name
  11193. * @param object|callable $macro
  11194. * @param-closure-this static $macro
  11195. * @return void
  11196. * @static
  11197. */
  11198. public static function macro($name, $macro)
  11199. {
  11200. \Illuminate\Support\Testing\Fakes\NotificationFake::macro($name, $macro);
  11201. }
  11202. /**
  11203. * Mix another object into the class.
  11204. *
  11205. * @param object $mixin
  11206. * @param bool $replace
  11207. * @return void
  11208. * @throws \ReflectionException
  11209. * @static
  11210. */
  11211. public static function mixin($mixin, $replace = true)
  11212. {
  11213. \Illuminate\Support\Testing\Fakes\NotificationFake::mixin($mixin, $replace);
  11214. }
  11215. /**
  11216. * Checks if macro is registered.
  11217. *
  11218. * @param string $name
  11219. * @return bool
  11220. * @static
  11221. */
  11222. public static function hasMacro($name)
  11223. {
  11224. return \Illuminate\Support\Testing\Fakes\NotificationFake::hasMacro($name);
  11225. }
  11226. /**
  11227. * Flush the existing macros.
  11228. *
  11229. * @return void
  11230. * @static
  11231. */
  11232. public static function flushMacros()
  11233. {
  11234. \Illuminate\Support\Testing\Fakes\NotificationFake::flushMacros();
  11235. }
  11236. }
  11237. /**
  11238. * @method static string sendResetLink(array $credentials, \Closure|null $callback = null)
  11239. * @method static mixed reset(array $credentials, \Closure $callback)
  11240. * @method static \Illuminate\Contracts\Auth\CanResetPassword|null getUser(array $credentials)
  11241. * @method static string createToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  11242. * @method static void deleteToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  11243. * @method static bool tokenExists(\Illuminate\Contracts\Auth\CanResetPassword $user, string $token)
  11244. * @method static \Illuminate\Auth\Passwords\TokenRepositoryInterface getRepository()
  11245. * @method static \Illuminate\Support\Timebox getTimebox()
  11246. * @see \Illuminate\Auth\Passwords\PasswordBrokerManager
  11247. * @see \Illuminate\Auth\Passwords\PasswordBroker
  11248. */
  11249. class Password {
  11250. /**
  11251. * Attempt to get the broker from the local cache.
  11252. *
  11253. * @param string|null $name
  11254. * @return \Illuminate\Contracts\Auth\PasswordBroker
  11255. * @static
  11256. */
  11257. public static function broker($name = null)
  11258. {
  11259. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11260. return $instance->broker($name);
  11261. }
  11262. /**
  11263. * Get the default password broker name.
  11264. *
  11265. * @return string
  11266. * @static
  11267. */
  11268. public static function getDefaultDriver()
  11269. {
  11270. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11271. return $instance->getDefaultDriver();
  11272. }
  11273. /**
  11274. * Set the default password broker name.
  11275. *
  11276. * @param string $name
  11277. * @return void
  11278. * @static
  11279. */
  11280. public static function setDefaultDriver($name)
  11281. {
  11282. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11283. $instance->setDefaultDriver($name);
  11284. }
  11285. }
  11286. /**
  11287. * @method static \Illuminate\Process\PendingProcess command(array|string $command)
  11288. * @method static \Illuminate\Process\PendingProcess path(string $path)
  11289. * @method static \Illuminate\Process\PendingProcess timeout(int $timeout)
  11290. * @method static \Illuminate\Process\PendingProcess idleTimeout(int $timeout)
  11291. * @method static \Illuminate\Process\PendingProcess forever()
  11292. * @method static \Illuminate\Process\PendingProcess env(array $environment)
  11293. * @method static \Illuminate\Process\PendingProcess input(\Traversable|resource|string|int|float|bool|null $input)
  11294. * @method static \Illuminate\Process\PendingProcess quietly()
  11295. * @method static \Illuminate\Process\PendingProcess tty(bool $tty = true)
  11296. * @method static \Illuminate\Process\PendingProcess options(array $options)
  11297. * @method static \Illuminate\Contracts\Process\ProcessResult run(array|string|null $command = null, callable|null $output = null)
  11298. * @method static \Illuminate\Process\InvokedProcess start(array|string|null $command = null, callable|null $output = null)
  11299. * @method static bool supportsTty()
  11300. * @method static \Illuminate\Process\PendingProcess withFakeHandlers(array $fakeHandlers)
  11301. * @method static \Illuminate\Process\PendingProcess|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  11302. * @method static \Illuminate\Process\PendingProcess|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  11303. * @see \Illuminate\Process\PendingProcess
  11304. * @see \Illuminate\Process\Factory
  11305. */
  11306. class Process {
  11307. /**
  11308. * Create a new fake process response for testing purposes.
  11309. *
  11310. * @param array|string $output
  11311. * @param array|string $errorOutput
  11312. * @param int $exitCode
  11313. * @return \Illuminate\Process\FakeProcessResult
  11314. * @static
  11315. */
  11316. public static function result($output = '', $errorOutput = '', $exitCode = 0)
  11317. {
  11318. /** @var \Illuminate\Process\Factory $instance */
  11319. return $instance->result($output, $errorOutput, $exitCode);
  11320. }
  11321. /**
  11322. * Begin describing a fake process lifecycle.
  11323. *
  11324. * @return \Illuminate\Process\FakeProcessDescription
  11325. * @static
  11326. */
  11327. public static function describe()
  11328. {
  11329. /** @var \Illuminate\Process\Factory $instance */
  11330. return $instance->describe();
  11331. }
  11332. /**
  11333. * Begin describing a fake process sequence.
  11334. *
  11335. * @param array $processes
  11336. * @return \Illuminate\Process\FakeProcessSequence
  11337. * @static
  11338. */
  11339. public static function sequence($processes = [])
  11340. {
  11341. /** @var \Illuminate\Process\Factory $instance */
  11342. return $instance->sequence($processes);
  11343. }
  11344. /**
  11345. * Indicate that the process factory should fake processes.
  11346. *
  11347. * @param \Closure|array|null $callback
  11348. * @return \Illuminate\Process\Factory
  11349. * @static
  11350. */
  11351. public static function fake($callback = null)
  11352. {
  11353. /** @var \Illuminate\Process\Factory $instance */
  11354. return $instance->fake($callback);
  11355. }
  11356. /**
  11357. * Determine if the process factory has fake process handlers and is recording processes.
  11358. *
  11359. * @return bool
  11360. * @static
  11361. */
  11362. public static function isRecording()
  11363. {
  11364. /** @var \Illuminate\Process\Factory $instance */
  11365. return $instance->isRecording();
  11366. }
  11367. /**
  11368. * Record the given process if processes should be recorded.
  11369. *
  11370. * @param \Illuminate\Process\PendingProcess $process
  11371. * @param \Illuminate\Contracts\Process\ProcessResult $result
  11372. * @return \Illuminate\Process\Factory
  11373. * @static
  11374. */
  11375. public static function recordIfRecording($process, $result)
  11376. {
  11377. /** @var \Illuminate\Process\Factory $instance */
  11378. return $instance->recordIfRecording($process, $result);
  11379. }
  11380. /**
  11381. * Record the given process.
  11382. *
  11383. * @param \Illuminate\Process\PendingProcess $process
  11384. * @param \Illuminate\Contracts\Process\ProcessResult $result
  11385. * @return \Illuminate\Process\Factory
  11386. * @static
  11387. */
  11388. public static function record($process, $result)
  11389. {
  11390. /** @var \Illuminate\Process\Factory $instance */
  11391. return $instance->record($process, $result);
  11392. }
  11393. /**
  11394. * Indicate that an exception should be thrown if any process is not faked.
  11395. *
  11396. * @param bool $prevent
  11397. * @return \Illuminate\Process\Factory
  11398. * @static
  11399. */
  11400. public static function preventStrayProcesses($prevent = true)
  11401. {
  11402. /** @var \Illuminate\Process\Factory $instance */
  11403. return $instance->preventStrayProcesses($prevent);
  11404. }
  11405. /**
  11406. * Determine if stray processes are being prevented.
  11407. *
  11408. * @return bool
  11409. * @static
  11410. */
  11411. public static function preventingStrayProcesses()
  11412. {
  11413. /** @var \Illuminate\Process\Factory $instance */
  11414. return $instance->preventingStrayProcesses();
  11415. }
  11416. /**
  11417. * Assert that a process was recorded matching a given truth test.
  11418. *
  11419. * @param \Closure|string $callback
  11420. * @return \Illuminate\Process\Factory
  11421. * @static
  11422. */
  11423. public static function assertRan($callback)
  11424. {
  11425. /** @var \Illuminate\Process\Factory $instance */
  11426. return $instance->assertRan($callback);
  11427. }
  11428. /**
  11429. * Assert that a process was recorded a given number of times matching a given truth test.
  11430. *
  11431. * @param \Closure|string $callback
  11432. * @param int $times
  11433. * @return \Illuminate\Process\Factory
  11434. * @static
  11435. */
  11436. public static function assertRanTimes($callback, $times = 1)
  11437. {
  11438. /** @var \Illuminate\Process\Factory $instance */
  11439. return $instance->assertRanTimes($callback, $times);
  11440. }
  11441. /**
  11442. * Assert that a process was not recorded matching a given truth test.
  11443. *
  11444. * @param \Closure|string $callback
  11445. * @return \Illuminate\Process\Factory
  11446. * @static
  11447. */
  11448. public static function assertNotRan($callback)
  11449. {
  11450. /** @var \Illuminate\Process\Factory $instance */
  11451. return $instance->assertNotRan($callback);
  11452. }
  11453. /**
  11454. * Assert that a process was not recorded matching a given truth test.
  11455. *
  11456. * @param \Closure|string $callback
  11457. * @return \Illuminate\Process\Factory
  11458. * @static
  11459. */
  11460. public static function assertDidntRun($callback)
  11461. {
  11462. /** @var \Illuminate\Process\Factory $instance */
  11463. return $instance->assertDidntRun($callback);
  11464. }
  11465. /**
  11466. * Assert that no processes were recorded.
  11467. *
  11468. * @return \Illuminate\Process\Factory
  11469. * @static
  11470. */
  11471. public static function assertNothingRan()
  11472. {
  11473. /** @var \Illuminate\Process\Factory $instance */
  11474. return $instance->assertNothingRan();
  11475. }
  11476. /**
  11477. * Start defining a pool of processes.
  11478. *
  11479. * @param callable $callback
  11480. * @return \Illuminate\Process\Pool
  11481. * @static
  11482. */
  11483. public static function pool($callback)
  11484. {
  11485. /** @var \Illuminate\Process\Factory $instance */
  11486. return $instance->pool($callback);
  11487. }
  11488. /**
  11489. * Start defining a series of piped processes.
  11490. *
  11491. * @param callable|array $callback
  11492. * @return \Illuminate\Contracts\Process\ProcessResult
  11493. * @static
  11494. */
  11495. public static function pipe($callback, $output = null)
  11496. {
  11497. /** @var \Illuminate\Process\Factory $instance */
  11498. return $instance->pipe($callback, $output);
  11499. }
  11500. /**
  11501. * Run a pool of processes and wait for them to finish executing.
  11502. *
  11503. * @param callable $callback
  11504. * @param callable|null $output
  11505. * @return \Illuminate\Process\ProcessPoolResults
  11506. * @static
  11507. */
  11508. public static function concurrently($callback, $output = null)
  11509. {
  11510. /** @var \Illuminate\Process\Factory $instance */
  11511. return $instance->concurrently($callback, $output);
  11512. }
  11513. /**
  11514. * Create a new pending process associated with this factory.
  11515. *
  11516. * @return \Illuminate\Process\PendingProcess
  11517. * @static
  11518. */
  11519. public static function newPendingProcess()
  11520. {
  11521. /** @var \Illuminate\Process\Factory $instance */
  11522. return $instance->newPendingProcess();
  11523. }
  11524. /**
  11525. * Register a custom macro.
  11526. *
  11527. * @param string $name
  11528. * @param object|callable $macro
  11529. * @param-closure-this static $macro
  11530. * @return void
  11531. * @static
  11532. */
  11533. public static function macro($name, $macro)
  11534. {
  11535. \Illuminate\Process\Factory::macro($name, $macro);
  11536. }
  11537. /**
  11538. * Mix another object into the class.
  11539. *
  11540. * @param object $mixin
  11541. * @param bool $replace
  11542. * @return void
  11543. * @throws \ReflectionException
  11544. * @static
  11545. */
  11546. public static function mixin($mixin, $replace = true)
  11547. {
  11548. \Illuminate\Process\Factory::mixin($mixin, $replace);
  11549. }
  11550. /**
  11551. * Checks if macro is registered.
  11552. *
  11553. * @param string $name
  11554. * @return bool
  11555. * @static
  11556. */
  11557. public static function hasMacro($name)
  11558. {
  11559. return \Illuminate\Process\Factory::hasMacro($name);
  11560. }
  11561. /**
  11562. * Flush the existing macros.
  11563. *
  11564. * @return void
  11565. * @static
  11566. */
  11567. public static function flushMacros()
  11568. {
  11569. \Illuminate\Process\Factory::flushMacros();
  11570. }
  11571. /**
  11572. * Dynamically handle calls to the class.
  11573. *
  11574. * @param string $method
  11575. * @param array $parameters
  11576. * @return mixed
  11577. * @throws \BadMethodCallException
  11578. * @static
  11579. */
  11580. public static function macroCall($method, $parameters)
  11581. {
  11582. /** @var \Illuminate\Process\Factory $instance */
  11583. return $instance->macroCall($method, $parameters);
  11584. }
  11585. }
  11586. /**
  11587. * @see \Illuminate\Queue\QueueManager
  11588. * @see \Illuminate\Queue\Queue
  11589. * @see \Illuminate\Support\Testing\Fakes\QueueFake
  11590. */
  11591. class Queue {
  11592. /**
  11593. * Register an event listener for the before job event.
  11594. *
  11595. * @param mixed $callback
  11596. * @return void
  11597. * @static
  11598. */
  11599. public static function before($callback)
  11600. {
  11601. /** @var \Illuminate\Queue\QueueManager $instance */
  11602. $instance->before($callback);
  11603. }
  11604. /**
  11605. * Register an event listener for the after job event.
  11606. *
  11607. * @param mixed $callback
  11608. * @return void
  11609. * @static
  11610. */
  11611. public static function after($callback)
  11612. {
  11613. /** @var \Illuminate\Queue\QueueManager $instance */
  11614. $instance->after($callback);
  11615. }
  11616. /**
  11617. * Register an event listener for the exception occurred job event.
  11618. *
  11619. * @param mixed $callback
  11620. * @return void
  11621. * @static
  11622. */
  11623. public static function exceptionOccurred($callback)
  11624. {
  11625. /** @var \Illuminate\Queue\QueueManager $instance */
  11626. $instance->exceptionOccurred($callback);
  11627. }
  11628. /**
  11629. * Register an event listener for the daemon queue loop.
  11630. *
  11631. * @param mixed $callback
  11632. * @return void
  11633. * @static
  11634. */
  11635. public static function looping($callback)
  11636. {
  11637. /** @var \Illuminate\Queue\QueueManager $instance */
  11638. $instance->looping($callback);
  11639. }
  11640. /**
  11641. * Register an event listener for the failed job event.
  11642. *
  11643. * @param mixed $callback
  11644. * @return void
  11645. * @static
  11646. */
  11647. public static function failing($callback)
  11648. {
  11649. /** @var \Illuminate\Queue\QueueManager $instance */
  11650. $instance->failing($callback);
  11651. }
  11652. /**
  11653. * Register an event listener for the daemon queue starting.
  11654. *
  11655. * @param mixed $callback
  11656. * @return void
  11657. * @static
  11658. */
  11659. public static function starting($callback)
  11660. {
  11661. /** @var \Illuminate\Queue\QueueManager $instance */
  11662. $instance->starting($callback);
  11663. }
  11664. /**
  11665. * Register an event listener for the daemon queue stopping.
  11666. *
  11667. * @param mixed $callback
  11668. * @return void
  11669. * @static
  11670. */
  11671. public static function stopping($callback)
  11672. {
  11673. /** @var \Illuminate\Queue\QueueManager $instance */
  11674. $instance->stopping($callback);
  11675. }
  11676. /**
  11677. * Determine if the driver is connected.
  11678. *
  11679. * @param string|null $name
  11680. * @return bool
  11681. * @static
  11682. */
  11683. public static function connected($name = null)
  11684. {
  11685. /** @var \Illuminate\Queue\QueueManager $instance */
  11686. return $instance->connected($name);
  11687. }
  11688. /**
  11689. * Resolve a queue connection instance.
  11690. *
  11691. * @param string|null $name
  11692. * @return \Illuminate\Contracts\Queue\Queue
  11693. * @static
  11694. */
  11695. public static function connection($name = null)
  11696. {
  11697. /** @var \Illuminate\Queue\QueueManager $instance */
  11698. return $instance->connection($name);
  11699. }
  11700. /**
  11701. * Add a queue connection resolver.
  11702. *
  11703. * @param string $driver
  11704. * @param \Closure $resolver
  11705. * @return void
  11706. * @static
  11707. */
  11708. public static function extend($driver, $resolver)
  11709. {
  11710. /** @var \Illuminate\Queue\QueueManager $instance */
  11711. $instance->extend($driver, $resolver);
  11712. }
  11713. /**
  11714. * Add a queue connection resolver.
  11715. *
  11716. * @param string $driver
  11717. * @param \Closure $resolver
  11718. * @return void
  11719. * @static
  11720. */
  11721. public static function addConnector($driver, $resolver)
  11722. {
  11723. /** @var \Illuminate\Queue\QueueManager $instance */
  11724. $instance->addConnector($driver, $resolver);
  11725. }
  11726. /**
  11727. * Get the name of the default queue connection.
  11728. *
  11729. * @return string
  11730. * @static
  11731. */
  11732. public static function getDefaultDriver()
  11733. {
  11734. /** @var \Illuminate\Queue\QueueManager $instance */
  11735. return $instance->getDefaultDriver();
  11736. }
  11737. /**
  11738. * Set the name of the default queue connection.
  11739. *
  11740. * @param string $name
  11741. * @return void
  11742. * @static
  11743. */
  11744. public static function setDefaultDriver($name)
  11745. {
  11746. /** @var \Illuminate\Queue\QueueManager $instance */
  11747. $instance->setDefaultDriver($name);
  11748. }
  11749. /**
  11750. * Get the full name for the given connection.
  11751. *
  11752. * @param string|null $connection
  11753. * @return string
  11754. * @static
  11755. */
  11756. public static function getName($connection = null)
  11757. {
  11758. /** @var \Illuminate\Queue\QueueManager $instance */
  11759. return $instance->getName($connection);
  11760. }
  11761. /**
  11762. * Get the application instance used by the manager.
  11763. *
  11764. * @return \Illuminate\Contracts\Foundation\Application
  11765. * @static
  11766. */
  11767. public static function getApplication()
  11768. {
  11769. /** @var \Illuminate\Queue\QueueManager $instance */
  11770. return $instance->getApplication();
  11771. }
  11772. /**
  11773. * Set the application instance used by the manager.
  11774. *
  11775. * @param \Illuminate\Contracts\Foundation\Application $app
  11776. * @return \Illuminate\Queue\QueueManager
  11777. * @static
  11778. */
  11779. public static function setApplication($app)
  11780. {
  11781. /** @var \Illuminate\Queue\QueueManager $instance */
  11782. return $instance->setApplication($app);
  11783. }
  11784. /**
  11785. * Specify the jobs that should be queued instead of faked.
  11786. *
  11787. * @param array|string $jobsToBeQueued
  11788. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  11789. * @static
  11790. */
  11791. public static function except($jobsToBeQueued)
  11792. {
  11793. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11794. return $instance->except($jobsToBeQueued);
  11795. }
  11796. /**
  11797. * Assert if a job was pushed based on a truth-test callback.
  11798. *
  11799. * @param string|\Closure $job
  11800. * @param callable|int|null $callback
  11801. * @return void
  11802. * @static
  11803. */
  11804. public static function assertPushed($job, $callback = null)
  11805. {
  11806. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11807. $instance->assertPushed($job, $callback);
  11808. }
  11809. /**
  11810. * Assert if a job was pushed based on a truth-test callback.
  11811. *
  11812. * @param string $queue
  11813. * @param string|\Closure $job
  11814. * @param callable|null $callback
  11815. * @return void
  11816. * @static
  11817. */
  11818. public static function assertPushedOn($queue, $job, $callback = null)
  11819. {
  11820. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11821. $instance->assertPushedOn($queue, $job, $callback);
  11822. }
  11823. /**
  11824. * Assert if a job was pushed with chained jobs based on a truth-test callback.
  11825. *
  11826. * @param string $job
  11827. * @param array $expectedChain
  11828. * @param callable|null $callback
  11829. * @return void
  11830. * @static
  11831. */
  11832. public static function assertPushedWithChain($job, $expectedChain = [], $callback = null)
  11833. {
  11834. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11835. $instance->assertPushedWithChain($job, $expectedChain, $callback);
  11836. }
  11837. /**
  11838. * Assert if a job was pushed with an empty chain based on a truth-test callback.
  11839. *
  11840. * @param string $job
  11841. * @param callable|null $callback
  11842. * @return void
  11843. * @static
  11844. */
  11845. public static function assertPushedWithoutChain($job, $callback = null)
  11846. {
  11847. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11848. $instance->assertPushedWithoutChain($job, $callback);
  11849. }
  11850. /**
  11851. * Assert if a closure was pushed based on a truth-test callback.
  11852. *
  11853. * @param callable|int|null $callback
  11854. * @return void
  11855. * @static
  11856. */
  11857. public static function assertClosurePushed($callback = null)
  11858. {
  11859. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11860. $instance->assertClosurePushed($callback);
  11861. }
  11862. /**
  11863. * Assert that a closure was not pushed based on a truth-test callback.
  11864. *
  11865. * @param callable|null $callback
  11866. * @return void
  11867. * @static
  11868. */
  11869. public static function assertClosureNotPushed($callback = null)
  11870. {
  11871. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11872. $instance->assertClosureNotPushed($callback);
  11873. }
  11874. /**
  11875. * Determine if a job was pushed based on a truth-test callback.
  11876. *
  11877. * @param string|\Closure $job
  11878. * @param callable|null $callback
  11879. * @return void
  11880. * @static
  11881. */
  11882. public static function assertNotPushed($job, $callback = null)
  11883. {
  11884. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11885. $instance->assertNotPushed($job, $callback);
  11886. }
  11887. /**
  11888. * Assert the total count of jobs that were pushed.
  11889. *
  11890. * @param int $expectedCount
  11891. * @return void
  11892. * @static
  11893. */
  11894. public static function assertCount($expectedCount)
  11895. {
  11896. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11897. $instance->assertCount($expectedCount);
  11898. }
  11899. /**
  11900. * Assert that no jobs were pushed.
  11901. *
  11902. * @return void
  11903. * @static
  11904. */
  11905. public static function assertNothingPushed()
  11906. {
  11907. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11908. $instance->assertNothingPushed();
  11909. }
  11910. /**
  11911. * Get all of the jobs matching a truth-test callback.
  11912. *
  11913. * @param string $job
  11914. * @param callable|null $callback
  11915. * @return \Illuminate\Support\Collection
  11916. * @static
  11917. */
  11918. public static function pushed($job, $callback = null)
  11919. {
  11920. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11921. return $instance->pushed($job, $callback);
  11922. }
  11923. /**
  11924. * Get all of the raw pushes matching a truth-test callback.
  11925. *
  11926. * @param null|\Closure(string, ?string, array): bool $callback
  11927. * @return \Illuminate\Support\Collection<int, RawPushType>
  11928. * @static
  11929. */
  11930. public static function pushedRaw($callback = null)
  11931. {
  11932. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11933. return $instance->pushedRaw($callback);
  11934. }
  11935. /**
  11936. * Get all of the jobs by listener class, passing an optional truth-test callback.
  11937. *
  11938. * @param class-string $listenerClass
  11939. * @param (\Closure(mixed, \Illuminate\Events\CallQueuedListener, string|null, mixed): bool)|null $callback
  11940. * @return \Illuminate\Support\Collection<int, \Illuminate\Events\CallQueuedListener>
  11941. * @static
  11942. */
  11943. public static function listenersPushed($listenerClass, $callback = null)
  11944. {
  11945. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11946. return $instance->listenersPushed($listenerClass, $callback);
  11947. }
  11948. /**
  11949. * Determine if there are any stored jobs for a given class.
  11950. *
  11951. * @param string $job
  11952. * @return bool
  11953. * @static
  11954. */
  11955. public static function hasPushed($job)
  11956. {
  11957. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11958. return $instance->hasPushed($job);
  11959. }
  11960. /**
  11961. * Get the size of the queue.
  11962. *
  11963. * @param string|null $queue
  11964. * @return int
  11965. * @static
  11966. */
  11967. public static function size($queue = null)
  11968. {
  11969. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11970. return $instance->size($queue);
  11971. }
  11972. /**
  11973. * Get the number of pending jobs.
  11974. *
  11975. * @param string|null $queue
  11976. * @return int
  11977. * @static
  11978. */
  11979. public static function pendingSize($queue = null)
  11980. {
  11981. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11982. return $instance->pendingSize($queue);
  11983. }
  11984. /**
  11985. * Get the number of delayed jobs.
  11986. *
  11987. * @param string|null $queue
  11988. * @return int
  11989. * @static
  11990. */
  11991. public static function delayedSize($queue = null)
  11992. {
  11993. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11994. return $instance->delayedSize($queue);
  11995. }
  11996. /**
  11997. * Get the number of reserved jobs.
  11998. *
  11999. * @param string|null $queue
  12000. * @return int
  12001. * @static
  12002. */
  12003. public static function reservedSize($queue = null)
  12004. {
  12005. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12006. return $instance->reservedSize($queue);
  12007. }
  12008. /**
  12009. * Get the creation timestamp of the oldest pending job, excluding delayed jobs.
  12010. *
  12011. * @param string|null $queue
  12012. * @return int|null
  12013. * @static
  12014. */
  12015. public static function creationTimeOfOldestPendingJob($queue = null)
  12016. {
  12017. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12018. return $instance->creationTimeOfOldestPendingJob($queue);
  12019. }
  12020. /**
  12021. * Push a new job onto the queue.
  12022. *
  12023. * @param string|object $job
  12024. * @param mixed $data
  12025. * @param string|null $queue
  12026. * @return mixed
  12027. * @static
  12028. */
  12029. public static function push($job, $data = '', $queue = null)
  12030. {
  12031. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12032. return $instance->push($job, $data, $queue);
  12033. }
  12034. /**
  12035. * Determine if a job should be faked or actually dispatched.
  12036. *
  12037. * @param object $job
  12038. * @return bool
  12039. * @static
  12040. */
  12041. public static function shouldFakeJob($job)
  12042. {
  12043. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12044. return $instance->shouldFakeJob($job);
  12045. }
  12046. /**
  12047. * Push a raw payload onto the queue.
  12048. *
  12049. * @param string $payload
  12050. * @param string|null $queue
  12051. * @param array $options
  12052. * @return mixed
  12053. * @static
  12054. */
  12055. public static function pushRaw($payload, $queue = null, $options = [])
  12056. {
  12057. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12058. return $instance->pushRaw($payload, $queue, $options);
  12059. }
  12060. /**
  12061. * Push a new job onto the queue after (n) seconds.
  12062. *
  12063. * @param \DateTimeInterface|\DateInterval|int $delay
  12064. * @param string|object $job
  12065. * @param mixed $data
  12066. * @param string|null $queue
  12067. * @return mixed
  12068. * @static
  12069. */
  12070. public static function later($delay, $job, $data = '', $queue = null)
  12071. {
  12072. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12073. return $instance->later($delay, $job, $data, $queue);
  12074. }
  12075. /**
  12076. * Push a new job onto the queue.
  12077. *
  12078. * @param string $queue
  12079. * @param string|object $job
  12080. * @param mixed $data
  12081. * @return mixed
  12082. * @static
  12083. */
  12084. public static function pushOn($queue, $job, $data = '')
  12085. {
  12086. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12087. return $instance->pushOn($queue, $job, $data);
  12088. }
  12089. /**
  12090. * Push a new job onto a specific queue after (n) seconds.
  12091. *
  12092. * @param string $queue
  12093. * @param \DateTimeInterface|\DateInterval|int $delay
  12094. * @param string|object $job
  12095. * @param mixed $data
  12096. * @return mixed
  12097. * @static
  12098. */
  12099. public static function laterOn($queue, $delay, $job, $data = '')
  12100. {
  12101. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12102. return $instance->laterOn($queue, $delay, $job, $data);
  12103. }
  12104. /**
  12105. * Pop the next job off of the queue.
  12106. *
  12107. * @param string|null $queue
  12108. * @return \Illuminate\Contracts\Queue\Job|null
  12109. * @static
  12110. */
  12111. public static function pop($queue = null)
  12112. {
  12113. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12114. return $instance->pop($queue);
  12115. }
  12116. /**
  12117. * Push an array of jobs onto the queue.
  12118. *
  12119. * @param array $jobs
  12120. * @param mixed $data
  12121. * @param string|null $queue
  12122. * @return mixed
  12123. * @static
  12124. */
  12125. public static function bulk($jobs, $data = '', $queue = null)
  12126. {
  12127. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12128. return $instance->bulk($jobs, $data, $queue);
  12129. }
  12130. /**
  12131. * Get the jobs that have been pushed.
  12132. *
  12133. * @return array
  12134. * @static
  12135. */
  12136. public static function pushedJobs()
  12137. {
  12138. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12139. return $instance->pushedJobs();
  12140. }
  12141. /**
  12142. * Get the payloads that were pushed raw.
  12143. *
  12144. * @return list<RawPushType>
  12145. * @static
  12146. */
  12147. public static function rawPushes()
  12148. {
  12149. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12150. return $instance->rawPushes();
  12151. }
  12152. /**
  12153. * Specify if jobs should be serialized and restored when being "pushed" to the queue.
  12154. *
  12155. * @param bool $serializeAndRestore
  12156. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  12157. * @static
  12158. */
  12159. public static function serializeAndRestore($serializeAndRestore = true)
  12160. {
  12161. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12162. return $instance->serializeAndRestore($serializeAndRestore);
  12163. }
  12164. /**
  12165. * Get the connection name for the queue.
  12166. *
  12167. * @return string
  12168. * @static
  12169. */
  12170. public static function getConnectionName()
  12171. {
  12172. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12173. return $instance->getConnectionName();
  12174. }
  12175. /**
  12176. * Set the connection name for the queue.
  12177. *
  12178. * @param string $name
  12179. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  12180. * @static
  12181. */
  12182. public static function setConnectionName($name)
  12183. {
  12184. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12185. return $instance->setConnectionName($name);
  12186. }
  12187. /**
  12188. * Migrate the delayed jobs that are ready to the regular queue.
  12189. *
  12190. * @param string $from
  12191. * @param string $to
  12192. * @return array
  12193. * @static
  12194. */
  12195. public static function migrateExpiredJobs($from, $to)
  12196. {
  12197. /** @var \Illuminate\Queue\RedisQueue $instance */
  12198. return $instance->migrateExpiredJobs($from, $to);
  12199. }
  12200. /**
  12201. * Delete a reserved job from the queue.
  12202. *
  12203. * @param string $queue
  12204. * @param \Illuminate\Queue\Jobs\RedisJob $job
  12205. * @return void
  12206. * @static
  12207. */
  12208. public static function deleteReserved($queue, $job)
  12209. {
  12210. /** @var \Illuminate\Queue\RedisQueue $instance */
  12211. $instance->deleteReserved($queue, $job);
  12212. }
  12213. /**
  12214. * Delete a reserved job from the reserved queue and release it.
  12215. *
  12216. * @param string $queue
  12217. * @param \Illuminate\Queue\Jobs\RedisJob $job
  12218. * @param int $delay
  12219. * @return void
  12220. * @static
  12221. */
  12222. public static function deleteAndRelease($queue, $job, $delay)
  12223. {
  12224. /** @var \Illuminate\Queue\RedisQueue $instance */
  12225. $instance->deleteAndRelease($queue, $job, $delay);
  12226. }
  12227. /**
  12228. * Delete all of the jobs from the queue.
  12229. *
  12230. * @param string $queue
  12231. * @return int
  12232. * @static
  12233. */
  12234. public static function clear($queue)
  12235. {
  12236. /** @var \Illuminate\Queue\RedisQueue $instance */
  12237. return $instance->clear($queue);
  12238. }
  12239. /**
  12240. * Get the queue or return the default.
  12241. *
  12242. * @param string|null $queue
  12243. * @return string
  12244. * @static
  12245. */
  12246. public static function getQueue($queue)
  12247. {
  12248. /** @var \Illuminate\Queue\RedisQueue $instance */
  12249. return $instance->getQueue($queue);
  12250. }
  12251. /**
  12252. * Get the connection for the queue.
  12253. *
  12254. * @return \Illuminate\Redis\Connections\Connection
  12255. * @static
  12256. */
  12257. public static function getConnection()
  12258. {
  12259. /** @var \Illuminate\Queue\RedisQueue $instance */
  12260. return $instance->getConnection();
  12261. }
  12262. /**
  12263. * Get the underlying Redis instance.
  12264. *
  12265. * @return \Illuminate\Contracts\Redis\Factory
  12266. * @static
  12267. */
  12268. public static function getRedis()
  12269. {
  12270. /** @var \Illuminate\Queue\RedisQueue $instance */
  12271. return $instance->getRedis();
  12272. }
  12273. /**
  12274. * Get the maximum number of attempts for an object-based queue handler.
  12275. *
  12276. * @param mixed $job
  12277. * @return mixed
  12278. * @static
  12279. */
  12280. public static function getJobTries($job)
  12281. {
  12282. //Method inherited from \Illuminate\Queue\Queue
  12283. /** @var \Illuminate\Queue\RedisQueue $instance */
  12284. return $instance->getJobTries($job);
  12285. }
  12286. /**
  12287. * Get the backoff for an object-based queue handler.
  12288. *
  12289. * @param mixed $job
  12290. * @return mixed
  12291. * @static
  12292. */
  12293. public static function getJobBackoff($job)
  12294. {
  12295. //Method inherited from \Illuminate\Queue\Queue
  12296. /** @var \Illuminate\Queue\RedisQueue $instance */
  12297. return $instance->getJobBackoff($job);
  12298. }
  12299. /**
  12300. * Get the expiration timestamp for an object-based queue handler.
  12301. *
  12302. * @param mixed $job
  12303. * @return mixed
  12304. * @static
  12305. */
  12306. public static function getJobExpiration($job)
  12307. {
  12308. //Method inherited from \Illuminate\Queue\Queue
  12309. /** @var \Illuminate\Queue\RedisQueue $instance */
  12310. return $instance->getJobExpiration($job);
  12311. }
  12312. /**
  12313. * Register a callback to be executed when creating job payloads.
  12314. *
  12315. * @param callable|null $callback
  12316. * @return void
  12317. * @static
  12318. */
  12319. public static function createPayloadUsing($callback)
  12320. {
  12321. //Method inherited from \Illuminate\Queue\Queue
  12322. \Illuminate\Queue\RedisQueue::createPayloadUsing($callback);
  12323. }
  12324. /**
  12325. * Get the container instance being used by the connection.
  12326. *
  12327. * @return \Illuminate\Container\Container
  12328. * @static
  12329. */
  12330. public static function getContainer()
  12331. {
  12332. //Method inherited from \Illuminate\Queue\Queue
  12333. /** @var \Illuminate\Queue\RedisQueue $instance */
  12334. return $instance->getContainer();
  12335. }
  12336. /**
  12337. * Set the IoC container instance.
  12338. *
  12339. * @param \Illuminate\Container\Container $container
  12340. * @return void
  12341. * @static
  12342. */
  12343. public static function setContainer($container)
  12344. {
  12345. //Method inherited from \Illuminate\Queue\Queue
  12346. /** @var \Illuminate\Queue\RedisQueue $instance */
  12347. $instance->setContainer($container);
  12348. }
  12349. }
  12350. /**
  12351. * @see \Illuminate\Cache\RateLimiter
  12352. */
  12353. class RateLimiter {
  12354. /**
  12355. * Register a named limiter configuration.
  12356. *
  12357. * @param \BackedEnum|\UnitEnum|string $name
  12358. * @param \Closure $callback
  12359. * @return \Illuminate\Cache\RateLimiter
  12360. * @static
  12361. */
  12362. public static function for($name, $callback)
  12363. {
  12364. /** @var \Illuminate\Cache\RateLimiter $instance */
  12365. return $instance->for($name, $callback);
  12366. }
  12367. /**
  12368. * Get the given named rate limiter.
  12369. *
  12370. * @param \BackedEnum|\UnitEnum|string $name
  12371. * @return \Closure|null
  12372. * @static
  12373. */
  12374. public static function limiter($name)
  12375. {
  12376. /** @var \Illuminate\Cache\RateLimiter $instance */
  12377. return $instance->limiter($name);
  12378. }
  12379. /**
  12380. * Attempts to execute a callback if it's not limited.
  12381. *
  12382. * @param string $key
  12383. * @param int $maxAttempts
  12384. * @param \Closure $callback
  12385. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12386. * @return mixed
  12387. * @static
  12388. */
  12389. public static function attempt($key, $maxAttempts, $callback, $decaySeconds = 60)
  12390. {
  12391. /** @var \Illuminate\Cache\RateLimiter $instance */
  12392. return $instance->attempt($key, $maxAttempts, $callback, $decaySeconds);
  12393. }
  12394. /**
  12395. * Determine if the given key has been "accessed" too many times.
  12396. *
  12397. * @param string $key
  12398. * @param int $maxAttempts
  12399. * @return bool
  12400. * @static
  12401. */
  12402. public static function tooManyAttempts($key, $maxAttempts)
  12403. {
  12404. /** @var \Illuminate\Cache\RateLimiter $instance */
  12405. return $instance->tooManyAttempts($key, $maxAttempts);
  12406. }
  12407. /**
  12408. * Increment (by 1) the counter for a given key for a given decay time.
  12409. *
  12410. * @param string $key
  12411. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12412. * @return int
  12413. * @static
  12414. */
  12415. public static function hit($key, $decaySeconds = 60)
  12416. {
  12417. /** @var \Illuminate\Cache\RateLimiter $instance */
  12418. return $instance->hit($key, $decaySeconds);
  12419. }
  12420. /**
  12421. * Increment the counter for a given key for a given decay time by a given amount.
  12422. *
  12423. * @param string $key
  12424. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12425. * @param int $amount
  12426. * @return int
  12427. * @static
  12428. */
  12429. public static function increment($key, $decaySeconds = 60, $amount = 1)
  12430. {
  12431. /** @var \Illuminate\Cache\RateLimiter $instance */
  12432. return $instance->increment($key, $decaySeconds, $amount);
  12433. }
  12434. /**
  12435. * Decrement the counter for a given key for a given decay time by a given amount.
  12436. *
  12437. * @param string $key
  12438. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12439. * @param int $amount
  12440. * @return int
  12441. * @static
  12442. */
  12443. public static function decrement($key, $decaySeconds = 60, $amount = 1)
  12444. {
  12445. /** @var \Illuminate\Cache\RateLimiter $instance */
  12446. return $instance->decrement($key, $decaySeconds, $amount);
  12447. }
  12448. /**
  12449. * Get the number of attempts for the given key.
  12450. *
  12451. * @param string $key
  12452. * @return mixed
  12453. * @static
  12454. */
  12455. public static function attempts($key)
  12456. {
  12457. /** @var \Illuminate\Cache\RateLimiter $instance */
  12458. return $instance->attempts($key);
  12459. }
  12460. /**
  12461. * Reset the number of attempts for the given key.
  12462. *
  12463. * @param string $key
  12464. * @return mixed
  12465. * @static
  12466. */
  12467. public static function resetAttempts($key)
  12468. {
  12469. /** @var \Illuminate\Cache\RateLimiter $instance */
  12470. return $instance->resetAttempts($key);
  12471. }
  12472. /**
  12473. * Get the number of retries left for the given key.
  12474. *
  12475. * @param string $key
  12476. * @param int $maxAttempts
  12477. * @return int
  12478. * @static
  12479. */
  12480. public static function remaining($key, $maxAttempts)
  12481. {
  12482. /** @var \Illuminate\Cache\RateLimiter $instance */
  12483. return $instance->remaining($key, $maxAttempts);
  12484. }
  12485. /**
  12486. * Get the number of retries left for the given key.
  12487. *
  12488. * @param string $key
  12489. * @param int $maxAttempts
  12490. * @return int
  12491. * @static
  12492. */
  12493. public static function retriesLeft($key, $maxAttempts)
  12494. {
  12495. /** @var \Illuminate\Cache\RateLimiter $instance */
  12496. return $instance->retriesLeft($key, $maxAttempts);
  12497. }
  12498. /**
  12499. * Clear the hits and lockout timer for the given key.
  12500. *
  12501. * @param string $key
  12502. * @return void
  12503. * @static
  12504. */
  12505. public static function clear($key)
  12506. {
  12507. /** @var \Illuminate\Cache\RateLimiter $instance */
  12508. $instance->clear($key);
  12509. }
  12510. /**
  12511. * Get the number of seconds until the "key" is accessible again.
  12512. *
  12513. * @param string $key
  12514. * @return int
  12515. * @static
  12516. */
  12517. public static function availableIn($key)
  12518. {
  12519. /** @var \Illuminate\Cache\RateLimiter $instance */
  12520. return $instance->availableIn($key);
  12521. }
  12522. /**
  12523. * Clean the rate limiter key from unicode characters.
  12524. *
  12525. * @param string $key
  12526. * @return string
  12527. * @static
  12528. */
  12529. public static function cleanRateLimiterKey($key)
  12530. {
  12531. /** @var \Illuminate\Cache\RateLimiter $instance */
  12532. return $instance->cleanRateLimiterKey($key);
  12533. }
  12534. }
  12535. /**
  12536. * @see \Illuminate\Routing\Redirector
  12537. */
  12538. class Redirect {
  12539. /**
  12540. * Create a new redirect response to the previous location.
  12541. *
  12542. * @param int $status
  12543. * @param array $headers
  12544. * @param mixed $fallback
  12545. * @return \Illuminate\Http\RedirectResponse
  12546. * @static
  12547. */
  12548. public static function back($status = 302, $headers = [], $fallback = false)
  12549. {
  12550. /** @var \Illuminate\Routing\Redirector $instance */
  12551. return $instance->back($status, $headers, $fallback);
  12552. }
  12553. /**
  12554. * Create a new redirect response to the current URI.
  12555. *
  12556. * @param int $status
  12557. * @param array $headers
  12558. * @return \Illuminate\Http\RedirectResponse
  12559. * @static
  12560. */
  12561. public static function refresh($status = 302, $headers = [])
  12562. {
  12563. /** @var \Illuminate\Routing\Redirector $instance */
  12564. return $instance->refresh($status, $headers);
  12565. }
  12566. /**
  12567. * Create a new redirect response, while putting the current URL in the session.
  12568. *
  12569. * @param string $path
  12570. * @param int $status
  12571. * @param array $headers
  12572. * @param bool|null $secure
  12573. * @return \Illuminate\Http\RedirectResponse
  12574. * @static
  12575. */
  12576. public static function guest($path, $status = 302, $headers = [], $secure = null)
  12577. {
  12578. /** @var \Illuminate\Routing\Redirector $instance */
  12579. return $instance->guest($path, $status, $headers, $secure);
  12580. }
  12581. /**
  12582. * Create a new redirect response to the previously intended location.
  12583. *
  12584. * @param mixed $default
  12585. * @param int $status
  12586. * @param array $headers
  12587. * @param bool|null $secure
  12588. * @return \Illuminate\Http\RedirectResponse
  12589. * @static
  12590. */
  12591. public static function intended($default = '/', $status = 302, $headers = [], $secure = null)
  12592. {
  12593. /** @var \Illuminate\Routing\Redirector $instance */
  12594. return $instance->intended($default, $status, $headers, $secure);
  12595. }
  12596. /**
  12597. * Create a new redirect response to the given path.
  12598. *
  12599. * @param string $path
  12600. * @param int $status
  12601. * @param array $headers
  12602. * @param bool|null $secure
  12603. * @return \Illuminate\Http\RedirectResponse
  12604. * @static
  12605. */
  12606. public static function to($path, $status = 302, $headers = [], $secure = null)
  12607. {
  12608. /** @var \Illuminate\Routing\Redirector $instance */
  12609. return $instance->to($path, $status, $headers, $secure);
  12610. }
  12611. /**
  12612. * Create a new redirect response to an external URL (no validation).
  12613. *
  12614. * @param string $path
  12615. * @param int $status
  12616. * @param array $headers
  12617. * @return \Illuminate\Http\RedirectResponse
  12618. * @static
  12619. */
  12620. public static function away($path, $status = 302, $headers = [])
  12621. {
  12622. /** @var \Illuminate\Routing\Redirector $instance */
  12623. return $instance->away($path, $status, $headers);
  12624. }
  12625. /**
  12626. * Create a new redirect response to the given HTTPS path.
  12627. *
  12628. * @param string $path
  12629. * @param int $status
  12630. * @param array $headers
  12631. * @return \Illuminate\Http\RedirectResponse
  12632. * @static
  12633. */
  12634. public static function secure($path, $status = 302, $headers = [])
  12635. {
  12636. /** @var \Illuminate\Routing\Redirector $instance */
  12637. return $instance->secure($path, $status, $headers);
  12638. }
  12639. /**
  12640. * Create a new redirect response to a named route.
  12641. *
  12642. * @param \BackedEnum|string $route
  12643. * @param mixed $parameters
  12644. * @param int $status
  12645. * @param array $headers
  12646. * @return \Illuminate\Http\RedirectResponse
  12647. * @static
  12648. */
  12649. public static function route($route, $parameters = [], $status = 302, $headers = [])
  12650. {
  12651. /** @var \Illuminate\Routing\Redirector $instance */
  12652. return $instance->route($route, $parameters, $status, $headers);
  12653. }
  12654. /**
  12655. * Create a new redirect response to a signed named route.
  12656. *
  12657. * @param \BackedEnum|string $route
  12658. * @param mixed $parameters
  12659. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  12660. * @param int $status
  12661. * @param array $headers
  12662. * @return \Illuminate\Http\RedirectResponse
  12663. * @static
  12664. */
  12665. public static function signedRoute($route, $parameters = [], $expiration = null, $status = 302, $headers = [])
  12666. {
  12667. /** @var \Illuminate\Routing\Redirector $instance */
  12668. return $instance->signedRoute($route, $parameters, $expiration, $status, $headers);
  12669. }
  12670. /**
  12671. * Create a new redirect response to a signed named route.
  12672. *
  12673. * @param \BackedEnum|string $route
  12674. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  12675. * @param mixed $parameters
  12676. * @param int $status
  12677. * @param array $headers
  12678. * @return \Illuminate\Http\RedirectResponse
  12679. * @static
  12680. */
  12681. public static function temporarySignedRoute($route, $expiration, $parameters = [], $status = 302, $headers = [])
  12682. {
  12683. /** @var \Illuminate\Routing\Redirector $instance */
  12684. return $instance->temporarySignedRoute($route, $expiration, $parameters, $status, $headers);
  12685. }
  12686. /**
  12687. * Create a new redirect response to a controller action.
  12688. *
  12689. * @param string|array $action
  12690. * @param mixed $parameters
  12691. * @param int $status
  12692. * @param array $headers
  12693. * @return \Illuminate\Http\RedirectResponse
  12694. * @static
  12695. */
  12696. public static function action($action, $parameters = [], $status = 302, $headers = [])
  12697. {
  12698. /** @var \Illuminate\Routing\Redirector $instance */
  12699. return $instance->action($action, $parameters, $status, $headers);
  12700. }
  12701. /**
  12702. * Get the URL generator instance.
  12703. *
  12704. * @return \Illuminate\Routing\UrlGenerator
  12705. * @static
  12706. */
  12707. public static function getUrlGenerator()
  12708. {
  12709. /** @var \Illuminate\Routing\Redirector $instance */
  12710. return $instance->getUrlGenerator();
  12711. }
  12712. /**
  12713. * Set the active session store.
  12714. *
  12715. * @param \Illuminate\Session\Store $session
  12716. * @return void
  12717. * @static
  12718. */
  12719. public static function setSession($session)
  12720. {
  12721. /** @var \Illuminate\Routing\Redirector $instance */
  12722. $instance->setSession($session);
  12723. }
  12724. /**
  12725. * Get the "intended" URL from the session.
  12726. *
  12727. * @return string|null
  12728. * @static
  12729. */
  12730. public static function getIntendedUrl()
  12731. {
  12732. /** @var \Illuminate\Routing\Redirector $instance */
  12733. return $instance->getIntendedUrl();
  12734. }
  12735. /**
  12736. * Set the "intended" URL in the session.
  12737. *
  12738. * @param string $url
  12739. * @return \Illuminate\Routing\Redirector
  12740. * @static
  12741. */
  12742. public static function setIntendedUrl($url)
  12743. {
  12744. /** @var \Illuminate\Routing\Redirector $instance */
  12745. return $instance->setIntendedUrl($url);
  12746. }
  12747. /**
  12748. * Register a custom macro.
  12749. *
  12750. * @param string $name
  12751. * @param object|callable $macro
  12752. * @param-closure-this static $macro
  12753. * @return void
  12754. * @static
  12755. */
  12756. public static function macro($name, $macro)
  12757. {
  12758. \Illuminate\Routing\Redirector::macro($name, $macro);
  12759. }
  12760. /**
  12761. * Mix another object into the class.
  12762. *
  12763. * @param object $mixin
  12764. * @param bool $replace
  12765. * @return void
  12766. * @throws \ReflectionException
  12767. * @static
  12768. */
  12769. public static function mixin($mixin, $replace = true)
  12770. {
  12771. \Illuminate\Routing\Redirector::mixin($mixin, $replace);
  12772. }
  12773. /**
  12774. * Checks if macro is registered.
  12775. *
  12776. * @param string $name
  12777. * @return bool
  12778. * @static
  12779. */
  12780. public static function hasMacro($name)
  12781. {
  12782. return \Illuminate\Routing\Redirector::hasMacro($name);
  12783. }
  12784. /**
  12785. * Flush the existing macros.
  12786. *
  12787. * @return void
  12788. * @static
  12789. */
  12790. public static function flushMacros()
  12791. {
  12792. \Illuminate\Routing\Redirector::flushMacros();
  12793. }
  12794. }
  12795. /**
  12796. * @see \Illuminate\Http\Request
  12797. */
  12798. class Request {
  12799. /**
  12800. * Create a new Illuminate HTTP request from server variables.
  12801. *
  12802. * @return static
  12803. * @static
  12804. */
  12805. public static function capture()
  12806. {
  12807. return \Illuminate\Http\Request::capture();
  12808. }
  12809. /**
  12810. * Return the Request instance.
  12811. *
  12812. * @return \Illuminate\Http\Request
  12813. * @static
  12814. */
  12815. public static function instance()
  12816. {
  12817. /** @var \Illuminate\Http\Request $instance */
  12818. return $instance->instance();
  12819. }
  12820. /**
  12821. * Get the request method.
  12822. *
  12823. * @return string
  12824. * @static
  12825. */
  12826. public static function method()
  12827. {
  12828. /** @var \Illuminate\Http\Request $instance */
  12829. return $instance->method();
  12830. }
  12831. /**
  12832. * Get a URI instance for the request.
  12833. *
  12834. * @return \Illuminate\Support\Uri
  12835. * @static
  12836. */
  12837. public static function uri()
  12838. {
  12839. /** @var \Illuminate\Http\Request $instance */
  12840. return $instance->uri();
  12841. }
  12842. /**
  12843. * Get the root URL for the application.
  12844. *
  12845. * @return string
  12846. * @static
  12847. */
  12848. public static function root()
  12849. {
  12850. /** @var \Illuminate\Http\Request $instance */
  12851. return $instance->root();
  12852. }
  12853. /**
  12854. * Get the URL (no query string) for the request.
  12855. *
  12856. * @return string
  12857. * @static
  12858. */
  12859. public static function url()
  12860. {
  12861. /** @var \Illuminate\Http\Request $instance */
  12862. return $instance->url();
  12863. }
  12864. /**
  12865. * Get the full URL for the request.
  12866. *
  12867. * @return string
  12868. * @static
  12869. */
  12870. public static function fullUrl()
  12871. {
  12872. /** @var \Illuminate\Http\Request $instance */
  12873. return $instance->fullUrl();
  12874. }
  12875. /**
  12876. * Get the full URL for the request with the added query string parameters.
  12877. *
  12878. * @param array $query
  12879. * @return string
  12880. * @static
  12881. */
  12882. public static function fullUrlWithQuery($query)
  12883. {
  12884. /** @var \Illuminate\Http\Request $instance */
  12885. return $instance->fullUrlWithQuery($query);
  12886. }
  12887. /**
  12888. * Get the full URL for the request without the given query string parameters.
  12889. *
  12890. * @param array|string $keys
  12891. * @return string
  12892. * @static
  12893. */
  12894. public static function fullUrlWithoutQuery($keys)
  12895. {
  12896. /** @var \Illuminate\Http\Request $instance */
  12897. return $instance->fullUrlWithoutQuery($keys);
  12898. }
  12899. /**
  12900. * Get the current path info for the request.
  12901. *
  12902. * @return string
  12903. * @static
  12904. */
  12905. public static function path()
  12906. {
  12907. /** @var \Illuminate\Http\Request $instance */
  12908. return $instance->path();
  12909. }
  12910. /**
  12911. * Get the current decoded path info for the request.
  12912. *
  12913. * @return string
  12914. * @static
  12915. */
  12916. public static function decodedPath()
  12917. {
  12918. /** @var \Illuminate\Http\Request $instance */
  12919. return $instance->decodedPath();
  12920. }
  12921. /**
  12922. * Get a segment from the URI (1 based index).
  12923. *
  12924. * @param int $index
  12925. * @param string|null $default
  12926. * @return string|null
  12927. * @static
  12928. */
  12929. public static function segment($index, $default = null)
  12930. {
  12931. /** @var \Illuminate\Http\Request $instance */
  12932. return $instance->segment($index, $default);
  12933. }
  12934. /**
  12935. * Get all of the segments for the request path.
  12936. *
  12937. * @return array
  12938. * @static
  12939. */
  12940. public static function segments()
  12941. {
  12942. /** @var \Illuminate\Http\Request $instance */
  12943. return $instance->segments();
  12944. }
  12945. /**
  12946. * Determine if the current request URI matches a pattern.
  12947. *
  12948. * @param mixed $patterns
  12949. * @return bool
  12950. * @static
  12951. */
  12952. public static function is(...$patterns)
  12953. {
  12954. /** @var \Illuminate\Http\Request $instance */
  12955. return $instance->is(...$patterns);
  12956. }
  12957. /**
  12958. * Determine if the route name matches a given pattern.
  12959. *
  12960. * @param mixed $patterns
  12961. * @return bool
  12962. * @static
  12963. */
  12964. public static function routeIs(...$patterns)
  12965. {
  12966. /** @var \Illuminate\Http\Request $instance */
  12967. return $instance->routeIs(...$patterns);
  12968. }
  12969. /**
  12970. * Determine if the current request URL and query string match a pattern.
  12971. *
  12972. * @param mixed $patterns
  12973. * @return bool
  12974. * @static
  12975. */
  12976. public static function fullUrlIs(...$patterns)
  12977. {
  12978. /** @var \Illuminate\Http\Request $instance */
  12979. return $instance->fullUrlIs(...$patterns);
  12980. }
  12981. /**
  12982. * Get the host name.
  12983. *
  12984. * @return string
  12985. * @static
  12986. */
  12987. public static function host()
  12988. {
  12989. /** @var \Illuminate\Http\Request $instance */
  12990. return $instance->host();
  12991. }
  12992. /**
  12993. * Get the HTTP host being requested.
  12994. *
  12995. * @return string
  12996. * @static
  12997. */
  12998. public static function httpHost()
  12999. {
  13000. /** @var \Illuminate\Http\Request $instance */
  13001. return $instance->httpHost();
  13002. }
  13003. /**
  13004. * Get the scheme and HTTP host.
  13005. *
  13006. * @return string
  13007. * @static
  13008. */
  13009. public static function schemeAndHttpHost()
  13010. {
  13011. /** @var \Illuminate\Http\Request $instance */
  13012. return $instance->schemeAndHttpHost();
  13013. }
  13014. /**
  13015. * Determine if the request is the result of an AJAX call.
  13016. *
  13017. * @return bool
  13018. * @static
  13019. */
  13020. public static function ajax()
  13021. {
  13022. /** @var \Illuminate\Http\Request $instance */
  13023. return $instance->ajax();
  13024. }
  13025. /**
  13026. * Determine if the request is the result of a PJAX call.
  13027. *
  13028. * @return bool
  13029. * @static
  13030. */
  13031. public static function pjax()
  13032. {
  13033. /** @var \Illuminate\Http\Request $instance */
  13034. return $instance->pjax();
  13035. }
  13036. /**
  13037. * Determine if the request is the result of a prefetch call.
  13038. *
  13039. * @return bool
  13040. * @static
  13041. */
  13042. public static function prefetch()
  13043. {
  13044. /** @var \Illuminate\Http\Request $instance */
  13045. return $instance->prefetch();
  13046. }
  13047. /**
  13048. * Determine if the request is over HTTPS.
  13049. *
  13050. * @return bool
  13051. * @static
  13052. */
  13053. public static function secure()
  13054. {
  13055. /** @var \Illuminate\Http\Request $instance */
  13056. return $instance->secure();
  13057. }
  13058. /**
  13059. * Get the client IP address.
  13060. *
  13061. * @return string|null
  13062. * @static
  13063. */
  13064. public static function ip()
  13065. {
  13066. /** @var \Illuminate\Http\Request $instance */
  13067. return $instance->ip();
  13068. }
  13069. /**
  13070. * Get the client IP addresses.
  13071. *
  13072. * @return array
  13073. * @static
  13074. */
  13075. public static function ips()
  13076. {
  13077. /** @var \Illuminate\Http\Request $instance */
  13078. return $instance->ips();
  13079. }
  13080. /**
  13081. * Get the client user agent.
  13082. *
  13083. * @return string|null
  13084. * @static
  13085. */
  13086. public static function userAgent()
  13087. {
  13088. /** @var \Illuminate\Http\Request $instance */
  13089. return $instance->userAgent();
  13090. }
  13091. /**
  13092. * Merge new input into the current request's input array.
  13093. *
  13094. * @param array $input
  13095. * @return \Illuminate\Http\Request
  13096. * @static
  13097. */
  13098. public static function merge($input)
  13099. {
  13100. /** @var \Illuminate\Http\Request $instance */
  13101. return $instance->merge($input);
  13102. }
  13103. /**
  13104. * Merge new input into the request's input, but only when that key is missing from the request.
  13105. *
  13106. * @param array $input
  13107. * @return \Illuminate\Http\Request
  13108. * @static
  13109. */
  13110. public static function mergeIfMissing($input)
  13111. {
  13112. /** @var \Illuminate\Http\Request $instance */
  13113. return $instance->mergeIfMissing($input);
  13114. }
  13115. /**
  13116. * Replace the input values for the current request.
  13117. *
  13118. * @param array $input
  13119. * @return \Illuminate\Http\Request
  13120. * @static
  13121. */
  13122. public static function replace($input)
  13123. {
  13124. /** @var \Illuminate\Http\Request $instance */
  13125. return $instance->replace($input);
  13126. }
  13127. /**
  13128. * This method belongs to Symfony HttpFoundation and is not usually needed when using Laravel.
  13129. *
  13130. * Instead, you may use the "input" method.
  13131. *
  13132. * @param string $key
  13133. * @param mixed $default
  13134. * @return mixed
  13135. * @static
  13136. */
  13137. public static function get($key, $default = null)
  13138. {
  13139. /** @var \Illuminate\Http\Request $instance */
  13140. return $instance->get($key, $default);
  13141. }
  13142. /**
  13143. * Get the JSON payload for the request.
  13144. *
  13145. * @param string|null $key
  13146. * @param mixed $default
  13147. * @return ($key is null ? \Symfony\Component\HttpFoundation\InputBag : mixed)
  13148. * @static
  13149. */
  13150. public static function json($key = null, $default = null)
  13151. {
  13152. /** @var \Illuminate\Http\Request $instance */
  13153. return $instance->json($key, $default);
  13154. }
  13155. /**
  13156. * Create a new request instance from the given Laravel request.
  13157. *
  13158. * @param \Illuminate\Http\Request $from
  13159. * @param \Illuminate\Http\Request|null $to
  13160. * @return static
  13161. * @static
  13162. */
  13163. public static function createFrom($from, $to = null)
  13164. {
  13165. return \Illuminate\Http\Request::createFrom($from, $to);
  13166. }
  13167. /**
  13168. * Create an Illuminate request from a Symfony instance.
  13169. *
  13170. * @param \Symfony\Component\HttpFoundation\Request $request
  13171. * @return static
  13172. * @static
  13173. */
  13174. public static function createFromBase($request)
  13175. {
  13176. return \Illuminate\Http\Request::createFromBase($request);
  13177. }
  13178. /**
  13179. * Clones a request and overrides some of its parameters.
  13180. *
  13181. * @return static
  13182. * @param array|null $query The GET parameters
  13183. * @param array|null $request The POST parameters
  13184. * @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  13185. * @param array|null $cookies The COOKIE parameters
  13186. * @param array|null $files The FILES parameters
  13187. * @param array|null $server The SERVER parameters
  13188. * @static
  13189. */
  13190. public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null)
  13191. {
  13192. /** @var \Illuminate\Http\Request $instance */
  13193. return $instance->duplicate($query, $request, $attributes, $cookies, $files, $server);
  13194. }
  13195. /**
  13196. * Whether the request contains a Session object.
  13197. *
  13198. * This method does not give any information about the state of the session object,
  13199. * like whether the session is started or not. It is just a way to check if this Request
  13200. * is associated with a Session instance.
  13201. *
  13202. * @param bool $skipIfUninitialized When true, ignores factories injected by `setSessionFactory`
  13203. * @static
  13204. */
  13205. public static function hasSession($skipIfUninitialized = false)
  13206. {
  13207. /** @var \Illuminate\Http\Request $instance */
  13208. return $instance->hasSession($skipIfUninitialized);
  13209. }
  13210. /**
  13211. * Gets the Session.
  13212. *
  13213. * @throws SessionNotFoundException When session is not set properly
  13214. * @static
  13215. */
  13216. public static function getSession()
  13217. {
  13218. /** @var \Illuminate\Http\Request $instance */
  13219. return $instance->getSession();
  13220. }
  13221. /**
  13222. * Get the session associated with the request.
  13223. *
  13224. * @return \Illuminate\Contracts\Session\Session
  13225. * @throws \RuntimeException
  13226. * @static
  13227. */
  13228. public static function session()
  13229. {
  13230. /** @var \Illuminate\Http\Request $instance */
  13231. return $instance->session();
  13232. }
  13233. /**
  13234. * Set the session instance on the request.
  13235. *
  13236. * @param \Illuminate\Contracts\Session\Session $session
  13237. * @return void
  13238. * @static
  13239. */
  13240. public static function setLaravelSession($session)
  13241. {
  13242. /** @var \Illuminate\Http\Request $instance */
  13243. $instance->setLaravelSession($session);
  13244. }
  13245. /**
  13246. * Set the locale for the request instance.
  13247. *
  13248. * @param string $locale
  13249. * @return void
  13250. * @static
  13251. */
  13252. public static function setRequestLocale($locale)
  13253. {
  13254. /** @var \Illuminate\Http\Request $instance */
  13255. $instance->setRequestLocale($locale);
  13256. }
  13257. /**
  13258. * Set the default locale for the request instance.
  13259. *
  13260. * @param string $locale
  13261. * @return void
  13262. * @static
  13263. */
  13264. public static function setDefaultRequestLocale($locale)
  13265. {
  13266. /** @var \Illuminate\Http\Request $instance */
  13267. $instance->setDefaultRequestLocale($locale);
  13268. }
  13269. /**
  13270. * Get the user making the request.
  13271. *
  13272. * @param string|null $guard
  13273. * @return mixed
  13274. * @static
  13275. */
  13276. public static function user($guard = null)
  13277. {
  13278. /** @var \Illuminate\Http\Request $instance */
  13279. return $instance->user($guard);
  13280. }
  13281. /**
  13282. * Get the route handling the request.
  13283. *
  13284. * @param string|null $param
  13285. * @param mixed $default
  13286. * @return ($param is null ? \Illuminate\Routing\Route : object|string|null)
  13287. * @static
  13288. */
  13289. public static function route($param = null, $default = null)
  13290. {
  13291. /** @var \Illuminate\Http\Request $instance */
  13292. return $instance->route($param, $default);
  13293. }
  13294. /**
  13295. * Get a unique fingerprint for the request / route / IP address.
  13296. *
  13297. * @return string
  13298. * @throws \RuntimeException
  13299. * @static
  13300. */
  13301. public static function fingerprint()
  13302. {
  13303. /** @var \Illuminate\Http\Request $instance */
  13304. return $instance->fingerprint();
  13305. }
  13306. /**
  13307. * Set the JSON payload for the request.
  13308. *
  13309. * @param \Symfony\Component\HttpFoundation\InputBag $json
  13310. * @return \Illuminate\Http\Request
  13311. * @static
  13312. */
  13313. public static function setJson($json)
  13314. {
  13315. /** @var \Illuminate\Http\Request $instance */
  13316. return $instance->setJson($json);
  13317. }
  13318. /**
  13319. * Get the user resolver callback.
  13320. *
  13321. * @return \Closure
  13322. * @static
  13323. */
  13324. public static function getUserResolver()
  13325. {
  13326. /** @var \Illuminate\Http\Request $instance */
  13327. return $instance->getUserResolver();
  13328. }
  13329. /**
  13330. * Set the user resolver callback.
  13331. *
  13332. * @param \Closure $callback
  13333. * @return \Illuminate\Http\Request
  13334. * @static
  13335. */
  13336. public static function setUserResolver($callback)
  13337. {
  13338. /** @var \Illuminate\Http\Request $instance */
  13339. return $instance->setUserResolver($callback);
  13340. }
  13341. /**
  13342. * Get the route resolver callback.
  13343. *
  13344. * @return \Closure
  13345. * @static
  13346. */
  13347. public static function getRouteResolver()
  13348. {
  13349. /** @var \Illuminate\Http\Request $instance */
  13350. return $instance->getRouteResolver();
  13351. }
  13352. /**
  13353. * Set the route resolver callback.
  13354. *
  13355. * @param \Closure $callback
  13356. * @return \Illuminate\Http\Request
  13357. * @static
  13358. */
  13359. public static function setRouteResolver($callback)
  13360. {
  13361. /** @var \Illuminate\Http\Request $instance */
  13362. return $instance->setRouteResolver($callback);
  13363. }
  13364. /**
  13365. * Get all of the input and files for the request.
  13366. *
  13367. * @return array
  13368. * @static
  13369. */
  13370. public static function toArray()
  13371. {
  13372. /** @var \Illuminate\Http\Request $instance */
  13373. return $instance->toArray();
  13374. }
  13375. /**
  13376. * Determine if the given offset exists.
  13377. *
  13378. * @param string $offset
  13379. * @return bool
  13380. * @static
  13381. */
  13382. public static function offsetExists($offset)
  13383. {
  13384. /** @var \Illuminate\Http\Request $instance */
  13385. return $instance->offsetExists($offset);
  13386. }
  13387. /**
  13388. * Get the value at the given offset.
  13389. *
  13390. * @param string $offset
  13391. * @return mixed
  13392. * @static
  13393. */
  13394. public static function offsetGet($offset)
  13395. {
  13396. /** @var \Illuminate\Http\Request $instance */
  13397. return $instance->offsetGet($offset);
  13398. }
  13399. /**
  13400. * Set the value at the given offset.
  13401. *
  13402. * @param string $offset
  13403. * @param mixed $value
  13404. * @return void
  13405. * @static
  13406. */
  13407. public static function offsetSet($offset, $value)
  13408. {
  13409. /** @var \Illuminate\Http\Request $instance */
  13410. $instance->offsetSet($offset, $value);
  13411. }
  13412. /**
  13413. * Remove the value at the given offset.
  13414. *
  13415. * @param string $offset
  13416. * @return void
  13417. * @static
  13418. */
  13419. public static function offsetUnset($offset)
  13420. {
  13421. /** @var \Illuminate\Http\Request $instance */
  13422. $instance->offsetUnset($offset);
  13423. }
  13424. /**
  13425. * Sets the parameters for this request.
  13426. *
  13427. * This method also re-initializes all properties.
  13428. *
  13429. * @param array $query The GET parameters
  13430. * @param array $request The POST parameters
  13431. * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  13432. * @param array $cookies The COOKIE parameters
  13433. * @param array $files The FILES parameters
  13434. * @param array $server The SERVER parameters
  13435. * @param string|resource|null $content The raw body data
  13436. * @static
  13437. */
  13438. public static function initialize($query = [], $request = [], $attributes = [], $cookies = [], $files = [], $server = [], $content = null)
  13439. {
  13440. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13441. /** @var \Illuminate\Http\Request $instance */
  13442. return $instance->initialize($query, $request, $attributes, $cookies, $files, $server, $content);
  13443. }
  13444. /**
  13445. * Creates a new request with values from PHP's super globals.
  13446. *
  13447. * @static
  13448. */
  13449. public static function createFromGlobals()
  13450. {
  13451. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13452. return \Illuminate\Http\Request::createFromGlobals();
  13453. }
  13454. /**
  13455. * Creates a Request based on a given URI and configuration.
  13456. *
  13457. * The information contained in the URI always take precedence
  13458. * over the other information (server and parameters).
  13459. *
  13460. * @param string $uri The URI
  13461. * @param string $method The HTTP method
  13462. * @param array $parameters The query (GET) or request (POST) parameters
  13463. * @param array $cookies The request cookies ($_COOKIE)
  13464. * @param array $files The request files ($_FILES)
  13465. * @param array $server The server parameters ($_SERVER)
  13466. * @param string|resource|null $content The raw body data
  13467. * @throws BadRequestException When the URI is invalid
  13468. * @static
  13469. */
  13470. public static function create($uri, $method = 'GET', $parameters = [], $cookies = [], $files = [], $server = [], $content = null)
  13471. {
  13472. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13473. return \Illuminate\Http\Request::create($uri, $method, $parameters, $cookies, $files, $server, $content);
  13474. }
  13475. /**
  13476. * Sets a callable able to create a Request instance.
  13477. *
  13478. * This is mainly useful when you need to override the Request class
  13479. * to keep BC with an existing system. It should not be used for any
  13480. * other purpose.
  13481. *
  13482. * @static
  13483. */
  13484. public static function setFactory($callable)
  13485. {
  13486. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13487. return \Illuminate\Http\Request::setFactory($callable);
  13488. }
  13489. /**
  13490. * Overrides the PHP global variables according to this request instance.
  13491. *
  13492. * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE.
  13493. * $_FILES is never overridden, see rfc1867
  13494. *
  13495. * @static
  13496. */
  13497. public static function overrideGlobals()
  13498. {
  13499. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13500. /** @var \Illuminate\Http\Request $instance */
  13501. return $instance->overrideGlobals();
  13502. }
  13503. /**
  13504. * Sets a list of trusted proxies.
  13505. *
  13506. * You should only list the reverse proxies that you manage directly.
  13507. *
  13508. * @param array $proxies A list of trusted proxies, the string 'REMOTE_ADDR' will be replaced with $_SERVER['REMOTE_ADDR'] and 'PRIVATE_SUBNETS' by IpUtils::PRIVATE_SUBNETS
  13509. * @param int-mask-of<Request::HEADER_*> $trustedHeaderSet A bit field to set which headers to trust from your proxies
  13510. * @static
  13511. */
  13512. public static function setTrustedProxies($proxies, $trustedHeaderSet)
  13513. {
  13514. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13515. return \Illuminate\Http\Request::setTrustedProxies($proxies, $trustedHeaderSet);
  13516. }
  13517. /**
  13518. * Gets the list of trusted proxies.
  13519. *
  13520. * @return string[]
  13521. * @static
  13522. */
  13523. public static function getTrustedProxies()
  13524. {
  13525. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13526. return \Illuminate\Http\Request::getTrustedProxies();
  13527. }
  13528. /**
  13529. * Gets the set of trusted headers from trusted proxies.
  13530. *
  13531. * @return int A bit field of Request::HEADER_* that defines which headers are trusted from your proxies
  13532. * @static
  13533. */
  13534. public static function getTrustedHeaderSet()
  13535. {
  13536. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13537. return \Illuminate\Http\Request::getTrustedHeaderSet();
  13538. }
  13539. /**
  13540. * Sets a list of trusted host patterns.
  13541. *
  13542. * You should only list the hosts you manage using regexs.
  13543. *
  13544. * @param array $hostPatterns A list of trusted host patterns
  13545. * @static
  13546. */
  13547. public static function setTrustedHosts($hostPatterns)
  13548. {
  13549. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13550. return \Illuminate\Http\Request::setTrustedHosts($hostPatterns);
  13551. }
  13552. /**
  13553. * Gets the list of trusted host patterns.
  13554. *
  13555. * @return string[]
  13556. * @static
  13557. */
  13558. public static function getTrustedHosts()
  13559. {
  13560. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13561. return \Illuminate\Http\Request::getTrustedHosts();
  13562. }
  13563. /**
  13564. * Normalizes a query string.
  13565. *
  13566. * It builds a normalized query string, where keys/value pairs are alphabetized,
  13567. * have consistent escaping and unneeded delimiters are removed.
  13568. *
  13569. * @static
  13570. */
  13571. public static function normalizeQueryString($qs)
  13572. {
  13573. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13574. return \Illuminate\Http\Request::normalizeQueryString($qs);
  13575. }
  13576. /**
  13577. * Enables support for the _method request parameter to determine the intended HTTP method.
  13578. *
  13579. * Be warned that enabling this feature might lead to CSRF issues in your code.
  13580. * Check that you are using CSRF tokens when required.
  13581. * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered
  13582. * and used to send a "PUT" or "DELETE" request via the _method request parameter.
  13583. * If these methods are not protected against CSRF, this presents a possible vulnerability.
  13584. *
  13585. * The HTTP method can only be overridden when the real HTTP method is POST.
  13586. *
  13587. * @static
  13588. */
  13589. public static function enableHttpMethodParameterOverride()
  13590. {
  13591. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13592. return \Illuminate\Http\Request::enableHttpMethodParameterOverride();
  13593. }
  13594. /**
  13595. * Checks whether support for the _method request parameter is enabled.
  13596. *
  13597. * @static
  13598. */
  13599. public static function getHttpMethodParameterOverride()
  13600. {
  13601. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13602. return \Illuminate\Http\Request::getHttpMethodParameterOverride();
  13603. }
  13604. /**
  13605. * Whether the request contains a Session which was started in one of the
  13606. * previous requests.
  13607. *
  13608. * @static
  13609. */
  13610. public static function hasPreviousSession()
  13611. {
  13612. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13613. /** @var \Illuminate\Http\Request $instance */
  13614. return $instance->hasPreviousSession();
  13615. }
  13616. /**
  13617. * @static
  13618. */
  13619. public static function setSession($session)
  13620. {
  13621. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13622. /** @var \Illuminate\Http\Request $instance */
  13623. return $instance->setSession($session);
  13624. }
  13625. /**
  13626. * @internal
  13627. * @param callable(): SessionInterface $factory
  13628. * @static
  13629. */
  13630. public static function setSessionFactory($factory)
  13631. {
  13632. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13633. /** @var \Illuminate\Http\Request $instance */
  13634. return $instance->setSessionFactory($factory);
  13635. }
  13636. /**
  13637. * Returns the client IP addresses.
  13638. *
  13639. * In the returned array the most trusted IP address is first, and the
  13640. * least trusted one last. The "real" client IP address is the last one,
  13641. * but this is also the least trusted one. Trusted proxies are stripped.
  13642. *
  13643. * Use this method carefully; you should use getClientIp() instead.
  13644. *
  13645. * @see getClientIp()
  13646. * @static
  13647. */
  13648. public static function getClientIps()
  13649. {
  13650. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13651. /** @var \Illuminate\Http\Request $instance */
  13652. return $instance->getClientIps();
  13653. }
  13654. /**
  13655. * Returns the client IP address.
  13656. *
  13657. * This method can read the client IP address from the "X-Forwarded-For" header
  13658. * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For"
  13659. * header value is a comma+space separated list of IP addresses, the left-most
  13660. * being the original client, and each successive proxy that passed the request
  13661. * adding the IP address where it received the request from.
  13662. *
  13663. * If your reverse proxy uses a different header name than "X-Forwarded-For",
  13664. * ("Client-Ip" for instance), configure it via the $trustedHeaderSet
  13665. * argument of the Request::setTrustedProxies() method instead.
  13666. *
  13667. * @see getClientIps()
  13668. * @see https://wikipedia.org/wiki/X-Forwarded-For
  13669. * @static
  13670. */
  13671. public static function getClientIp()
  13672. {
  13673. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13674. /** @var \Illuminate\Http\Request $instance */
  13675. return $instance->getClientIp();
  13676. }
  13677. /**
  13678. * Returns current script name.
  13679. *
  13680. * @static
  13681. */
  13682. public static function getScriptName()
  13683. {
  13684. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13685. /** @var \Illuminate\Http\Request $instance */
  13686. return $instance->getScriptName();
  13687. }
  13688. /**
  13689. * Returns the path being requested relative to the executed script.
  13690. *
  13691. * The path info always starts with a /.
  13692. *
  13693. * Suppose this request is instantiated from /mysite on localhost:
  13694. *
  13695. * * http://localhost/mysite returns an empty string
  13696. * * http://localhost/mysite/about returns '/about'
  13697. * * http://localhost/mysite/enco%20ded returns '/enco%20ded'
  13698. * * http://localhost/mysite/about?var=1 returns '/about'
  13699. *
  13700. * @return string The raw path (i.e. not urldecoded)
  13701. * @static
  13702. */
  13703. public static function getPathInfo()
  13704. {
  13705. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13706. /** @var \Illuminate\Http\Request $instance */
  13707. return $instance->getPathInfo();
  13708. }
  13709. /**
  13710. * Returns the root path from which this request is executed.
  13711. *
  13712. * Suppose that an index.php file instantiates this request object:
  13713. *
  13714. * * http://localhost/index.php returns an empty string
  13715. * * http://localhost/index.php/page returns an empty string
  13716. * * http://localhost/web/index.php returns '/web'
  13717. * * http://localhost/we%20b/index.php returns '/we%20b'
  13718. *
  13719. * @return string The raw path (i.e. not urldecoded)
  13720. * @static
  13721. */
  13722. public static function getBasePath()
  13723. {
  13724. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13725. /** @var \Illuminate\Http\Request $instance */
  13726. return $instance->getBasePath();
  13727. }
  13728. /**
  13729. * Returns the root URL from which this request is executed.
  13730. *
  13731. * The base URL never ends with a /.
  13732. *
  13733. * This is similar to getBasePath(), except that it also includes the
  13734. * script filename (e.g. index.php) if one exists.
  13735. *
  13736. * @return string The raw URL (i.e. not urldecoded)
  13737. * @static
  13738. */
  13739. public static function getBaseUrl()
  13740. {
  13741. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13742. /** @var \Illuminate\Http\Request $instance */
  13743. return $instance->getBaseUrl();
  13744. }
  13745. /**
  13746. * Gets the request's scheme.
  13747. *
  13748. * @static
  13749. */
  13750. public static function getScheme()
  13751. {
  13752. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13753. /** @var \Illuminate\Http\Request $instance */
  13754. return $instance->getScheme();
  13755. }
  13756. /**
  13757. * Returns the port on which the request is made.
  13758. *
  13759. * This method can read the client port from the "X-Forwarded-Port" header
  13760. * when trusted proxies were set via "setTrustedProxies()".
  13761. *
  13762. * The "X-Forwarded-Port" header must contain the client port.
  13763. *
  13764. * @return int|string|null Can be a string if fetched from the server bag
  13765. * @static
  13766. */
  13767. public static function getPort()
  13768. {
  13769. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13770. /** @var \Illuminate\Http\Request $instance */
  13771. return $instance->getPort();
  13772. }
  13773. /**
  13774. * Returns the user.
  13775. *
  13776. * @static
  13777. */
  13778. public static function getUser()
  13779. {
  13780. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13781. /** @var \Illuminate\Http\Request $instance */
  13782. return $instance->getUser();
  13783. }
  13784. /**
  13785. * Returns the password.
  13786. *
  13787. * @static
  13788. */
  13789. public static function getPassword()
  13790. {
  13791. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13792. /** @var \Illuminate\Http\Request $instance */
  13793. return $instance->getPassword();
  13794. }
  13795. /**
  13796. * Gets the user info.
  13797. *
  13798. * @return string|null A user name if any and, optionally, scheme-specific information about how to gain authorization to access the server
  13799. * @static
  13800. */
  13801. public static function getUserInfo()
  13802. {
  13803. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13804. /** @var \Illuminate\Http\Request $instance */
  13805. return $instance->getUserInfo();
  13806. }
  13807. /**
  13808. * Returns the HTTP host being requested.
  13809. *
  13810. * The port name will be appended to the host if it's non-standard.
  13811. *
  13812. * @static
  13813. */
  13814. public static function getHttpHost()
  13815. {
  13816. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13817. /** @var \Illuminate\Http\Request $instance */
  13818. return $instance->getHttpHost();
  13819. }
  13820. /**
  13821. * Returns the requested URI (path and query string).
  13822. *
  13823. * @return string The raw URI (i.e. not URI decoded)
  13824. * @static
  13825. */
  13826. public static function getRequestUri()
  13827. {
  13828. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13829. /** @var \Illuminate\Http\Request $instance */
  13830. return $instance->getRequestUri();
  13831. }
  13832. /**
  13833. * Gets the scheme and HTTP host.
  13834. *
  13835. * If the URL was called with basic authentication, the user
  13836. * and the password are not added to the generated string.
  13837. *
  13838. * @static
  13839. */
  13840. public static function getSchemeAndHttpHost()
  13841. {
  13842. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13843. /** @var \Illuminate\Http\Request $instance */
  13844. return $instance->getSchemeAndHttpHost();
  13845. }
  13846. /**
  13847. * Generates a normalized URI (URL) for the Request.
  13848. *
  13849. * @see getQueryString()
  13850. * @static
  13851. */
  13852. public static function getUri()
  13853. {
  13854. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13855. /** @var \Illuminate\Http\Request $instance */
  13856. return $instance->getUri();
  13857. }
  13858. /**
  13859. * Generates a normalized URI for the given path.
  13860. *
  13861. * @param string $path A path to use instead of the current one
  13862. * @static
  13863. */
  13864. public static function getUriForPath($path)
  13865. {
  13866. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13867. /** @var \Illuminate\Http\Request $instance */
  13868. return $instance->getUriForPath($path);
  13869. }
  13870. /**
  13871. * Returns the path as relative reference from the current Request path.
  13872. *
  13873. * Only the URIs path component (no schema, host etc.) is relevant and must be given.
  13874. * Both paths must be absolute and not contain relative parts.
  13875. * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives.
  13876. * Furthermore, they can be used to reduce the link size in documents.
  13877. *
  13878. * Example target paths, given a base path of "/a/b/c/d":
  13879. * - "/a/b/c/d" -> ""
  13880. * - "/a/b/c/" -> "./"
  13881. * - "/a/b/" -> "../"
  13882. * - "/a/b/c/other" -> "other"
  13883. * - "/a/x/y" -> "../../x/y"
  13884. *
  13885. * @static
  13886. */
  13887. public static function getRelativeUriForPath($path)
  13888. {
  13889. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13890. /** @var \Illuminate\Http\Request $instance */
  13891. return $instance->getRelativeUriForPath($path);
  13892. }
  13893. /**
  13894. * Generates the normalized query string for the Request.
  13895. *
  13896. * It builds a normalized query string, where keys/value pairs are alphabetized
  13897. * and have consistent escaping.
  13898. *
  13899. * @static
  13900. */
  13901. public static function getQueryString()
  13902. {
  13903. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13904. /** @var \Illuminate\Http\Request $instance */
  13905. return $instance->getQueryString();
  13906. }
  13907. /**
  13908. * Checks whether the request is secure or not.
  13909. *
  13910. * This method can read the client protocol from the "X-Forwarded-Proto" header
  13911. * when trusted proxies were set via "setTrustedProxies()".
  13912. *
  13913. * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".
  13914. *
  13915. * @static
  13916. */
  13917. public static function isSecure()
  13918. {
  13919. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13920. /** @var \Illuminate\Http\Request $instance */
  13921. return $instance->isSecure();
  13922. }
  13923. /**
  13924. * Returns the host name.
  13925. *
  13926. * This method can read the client host name from the "X-Forwarded-Host" header
  13927. * when trusted proxies were set via "setTrustedProxies()".
  13928. *
  13929. * The "X-Forwarded-Host" header must contain the client host name.
  13930. *
  13931. * @throws SuspiciousOperationException when the host name is invalid or not trusted
  13932. * @static
  13933. */
  13934. public static function getHost()
  13935. {
  13936. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13937. /** @var \Illuminate\Http\Request $instance */
  13938. return $instance->getHost();
  13939. }
  13940. /**
  13941. * Sets the request method.
  13942. *
  13943. * @static
  13944. */
  13945. public static function setMethod($method)
  13946. {
  13947. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13948. /** @var \Illuminate\Http\Request $instance */
  13949. return $instance->setMethod($method);
  13950. }
  13951. /**
  13952. * Gets the request "intended" method.
  13953. *
  13954. * If the X-HTTP-Method-Override header is set, and if the method is a POST,
  13955. * then it is used to determine the "real" intended HTTP method.
  13956. *
  13957. * The _method request parameter can also be used to determine the HTTP method,
  13958. * but only if enableHttpMethodParameterOverride() has been called.
  13959. *
  13960. * The method is always an uppercased string.
  13961. *
  13962. * @see getRealMethod()
  13963. * @static
  13964. */
  13965. public static function getMethod()
  13966. {
  13967. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13968. /** @var \Illuminate\Http\Request $instance */
  13969. return $instance->getMethod();
  13970. }
  13971. /**
  13972. * Gets the "real" request method.
  13973. *
  13974. * @see getMethod()
  13975. * @static
  13976. */
  13977. public static function getRealMethod()
  13978. {
  13979. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13980. /** @var \Illuminate\Http\Request $instance */
  13981. return $instance->getRealMethod();
  13982. }
  13983. /**
  13984. * Gets the mime type associated with the format.
  13985. *
  13986. * @static
  13987. */
  13988. public static function getMimeType($format)
  13989. {
  13990. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13991. /** @var \Illuminate\Http\Request $instance */
  13992. return $instance->getMimeType($format);
  13993. }
  13994. /**
  13995. * Gets the mime types associated with the format.
  13996. *
  13997. * @return string[]
  13998. * @static
  13999. */
  14000. public static function getMimeTypes($format)
  14001. {
  14002. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14003. return \Illuminate\Http\Request::getMimeTypes($format);
  14004. }
  14005. /**
  14006. * Gets the format associated with the mime type.
  14007. *
  14008. * @static
  14009. */
  14010. public static function getFormat($mimeType)
  14011. {
  14012. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14013. /** @var \Illuminate\Http\Request $instance */
  14014. return $instance->getFormat($mimeType);
  14015. }
  14016. /**
  14017. * Associates a format with mime types.
  14018. *
  14019. * @param string|string[] $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
  14020. * @static
  14021. */
  14022. public static function setFormat($format, $mimeTypes)
  14023. {
  14024. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14025. /** @var \Illuminate\Http\Request $instance */
  14026. return $instance->setFormat($format, $mimeTypes);
  14027. }
  14028. /**
  14029. * Gets the request format.
  14030. *
  14031. * Here is the process to determine the format:
  14032. *
  14033. * * format defined by the user (with setRequestFormat())
  14034. * * _format request attribute
  14035. * * $default
  14036. *
  14037. * @see getPreferredFormat
  14038. * @static
  14039. */
  14040. public static function getRequestFormat($default = 'html')
  14041. {
  14042. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14043. /** @var \Illuminate\Http\Request $instance */
  14044. return $instance->getRequestFormat($default);
  14045. }
  14046. /**
  14047. * Sets the request format.
  14048. *
  14049. * @static
  14050. */
  14051. public static function setRequestFormat($format)
  14052. {
  14053. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14054. /** @var \Illuminate\Http\Request $instance */
  14055. return $instance->setRequestFormat($format);
  14056. }
  14057. /**
  14058. * Gets the usual name of the format associated with the request's media type (provided in the Content-Type header).
  14059. *
  14060. * @see Request::$formats
  14061. * @static
  14062. */
  14063. public static function getContentTypeFormat()
  14064. {
  14065. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14066. /** @var \Illuminate\Http\Request $instance */
  14067. return $instance->getContentTypeFormat();
  14068. }
  14069. /**
  14070. * Sets the default locale.
  14071. *
  14072. * @static
  14073. */
  14074. public static function setDefaultLocale($locale)
  14075. {
  14076. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14077. /** @var \Illuminate\Http\Request $instance */
  14078. return $instance->setDefaultLocale($locale);
  14079. }
  14080. /**
  14081. * Get the default locale.
  14082. *
  14083. * @static
  14084. */
  14085. public static function getDefaultLocale()
  14086. {
  14087. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14088. /** @var \Illuminate\Http\Request $instance */
  14089. return $instance->getDefaultLocale();
  14090. }
  14091. /**
  14092. * Sets the locale.
  14093. *
  14094. * @static
  14095. */
  14096. public static function setLocale($locale)
  14097. {
  14098. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14099. /** @var \Illuminate\Http\Request $instance */
  14100. return $instance->setLocale($locale);
  14101. }
  14102. /**
  14103. * Get the locale.
  14104. *
  14105. * @static
  14106. */
  14107. public static function getLocale()
  14108. {
  14109. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14110. /** @var \Illuminate\Http\Request $instance */
  14111. return $instance->getLocale();
  14112. }
  14113. /**
  14114. * Checks if the request method is of specified type.
  14115. *
  14116. * @param string $method Uppercase request method (GET, POST etc)
  14117. * @static
  14118. */
  14119. public static function isMethod($method)
  14120. {
  14121. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14122. /** @var \Illuminate\Http\Request $instance */
  14123. return $instance->isMethod($method);
  14124. }
  14125. /**
  14126. * Checks whether or not the method is safe.
  14127. *
  14128. * @see https://tools.ietf.org/html/rfc7231#section-4.2.1
  14129. * @static
  14130. */
  14131. public static function isMethodSafe()
  14132. {
  14133. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14134. /** @var \Illuminate\Http\Request $instance */
  14135. return $instance->isMethodSafe();
  14136. }
  14137. /**
  14138. * Checks whether or not the method is idempotent.
  14139. *
  14140. * @static
  14141. */
  14142. public static function isMethodIdempotent()
  14143. {
  14144. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14145. /** @var \Illuminate\Http\Request $instance */
  14146. return $instance->isMethodIdempotent();
  14147. }
  14148. /**
  14149. * Checks whether the method is cacheable or not.
  14150. *
  14151. * @see https://tools.ietf.org/html/rfc7231#section-4.2.3
  14152. * @static
  14153. */
  14154. public static function isMethodCacheable()
  14155. {
  14156. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14157. /** @var \Illuminate\Http\Request $instance */
  14158. return $instance->isMethodCacheable();
  14159. }
  14160. /**
  14161. * Returns the protocol version.
  14162. *
  14163. * If the application is behind a proxy, the protocol version used in the
  14164. * requests between the client and the proxy and between the proxy and the
  14165. * server might be different. This returns the former (from the "Via" header)
  14166. * if the proxy is trusted (see "setTrustedProxies()"), otherwise it returns
  14167. * the latter (from the "SERVER_PROTOCOL" server parameter).
  14168. *
  14169. * @static
  14170. */
  14171. public static function getProtocolVersion()
  14172. {
  14173. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14174. /** @var \Illuminate\Http\Request $instance */
  14175. return $instance->getProtocolVersion();
  14176. }
  14177. /**
  14178. * Returns the request body content.
  14179. *
  14180. * @param bool $asResource If true, a resource will be returned
  14181. * @return string|resource
  14182. * @psalm-return ($asResource is true ? resource : string)
  14183. * @static
  14184. */
  14185. public static function getContent($asResource = false)
  14186. {
  14187. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14188. /** @var \Illuminate\Http\Request $instance */
  14189. return $instance->getContent($asResource);
  14190. }
  14191. /**
  14192. * Gets the decoded form or json request body.
  14193. *
  14194. * @throws JsonException When the body cannot be decoded to an array
  14195. * @static
  14196. */
  14197. public static function getPayload()
  14198. {
  14199. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14200. /** @var \Illuminate\Http\Request $instance */
  14201. return $instance->getPayload();
  14202. }
  14203. /**
  14204. * Gets the Etags.
  14205. *
  14206. * @static
  14207. */
  14208. public static function getETags()
  14209. {
  14210. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14211. /** @var \Illuminate\Http\Request $instance */
  14212. return $instance->getETags();
  14213. }
  14214. /**
  14215. * @static
  14216. */
  14217. public static function isNoCache()
  14218. {
  14219. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14220. /** @var \Illuminate\Http\Request $instance */
  14221. return $instance->isNoCache();
  14222. }
  14223. /**
  14224. * Gets the preferred format for the response by inspecting, in the following order:
  14225. * * the request format set using setRequestFormat;
  14226. * * the values of the Accept HTTP header.
  14227. *
  14228. * Note that if you use this method, you should send the "Vary: Accept" header
  14229. * in the response to prevent any issues with intermediary HTTP caches.
  14230. *
  14231. * @static
  14232. */
  14233. public static function getPreferredFormat($default = 'html')
  14234. {
  14235. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14236. /** @var \Illuminate\Http\Request $instance */
  14237. return $instance->getPreferredFormat($default);
  14238. }
  14239. /**
  14240. * Returns the preferred language.
  14241. *
  14242. * @param string[] $locales An array of ordered available locales
  14243. * @static
  14244. */
  14245. public static function getPreferredLanguage($locales = null)
  14246. {
  14247. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14248. /** @var \Illuminate\Http\Request $instance */
  14249. return $instance->getPreferredLanguage($locales);
  14250. }
  14251. /**
  14252. * Gets a list of languages acceptable by the client browser ordered in the user browser preferences.
  14253. *
  14254. * @return string[]
  14255. * @static
  14256. */
  14257. public static function getLanguages()
  14258. {
  14259. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14260. /** @var \Illuminate\Http\Request $instance */
  14261. return $instance->getLanguages();
  14262. }
  14263. /**
  14264. * Gets a list of charsets acceptable by the client browser in preferable order.
  14265. *
  14266. * @return string[]
  14267. * @static
  14268. */
  14269. public static function getCharsets()
  14270. {
  14271. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14272. /** @var \Illuminate\Http\Request $instance */
  14273. return $instance->getCharsets();
  14274. }
  14275. /**
  14276. * Gets a list of encodings acceptable by the client browser in preferable order.
  14277. *
  14278. * @return string[]
  14279. * @static
  14280. */
  14281. public static function getEncodings()
  14282. {
  14283. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14284. /** @var \Illuminate\Http\Request $instance */
  14285. return $instance->getEncodings();
  14286. }
  14287. /**
  14288. * Gets a list of content types acceptable by the client browser in preferable order.
  14289. *
  14290. * @return string[]
  14291. * @static
  14292. */
  14293. public static function getAcceptableContentTypes()
  14294. {
  14295. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14296. /** @var \Illuminate\Http\Request $instance */
  14297. return $instance->getAcceptableContentTypes();
  14298. }
  14299. /**
  14300. * Returns true if the request is an XMLHttpRequest.
  14301. *
  14302. * It works if your JavaScript library sets an X-Requested-With HTTP header.
  14303. * It is known to work with common JavaScript frameworks:
  14304. *
  14305. * @see https://wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
  14306. * @static
  14307. */
  14308. public static function isXmlHttpRequest()
  14309. {
  14310. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14311. /** @var \Illuminate\Http\Request $instance */
  14312. return $instance->isXmlHttpRequest();
  14313. }
  14314. /**
  14315. * Checks whether the client browser prefers safe content or not according to RFC8674.
  14316. *
  14317. * @see https://tools.ietf.org/html/rfc8674
  14318. * @static
  14319. */
  14320. public static function preferSafeContent()
  14321. {
  14322. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14323. /** @var \Illuminate\Http\Request $instance */
  14324. return $instance->preferSafeContent();
  14325. }
  14326. /**
  14327. * Indicates whether this request originated from a trusted proxy.
  14328. *
  14329. * This can be useful to determine whether or not to trust the
  14330. * contents of a proxy-specific header.
  14331. *
  14332. * @static
  14333. */
  14334. public static function isFromTrustedProxy()
  14335. {
  14336. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14337. /** @var \Illuminate\Http\Request $instance */
  14338. return $instance->isFromTrustedProxy();
  14339. }
  14340. /**
  14341. * Filter the given array of rules into an array of rules that are included in precognitive headers.
  14342. *
  14343. * @param array $rules
  14344. * @return array
  14345. * @static
  14346. */
  14347. public static function filterPrecognitiveRules($rules)
  14348. {
  14349. /** @var \Illuminate\Http\Request $instance */
  14350. return $instance->filterPrecognitiveRules($rules);
  14351. }
  14352. /**
  14353. * Determine if the request is attempting to be precognitive.
  14354. *
  14355. * @return bool
  14356. * @static
  14357. */
  14358. public static function isAttemptingPrecognition()
  14359. {
  14360. /** @var \Illuminate\Http\Request $instance */
  14361. return $instance->isAttemptingPrecognition();
  14362. }
  14363. /**
  14364. * Determine if the request is precognitive.
  14365. *
  14366. * @return bool
  14367. * @static
  14368. */
  14369. public static function isPrecognitive()
  14370. {
  14371. /** @var \Illuminate\Http\Request $instance */
  14372. return $instance->isPrecognitive();
  14373. }
  14374. /**
  14375. * Determine if the request is sending JSON.
  14376. *
  14377. * @return bool
  14378. * @static
  14379. */
  14380. public static function isJson()
  14381. {
  14382. /** @var \Illuminate\Http\Request $instance */
  14383. return $instance->isJson();
  14384. }
  14385. /**
  14386. * Determine if the current request probably expects a JSON response.
  14387. *
  14388. * @return bool
  14389. * @static
  14390. */
  14391. public static function expectsJson()
  14392. {
  14393. /** @var \Illuminate\Http\Request $instance */
  14394. return $instance->expectsJson();
  14395. }
  14396. /**
  14397. * Determine if the current request is asking for JSON.
  14398. *
  14399. * @return bool
  14400. * @static
  14401. */
  14402. public static function wantsJson()
  14403. {
  14404. /** @var \Illuminate\Http\Request $instance */
  14405. return $instance->wantsJson();
  14406. }
  14407. /**
  14408. * Determines whether the current requests accepts a given content type.
  14409. *
  14410. * @param string|array $contentTypes
  14411. * @return bool
  14412. * @static
  14413. */
  14414. public static function accepts($contentTypes)
  14415. {
  14416. /** @var \Illuminate\Http\Request $instance */
  14417. return $instance->accepts($contentTypes);
  14418. }
  14419. /**
  14420. * Return the most suitable content type from the given array based on content negotiation.
  14421. *
  14422. * @param string|array $contentTypes
  14423. * @return string|null
  14424. * @static
  14425. */
  14426. public static function prefers($contentTypes)
  14427. {
  14428. /** @var \Illuminate\Http\Request $instance */
  14429. return $instance->prefers($contentTypes);
  14430. }
  14431. /**
  14432. * Determine if the current request accepts any content type.
  14433. *
  14434. * @return bool
  14435. * @static
  14436. */
  14437. public static function acceptsAnyContentType()
  14438. {
  14439. /** @var \Illuminate\Http\Request $instance */
  14440. return $instance->acceptsAnyContentType();
  14441. }
  14442. /**
  14443. * Determines whether a request accepts JSON.
  14444. *
  14445. * @return bool
  14446. * @static
  14447. */
  14448. public static function acceptsJson()
  14449. {
  14450. /** @var \Illuminate\Http\Request $instance */
  14451. return $instance->acceptsJson();
  14452. }
  14453. /**
  14454. * Determines whether a request accepts HTML.
  14455. *
  14456. * @return bool
  14457. * @static
  14458. */
  14459. public static function acceptsHtml()
  14460. {
  14461. /** @var \Illuminate\Http\Request $instance */
  14462. return $instance->acceptsHtml();
  14463. }
  14464. /**
  14465. * Determine if the given content types match.
  14466. *
  14467. * @param string $actual
  14468. * @param string $type
  14469. * @return bool
  14470. * @static
  14471. */
  14472. public static function matchesType($actual, $type)
  14473. {
  14474. return \Illuminate\Http\Request::matchesType($actual, $type);
  14475. }
  14476. /**
  14477. * Get the data format expected in the response.
  14478. *
  14479. * @param string $default
  14480. * @return string
  14481. * @static
  14482. */
  14483. public static function format($default = 'html')
  14484. {
  14485. /** @var \Illuminate\Http\Request $instance */
  14486. return $instance->format($default);
  14487. }
  14488. /**
  14489. * Retrieve an old input item.
  14490. *
  14491. * @param string|null $key
  14492. * @param \Illuminate\Database\Eloquent\Model|string|array|null $default
  14493. * @return string|array|null
  14494. * @static
  14495. */
  14496. public static function old($key = null, $default = null)
  14497. {
  14498. /** @var \Illuminate\Http\Request $instance */
  14499. return $instance->old($key, $default);
  14500. }
  14501. /**
  14502. * Flash the input for the current request to the session.
  14503. *
  14504. * @return void
  14505. * @static
  14506. */
  14507. public static function flash()
  14508. {
  14509. /** @var \Illuminate\Http\Request $instance */
  14510. $instance->flash();
  14511. }
  14512. /**
  14513. * Flash only some of the input to the session.
  14514. *
  14515. * @param array|mixed $keys
  14516. * @return void
  14517. * @static
  14518. */
  14519. public static function flashOnly($keys)
  14520. {
  14521. /** @var \Illuminate\Http\Request $instance */
  14522. $instance->flashOnly($keys);
  14523. }
  14524. /**
  14525. * Flash only some of the input to the session.
  14526. *
  14527. * @param array|mixed $keys
  14528. * @return void
  14529. * @static
  14530. */
  14531. public static function flashExcept($keys)
  14532. {
  14533. /** @var \Illuminate\Http\Request $instance */
  14534. $instance->flashExcept($keys);
  14535. }
  14536. /**
  14537. * Flush all of the old input from the session.
  14538. *
  14539. * @return void
  14540. * @static
  14541. */
  14542. public static function flush()
  14543. {
  14544. /** @var \Illuminate\Http\Request $instance */
  14545. $instance->flush();
  14546. }
  14547. /**
  14548. * Retrieve a server variable from the request.
  14549. *
  14550. * @param string|null $key
  14551. * @param string|array|null $default
  14552. * @return string|array|null
  14553. * @static
  14554. */
  14555. public static function server($key = null, $default = null)
  14556. {
  14557. /** @var \Illuminate\Http\Request $instance */
  14558. return $instance->server($key, $default);
  14559. }
  14560. /**
  14561. * Determine if a header is set on the request.
  14562. *
  14563. * @param string $key
  14564. * @return bool
  14565. * @static
  14566. */
  14567. public static function hasHeader($key)
  14568. {
  14569. /** @var \Illuminate\Http\Request $instance */
  14570. return $instance->hasHeader($key);
  14571. }
  14572. /**
  14573. * Retrieve a header from the request.
  14574. *
  14575. * @param string|null $key
  14576. * @param string|array|null $default
  14577. * @return string|array|null
  14578. * @static
  14579. */
  14580. public static function header($key = null, $default = null)
  14581. {
  14582. /** @var \Illuminate\Http\Request $instance */
  14583. return $instance->header($key, $default);
  14584. }
  14585. /**
  14586. * Get the bearer token from the request headers.
  14587. *
  14588. * @return string|null
  14589. * @static
  14590. */
  14591. public static function bearerToken()
  14592. {
  14593. /** @var \Illuminate\Http\Request $instance */
  14594. return $instance->bearerToken();
  14595. }
  14596. /**
  14597. * Get the keys for all of the input and files.
  14598. *
  14599. * @return array
  14600. * @static
  14601. */
  14602. public static function keys()
  14603. {
  14604. /** @var \Illuminate\Http\Request $instance */
  14605. return $instance->keys();
  14606. }
  14607. /**
  14608. * Get all of the input and files for the request.
  14609. *
  14610. * @param array|mixed|null $keys
  14611. * @return array
  14612. * @static
  14613. */
  14614. public static function all($keys = null)
  14615. {
  14616. /** @var \Illuminate\Http\Request $instance */
  14617. return $instance->all($keys);
  14618. }
  14619. /**
  14620. * Retrieve an input item from the request.
  14621. *
  14622. * @param string|null $key
  14623. * @param mixed $default
  14624. * @return mixed
  14625. * @static
  14626. */
  14627. public static function input($key = null, $default = null)
  14628. {
  14629. /** @var \Illuminate\Http\Request $instance */
  14630. return $instance->input($key, $default);
  14631. }
  14632. /**
  14633. * Retrieve input from the request as a Fluent object instance.
  14634. *
  14635. * @param array|string|null $key
  14636. * @return \Illuminate\Support\Fluent
  14637. * @static
  14638. */
  14639. public static function fluent($key = null)
  14640. {
  14641. /** @var \Illuminate\Http\Request $instance */
  14642. return $instance->fluent($key);
  14643. }
  14644. /**
  14645. * Retrieve a query string item from the request.
  14646. *
  14647. * @param string|null $key
  14648. * @param string|array|null $default
  14649. * @return string|array|null
  14650. * @static
  14651. */
  14652. public static function query($key = null, $default = null)
  14653. {
  14654. /** @var \Illuminate\Http\Request $instance */
  14655. return $instance->query($key, $default);
  14656. }
  14657. /**
  14658. * Retrieve a request payload item from the request.
  14659. *
  14660. * @param string|null $key
  14661. * @param string|array|null $default
  14662. * @return string|array|null
  14663. * @static
  14664. */
  14665. public static function post($key = null, $default = null)
  14666. {
  14667. /** @var \Illuminate\Http\Request $instance */
  14668. return $instance->post($key, $default);
  14669. }
  14670. /**
  14671. * Determine if a cookie is set on the request.
  14672. *
  14673. * @param string $key
  14674. * @return bool
  14675. * @static
  14676. */
  14677. public static function hasCookie($key)
  14678. {
  14679. /** @var \Illuminate\Http\Request $instance */
  14680. return $instance->hasCookie($key);
  14681. }
  14682. /**
  14683. * Retrieve a cookie from the request.
  14684. *
  14685. * @param string|null $key
  14686. * @param string|array|null $default
  14687. * @return string|array|null
  14688. * @static
  14689. */
  14690. public static function cookie($key = null, $default = null)
  14691. {
  14692. /** @var \Illuminate\Http\Request $instance */
  14693. return $instance->cookie($key, $default);
  14694. }
  14695. /**
  14696. * Get an array of all of the files on the request.
  14697. *
  14698. * @return array<string, \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]>
  14699. * @static
  14700. */
  14701. public static function allFiles()
  14702. {
  14703. /** @var \Illuminate\Http\Request $instance */
  14704. return $instance->allFiles();
  14705. }
  14706. /**
  14707. * Determine if the uploaded data contains a file.
  14708. *
  14709. * @param string $key
  14710. * @return bool
  14711. * @static
  14712. */
  14713. public static function hasFile($key)
  14714. {
  14715. /** @var \Illuminate\Http\Request $instance */
  14716. return $instance->hasFile($key);
  14717. }
  14718. /**
  14719. * Retrieve a file from the request.
  14720. *
  14721. * @param string|null $key
  14722. * @param mixed $default
  14723. * @return ($key is null ? array<string, \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]> : \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]|null)
  14724. * @static
  14725. */
  14726. public static function file($key = null, $default = null)
  14727. {
  14728. /** @var \Illuminate\Http\Request $instance */
  14729. return $instance->file($key, $default);
  14730. }
  14731. /**
  14732. * Dump the items.
  14733. *
  14734. * @param mixed $keys
  14735. * @return \Illuminate\Http\Request
  14736. * @static
  14737. */
  14738. public static function dump($keys = [])
  14739. {
  14740. /** @var \Illuminate\Http\Request $instance */
  14741. return $instance->dump($keys);
  14742. }
  14743. /**
  14744. * Dump the given arguments and terminate execution.
  14745. *
  14746. * @param mixed $args
  14747. * @return never
  14748. * @static
  14749. */
  14750. public static function dd(...$args)
  14751. {
  14752. /** @var \Illuminate\Http\Request $instance */
  14753. return $instance->dd(...$args);
  14754. }
  14755. /**
  14756. * Determine if the data contains a given key.
  14757. *
  14758. * @param string|array $key
  14759. * @return bool
  14760. * @static
  14761. */
  14762. public static function exists($key)
  14763. {
  14764. /** @var \Illuminate\Http\Request $instance */
  14765. return $instance->exists($key);
  14766. }
  14767. /**
  14768. * Determine if the data contains a given key.
  14769. *
  14770. * @param string|array $key
  14771. * @return bool
  14772. * @static
  14773. */
  14774. public static function has($key)
  14775. {
  14776. /** @var \Illuminate\Http\Request $instance */
  14777. return $instance->has($key);
  14778. }
  14779. /**
  14780. * Determine if the instance contains any of the given keys.
  14781. *
  14782. * @param string|array $keys
  14783. * @return bool
  14784. * @static
  14785. */
  14786. public static function hasAny($keys)
  14787. {
  14788. /** @var \Illuminate\Http\Request $instance */
  14789. return $instance->hasAny($keys);
  14790. }
  14791. /**
  14792. * Apply the callback if the instance contains the given key.
  14793. *
  14794. * @param string $key
  14795. * @param callable $callback
  14796. * @param callable|null $default
  14797. * @return $this|mixed
  14798. * @static
  14799. */
  14800. public static function whenHas($key, $callback, $default = null)
  14801. {
  14802. /** @var \Illuminate\Http\Request $instance */
  14803. return $instance->whenHas($key, $callback, $default);
  14804. }
  14805. /**
  14806. * Determine if the instance contains a non-empty value for the given key.
  14807. *
  14808. * @param string|array $key
  14809. * @return bool
  14810. * @static
  14811. */
  14812. public static function filled($key)
  14813. {
  14814. /** @var \Illuminate\Http\Request $instance */
  14815. return $instance->filled($key);
  14816. }
  14817. /**
  14818. * Determine if the instance contains an empty value for the given key.
  14819. *
  14820. * @param string|array $key
  14821. * @return bool
  14822. * @static
  14823. */
  14824. public static function isNotFilled($key)
  14825. {
  14826. /** @var \Illuminate\Http\Request $instance */
  14827. return $instance->isNotFilled($key);
  14828. }
  14829. /**
  14830. * Determine if the instance contains a non-empty value for any of the given keys.
  14831. *
  14832. * @param string|array $keys
  14833. * @return bool
  14834. * @static
  14835. */
  14836. public static function anyFilled($keys)
  14837. {
  14838. /** @var \Illuminate\Http\Request $instance */
  14839. return $instance->anyFilled($keys);
  14840. }
  14841. /**
  14842. * Apply the callback if the instance contains a non-empty value for the given key.
  14843. *
  14844. * @param string $key
  14845. * @param callable $callback
  14846. * @param callable|null $default
  14847. * @return $this|mixed
  14848. * @static
  14849. */
  14850. public static function whenFilled($key, $callback, $default = null)
  14851. {
  14852. /** @var \Illuminate\Http\Request $instance */
  14853. return $instance->whenFilled($key, $callback, $default);
  14854. }
  14855. /**
  14856. * Determine if the instance is missing a given key.
  14857. *
  14858. * @param string|array $key
  14859. * @return bool
  14860. * @static
  14861. */
  14862. public static function missing($key)
  14863. {
  14864. /** @var \Illuminate\Http\Request $instance */
  14865. return $instance->missing($key);
  14866. }
  14867. /**
  14868. * Apply the callback if the instance is missing the given key.
  14869. *
  14870. * @param string $key
  14871. * @param callable $callback
  14872. * @param callable|null $default
  14873. * @return $this|mixed
  14874. * @static
  14875. */
  14876. public static function whenMissing($key, $callback, $default = null)
  14877. {
  14878. /** @var \Illuminate\Http\Request $instance */
  14879. return $instance->whenMissing($key, $callback, $default);
  14880. }
  14881. /**
  14882. * Retrieve data from the instance as a Stringable instance.
  14883. *
  14884. * @param string $key
  14885. * @param mixed $default
  14886. * @return \Illuminate\Support\Stringable
  14887. * @static
  14888. */
  14889. public static function str($key, $default = null)
  14890. {
  14891. /** @var \Illuminate\Http\Request $instance */
  14892. return $instance->str($key, $default);
  14893. }
  14894. /**
  14895. * Retrieve data from the instance as a Stringable instance.
  14896. *
  14897. * @param string $key
  14898. * @param mixed $default
  14899. * @return \Illuminate\Support\Stringable
  14900. * @static
  14901. */
  14902. public static function string($key, $default = null)
  14903. {
  14904. /** @var \Illuminate\Http\Request $instance */
  14905. return $instance->string($key, $default);
  14906. }
  14907. /**
  14908. * Retrieve data as a boolean value.
  14909. *
  14910. * Returns true when value is "1", "true", "on", and "yes". Otherwise, returns false.
  14911. *
  14912. * @param string|null $key
  14913. * @param bool $default
  14914. * @return bool
  14915. * @static
  14916. */
  14917. public static function boolean($key = null, $default = false)
  14918. {
  14919. /** @var \Illuminate\Http\Request $instance */
  14920. return $instance->boolean($key, $default);
  14921. }
  14922. /**
  14923. * Retrieve data as an integer value.
  14924. *
  14925. * @param string $key
  14926. * @param int $default
  14927. * @return int
  14928. * @static
  14929. */
  14930. public static function integer($key, $default = 0)
  14931. {
  14932. /** @var \Illuminate\Http\Request $instance */
  14933. return $instance->integer($key, $default);
  14934. }
  14935. /**
  14936. * Retrieve data as a float value.
  14937. *
  14938. * @param string $key
  14939. * @param float $default
  14940. * @return float
  14941. * @static
  14942. */
  14943. public static function float($key, $default = 0.0)
  14944. {
  14945. /** @var \Illuminate\Http\Request $instance */
  14946. return $instance->float($key, $default);
  14947. }
  14948. /**
  14949. * Retrieve data from the instance as a Carbon instance.
  14950. *
  14951. * @param string $key
  14952. * @param string|null $format
  14953. * @param string|null $tz
  14954. * @return \Illuminate\Support\Carbon|null
  14955. * @throws \Carbon\Exceptions\InvalidFormatException
  14956. * @static
  14957. */
  14958. public static function date($key, $format = null, $tz = null)
  14959. {
  14960. /** @var \Illuminate\Http\Request $instance */
  14961. return $instance->date($key, $format, $tz);
  14962. }
  14963. /**
  14964. * Retrieve data from the instance as an enum.
  14965. *
  14966. * @template TEnum of \BackedEnum
  14967. * @param string $key
  14968. * @param class-string<TEnum> $enumClass
  14969. * @param TEnum|null $default
  14970. * @return TEnum|null
  14971. * @static
  14972. */
  14973. public static function enum($key, $enumClass, $default = null)
  14974. {
  14975. /** @var \Illuminate\Http\Request $instance */
  14976. return $instance->enum($key, $enumClass, $default);
  14977. }
  14978. /**
  14979. * Retrieve data from the instance as an array of enums.
  14980. *
  14981. * @template TEnum of \BackedEnum
  14982. * @param string $key
  14983. * @param class-string<TEnum> $enumClass
  14984. * @return TEnum[]
  14985. * @static
  14986. */
  14987. public static function enums($key, $enumClass)
  14988. {
  14989. /** @var \Illuminate\Http\Request $instance */
  14990. return $instance->enums($key, $enumClass);
  14991. }
  14992. /**
  14993. * Retrieve data from the instance as an array.
  14994. *
  14995. * @param array|string|null $key
  14996. * @return array
  14997. * @static
  14998. */
  14999. public static function array($key = null)
  15000. {
  15001. /** @var \Illuminate\Http\Request $instance */
  15002. return $instance->array($key);
  15003. }
  15004. /**
  15005. * Retrieve data from the instance as a collection.
  15006. *
  15007. * @param array|string|null $key
  15008. * @return \Illuminate\Support\Collection
  15009. * @static
  15010. */
  15011. public static function collect($key = null)
  15012. {
  15013. /** @var \Illuminate\Http\Request $instance */
  15014. return $instance->collect($key);
  15015. }
  15016. /**
  15017. * Get a subset containing the provided keys with values from the instance data.
  15018. *
  15019. * @param array|mixed $keys
  15020. * @return array
  15021. * @static
  15022. */
  15023. public static function only($keys)
  15024. {
  15025. /** @var \Illuminate\Http\Request $instance */
  15026. return $instance->only($keys);
  15027. }
  15028. /**
  15029. * Get all of the data except for a specified array of items.
  15030. *
  15031. * @param array|mixed $keys
  15032. * @return array
  15033. * @static
  15034. */
  15035. public static function except($keys)
  15036. {
  15037. /** @var \Illuminate\Http\Request $instance */
  15038. return $instance->except($keys);
  15039. }
  15040. /**
  15041. * Apply the callback if the given "value" is (or resolves to) truthy.
  15042. *
  15043. * @template TWhenParameter
  15044. * @template TWhenReturnType
  15045. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  15046. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  15047. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  15048. * @return $this|TWhenReturnType
  15049. * @static
  15050. */
  15051. public static function when($value = null, $callback = null, $default = null)
  15052. {
  15053. /** @var \Illuminate\Http\Request $instance */
  15054. return $instance->when($value, $callback, $default);
  15055. }
  15056. /**
  15057. * Apply the callback if the given "value" is (or resolves to) falsy.
  15058. *
  15059. * @template TUnlessParameter
  15060. * @template TUnlessReturnType
  15061. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  15062. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  15063. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  15064. * @return $this|TUnlessReturnType
  15065. * @static
  15066. */
  15067. public static function unless($value = null, $callback = null, $default = null)
  15068. {
  15069. /** @var \Illuminate\Http\Request $instance */
  15070. return $instance->unless($value, $callback, $default);
  15071. }
  15072. /**
  15073. * Register a custom macro.
  15074. *
  15075. * @param string $name
  15076. * @param object|callable $macro
  15077. * @param-closure-this static $macro
  15078. * @return void
  15079. * @static
  15080. */
  15081. public static function macro($name, $macro)
  15082. {
  15083. \Illuminate\Http\Request::macro($name, $macro);
  15084. }
  15085. /**
  15086. * Mix another object into the class.
  15087. *
  15088. * @param object $mixin
  15089. * @param bool $replace
  15090. * @return void
  15091. * @throws \ReflectionException
  15092. * @static
  15093. */
  15094. public static function mixin($mixin, $replace = true)
  15095. {
  15096. \Illuminate\Http\Request::mixin($mixin, $replace);
  15097. }
  15098. /**
  15099. * Checks if macro is registered.
  15100. *
  15101. * @param string $name
  15102. * @return bool
  15103. * @static
  15104. */
  15105. public static function hasMacro($name)
  15106. {
  15107. return \Illuminate\Http\Request::hasMacro($name);
  15108. }
  15109. /**
  15110. * Flush the existing macros.
  15111. *
  15112. * @return void
  15113. * @static
  15114. */
  15115. public static function flushMacros()
  15116. {
  15117. \Illuminate\Http\Request::flushMacros();
  15118. }
  15119. /**
  15120. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  15121. * @param array $rules
  15122. * @param mixed $params
  15123. * @static
  15124. */
  15125. public static function validate($rules, ...$params)
  15126. {
  15127. return \Illuminate\Http\Request::validate($rules, ...$params);
  15128. }
  15129. /**
  15130. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  15131. * @param string $errorBag
  15132. * @param array $rules
  15133. * @param mixed $params
  15134. * @static
  15135. */
  15136. public static function validateWithBag($errorBag, $rules, ...$params)
  15137. {
  15138. return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params);
  15139. }
  15140. /**
  15141. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15142. * @param mixed $absolute
  15143. * @static
  15144. */
  15145. public static function hasValidSignature($absolute = true)
  15146. {
  15147. return \Illuminate\Http\Request::hasValidSignature($absolute);
  15148. }
  15149. /**
  15150. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15151. * @static
  15152. */
  15153. public static function hasValidRelativeSignature()
  15154. {
  15155. return \Illuminate\Http\Request::hasValidRelativeSignature();
  15156. }
  15157. /**
  15158. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15159. * @param mixed $ignoreQuery
  15160. * @param mixed $absolute
  15161. * @static
  15162. */
  15163. public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)
  15164. {
  15165. return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute);
  15166. }
  15167. /**
  15168. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15169. * @param mixed $ignoreQuery
  15170. * @static
  15171. */
  15172. public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])
  15173. {
  15174. return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery);
  15175. }
  15176. }
  15177. /**
  15178. * @see \Illuminate\Routing\ResponseFactory
  15179. */
  15180. class Response {
  15181. /**
  15182. * Create a new response instance.
  15183. *
  15184. * @param mixed $content
  15185. * @param int $status
  15186. * @param array $headers
  15187. * @return \Illuminate\Http\Response
  15188. * @static
  15189. */
  15190. public static function make($content = '', $status = 200, $headers = [])
  15191. {
  15192. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15193. return $instance->make($content, $status, $headers);
  15194. }
  15195. /**
  15196. * Create a new "no content" response.
  15197. *
  15198. * @param int $status
  15199. * @param array $headers
  15200. * @return \Illuminate\Http\Response
  15201. * @static
  15202. */
  15203. public static function noContent($status = 204, $headers = [])
  15204. {
  15205. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15206. return $instance->noContent($status, $headers);
  15207. }
  15208. /**
  15209. * Create a new response for a given view.
  15210. *
  15211. * @param string|array $view
  15212. * @param array $data
  15213. * @param int $status
  15214. * @param array $headers
  15215. * @return \Illuminate\Http\Response
  15216. * @static
  15217. */
  15218. public static function view($view, $data = [], $status = 200, $headers = [])
  15219. {
  15220. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15221. return $instance->view($view, $data, $status, $headers);
  15222. }
  15223. /**
  15224. * Create a new JSON response instance.
  15225. *
  15226. * @param mixed $data
  15227. * @param int $status
  15228. * @param array $headers
  15229. * @param int $options
  15230. * @return \Illuminate\Http\JsonResponse
  15231. * @static
  15232. */
  15233. public static function json($data = [], $status = 200, $headers = [], $options = 0)
  15234. {
  15235. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15236. return $instance->json($data, $status, $headers, $options);
  15237. }
  15238. /**
  15239. * Create a new JSONP response instance.
  15240. *
  15241. * @param string $callback
  15242. * @param mixed $data
  15243. * @param int $status
  15244. * @param array $headers
  15245. * @param int $options
  15246. * @return \Illuminate\Http\JsonResponse
  15247. * @static
  15248. */
  15249. public static function jsonp($callback, $data = [], $status = 200, $headers = [], $options = 0)
  15250. {
  15251. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15252. return $instance->jsonp($callback, $data, $status, $headers, $options);
  15253. }
  15254. /**
  15255. * Create a new event stream response.
  15256. *
  15257. * @param \Closure $callback
  15258. * @param array $headers
  15259. * @param \Illuminate\Http\StreamedEvent|string|null $endStreamWith
  15260. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15261. * @static
  15262. */
  15263. public static function eventStream($callback, $headers = [], $endStreamWith = '</stream>')
  15264. {
  15265. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15266. return $instance->eventStream($callback, $headers, $endStreamWith);
  15267. }
  15268. /**
  15269. * Create a new streamed response instance.
  15270. *
  15271. * @param callable|null $callback
  15272. * @param int $status
  15273. * @param array $headers
  15274. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15275. * @static
  15276. */
  15277. public static function stream($callback, $status = 200, $headers = [])
  15278. {
  15279. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15280. return $instance->stream($callback, $status, $headers);
  15281. }
  15282. /**
  15283. * Create a new streamed JSON response instance.
  15284. *
  15285. * @param array $data
  15286. * @param int $status
  15287. * @param array $headers
  15288. * @param int $encodingOptions
  15289. * @return \Symfony\Component\HttpFoundation\StreamedJsonResponse
  15290. * @static
  15291. */
  15292. public static function streamJson($data, $status = 200, $headers = [], $encodingOptions = 15)
  15293. {
  15294. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15295. return $instance->streamJson($data, $status, $headers, $encodingOptions);
  15296. }
  15297. /**
  15298. * Create a new streamed response instance as a file download.
  15299. *
  15300. * @param callable $callback
  15301. * @param string|null $name
  15302. * @param array $headers
  15303. * @param string|null $disposition
  15304. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15305. * @throws \Illuminate\Routing\Exceptions\StreamedResponseException
  15306. * @static
  15307. */
  15308. public static function streamDownload($callback, $name = null, $headers = [], $disposition = 'attachment')
  15309. {
  15310. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15311. return $instance->streamDownload($callback, $name, $headers, $disposition);
  15312. }
  15313. /**
  15314. * Create a new file download response.
  15315. *
  15316. * @param \SplFileInfo|string $file
  15317. * @param string|null $name
  15318. * @param array $headers
  15319. * @param string|null $disposition
  15320. * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
  15321. * @static
  15322. */
  15323. public static function download($file, $name = null, $headers = [], $disposition = 'attachment')
  15324. {
  15325. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15326. return $instance->download($file, $name, $headers, $disposition);
  15327. }
  15328. /**
  15329. * Return the raw contents of a binary file.
  15330. *
  15331. * @param \SplFileInfo|string $file
  15332. * @param array $headers
  15333. * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
  15334. * @static
  15335. */
  15336. public static function file($file, $headers = [])
  15337. {
  15338. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15339. return $instance->file($file, $headers);
  15340. }
  15341. /**
  15342. * Create a new redirect response to the given path.
  15343. *
  15344. * @param string $path
  15345. * @param int $status
  15346. * @param array $headers
  15347. * @param bool|null $secure
  15348. * @return \Illuminate\Http\RedirectResponse
  15349. * @static
  15350. */
  15351. public static function redirectTo($path, $status = 302, $headers = [], $secure = null)
  15352. {
  15353. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15354. return $instance->redirectTo($path, $status, $headers, $secure);
  15355. }
  15356. /**
  15357. * Create a new redirect response to a named route.
  15358. *
  15359. * @param \BackedEnum|string $route
  15360. * @param mixed $parameters
  15361. * @param int $status
  15362. * @param array $headers
  15363. * @return \Illuminate\Http\RedirectResponse
  15364. * @static
  15365. */
  15366. public static function redirectToRoute($route, $parameters = [], $status = 302, $headers = [])
  15367. {
  15368. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15369. return $instance->redirectToRoute($route, $parameters, $status, $headers);
  15370. }
  15371. /**
  15372. * Create a new redirect response to a controller action.
  15373. *
  15374. * @param array|string $action
  15375. * @param mixed $parameters
  15376. * @param int $status
  15377. * @param array $headers
  15378. * @return \Illuminate\Http\RedirectResponse
  15379. * @static
  15380. */
  15381. public static function redirectToAction($action, $parameters = [], $status = 302, $headers = [])
  15382. {
  15383. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15384. return $instance->redirectToAction($action, $parameters, $status, $headers);
  15385. }
  15386. /**
  15387. * Create a new redirect response, while putting the current URL in the session.
  15388. *
  15389. * @param string $path
  15390. * @param int $status
  15391. * @param array $headers
  15392. * @param bool|null $secure
  15393. * @return \Illuminate\Http\RedirectResponse
  15394. * @static
  15395. */
  15396. public static function redirectGuest($path, $status = 302, $headers = [], $secure = null)
  15397. {
  15398. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15399. return $instance->redirectGuest($path, $status, $headers, $secure);
  15400. }
  15401. /**
  15402. * Create a new redirect response to the previously intended location.
  15403. *
  15404. * @param string $default
  15405. * @param int $status
  15406. * @param array $headers
  15407. * @param bool|null $secure
  15408. * @return \Illuminate\Http\RedirectResponse
  15409. * @static
  15410. */
  15411. public static function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null)
  15412. {
  15413. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15414. return $instance->redirectToIntended($default, $status, $headers, $secure);
  15415. }
  15416. /**
  15417. * Register a custom macro.
  15418. *
  15419. * @param string $name
  15420. * @param object|callable $macro
  15421. * @param-closure-this static $macro
  15422. * @return void
  15423. * @static
  15424. */
  15425. public static function macro($name, $macro)
  15426. {
  15427. \Illuminate\Routing\ResponseFactory::macro($name, $macro);
  15428. }
  15429. /**
  15430. * Mix another object into the class.
  15431. *
  15432. * @param object $mixin
  15433. * @param bool $replace
  15434. * @return void
  15435. * @throws \ReflectionException
  15436. * @static
  15437. */
  15438. public static function mixin($mixin, $replace = true)
  15439. {
  15440. \Illuminate\Routing\ResponseFactory::mixin($mixin, $replace);
  15441. }
  15442. /**
  15443. * Checks if macro is registered.
  15444. *
  15445. * @param string $name
  15446. * @return bool
  15447. * @static
  15448. */
  15449. public static function hasMacro($name)
  15450. {
  15451. return \Illuminate\Routing\ResponseFactory::hasMacro($name);
  15452. }
  15453. /**
  15454. * Flush the existing macros.
  15455. *
  15456. * @return void
  15457. * @static
  15458. */
  15459. public static function flushMacros()
  15460. {
  15461. \Illuminate\Routing\ResponseFactory::flushMacros();
  15462. }
  15463. }
  15464. /**
  15465. * @method static \Illuminate\Routing\RouteRegistrar attribute(string $key, mixed $value)
  15466. * @method static \Illuminate\Routing\RouteRegistrar whereAlpha(array|string $parameters)
  15467. * @method static \Illuminate\Routing\RouteRegistrar whereAlphaNumeric(array|string $parameters)
  15468. * @method static \Illuminate\Routing\RouteRegistrar whereNumber(array|string $parameters)
  15469. * @method static \Illuminate\Routing\RouteRegistrar whereUlid(array|string $parameters)
  15470. * @method static \Illuminate\Routing\RouteRegistrar whereUuid(array|string $parameters)
  15471. * @method static \Illuminate\Routing\RouteRegistrar whereIn(array|string $parameters, array $values)
  15472. * @method static \Illuminate\Routing\RouteRegistrar as(string $value)
  15473. * @method static \Illuminate\Routing\RouteRegistrar can(\UnitEnum|string $ability, array|string $models = [])
  15474. * @method static \Illuminate\Routing\RouteRegistrar controller(string $controller)
  15475. * @method static \Illuminate\Routing\RouteRegistrar domain(\BackedEnum|string $value)
  15476. * @method static \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware)
  15477. * @method static \Illuminate\Routing\RouteRegistrar missing(\Closure $missing)
  15478. * @method static \Illuminate\Routing\RouteRegistrar name(\BackedEnum|string $value)
  15479. * @method static \Illuminate\Routing\RouteRegistrar namespace(string|null $value)
  15480. * @method static \Illuminate\Routing\RouteRegistrar prefix(string $prefix)
  15481. * @method static \Illuminate\Routing\RouteRegistrar scopeBindings()
  15482. * @method static \Illuminate\Routing\RouteRegistrar where(array $where)
  15483. * @method static \Illuminate\Routing\RouteRegistrar withoutMiddleware(array|string $middleware)
  15484. * @method static \Illuminate\Routing\RouteRegistrar withoutScopedBindings()
  15485. * @see \Illuminate\Routing\Router
  15486. */
  15487. class Route {
  15488. /**
  15489. * Register a new GET route with the router.
  15490. *
  15491. * @param string $uri
  15492. * @param array|string|callable|null $action
  15493. * @return \Illuminate\Routing\Route
  15494. * @static
  15495. */
  15496. public static function get($uri, $action = null)
  15497. {
  15498. /** @var \Illuminate\Routing\Router $instance */
  15499. return $instance->get($uri, $action);
  15500. }
  15501. /**
  15502. * Register a new POST route with the router.
  15503. *
  15504. * @param string $uri
  15505. * @param array|string|callable|null $action
  15506. * @return \Illuminate\Routing\Route
  15507. * @static
  15508. */
  15509. public static function post($uri, $action = null)
  15510. {
  15511. /** @var \Illuminate\Routing\Router $instance */
  15512. return $instance->post($uri, $action);
  15513. }
  15514. /**
  15515. * Register a new PUT route with the router.
  15516. *
  15517. * @param string $uri
  15518. * @param array|string|callable|null $action
  15519. * @return \Illuminate\Routing\Route
  15520. * @static
  15521. */
  15522. public static function put($uri, $action = null)
  15523. {
  15524. /** @var \Illuminate\Routing\Router $instance */
  15525. return $instance->put($uri, $action);
  15526. }
  15527. /**
  15528. * Register a new PATCH route with the router.
  15529. *
  15530. * @param string $uri
  15531. * @param array|string|callable|null $action
  15532. * @return \Illuminate\Routing\Route
  15533. * @static
  15534. */
  15535. public static function patch($uri, $action = null)
  15536. {
  15537. /** @var \Illuminate\Routing\Router $instance */
  15538. return $instance->patch($uri, $action);
  15539. }
  15540. /**
  15541. * Register a new DELETE route with the router.
  15542. *
  15543. * @param string $uri
  15544. * @param array|string|callable|null $action
  15545. * @return \Illuminate\Routing\Route
  15546. * @static
  15547. */
  15548. public static function delete($uri, $action = null)
  15549. {
  15550. /** @var \Illuminate\Routing\Router $instance */
  15551. return $instance->delete($uri, $action);
  15552. }
  15553. /**
  15554. * Register a new OPTIONS route with the router.
  15555. *
  15556. * @param string $uri
  15557. * @param array|string|callable|null $action
  15558. * @return \Illuminate\Routing\Route
  15559. * @static
  15560. */
  15561. public static function options($uri, $action = null)
  15562. {
  15563. /** @var \Illuminate\Routing\Router $instance */
  15564. return $instance->options($uri, $action);
  15565. }
  15566. /**
  15567. * Register a new route responding to all verbs.
  15568. *
  15569. * @param string $uri
  15570. * @param array|string|callable|null $action
  15571. * @return \Illuminate\Routing\Route
  15572. * @static
  15573. */
  15574. public static function any($uri, $action = null)
  15575. {
  15576. /** @var \Illuminate\Routing\Router $instance */
  15577. return $instance->any($uri, $action);
  15578. }
  15579. /**
  15580. * Register a new fallback route with the router.
  15581. *
  15582. * @param array|string|callable|null $action
  15583. * @return \Illuminate\Routing\Route
  15584. * @static
  15585. */
  15586. public static function fallback($action)
  15587. {
  15588. /** @var \Illuminate\Routing\Router $instance */
  15589. return $instance->fallback($action);
  15590. }
  15591. /**
  15592. * Create a redirect from one URI to another.
  15593. *
  15594. * @param string $uri
  15595. * @param string $destination
  15596. * @param int $status
  15597. * @return \Illuminate\Routing\Route
  15598. * @static
  15599. */
  15600. public static function redirect($uri, $destination, $status = 302)
  15601. {
  15602. /** @var \Illuminate\Routing\Router $instance */
  15603. return $instance->redirect($uri, $destination, $status);
  15604. }
  15605. /**
  15606. * Create a permanent redirect from one URI to another.
  15607. *
  15608. * @param string $uri
  15609. * @param string $destination
  15610. * @return \Illuminate\Routing\Route
  15611. * @static
  15612. */
  15613. public static function permanentRedirect($uri, $destination)
  15614. {
  15615. /** @var \Illuminate\Routing\Router $instance */
  15616. return $instance->permanentRedirect($uri, $destination);
  15617. }
  15618. /**
  15619. * Register a new route that returns a view.
  15620. *
  15621. * @param string $uri
  15622. * @param string $view
  15623. * @param array $data
  15624. * @param int|array $status
  15625. * @param array $headers
  15626. * @return \Illuminate\Routing\Route
  15627. * @static
  15628. */
  15629. public static function view($uri, $view, $data = [], $status = 200, $headers = [])
  15630. {
  15631. /** @var \Illuminate\Routing\Router $instance */
  15632. return $instance->view($uri, $view, $data, $status, $headers);
  15633. }
  15634. /**
  15635. * Register a new route with the given verbs.
  15636. *
  15637. * @param array|string $methods
  15638. * @param string $uri
  15639. * @param array|string|callable|null $action
  15640. * @return \Illuminate\Routing\Route
  15641. * @static
  15642. */
  15643. public static function match($methods, $uri, $action = null)
  15644. {
  15645. /** @var \Illuminate\Routing\Router $instance */
  15646. return $instance->match($methods, $uri, $action);
  15647. }
  15648. /**
  15649. * Register an array of resource controllers.
  15650. *
  15651. * @param array $resources
  15652. * @param array $options
  15653. * @return void
  15654. * @static
  15655. */
  15656. public static function resources($resources, $options = [])
  15657. {
  15658. /** @var \Illuminate\Routing\Router $instance */
  15659. $instance->resources($resources, $options);
  15660. }
  15661. /**
  15662. * Route a resource to a controller.
  15663. *
  15664. * @param string $name
  15665. * @param string $controller
  15666. * @param array $options
  15667. * @return \Illuminate\Routing\PendingResourceRegistration
  15668. * @static
  15669. */
  15670. public static function resource($name, $controller, $options = [])
  15671. {
  15672. /** @var \Illuminate\Routing\Router $instance */
  15673. return $instance->resource($name, $controller, $options);
  15674. }
  15675. /**
  15676. * Register an array of API resource controllers.
  15677. *
  15678. * @param array $resources
  15679. * @param array $options
  15680. * @return void
  15681. * @static
  15682. */
  15683. public static function apiResources($resources, $options = [])
  15684. {
  15685. /** @var \Illuminate\Routing\Router $instance */
  15686. $instance->apiResources($resources, $options);
  15687. }
  15688. /**
  15689. * Route an API resource to a controller.
  15690. *
  15691. * @param string $name
  15692. * @param string $controller
  15693. * @param array $options
  15694. * @return \Illuminate\Routing\PendingResourceRegistration
  15695. * @static
  15696. */
  15697. public static function apiResource($name, $controller, $options = [])
  15698. {
  15699. /** @var \Illuminate\Routing\Router $instance */
  15700. return $instance->apiResource($name, $controller, $options);
  15701. }
  15702. /**
  15703. * Register an array of singleton resource controllers.
  15704. *
  15705. * @param array $singletons
  15706. * @param array $options
  15707. * @return void
  15708. * @static
  15709. */
  15710. public static function singletons($singletons, $options = [])
  15711. {
  15712. /** @var \Illuminate\Routing\Router $instance */
  15713. $instance->singletons($singletons, $options);
  15714. }
  15715. /**
  15716. * Route a singleton resource to a controller.
  15717. *
  15718. * @param string $name
  15719. * @param string $controller
  15720. * @param array $options
  15721. * @return \Illuminate\Routing\PendingSingletonResourceRegistration
  15722. * @static
  15723. */
  15724. public static function singleton($name, $controller, $options = [])
  15725. {
  15726. /** @var \Illuminate\Routing\Router $instance */
  15727. return $instance->singleton($name, $controller, $options);
  15728. }
  15729. /**
  15730. * Register an array of API singleton resource controllers.
  15731. *
  15732. * @param array $singletons
  15733. * @param array $options
  15734. * @return void
  15735. * @static
  15736. */
  15737. public static function apiSingletons($singletons, $options = [])
  15738. {
  15739. /** @var \Illuminate\Routing\Router $instance */
  15740. $instance->apiSingletons($singletons, $options);
  15741. }
  15742. /**
  15743. * Route an API singleton resource to a controller.
  15744. *
  15745. * @param string $name
  15746. * @param string $controller
  15747. * @param array $options
  15748. * @return \Illuminate\Routing\PendingSingletonResourceRegistration
  15749. * @static
  15750. */
  15751. public static function apiSingleton($name, $controller, $options = [])
  15752. {
  15753. /** @var \Illuminate\Routing\Router $instance */
  15754. return $instance->apiSingleton($name, $controller, $options);
  15755. }
  15756. /**
  15757. * Create a route group with shared attributes.
  15758. *
  15759. * @param array $attributes
  15760. * @param \Closure|array|string $routes
  15761. * @return \Illuminate\Routing\Router
  15762. * @static
  15763. */
  15764. public static function group($attributes, $routes)
  15765. {
  15766. /** @var \Illuminate\Routing\Router $instance */
  15767. return $instance->group($attributes, $routes);
  15768. }
  15769. /**
  15770. * Merge the given array with the last group stack.
  15771. *
  15772. * @param array $new
  15773. * @param bool $prependExistingPrefix
  15774. * @return array
  15775. * @static
  15776. */
  15777. public static function mergeWithLastGroup($new, $prependExistingPrefix = true)
  15778. {
  15779. /** @var \Illuminate\Routing\Router $instance */
  15780. return $instance->mergeWithLastGroup($new, $prependExistingPrefix);
  15781. }
  15782. /**
  15783. * Get the prefix from the last group on the stack.
  15784. *
  15785. * @return string
  15786. * @static
  15787. */
  15788. public static function getLastGroupPrefix()
  15789. {
  15790. /** @var \Illuminate\Routing\Router $instance */
  15791. return $instance->getLastGroupPrefix();
  15792. }
  15793. /**
  15794. * Add a route to the underlying route collection.
  15795. *
  15796. * @param array|string $methods
  15797. * @param string $uri
  15798. * @param array|string|callable|null $action
  15799. * @return \Illuminate\Routing\Route
  15800. * @static
  15801. */
  15802. public static function addRoute($methods, $uri, $action)
  15803. {
  15804. /** @var \Illuminate\Routing\Router $instance */
  15805. return $instance->addRoute($methods, $uri, $action);
  15806. }
  15807. /**
  15808. * Create a new Route object.
  15809. *
  15810. * @param array|string $methods
  15811. * @param string $uri
  15812. * @param mixed $action
  15813. * @return \Illuminate\Routing\Route
  15814. * @static
  15815. */
  15816. public static function newRoute($methods, $uri, $action)
  15817. {
  15818. /** @var \Illuminate\Routing\Router $instance */
  15819. return $instance->newRoute($methods, $uri, $action);
  15820. }
  15821. /**
  15822. * Return the response returned by the given route.
  15823. *
  15824. * @param string $name
  15825. * @return \Symfony\Component\HttpFoundation\Response
  15826. * @static
  15827. */
  15828. public static function respondWithRoute($name)
  15829. {
  15830. /** @var \Illuminate\Routing\Router $instance */
  15831. return $instance->respondWithRoute($name);
  15832. }
  15833. /**
  15834. * Dispatch the request to the application.
  15835. *
  15836. * @param \Illuminate\Http\Request $request
  15837. * @return \Symfony\Component\HttpFoundation\Response
  15838. * @static
  15839. */
  15840. public static function dispatch($request)
  15841. {
  15842. /** @var \Illuminate\Routing\Router $instance */
  15843. return $instance->dispatch($request);
  15844. }
  15845. /**
  15846. * Dispatch the request to a route and return the response.
  15847. *
  15848. * @param \Illuminate\Http\Request $request
  15849. * @return \Symfony\Component\HttpFoundation\Response
  15850. * @static
  15851. */
  15852. public static function dispatchToRoute($request)
  15853. {
  15854. /** @var \Illuminate\Routing\Router $instance */
  15855. return $instance->dispatchToRoute($request);
  15856. }
  15857. /**
  15858. * Gather the middleware for the given route with resolved class names.
  15859. *
  15860. * @param \Illuminate\Routing\Route $route
  15861. * @return array
  15862. * @static
  15863. */
  15864. public static function gatherRouteMiddleware($route)
  15865. {
  15866. /** @var \Illuminate\Routing\Router $instance */
  15867. return $instance->gatherRouteMiddleware($route);
  15868. }
  15869. /**
  15870. * Resolve a flat array of middleware classes from the provided array.
  15871. *
  15872. * @param array $middleware
  15873. * @param array $excluded
  15874. * @return array
  15875. * @static
  15876. */
  15877. public static function resolveMiddleware($middleware, $excluded = [])
  15878. {
  15879. /** @var \Illuminate\Routing\Router $instance */
  15880. return $instance->resolveMiddleware($middleware, $excluded);
  15881. }
  15882. /**
  15883. * Create a response instance from the given value.
  15884. *
  15885. * @param \Symfony\Component\HttpFoundation\Request $request
  15886. * @param mixed $response
  15887. * @return \Symfony\Component\HttpFoundation\Response
  15888. * @static
  15889. */
  15890. public static function prepareResponse($request, $response)
  15891. {
  15892. /** @var \Illuminate\Routing\Router $instance */
  15893. return $instance->prepareResponse($request, $response);
  15894. }
  15895. /**
  15896. * Static version of prepareResponse.
  15897. *
  15898. * @param \Symfony\Component\HttpFoundation\Request $request
  15899. * @param mixed $response
  15900. * @return \Symfony\Component\HttpFoundation\Response
  15901. * @static
  15902. */
  15903. public static function toResponse($request, $response)
  15904. {
  15905. return \Illuminate\Routing\Router::toResponse($request, $response);
  15906. }
  15907. /**
  15908. * Substitute the route bindings onto the route.
  15909. *
  15910. * @param \Illuminate\Routing\Route $route
  15911. * @return \Illuminate\Routing\Route
  15912. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model>
  15913. * @throws \Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
  15914. * @static
  15915. */
  15916. public static function substituteBindings($route)
  15917. {
  15918. /** @var \Illuminate\Routing\Router $instance */
  15919. return $instance->substituteBindings($route);
  15920. }
  15921. /**
  15922. * Substitute the implicit route bindings for the given route.
  15923. *
  15924. * @param \Illuminate\Routing\Route $route
  15925. * @return void
  15926. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model>
  15927. * @throws \Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
  15928. * @static
  15929. */
  15930. public static function substituteImplicitBindings($route)
  15931. {
  15932. /** @var \Illuminate\Routing\Router $instance */
  15933. $instance->substituteImplicitBindings($route);
  15934. }
  15935. /**
  15936. * Register a callback to run after implicit bindings are substituted.
  15937. *
  15938. * @param callable $callback
  15939. * @return \Illuminate\Routing\Router
  15940. * @static
  15941. */
  15942. public static function substituteImplicitBindingsUsing($callback)
  15943. {
  15944. /** @var \Illuminate\Routing\Router $instance */
  15945. return $instance->substituteImplicitBindingsUsing($callback);
  15946. }
  15947. /**
  15948. * Register a route matched event listener.
  15949. *
  15950. * @param string|callable $callback
  15951. * @return void
  15952. * @static
  15953. */
  15954. public static function matched($callback)
  15955. {
  15956. /** @var \Illuminate\Routing\Router $instance */
  15957. $instance->matched($callback);
  15958. }
  15959. /**
  15960. * Get all of the defined middleware short-hand names.
  15961. *
  15962. * @return array
  15963. * @static
  15964. */
  15965. public static function getMiddleware()
  15966. {
  15967. /** @var \Illuminate\Routing\Router $instance */
  15968. return $instance->getMiddleware();
  15969. }
  15970. /**
  15971. * Register a short-hand name for a middleware.
  15972. *
  15973. * @param string $name
  15974. * @param string $class
  15975. * @return \Illuminate\Routing\Router
  15976. * @static
  15977. */
  15978. public static function aliasMiddleware($name, $class)
  15979. {
  15980. /** @var \Illuminate\Routing\Router $instance */
  15981. return $instance->aliasMiddleware($name, $class);
  15982. }
  15983. /**
  15984. * Check if a middlewareGroup with the given name exists.
  15985. *
  15986. * @param string $name
  15987. * @return bool
  15988. * @static
  15989. */
  15990. public static function hasMiddlewareGroup($name)
  15991. {
  15992. /** @var \Illuminate\Routing\Router $instance */
  15993. return $instance->hasMiddlewareGroup($name);
  15994. }
  15995. /**
  15996. * Get all of the defined middleware groups.
  15997. *
  15998. * @return array
  15999. * @static
  16000. */
  16001. public static function getMiddlewareGroups()
  16002. {
  16003. /** @var \Illuminate\Routing\Router $instance */
  16004. return $instance->getMiddlewareGroups();
  16005. }
  16006. /**
  16007. * Register a group of middleware.
  16008. *
  16009. * @param string $name
  16010. * @param array $middleware
  16011. * @return \Illuminate\Routing\Router
  16012. * @static
  16013. */
  16014. public static function middlewareGroup($name, $middleware)
  16015. {
  16016. /** @var \Illuminate\Routing\Router $instance */
  16017. return $instance->middlewareGroup($name, $middleware);
  16018. }
  16019. /**
  16020. * Add a middleware to the beginning of a middleware group.
  16021. *
  16022. * If the middleware is already in the group, it will not be added again.
  16023. *
  16024. * @param string $group
  16025. * @param string $middleware
  16026. * @return \Illuminate\Routing\Router
  16027. * @static
  16028. */
  16029. public static function prependMiddlewareToGroup($group, $middleware)
  16030. {
  16031. /** @var \Illuminate\Routing\Router $instance */
  16032. return $instance->prependMiddlewareToGroup($group, $middleware);
  16033. }
  16034. /**
  16035. * Add a middleware to the end of a middleware group.
  16036. *
  16037. * If the middleware is already in the group, it will not be added again.
  16038. *
  16039. * @param string $group
  16040. * @param string $middleware
  16041. * @return \Illuminate\Routing\Router
  16042. * @static
  16043. */
  16044. public static function pushMiddlewareToGroup($group, $middleware)
  16045. {
  16046. /** @var \Illuminate\Routing\Router $instance */
  16047. return $instance->pushMiddlewareToGroup($group, $middleware);
  16048. }
  16049. /**
  16050. * Remove the given middleware from the specified group.
  16051. *
  16052. * @param string $group
  16053. * @param string $middleware
  16054. * @return \Illuminate\Routing\Router
  16055. * @static
  16056. */
  16057. public static function removeMiddlewareFromGroup($group, $middleware)
  16058. {
  16059. /** @var \Illuminate\Routing\Router $instance */
  16060. return $instance->removeMiddlewareFromGroup($group, $middleware);
  16061. }
  16062. /**
  16063. * Flush the router's middleware groups.
  16064. *
  16065. * @return \Illuminate\Routing\Router
  16066. * @static
  16067. */
  16068. public static function flushMiddlewareGroups()
  16069. {
  16070. /** @var \Illuminate\Routing\Router $instance */
  16071. return $instance->flushMiddlewareGroups();
  16072. }
  16073. /**
  16074. * Add a new route parameter binder.
  16075. *
  16076. * @param string $key
  16077. * @param string|callable $binder
  16078. * @return void
  16079. * @static
  16080. */
  16081. public static function bind($key, $binder)
  16082. {
  16083. /** @var \Illuminate\Routing\Router $instance */
  16084. $instance->bind($key, $binder);
  16085. }
  16086. /**
  16087. * Register a model binder for a wildcard.
  16088. *
  16089. * @param string $key
  16090. * @param string $class
  16091. * @param \Closure|null $callback
  16092. * @return void
  16093. * @static
  16094. */
  16095. public static function model($key, $class, $callback = null)
  16096. {
  16097. /** @var \Illuminate\Routing\Router $instance */
  16098. $instance->model($key, $class, $callback);
  16099. }
  16100. /**
  16101. * Get the binding callback for a given binding.
  16102. *
  16103. * @param string $key
  16104. * @return \Closure|null
  16105. * @static
  16106. */
  16107. public static function getBindingCallback($key)
  16108. {
  16109. /** @var \Illuminate\Routing\Router $instance */
  16110. return $instance->getBindingCallback($key);
  16111. }
  16112. /**
  16113. * Get the global "where" patterns.
  16114. *
  16115. * @return array
  16116. * @static
  16117. */
  16118. public static function getPatterns()
  16119. {
  16120. /** @var \Illuminate\Routing\Router $instance */
  16121. return $instance->getPatterns();
  16122. }
  16123. /**
  16124. * Set a global where pattern on all routes.
  16125. *
  16126. * @param string $key
  16127. * @param string $pattern
  16128. * @return void
  16129. * @static
  16130. */
  16131. public static function pattern($key, $pattern)
  16132. {
  16133. /** @var \Illuminate\Routing\Router $instance */
  16134. $instance->pattern($key, $pattern);
  16135. }
  16136. /**
  16137. * Set a group of global where patterns on all routes.
  16138. *
  16139. * @param array $patterns
  16140. * @return void
  16141. * @static
  16142. */
  16143. public static function patterns($patterns)
  16144. {
  16145. /** @var \Illuminate\Routing\Router $instance */
  16146. $instance->patterns($patterns);
  16147. }
  16148. /**
  16149. * Determine if the router currently has a group stack.
  16150. *
  16151. * @return bool
  16152. * @static
  16153. */
  16154. public static function hasGroupStack()
  16155. {
  16156. /** @var \Illuminate\Routing\Router $instance */
  16157. return $instance->hasGroupStack();
  16158. }
  16159. /**
  16160. * Get the current group stack for the router.
  16161. *
  16162. * @return array
  16163. * @static
  16164. */
  16165. public static function getGroupStack()
  16166. {
  16167. /** @var \Illuminate\Routing\Router $instance */
  16168. return $instance->getGroupStack();
  16169. }
  16170. /**
  16171. * Get a route parameter for the current route.
  16172. *
  16173. * @param string $key
  16174. * @param string|null $default
  16175. * @return mixed
  16176. * @static
  16177. */
  16178. public static function input($key, $default = null)
  16179. {
  16180. /** @var \Illuminate\Routing\Router $instance */
  16181. return $instance->input($key, $default);
  16182. }
  16183. /**
  16184. * Get the request currently being dispatched.
  16185. *
  16186. * @return \Illuminate\Http\Request
  16187. * @static
  16188. */
  16189. public static function getCurrentRequest()
  16190. {
  16191. /** @var \Illuminate\Routing\Router $instance */
  16192. return $instance->getCurrentRequest();
  16193. }
  16194. /**
  16195. * Get the currently dispatched route instance.
  16196. *
  16197. * @return \Illuminate\Routing\Route|null
  16198. * @static
  16199. */
  16200. public static function getCurrentRoute()
  16201. {
  16202. /** @var \Illuminate\Routing\Router $instance */
  16203. return $instance->getCurrentRoute();
  16204. }
  16205. /**
  16206. * Get the currently dispatched route instance.
  16207. *
  16208. * @return \Illuminate\Routing\Route|null
  16209. * @static
  16210. */
  16211. public static function current()
  16212. {
  16213. /** @var \Illuminate\Routing\Router $instance */
  16214. return $instance->current();
  16215. }
  16216. /**
  16217. * Check if a route with the given name exists.
  16218. *
  16219. * @param string|array $name
  16220. * @return bool
  16221. * @static
  16222. */
  16223. public static function has($name)
  16224. {
  16225. /** @var \Illuminate\Routing\Router $instance */
  16226. return $instance->has($name);
  16227. }
  16228. /**
  16229. * Get the current route name.
  16230. *
  16231. * @return string|null
  16232. * @static
  16233. */
  16234. public static function currentRouteName()
  16235. {
  16236. /** @var \Illuminate\Routing\Router $instance */
  16237. return $instance->currentRouteName();
  16238. }
  16239. /**
  16240. * Alias for the "currentRouteNamed" method.
  16241. *
  16242. * @param mixed $patterns
  16243. * @return bool
  16244. * @static
  16245. */
  16246. public static function is(...$patterns)
  16247. {
  16248. /** @var \Illuminate\Routing\Router $instance */
  16249. return $instance->is(...$patterns);
  16250. }
  16251. /**
  16252. * Determine if the current route matches a pattern.
  16253. *
  16254. * @param mixed $patterns
  16255. * @return bool
  16256. * @static
  16257. */
  16258. public static function currentRouteNamed(...$patterns)
  16259. {
  16260. /** @var \Illuminate\Routing\Router $instance */
  16261. return $instance->currentRouteNamed(...$patterns);
  16262. }
  16263. /**
  16264. * Get the current route action.
  16265. *
  16266. * @return string|null
  16267. * @static
  16268. */
  16269. public static function currentRouteAction()
  16270. {
  16271. /** @var \Illuminate\Routing\Router $instance */
  16272. return $instance->currentRouteAction();
  16273. }
  16274. /**
  16275. * Alias for the "currentRouteUses" method.
  16276. *
  16277. * @param array|string $patterns
  16278. * @return bool
  16279. * @static
  16280. */
  16281. public static function uses(...$patterns)
  16282. {
  16283. /** @var \Illuminate\Routing\Router $instance */
  16284. return $instance->uses(...$patterns);
  16285. }
  16286. /**
  16287. * Determine if the current route action matches a given action.
  16288. *
  16289. * @param string $action
  16290. * @return bool
  16291. * @static
  16292. */
  16293. public static function currentRouteUses($action)
  16294. {
  16295. /** @var \Illuminate\Routing\Router $instance */
  16296. return $instance->currentRouteUses($action);
  16297. }
  16298. /**
  16299. * Set the unmapped global resource parameters to singular.
  16300. *
  16301. * @param bool $singular
  16302. * @return void
  16303. * @static
  16304. */
  16305. public static function singularResourceParameters($singular = true)
  16306. {
  16307. /** @var \Illuminate\Routing\Router $instance */
  16308. $instance->singularResourceParameters($singular);
  16309. }
  16310. /**
  16311. * Set the global resource parameter mapping.
  16312. *
  16313. * @param array $parameters
  16314. * @return void
  16315. * @static
  16316. */
  16317. public static function resourceParameters($parameters = [])
  16318. {
  16319. /** @var \Illuminate\Routing\Router $instance */
  16320. $instance->resourceParameters($parameters);
  16321. }
  16322. /**
  16323. * Get or set the verbs used in the resource URIs.
  16324. *
  16325. * @param array $verbs
  16326. * @return array|null
  16327. * @static
  16328. */
  16329. public static function resourceVerbs($verbs = [])
  16330. {
  16331. /** @var \Illuminate\Routing\Router $instance */
  16332. return $instance->resourceVerbs($verbs);
  16333. }
  16334. /**
  16335. * Get the underlying route collection.
  16336. *
  16337. * @return \Illuminate\Routing\RouteCollectionInterface
  16338. * @static
  16339. */
  16340. public static function getRoutes()
  16341. {
  16342. /** @var \Illuminate\Routing\Router $instance */
  16343. return $instance->getRoutes();
  16344. }
  16345. /**
  16346. * Set the route collection instance.
  16347. *
  16348. * @param \Illuminate\Routing\RouteCollection $routes
  16349. * @return void
  16350. * @static
  16351. */
  16352. public static function setRoutes($routes)
  16353. {
  16354. /** @var \Illuminate\Routing\Router $instance */
  16355. $instance->setRoutes($routes);
  16356. }
  16357. /**
  16358. * Set the compiled route collection instance.
  16359. *
  16360. * @param array $routes
  16361. * @return void
  16362. * @static
  16363. */
  16364. public static function setCompiledRoutes($routes)
  16365. {
  16366. /** @var \Illuminate\Routing\Router $instance */
  16367. $instance->setCompiledRoutes($routes);
  16368. }
  16369. /**
  16370. * Remove any duplicate middleware from the given array.
  16371. *
  16372. * @param array $middleware
  16373. * @return array
  16374. * @static
  16375. */
  16376. public static function uniqueMiddleware($middleware)
  16377. {
  16378. return \Illuminate\Routing\Router::uniqueMiddleware($middleware);
  16379. }
  16380. /**
  16381. * Set the container instance used by the router.
  16382. *
  16383. * @param \Illuminate\Container\Container $container
  16384. * @return \Illuminate\Routing\Router
  16385. * @static
  16386. */
  16387. public static function setContainer($container)
  16388. {
  16389. /** @var \Illuminate\Routing\Router $instance */
  16390. return $instance->setContainer($container);
  16391. }
  16392. /**
  16393. * Register a custom macro.
  16394. *
  16395. * @param string $name
  16396. * @param object|callable $macro
  16397. * @param-closure-this static $macro
  16398. * @return void
  16399. * @static
  16400. */
  16401. public static function macro($name, $macro)
  16402. {
  16403. \Illuminate\Routing\Router::macro($name, $macro);
  16404. }
  16405. /**
  16406. * Mix another object into the class.
  16407. *
  16408. * @param object $mixin
  16409. * @param bool $replace
  16410. * @return void
  16411. * @throws \ReflectionException
  16412. * @static
  16413. */
  16414. public static function mixin($mixin, $replace = true)
  16415. {
  16416. \Illuminate\Routing\Router::mixin($mixin, $replace);
  16417. }
  16418. /**
  16419. * Checks if macro is registered.
  16420. *
  16421. * @param string $name
  16422. * @return bool
  16423. * @static
  16424. */
  16425. public static function hasMacro($name)
  16426. {
  16427. return \Illuminate\Routing\Router::hasMacro($name);
  16428. }
  16429. /**
  16430. * Flush the existing macros.
  16431. *
  16432. * @return void
  16433. * @static
  16434. */
  16435. public static function flushMacros()
  16436. {
  16437. \Illuminate\Routing\Router::flushMacros();
  16438. }
  16439. /**
  16440. * Dynamically handle calls to the class.
  16441. *
  16442. * @param string $method
  16443. * @param array $parameters
  16444. * @return mixed
  16445. * @throws \BadMethodCallException
  16446. * @static
  16447. */
  16448. public static function macroCall($method, $parameters)
  16449. {
  16450. /** @var \Illuminate\Routing\Router $instance */
  16451. return $instance->macroCall($method, $parameters);
  16452. }
  16453. /**
  16454. * Call the given Closure with this instance then return the instance.
  16455. *
  16456. * @param (callable($this): mixed)|null $callback
  16457. * @return ($callback is null ? \Illuminate\Support\HigherOrderTapProxy : $this)
  16458. * @static
  16459. */
  16460. public static function tap($callback = null)
  16461. {
  16462. /** @var \Illuminate\Routing\Router $instance */
  16463. return $instance->tap($callback);
  16464. }
  16465. }
  16466. /**
  16467. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes withoutOverlapping(int $expiresAt = 1440)
  16468. * @method static void mergeAttributes(\Illuminate\Console\Scheduling\Event $event)
  16469. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes user(string $user)
  16470. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes environments(array|mixed $environments)
  16471. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes evenInMaintenanceMode()
  16472. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes onOneServer()
  16473. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes runInBackground()
  16474. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes when(\Closure|bool $callback)
  16475. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes skip(\Closure|bool $callback)
  16476. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes name(string $description)
  16477. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes description(string $description)
  16478. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes cron(string $expression)
  16479. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes between(string $startTime, string $endTime)
  16480. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes unlessBetween(string $startTime, string $endTime)
  16481. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everySecond()
  16482. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoSeconds()
  16483. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFiveSeconds()
  16484. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTenSeconds()
  16485. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFifteenSeconds()
  16486. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwentySeconds()
  16487. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThirtySeconds()
  16488. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyMinute()
  16489. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoMinutes()
  16490. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThreeMinutes()
  16491. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFourMinutes()
  16492. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFiveMinutes()
  16493. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTenMinutes()
  16494. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFifteenMinutes()
  16495. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThirtyMinutes()
  16496. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes hourly()
  16497. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes hourlyAt(array|string|int|int[] $offset)
  16498. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyOddHour(array|string|int $offset = 0)
  16499. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoHours(array|string|int $offset = 0)
  16500. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThreeHours(array|string|int $offset = 0)
  16501. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFourHours(array|string|int $offset = 0)
  16502. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everySixHours(array|string|int $offset = 0)
  16503. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes daily()
  16504. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes at(string $time)
  16505. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes dailyAt(string $time)
  16506. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceDaily(int $first = 1, int $second = 13)
  16507. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceDailyAt(int $first = 1, int $second = 13, int $offset = 0)
  16508. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekdays()
  16509. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekends()
  16510. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes mondays()
  16511. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes tuesdays()
  16512. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes wednesdays()
  16513. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes thursdays()
  16514. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes fridays()
  16515. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes saturdays()
  16516. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes sundays()
  16517. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekly()
  16518. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weeklyOn(array|mixed $dayOfWeek, string $time = '0:0')
  16519. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes monthly()
  16520. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes monthlyOn(int $dayOfMonth = 1, string $time = '0:0')
  16521. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceMonthly(int $first = 1, int $second = 16, string $time = '0:0')
  16522. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes lastDayOfMonth(string $time = '0:0')
  16523. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterly()
  16524. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterlyOn(int $dayOfQuarter = 1, string $time = '0:0')
  16525. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes yearly()
  16526. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes yearlyOn(int $month = 1, int|string $dayOfMonth = 1, string $time = '0:0')
  16527. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes days(array|mixed $days)
  16528. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes timezone(\DateTimeZone|string $timezone)
  16529. * @see \Illuminate\Console\Scheduling\Schedule
  16530. */
  16531. class Schedule {
  16532. /**
  16533. * Add a new callback event to the schedule.
  16534. *
  16535. * @param string|callable $callback
  16536. * @param array $parameters
  16537. * @return \Illuminate\Console\Scheduling\CallbackEvent
  16538. * @static
  16539. */
  16540. public static function call($callback, $parameters = [])
  16541. {
  16542. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16543. return $instance->call($callback, $parameters);
  16544. }
  16545. /**
  16546. * Add a new Artisan command event to the schedule.
  16547. *
  16548. * @param string $command
  16549. * @param array $parameters
  16550. * @return \Illuminate\Console\Scheduling\Event
  16551. * @static
  16552. */
  16553. public static function command($command, $parameters = [])
  16554. {
  16555. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16556. return $instance->command($command, $parameters);
  16557. }
  16558. /**
  16559. * Add a new job callback event to the schedule.
  16560. *
  16561. * @param object|string $job
  16562. * @param string|null $queue
  16563. * @param string|null $connection
  16564. * @return \Illuminate\Console\Scheduling\CallbackEvent
  16565. * @static
  16566. */
  16567. public static function job($job, $queue = null, $connection = null)
  16568. {
  16569. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16570. return $instance->job($job, $queue, $connection);
  16571. }
  16572. /**
  16573. * Add a new command event to the schedule.
  16574. *
  16575. * @param string $command
  16576. * @param array $parameters
  16577. * @return \Illuminate\Console\Scheduling\Event
  16578. * @static
  16579. */
  16580. public static function exec($command, $parameters = [])
  16581. {
  16582. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16583. return $instance->exec($command, $parameters);
  16584. }
  16585. /**
  16586. * Create new schedule group.
  16587. *
  16588. * @param \Illuminate\Console\Scheduling\Event $event
  16589. * @return void
  16590. * @throws \RuntimeException
  16591. * @static
  16592. */
  16593. public static function group($events)
  16594. {
  16595. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16596. $instance->group($events);
  16597. }
  16598. /**
  16599. * Compile array input for a command.
  16600. *
  16601. * @param string|int $key
  16602. * @param array $value
  16603. * @return string
  16604. * @static
  16605. */
  16606. public static function compileArrayInput($key, $value)
  16607. {
  16608. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16609. return $instance->compileArrayInput($key, $value);
  16610. }
  16611. /**
  16612. * Determine if the server is allowed to run this event.
  16613. *
  16614. * @param \Illuminate\Console\Scheduling\Event $event
  16615. * @param \DateTimeInterface $time
  16616. * @return bool
  16617. * @static
  16618. */
  16619. public static function serverShouldRun($event, $time)
  16620. {
  16621. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16622. return $instance->serverShouldRun($event, $time);
  16623. }
  16624. /**
  16625. * Get all of the events on the schedule that are due.
  16626. *
  16627. * @param \Illuminate\Contracts\Foundation\Application $app
  16628. * @return \Illuminate\Support\Collection
  16629. * @static
  16630. */
  16631. public static function dueEvents($app)
  16632. {
  16633. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16634. return $instance->dueEvents($app);
  16635. }
  16636. /**
  16637. * Get all of the events on the schedule.
  16638. *
  16639. * @return \Illuminate\Console\Scheduling\Event[]
  16640. * @static
  16641. */
  16642. public static function events()
  16643. {
  16644. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16645. return $instance->events();
  16646. }
  16647. /**
  16648. * Specify the cache store that should be used to store mutexes.
  16649. *
  16650. * @param string $store
  16651. * @return \Illuminate\Console\Scheduling\Schedule
  16652. * @static
  16653. */
  16654. public static function useCache($store)
  16655. {
  16656. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16657. return $instance->useCache($store);
  16658. }
  16659. /**
  16660. * Register a custom macro.
  16661. *
  16662. * @param string $name
  16663. * @param object|callable $macro
  16664. * @param-closure-this static $macro
  16665. * @return void
  16666. * @static
  16667. */
  16668. public static function macro($name, $macro)
  16669. {
  16670. \Illuminate\Console\Scheduling\Schedule::macro($name, $macro);
  16671. }
  16672. /**
  16673. * Mix another object into the class.
  16674. *
  16675. * @param object $mixin
  16676. * @param bool $replace
  16677. * @return void
  16678. * @throws \ReflectionException
  16679. * @static
  16680. */
  16681. public static function mixin($mixin, $replace = true)
  16682. {
  16683. \Illuminate\Console\Scheduling\Schedule::mixin($mixin, $replace);
  16684. }
  16685. /**
  16686. * Checks if macro is registered.
  16687. *
  16688. * @param string $name
  16689. * @return bool
  16690. * @static
  16691. */
  16692. public static function hasMacro($name)
  16693. {
  16694. return \Illuminate\Console\Scheduling\Schedule::hasMacro($name);
  16695. }
  16696. /**
  16697. * Flush the existing macros.
  16698. *
  16699. * @return void
  16700. * @static
  16701. */
  16702. public static function flushMacros()
  16703. {
  16704. \Illuminate\Console\Scheduling\Schedule::flushMacros();
  16705. }
  16706. /**
  16707. * Dynamically handle calls to the class.
  16708. *
  16709. * @param string $method
  16710. * @param array $parameters
  16711. * @return mixed
  16712. * @throws \BadMethodCallException
  16713. * @static
  16714. */
  16715. public static function macroCall($method, $parameters)
  16716. {
  16717. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16718. return $instance->macroCall($method, $parameters);
  16719. }
  16720. }
  16721. /**
  16722. * @see \Illuminate\Database\Schema\Builder
  16723. */
  16724. class Schema {
  16725. /**
  16726. * Drop all tables from the database.
  16727. *
  16728. * @return void
  16729. * @static
  16730. */
  16731. public static function dropAllTables()
  16732. {
  16733. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16734. $instance->dropAllTables();
  16735. }
  16736. /**
  16737. * Drop all views from the database.
  16738. *
  16739. * @return void
  16740. * @static
  16741. */
  16742. public static function dropAllViews()
  16743. {
  16744. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16745. $instance->dropAllViews();
  16746. }
  16747. /**
  16748. * Drop all types from the database.
  16749. *
  16750. * @return void
  16751. * @static
  16752. */
  16753. public static function dropAllTypes()
  16754. {
  16755. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16756. $instance->dropAllTypes();
  16757. }
  16758. /**
  16759. * Get the current schemas for the connection.
  16760. *
  16761. * @return string[]
  16762. * @static
  16763. */
  16764. public static function getCurrentSchemaListing()
  16765. {
  16766. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16767. return $instance->getCurrentSchemaListing();
  16768. }
  16769. /**
  16770. * Set the default string length for migrations.
  16771. *
  16772. * @param int $length
  16773. * @return void
  16774. * @static
  16775. */
  16776. public static function defaultStringLength($length)
  16777. {
  16778. //Method inherited from \Illuminate\Database\Schema\Builder
  16779. \Illuminate\Database\Schema\PostgresBuilder::defaultStringLength($length);
  16780. }
  16781. /**
  16782. * Set the default time precision for migrations.
  16783. *
  16784. * @static
  16785. */
  16786. public static function defaultTimePrecision($precision)
  16787. {
  16788. //Method inherited from \Illuminate\Database\Schema\Builder
  16789. return \Illuminate\Database\Schema\PostgresBuilder::defaultTimePrecision($precision);
  16790. }
  16791. /**
  16792. * Set the default morph key type for migrations.
  16793. *
  16794. * @param string $type
  16795. * @return void
  16796. * @throws \InvalidArgumentException
  16797. * @static
  16798. */
  16799. public static function defaultMorphKeyType($type)
  16800. {
  16801. //Method inherited from \Illuminate\Database\Schema\Builder
  16802. \Illuminate\Database\Schema\PostgresBuilder::defaultMorphKeyType($type);
  16803. }
  16804. /**
  16805. * Set the default morph key type for migrations to UUIDs.
  16806. *
  16807. * @return void
  16808. * @static
  16809. */
  16810. public static function morphUsingUuids()
  16811. {
  16812. //Method inherited from \Illuminate\Database\Schema\Builder
  16813. \Illuminate\Database\Schema\PostgresBuilder::morphUsingUuids();
  16814. }
  16815. /**
  16816. * Set the default morph key type for migrations to ULIDs.
  16817. *
  16818. * @return void
  16819. * @static
  16820. */
  16821. public static function morphUsingUlids()
  16822. {
  16823. //Method inherited from \Illuminate\Database\Schema\Builder
  16824. \Illuminate\Database\Schema\PostgresBuilder::morphUsingUlids();
  16825. }
  16826. /**
  16827. * Create a database in the schema.
  16828. *
  16829. * @param string $name
  16830. * @return bool
  16831. * @static
  16832. */
  16833. public static function createDatabase($name)
  16834. {
  16835. //Method inherited from \Illuminate\Database\Schema\Builder
  16836. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16837. return $instance->createDatabase($name);
  16838. }
  16839. /**
  16840. * Drop a database from the schema if the database exists.
  16841. *
  16842. * @param string $name
  16843. * @return bool
  16844. * @static
  16845. */
  16846. public static function dropDatabaseIfExists($name)
  16847. {
  16848. //Method inherited from \Illuminate\Database\Schema\Builder
  16849. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16850. return $instance->dropDatabaseIfExists($name);
  16851. }
  16852. /**
  16853. * Get the schemas that belong to the connection.
  16854. *
  16855. * @return \Illuminate\Database\Schema\list<array{name: string, path: string|null, default: bool}>
  16856. * @static
  16857. */
  16858. public static function getSchemas()
  16859. {
  16860. //Method inherited from \Illuminate\Database\Schema\Builder
  16861. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16862. return $instance->getSchemas();
  16863. }
  16864. /**
  16865. * Determine if the given table exists.
  16866. *
  16867. * @param string $table
  16868. * @return bool
  16869. * @static
  16870. */
  16871. public static function hasTable($table)
  16872. {
  16873. //Method inherited from \Illuminate\Database\Schema\Builder
  16874. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16875. return $instance->hasTable($table);
  16876. }
  16877. /**
  16878. * Determine if the given view exists.
  16879. *
  16880. * @param string $view
  16881. * @return bool
  16882. * @static
  16883. */
  16884. public static function hasView($view)
  16885. {
  16886. //Method inherited from \Illuminate\Database\Schema\Builder
  16887. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16888. return $instance->hasView($view);
  16889. }
  16890. /**
  16891. * Get the tables that belong to the connection.
  16892. *
  16893. * @param string|string[]|null $schema
  16894. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string|null, schema_qualified_name: string, size: int|null, comment: string|null, collation: string|null, engine: string|null}>
  16895. * @static
  16896. */
  16897. public static function getTables($schema = null)
  16898. {
  16899. //Method inherited from \Illuminate\Database\Schema\Builder
  16900. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16901. return $instance->getTables($schema);
  16902. }
  16903. /**
  16904. * Get the names of the tables that belong to the connection.
  16905. *
  16906. * @param string|string[]|null $schema
  16907. * @param bool $schemaQualified
  16908. * @return list<string>
  16909. * @static
  16910. */
  16911. public static function getTableListing($schema = null, $schemaQualified = true)
  16912. {
  16913. //Method inherited from \Illuminate\Database\Schema\Builder
  16914. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16915. return $instance->getTableListing($schema, $schemaQualified);
  16916. }
  16917. /**
  16918. * Get the views that belong to the connection.
  16919. *
  16920. * @param string|string[]|null $schema
  16921. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string|null, schema_qualified_name: string, definition: string}>
  16922. * @static
  16923. */
  16924. public static function getViews($schema = null)
  16925. {
  16926. //Method inherited from \Illuminate\Database\Schema\Builder
  16927. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16928. return $instance->getViews($schema);
  16929. }
  16930. /**
  16931. * Get the user-defined types that belong to the connection.
  16932. *
  16933. * @param string|string[]|null $schema
  16934. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string, type: string, type: string, category: string, implicit: bool}>
  16935. * @static
  16936. */
  16937. public static function getTypes($schema = null)
  16938. {
  16939. //Method inherited from \Illuminate\Database\Schema\Builder
  16940. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16941. return $instance->getTypes($schema);
  16942. }
  16943. /**
  16944. * Determine if the given table has a given column.
  16945. *
  16946. * @param string $table
  16947. * @param string $column
  16948. * @return bool
  16949. * @static
  16950. */
  16951. public static function hasColumn($table, $column)
  16952. {
  16953. //Method inherited from \Illuminate\Database\Schema\Builder
  16954. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16955. return $instance->hasColumn($table, $column);
  16956. }
  16957. /**
  16958. * Determine if the given table has given columns.
  16959. *
  16960. * @param string $table
  16961. * @param array<string> $columns
  16962. * @return bool
  16963. * @static
  16964. */
  16965. public static function hasColumns($table, $columns)
  16966. {
  16967. //Method inherited from \Illuminate\Database\Schema\Builder
  16968. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16969. return $instance->hasColumns($table, $columns);
  16970. }
  16971. /**
  16972. * Execute a table builder callback if the given table has a given column.
  16973. *
  16974. * @param string $table
  16975. * @param string $column
  16976. * @param \Closure $callback
  16977. * @return void
  16978. * @static
  16979. */
  16980. public static function whenTableHasColumn($table, $column, $callback)
  16981. {
  16982. //Method inherited from \Illuminate\Database\Schema\Builder
  16983. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16984. $instance->whenTableHasColumn($table, $column, $callback);
  16985. }
  16986. /**
  16987. * Execute a table builder callback if the given table doesn't have a given column.
  16988. *
  16989. * @param string $table
  16990. * @param string $column
  16991. * @param \Closure $callback
  16992. * @return void
  16993. * @static
  16994. */
  16995. public static function whenTableDoesntHaveColumn($table, $column, $callback)
  16996. {
  16997. //Method inherited from \Illuminate\Database\Schema\Builder
  16998. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16999. $instance->whenTableDoesntHaveColumn($table, $column, $callback);
  17000. }
  17001. /**
  17002. * Get the data type for the given column name.
  17003. *
  17004. * @param string $table
  17005. * @param string $column
  17006. * @param bool $fullDefinition
  17007. * @return string
  17008. * @static
  17009. */
  17010. public static function getColumnType($table, $column, $fullDefinition = false)
  17011. {
  17012. //Method inherited from \Illuminate\Database\Schema\Builder
  17013. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17014. return $instance->getColumnType($table, $column, $fullDefinition);
  17015. }
  17016. /**
  17017. * Get the column listing for a given table.
  17018. *
  17019. * @param string $table
  17020. * @return list<string>
  17021. * @static
  17022. */
  17023. public static function getColumnListing($table)
  17024. {
  17025. //Method inherited from \Illuminate\Database\Schema\Builder
  17026. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17027. return $instance->getColumnListing($table);
  17028. }
  17029. /**
  17030. * Get the columns for a given table.
  17031. *
  17032. * @param string $table
  17033. * @return \Illuminate\Database\Schema\list<array{name: string, type: string, type_name: string, nullable: bool, default: mixed, auto_increment: bool, comment: string|null, generation: array{type: string, expression: string|null}|null}>
  17034. * @static
  17035. */
  17036. public static function getColumns($table)
  17037. {
  17038. //Method inherited from \Illuminate\Database\Schema\Builder
  17039. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17040. return $instance->getColumns($table);
  17041. }
  17042. /**
  17043. * Get the indexes for a given table.
  17044. *
  17045. * @param string $table
  17046. * @return \Illuminate\Database\Schema\list<array{name: string, columns: list<string>, type: string, unique: bool, primary: bool}>
  17047. * @static
  17048. */
  17049. public static function getIndexes($table)
  17050. {
  17051. //Method inherited from \Illuminate\Database\Schema\Builder
  17052. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17053. return $instance->getIndexes($table);
  17054. }
  17055. /**
  17056. * Get the names of the indexes for a given table.
  17057. *
  17058. * @param string $table
  17059. * @return list<string>
  17060. * @static
  17061. */
  17062. public static function getIndexListing($table)
  17063. {
  17064. //Method inherited from \Illuminate\Database\Schema\Builder
  17065. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17066. return $instance->getIndexListing($table);
  17067. }
  17068. /**
  17069. * Determine if the given table has a given index.
  17070. *
  17071. * @param string $table
  17072. * @param string|array $index
  17073. * @param string|null $type
  17074. * @return bool
  17075. * @static
  17076. */
  17077. public static function hasIndex($table, $index, $type = null)
  17078. {
  17079. //Method inherited from \Illuminate\Database\Schema\Builder
  17080. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17081. return $instance->hasIndex($table, $index, $type);
  17082. }
  17083. /**
  17084. * Get the foreign keys for a given table.
  17085. *
  17086. * @param string $table
  17087. * @return array
  17088. * @static
  17089. */
  17090. public static function getForeignKeys($table)
  17091. {
  17092. //Method inherited from \Illuminate\Database\Schema\Builder
  17093. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17094. return $instance->getForeignKeys($table);
  17095. }
  17096. /**
  17097. * Modify a table on the schema.
  17098. *
  17099. * @param string $table
  17100. * @param \Closure $callback
  17101. * @return void
  17102. * @static
  17103. */
  17104. public static function table($table, $callback)
  17105. {
  17106. //Method inherited from \Illuminate\Database\Schema\Builder
  17107. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17108. $instance->table($table, $callback);
  17109. }
  17110. /**
  17111. * Create a new table on the schema.
  17112. *
  17113. * @param string $table
  17114. * @param \Closure $callback
  17115. * @return void
  17116. * @static
  17117. */
  17118. public static function create($table, $callback)
  17119. {
  17120. //Method inherited from \Illuminate\Database\Schema\Builder
  17121. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17122. $instance->create($table, $callback);
  17123. }
  17124. /**
  17125. * Drop a table from the schema.
  17126. *
  17127. * @param string $table
  17128. * @return void
  17129. * @static
  17130. */
  17131. public static function drop($table)
  17132. {
  17133. //Method inherited from \Illuminate\Database\Schema\Builder
  17134. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17135. $instance->drop($table);
  17136. }
  17137. /**
  17138. * Drop a table from the schema if it exists.
  17139. *
  17140. * @param string $table
  17141. * @return void
  17142. * @static
  17143. */
  17144. public static function dropIfExists($table)
  17145. {
  17146. //Method inherited from \Illuminate\Database\Schema\Builder
  17147. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17148. $instance->dropIfExists($table);
  17149. }
  17150. /**
  17151. * Drop columns from a table schema.
  17152. *
  17153. * @param string $table
  17154. * @param string|array<string> $columns
  17155. * @return void
  17156. * @static
  17157. */
  17158. public static function dropColumns($table, $columns)
  17159. {
  17160. //Method inherited from \Illuminate\Database\Schema\Builder
  17161. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17162. $instance->dropColumns($table, $columns);
  17163. }
  17164. /**
  17165. * Rename a table on the schema.
  17166. *
  17167. * @param string $from
  17168. * @param string $to
  17169. * @return void
  17170. * @static
  17171. */
  17172. public static function rename($from, $to)
  17173. {
  17174. //Method inherited from \Illuminate\Database\Schema\Builder
  17175. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17176. $instance->rename($from, $to);
  17177. }
  17178. /**
  17179. * Enable foreign key constraints.
  17180. *
  17181. * @return bool
  17182. * @static
  17183. */
  17184. public static function enableForeignKeyConstraints()
  17185. {
  17186. //Method inherited from \Illuminate\Database\Schema\Builder
  17187. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17188. return $instance->enableForeignKeyConstraints();
  17189. }
  17190. /**
  17191. * Disable foreign key constraints.
  17192. *
  17193. * @return bool
  17194. * @static
  17195. */
  17196. public static function disableForeignKeyConstraints()
  17197. {
  17198. //Method inherited from \Illuminate\Database\Schema\Builder
  17199. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17200. return $instance->disableForeignKeyConstraints();
  17201. }
  17202. /**
  17203. * Disable foreign key constraints during the execution of a callback.
  17204. *
  17205. * @param \Closure $callback
  17206. * @return mixed
  17207. * @static
  17208. */
  17209. public static function withoutForeignKeyConstraints($callback)
  17210. {
  17211. //Method inherited from \Illuminate\Database\Schema\Builder
  17212. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17213. return $instance->withoutForeignKeyConstraints($callback);
  17214. }
  17215. /**
  17216. * Get the default schema name for the connection.
  17217. *
  17218. * @return string|null
  17219. * @static
  17220. */
  17221. public static function getCurrentSchemaName()
  17222. {
  17223. //Method inherited from \Illuminate\Database\Schema\Builder
  17224. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17225. return $instance->getCurrentSchemaName();
  17226. }
  17227. /**
  17228. * Parse the given database object reference and extract the schema and table.
  17229. *
  17230. * @param string $reference
  17231. * @param string|bool|null $withDefaultSchema
  17232. * @return array
  17233. * @static
  17234. */
  17235. public static function parseSchemaAndTable($reference, $withDefaultSchema = null)
  17236. {
  17237. //Method inherited from \Illuminate\Database\Schema\Builder
  17238. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17239. return $instance->parseSchemaAndTable($reference, $withDefaultSchema);
  17240. }
  17241. /**
  17242. * Get the database connection instance.
  17243. *
  17244. * @return \Illuminate\Database\Connection
  17245. * @static
  17246. */
  17247. public static function getConnection()
  17248. {
  17249. //Method inherited from \Illuminate\Database\Schema\Builder
  17250. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17251. return $instance->getConnection();
  17252. }
  17253. /**
  17254. * Set the Schema Blueprint resolver callback.
  17255. *
  17256. * @param \Closure(string, \Closure, string): \Illuminate\Database\Schema\Blueprint|null $resolver
  17257. * @return void
  17258. * @static
  17259. */
  17260. public static function blueprintResolver($resolver)
  17261. {
  17262. //Method inherited from \Illuminate\Database\Schema\Builder
  17263. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17264. $instance->blueprintResolver($resolver);
  17265. }
  17266. /**
  17267. * Register a custom macro.
  17268. *
  17269. * @param string $name
  17270. * @param object|callable $macro
  17271. * @param-closure-this static $macro
  17272. * @return void
  17273. * @static
  17274. */
  17275. public static function macro($name, $macro)
  17276. {
  17277. //Method inherited from \Illuminate\Database\Schema\Builder
  17278. \Illuminate\Database\Schema\PostgresBuilder::macro($name, $macro);
  17279. }
  17280. /**
  17281. * Mix another object into the class.
  17282. *
  17283. * @param object $mixin
  17284. * @param bool $replace
  17285. * @return void
  17286. * @throws \ReflectionException
  17287. * @static
  17288. */
  17289. public static function mixin($mixin, $replace = true)
  17290. {
  17291. //Method inherited from \Illuminate\Database\Schema\Builder
  17292. \Illuminate\Database\Schema\PostgresBuilder::mixin($mixin, $replace);
  17293. }
  17294. /**
  17295. * Checks if macro is registered.
  17296. *
  17297. * @param string $name
  17298. * @return bool
  17299. * @static
  17300. */
  17301. public static function hasMacro($name)
  17302. {
  17303. //Method inherited from \Illuminate\Database\Schema\Builder
  17304. return \Illuminate\Database\Schema\PostgresBuilder::hasMacro($name);
  17305. }
  17306. /**
  17307. * Flush the existing macros.
  17308. *
  17309. * @return void
  17310. * @static
  17311. */
  17312. public static function flushMacros()
  17313. {
  17314. //Method inherited from \Illuminate\Database\Schema\Builder
  17315. \Illuminate\Database\Schema\PostgresBuilder::flushMacros();
  17316. }
  17317. }
  17318. /**
  17319. * @see \Illuminate\Session\SessionManager
  17320. */
  17321. class Session {
  17322. /**
  17323. * Determine if requests for the same session should wait for each to finish before executing.
  17324. *
  17325. * @return bool
  17326. * @static
  17327. */
  17328. public static function shouldBlock()
  17329. {
  17330. /** @var \Illuminate\Session\SessionManager $instance */
  17331. return $instance->shouldBlock();
  17332. }
  17333. /**
  17334. * Get the name of the cache store / driver that should be used to acquire session locks.
  17335. *
  17336. * @return string|null
  17337. * @static
  17338. */
  17339. public static function blockDriver()
  17340. {
  17341. /** @var \Illuminate\Session\SessionManager $instance */
  17342. return $instance->blockDriver();
  17343. }
  17344. /**
  17345. * Get the maximum number of seconds the session lock should be held for.
  17346. *
  17347. * @return int
  17348. * @static
  17349. */
  17350. public static function defaultRouteBlockLockSeconds()
  17351. {
  17352. /** @var \Illuminate\Session\SessionManager $instance */
  17353. return $instance->defaultRouteBlockLockSeconds();
  17354. }
  17355. /**
  17356. * Get the maximum number of seconds to wait while attempting to acquire a route block session lock.
  17357. *
  17358. * @return int
  17359. * @static
  17360. */
  17361. public static function defaultRouteBlockWaitSeconds()
  17362. {
  17363. /** @var \Illuminate\Session\SessionManager $instance */
  17364. return $instance->defaultRouteBlockWaitSeconds();
  17365. }
  17366. /**
  17367. * Get the session configuration.
  17368. *
  17369. * @return array
  17370. * @static
  17371. */
  17372. public static function getSessionConfig()
  17373. {
  17374. /** @var \Illuminate\Session\SessionManager $instance */
  17375. return $instance->getSessionConfig();
  17376. }
  17377. /**
  17378. * Get the default session driver name.
  17379. *
  17380. * @return string
  17381. * @static
  17382. */
  17383. public static function getDefaultDriver()
  17384. {
  17385. /** @var \Illuminate\Session\SessionManager $instance */
  17386. return $instance->getDefaultDriver();
  17387. }
  17388. /**
  17389. * Set the default session driver name.
  17390. *
  17391. * @param string $name
  17392. * @return void
  17393. * @static
  17394. */
  17395. public static function setDefaultDriver($name)
  17396. {
  17397. /** @var \Illuminate\Session\SessionManager $instance */
  17398. $instance->setDefaultDriver($name);
  17399. }
  17400. /**
  17401. * Get a driver instance.
  17402. *
  17403. * @param string|null $driver
  17404. * @return mixed
  17405. * @throws \InvalidArgumentException
  17406. * @static
  17407. */
  17408. public static function driver($driver = null)
  17409. {
  17410. //Method inherited from \Illuminate\Support\Manager
  17411. /** @var \Illuminate\Session\SessionManager $instance */
  17412. return $instance->driver($driver);
  17413. }
  17414. /**
  17415. * Register a custom driver creator Closure.
  17416. *
  17417. * @param string $driver
  17418. * @param \Closure $callback
  17419. * @return \Illuminate\Session\SessionManager
  17420. * @static
  17421. */
  17422. public static function extend($driver, $callback)
  17423. {
  17424. //Method inherited from \Illuminate\Support\Manager
  17425. /** @var \Illuminate\Session\SessionManager $instance */
  17426. return $instance->extend($driver, $callback);
  17427. }
  17428. /**
  17429. * Get all of the created "drivers".
  17430. *
  17431. * @return array
  17432. * @static
  17433. */
  17434. public static function getDrivers()
  17435. {
  17436. //Method inherited from \Illuminate\Support\Manager
  17437. /** @var \Illuminate\Session\SessionManager $instance */
  17438. return $instance->getDrivers();
  17439. }
  17440. /**
  17441. * Get the container instance used by the manager.
  17442. *
  17443. * @return \Illuminate\Contracts\Container\Container
  17444. * @static
  17445. */
  17446. public static function getContainer()
  17447. {
  17448. //Method inherited from \Illuminate\Support\Manager
  17449. /** @var \Illuminate\Session\SessionManager $instance */
  17450. return $instance->getContainer();
  17451. }
  17452. /**
  17453. * Set the container instance used by the manager.
  17454. *
  17455. * @param \Illuminate\Contracts\Container\Container $container
  17456. * @return \Illuminate\Session\SessionManager
  17457. * @static
  17458. */
  17459. public static function setContainer($container)
  17460. {
  17461. //Method inherited from \Illuminate\Support\Manager
  17462. /** @var \Illuminate\Session\SessionManager $instance */
  17463. return $instance->setContainer($container);
  17464. }
  17465. /**
  17466. * Forget all of the resolved driver instances.
  17467. *
  17468. * @return \Illuminate\Session\SessionManager
  17469. * @static
  17470. */
  17471. public static function forgetDrivers()
  17472. {
  17473. //Method inherited from \Illuminate\Support\Manager
  17474. /** @var \Illuminate\Session\SessionManager $instance */
  17475. return $instance->forgetDrivers();
  17476. }
  17477. /**
  17478. * Start the session, reading the data from a handler.
  17479. *
  17480. * @return bool
  17481. * @static
  17482. */
  17483. public static function start()
  17484. {
  17485. /** @var \Illuminate\Session\Store $instance */
  17486. return $instance->start();
  17487. }
  17488. /**
  17489. * Save the session data to storage.
  17490. *
  17491. * @return void
  17492. * @static
  17493. */
  17494. public static function save()
  17495. {
  17496. /** @var \Illuminate\Session\Store $instance */
  17497. $instance->save();
  17498. }
  17499. /**
  17500. * Age the flash data for the session.
  17501. *
  17502. * @return void
  17503. * @static
  17504. */
  17505. public static function ageFlashData()
  17506. {
  17507. /** @var \Illuminate\Session\Store $instance */
  17508. $instance->ageFlashData();
  17509. }
  17510. /**
  17511. * Get all of the session data.
  17512. *
  17513. * @return array
  17514. * @static
  17515. */
  17516. public static function all()
  17517. {
  17518. /** @var \Illuminate\Session\Store $instance */
  17519. return $instance->all();
  17520. }
  17521. /**
  17522. * Get a subset of the session data.
  17523. *
  17524. * @param array $keys
  17525. * @return array
  17526. * @static
  17527. */
  17528. public static function only($keys)
  17529. {
  17530. /** @var \Illuminate\Session\Store $instance */
  17531. return $instance->only($keys);
  17532. }
  17533. /**
  17534. * Get all the session data except for a specified array of items.
  17535. *
  17536. * @param array $keys
  17537. * @return array
  17538. * @static
  17539. */
  17540. public static function except($keys)
  17541. {
  17542. /** @var \Illuminate\Session\Store $instance */
  17543. return $instance->except($keys);
  17544. }
  17545. /**
  17546. * Checks if a key exists.
  17547. *
  17548. * @param string|array $key
  17549. * @return bool
  17550. * @static
  17551. */
  17552. public static function exists($key)
  17553. {
  17554. /** @var \Illuminate\Session\Store $instance */
  17555. return $instance->exists($key);
  17556. }
  17557. /**
  17558. * Determine if the given key is missing from the session data.
  17559. *
  17560. * @param string|array $key
  17561. * @return bool
  17562. * @static
  17563. */
  17564. public static function missing($key)
  17565. {
  17566. /** @var \Illuminate\Session\Store $instance */
  17567. return $instance->missing($key);
  17568. }
  17569. /**
  17570. * Determine if a key is present and not null.
  17571. *
  17572. * @param string|array $key
  17573. * @return bool
  17574. * @static
  17575. */
  17576. public static function has($key)
  17577. {
  17578. /** @var \Illuminate\Session\Store $instance */
  17579. return $instance->has($key);
  17580. }
  17581. /**
  17582. * Determine if any of the given keys are present and not null.
  17583. *
  17584. * @param string|array $key
  17585. * @return bool
  17586. * @static
  17587. */
  17588. public static function hasAny($key)
  17589. {
  17590. /** @var \Illuminate\Session\Store $instance */
  17591. return $instance->hasAny($key);
  17592. }
  17593. /**
  17594. * Get an item from the session.
  17595. *
  17596. * @param string $key
  17597. * @param mixed $default
  17598. * @return mixed
  17599. * @static
  17600. */
  17601. public static function get($key, $default = null)
  17602. {
  17603. /** @var \Illuminate\Session\Store $instance */
  17604. return $instance->get($key, $default);
  17605. }
  17606. /**
  17607. * Get the value of a given key and then forget it.
  17608. *
  17609. * @param string $key
  17610. * @param mixed $default
  17611. * @return mixed
  17612. * @static
  17613. */
  17614. public static function pull($key, $default = null)
  17615. {
  17616. /** @var \Illuminate\Session\Store $instance */
  17617. return $instance->pull($key, $default);
  17618. }
  17619. /**
  17620. * Determine if the session contains old input.
  17621. *
  17622. * @param string|null $key
  17623. * @return bool
  17624. * @static
  17625. */
  17626. public static function hasOldInput($key = null)
  17627. {
  17628. /** @var \Illuminate\Session\Store $instance */
  17629. return $instance->hasOldInput($key);
  17630. }
  17631. /**
  17632. * Get the requested item from the flashed input array.
  17633. *
  17634. * @param string|null $key
  17635. * @param mixed $default
  17636. * @return mixed
  17637. * @static
  17638. */
  17639. public static function getOldInput($key = null, $default = null)
  17640. {
  17641. /** @var \Illuminate\Session\Store $instance */
  17642. return $instance->getOldInput($key, $default);
  17643. }
  17644. /**
  17645. * Replace the given session attributes entirely.
  17646. *
  17647. * @param array $attributes
  17648. * @return void
  17649. * @static
  17650. */
  17651. public static function replace($attributes)
  17652. {
  17653. /** @var \Illuminate\Session\Store $instance */
  17654. $instance->replace($attributes);
  17655. }
  17656. /**
  17657. * Put a key / value pair or array of key / value pairs in the session.
  17658. *
  17659. * @param string|array $key
  17660. * @param mixed $value
  17661. * @return void
  17662. * @static
  17663. */
  17664. public static function put($key, $value = null)
  17665. {
  17666. /** @var \Illuminate\Session\Store $instance */
  17667. $instance->put($key, $value);
  17668. }
  17669. /**
  17670. * Get an item from the session, or store the default value.
  17671. *
  17672. * @param string $key
  17673. * @param \Closure $callback
  17674. * @return mixed
  17675. * @static
  17676. */
  17677. public static function remember($key, $callback)
  17678. {
  17679. /** @var \Illuminate\Session\Store $instance */
  17680. return $instance->remember($key, $callback);
  17681. }
  17682. /**
  17683. * Push a value onto a session array.
  17684. *
  17685. * @param string $key
  17686. * @param mixed $value
  17687. * @return void
  17688. * @static
  17689. */
  17690. public static function push($key, $value)
  17691. {
  17692. /** @var \Illuminate\Session\Store $instance */
  17693. $instance->push($key, $value);
  17694. }
  17695. /**
  17696. * Increment the value of an item in the session.
  17697. *
  17698. * @param string $key
  17699. * @param int $amount
  17700. * @return mixed
  17701. * @static
  17702. */
  17703. public static function increment($key, $amount = 1)
  17704. {
  17705. /** @var \Illuminate\Session\Store $instance */
  17706. return $instance->increment($key, $amount);
  17707. }
  17708. /**
  17709. * Decrement the value of an item in the session.
  17710. *
  17711. * @param string $key
  17712. * @param int $amount
  17713. * @return int
  17714. * @static
  17715. */
  17716. public static function decrement($key, $amount = 1)
  17717. {
  17718. /** @var \Illuminate\Session\Store $instance */
  17719. return $instance->decrement($key, $amount);
  17720. }
  17721. /**
  17722. * Flash a key / value pair to the session.
  17723. *
  17724. * @param string $key
  17725. * @param mixed $value
  17726. * @return void
  17727. * @static
  17728. */
  17729. public static function flash($key, $value = true)
  17730. {
  17731. /** @var \Illuminate\Session\Store $instance */
  17732. $instance->flash($key, $value);
  17733. }
  17734. /**
  17735. * Flash a key / value pair to the session for immediate use.
  17736. *
  17737. * @param string $key
  17738. * @param mixed $value
  17739. * @return void
  17740. * @static
  17741. */
  17742. public static function now($key, $value)
  17743. {
  17744. /** @var \Illuminate\Session\Store $instance */
  17745. $instance->now($key, $value);
  17746. }
  17747. /**
  17748. * Reflash all of the session flash data.
  17749. *
  17750. * @return void
  17751. * @static
  17752. */
  17753. public static function reflash()
  17754. {
  17755. /** @var \Illuminate\Session\Store $instance */
  17756. $instance->reflash();
  17757. }
  17758. /**
  17759. * Reflash a subset of the current flash data.
  17760. *
  17761. * @param array|mixed $keys
  17762. * @return void
  17763. * @static
  17764. */
  17765. public static function keep($keys = null)
  17766. {
  17767. /** @var \Illuminate\Session\Store $instance */
  17768. $instance->keep($keys);
  17769. }
  17770. /**
  17771. * Flash an input array to the session.
  17772. *
  17773. * @param array $value
  17774. * @return void
  17775. * @static
  17776. */
  17777. public static function flashInput($value)
  17778. {
  17779. /** @var \Illuminate\Session\Store $instance */
  17780. $instance->flashInput($value);
  17781. }
  17782. /**
  17783. * Remove an item from the session, returning its value.
  17784. *
  17785. * @param string $key
  17786. * @return mixed
  17787. * @static
  17788. */
  17789. public static function remove($key)
  17790. {
  17791. /** @var \Illuminate\Session\Store $instance */
  17792. return $instance->remove($key);
  17793. }
  17794. /**
  17795. * Remove one or many items from the session.
  17796. *
  17797. * @param string|array $keys
  17798. * @return void
  17799. * @static
  17800. */
  17801. public static function forget($keys)
  17802. {
  17803. /** @var \Illuminate\Session\Store $instance */
  17804. $instance->forget($keys);
  17805. }
  17806. /**
  17807. * Remove all of the items from the session.
  17808. *
  17809. * @return void
  17810. * @static
  17811. */
  17812. public static function flush()
  17813. {
  17814. /** @var \Illuminate\Session\Store $instance */
  17815. $instance->flush();
  17816. }
  17817. /**
  17818. * Flush the session data and regenerate the ID.
  17819. *
  17820. * @return bool
  17821. * @static
  17822. */
  17823. public static function invalidate()
  17824. {
  17825. /** @var \Illuminate\Session\Store $instance */
  17826. return $instance->invalidate();
  17827. }
  17828. /**
  17829. * Generate a new session identifier.
  17830. *
  17831. * @param bool $destroy
  17832. * @return bool
  17833. * @static
  17834. */
  17835. public static function regenerate($destroy = false)
  17836. {
  17837. /** @var \Illuminate\Session\Store $instance */
  17838. return $instance->regenerate($destroy);
  17839. }
  17840. /**
  17841. * Generate a new session ID for the session.
  17842. *
  17843. * @param bool $destroy
  17844. * @return bool
  17845. * @static
  17846. */
  17847. public static function migrate($destroy = false)
  17848. {
  17849. /** @var \Illuminate\Session\Store $instance */
  17850. return $instance->migrate($destroy);
  17851. }
  17852. /**
  17853. * Determine if the session has been started.
  17854. *
  17855. * @return bool
  17856. * @static
  17857. */
  17858. public static function isStarted()
  17859. {
  17860. /** @var \Illuminate\Session\Store $instance */
  17861. return $instance->isStarted();
  17862. }
  17863. /**
  17864. * Get the name of the session.
  17865. *
  17866. * @return string
  17867. * @static
  17868. */
  17869. public static function getName()
  17870. {
  17871. /** @var \Illuminate\Session\Store $instance */
  17872. return $instance->getName();
  17873. }
  17874. /**
  17875. * Set the name of the session.
  17876. *
  17877. * @param string $name
  17878. * @return void
  17879. * @static
  17880. */
  17881. public static function setName($name)
  17882. {
  17883. /** @var \Illuminate\Session\Store $instance */
  17884. $instance->setName($name);
  17885. }
  17886. /**
  17887. * Get the current session ID.
  17888. *
  17889. * @return string
  17890. * @static
  17891. */
  17892. public static function id()
  17893. {
  17894. /** @var \Illuminate\Session\Store $instance */
  17895. return $instance->id();
  17896. }
  17897. /**
  17898. * Get the current session ID.
  17899. *
  17900. * @return string
  17901. * @static
  17902. */
  17903. public static function getId()
  17904. {
  17905. /** @var \Illuminate\Session\Store $instance */
  17906. return $instance->getId();
  17907. }
  17908. /**
  17909. * Set the session ID.
  17910. *
  17911. * @param string|null $id
  17912. * @return void
  17913. * @static
  17914. */
  17915. public static function setId($id)
  17916. {
  17917. /** @var \Illuminate\Session\Store $instance */
  17918. $instance->setId($id);
  17919. }
  17920. /**
  17921. * Determine if this is a valid session ID.
  17922. *
  17923. * @param string|null $id
  17924. * @return bool
  17925. * @static
  17926. */
  17927. public static function isValidId($id)
  17928. {
  17929. /** @var \Illuminate\Session\Store $instance */
  17930. return $instance->isValidId($id);
  17931. }
  17932. /**
  17933. * Set the existence of the session on the handler if applicable.
  17934. *
  17935. * @param bool $value
  17936. * @return void
  17937. * @static
  17938. */
  17939. public static function setExists($value)
  17940. {
  17941. /** @var \Illuminate\Session\Store $instance */
  17942. $instance->setExists($value);
  17943. }
  17944. /**
  17945. * Get the CSRF token value.
  17946. *
  17947. * @return string
  17948. * @static
  17949. */
  17950. public static function token()
  17951. {
  17952. /** @var \Illuminate\Session\Store $instance */
  17953. return $instance->token();
  17954. }
  17955. /**
  17956. * Regenerate the CSRF token value.
  17957. *
  17958. * @return void
  17959. * @static
  17960. */
  17961. public static function regenerateToken()
  17962. {
  17963. /** @var \Illuminate\Session\Store $instance */
  17964. $instance->regenerateToken();
  17965. }
  17966. /**
  17967. * Determine if the previous URI is available.
  17968. *
  17969. * @return bool
  17970. * @static
  17971. */
  17972. public static function hasPreviousUri()
  17973. {
  17974. /** @var \Illuminate\Session\Store $instance */
  17975. return $instance->hasPreviousUri();
  17976. }
  17977. /**
  17978. * Get the previous URL from the session as a URI instance.
  17979. *
  17980. * @return \Illuminate\Support\Uri
  17981. * @throws \RuntimeException
  17982. * @static
  17983. */
  17984. public static function previousUri()
  17985. {
  17986. /** @var \Illuminate\Session\Store $instance */
  17987. return $instance->previousUri();
  17988. }
  17989. /**
  17990. * Get the previous URL from the session.
  17991. *
  17992. * @return string|null
  17993. * @static
  17994. */
  17995. public static function previousUrl()
  17996. {
  17997. /** @var \Illuminate\Session\Store $instance */
  17998. return $instance->previousUrl();
  17999. }
  18000. /**
  18001. * Set the "previous" URL in the session.
  18002. *
  18003. * @param string $url
  18004. * @return void
  18005. * @static
  18006. */
  18007. public static function setPreviousUrl($url)
  18008. {
  18009. /** @var \Illuminate\Session\Store $instance */
  18010. $instance->setPreviousUrl($url);
  18011. }
  18012. /**
  18013. * Specify that the user has confirmed their password.
  18014. *
  18015. * @return void
  18016. * @static
  18017. */
  18018. public static function passwordConfirmed()
  18019. {
  18020. /** @var \Illuminate\Session\Store $instance */
  18021. $instance->passwordConfirmed();
  18022. }
  18023. /**
  18024. * Get the underlying session handler implementation.
  18025. *
  18026. * @return \SessionHandlerInterface
  18027. * @static
  18028. */
  18029. public static function getHandler()
  18030. {
  18031. /** @var \Illuminate\Session\Store $instance */
  18032. return $instance->getHandler();
  18033. }
  18034. /**
  18035. * Set the underlying session handler implementation.
  18036. *
  18037. * @param \SessionHandlerInterface $handler
  18038. * @return \SessionHandlerInterface
  18039. * @static
  18040. */
  18041. public static function setHandler($handler)
  18042. {
  18043. /** @var \Illuminate\Session\Store $instance */
  18044. return $instance->setHandler($handler);
  18045. }
  18046. /**
  18047. * Determine if the session handler needs a request.
  18048. *
  18049. * @return bool
  18050. * @static
  18051. */
  18052. public static function handlerNeedsRequest()
  18053. {
  18054. /** @var \Illuminate\Session\Store $instance */
  18055. return $instance->handlerNeedsRequest();
  18056. }
  18057. /**
  18058. * Set the request on the handler instance.
  18059. *
  18060. * @param \Illuminate\Http\Request $request
  18061. * @return void
  18062. * @static
  18063. */
  18064. public static function setRequestOnHandler($request)
  18065. {
  18066. /** @var \Illuminate\Session\Store $instance */
  18067. $instance->setRequestOnHandler($request);
  18068. }
  18069. /**
  18070. * Register a custom macro.
  18071. *
  18072. * @param string $name
  18073. * @param object|callable $macro
  18074. * @param-closure-this static $macro
  18075. * @return void
  18076. * @static
  18077. */
  18078. public static function macro($name, $macro)
  18079. {
  18080. \Illuminate\Session\Store::macro($name, $macro);
  18081. }
  18082. /**
  18083. * Mix another object into the class.
  18084. *
  18085. * @param object $mixin
  18086. * @param bool $replace
  18087. * @return void
  18088. * @throws \ReflectionException
  18089. * @static
  18090. */
  18091. public static function mixin($mixin, $replace = true)
  18092. {
  18093. \Illuminate\Session\Store::mixin($mixin, $replace);
  18094. }
  18095. /**
  18096. * Checks if macro is registered.
  18097. *
  18098. * @param string $name
  18099. * @return bool
  18100. * @static
  18101. */
  18102. public static function hasMacro($name)
  18103. {
  18104. return \Illuminate\Session\Store::hasMacro($name);
  18105. }
  18106. /**
  18107. * Flush the existing macros.
  18108. *
  18109. * @return void
  18110. * @static
  18111. */
  18112. public static function flushMacros()
  18113. {
  18114. \Illuminate\Session\Store::flushMacros();
  18115. }
  18116. }
  18117. /**
  18118. * @method static bool has(string $location)
  18119. * @method static string read(string $location)
  18120. * @method static \League\Flysystem\DirectoryListing listContents(string $location, bool $deep = false)
  18121. * @method static int fileSize(string $path)
  18122. * @method static string visibility(string $path)
  18123. * @method static void write(string $location, string $contents, array $config = [])
  18124. * @method static void createDirectory(string $location, array $config = [])
  18125. * @see \Illuminate\Filesystem\FilesystemManager
  18126. */
  18127. class Storage {
  18128. /**
  18129. * Get a filesystem instance.
  18130. *
  18131. * @param string|null $name
  18132. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18133. * @static
  18134. */
  18135. public static function drive($name = null)
  18136. {
  18137. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18138. return $instance->drive($name);
  18139. }
  18140. /**
  18141. * Get a filesystem instance.
  18142. *
  18143. * @param string|null $name
  18144. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18145. * @static
  18146. */
  18147. public static function disk($name = null)
  18148. {
  18149. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18150. return $instance->disk($name);
  18151. }
  18152. /**
  18153. * Get a default cloud filesystem instance.
  18154. *
  18155. * @return \Illuminate\Contracts\Filesystem\Cloud
  18156. * @static
  18157. */
  18158. public static function cloud()
  18159. {
  18160. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18161. return $instance->cloud();
  18162. }
  18163. /**
  18164. * Build an on-demand disk.
  18165. *
  18166. * @param string|array $config
  18167. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18168. * @static
  18169. */
  18170. public static function build($config)
  18171. {
  18172. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18173. return $instance->build($config);
  18174. }
  18175. /**
  18176. * Create an instance of the local driver.
  18177. *
  18178. * @param array $config
  18179. * @param string $name
  18180. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18181. * @static
  18182. */
  18183. public static function createLocalDriver($config, $name = 'local')
  18184. {
  18185. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18186. return $instance->createLocalDriver($config, $name);
  18187. }
  18188. /**
  18189. * Create an instance of the ftp driver.
  18190. *
  18191. * @param array $config
  18192. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18193. * @static
  18194. */
  18195. public static function createFtpDriver($config)
  18196. {
  18197. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18198. return $instance->createFtpDriver($config);
  18199. }
  18200. /**
  18201. * Create an instance of the sftp driver.
  18202. *
  18203. * @param array $config
  18204. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18205. * @static
  18206. */
  18207. public static function createSftpDriver($config)
  18208. {
  18209. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18210. return $instance->createSftpDriver($config);
  18211. }
  18212. /**
  18213. * Create an instance of the Amazon S3 driver.
  18214. *
  18215. * @param array $config
  18216. * @return \Illuminate\Contracts\Filesystem\Cloud
  18217. * @static
  18218. */
  18219. public static function createS3Driver($config)
  18220. {
  18221. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18222. return $instance->createS3Driver($config);
  18223. }
  18224. /**
  18225. * Create a scoped driver.
  18226. *
  18227. * @param array $config
  18228. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18229. * @static
  18230. */
  18231. public static function createScopedDriver($config)
  18232. {
  18233. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18234. return $instance->createScopedDriver($config);
  18235. }
  18236. /**
  18237. * Set the given disk instance.
  18238. *
  18239. * @param string $name
  18240. * @param mixed $disk
  18241. * @return \Illuminate\Filesystem\FilesystemManager
  18242. * @static
  18243. */
  18244. public static function set($name, $disk)
  18245. {
  18246. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18247. return $instance->set($name, $disk);
  18248. }
  18249. /**
  18250. * Get the default driver name.
  18251. *
  18252. * @return string
  18253. * @static
  18254. */
  18255. public static function getDefaultDriver()
  18256. {
  18257. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18258. return $instance->getDefaultDriver();
  18259. }
  18260. /**
  18261. * Get the default cloud driver name.
  18262. *
  18263. * @return string
  18264. * @static
  18265. */
  18266. public static function getDefaultCloudDriver()
  18267. {
  18268. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18269. return $instance->getDefaultCloudDriver();
  18270. }
  18271. /**
  18272. * Unset the given disk instances.
  18273. *
  18274. * @param array|string $disk
  18275. * @return \Illuminate\Filesystem\FilesystemManager
  18276. * @static
  18277. */
  18278. public static function forgetDisk($disk)
  18279. {
  18280. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18281. return $instance->forgetDisk($disk);
  18282. }
  18283. /**
  18284. * Disconnect the given disk and remove from local cache.
  18285. *
  18286. * @param string|null $name
  18287. * @return void
  18288. * @static
  18289. */
  18290. public static function purge($name = null)
  18291. {
  18292. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18293. $instance->purge($name);
  18294. }
  18295. /**
  18296. * Register a custom driver creator Closure.
  18297. *
  18298. * @param string $driver
  18299. * @param \Closure $callback
  18300. * @return \Illuminate\Filesystem\FilesystemManager
  18301. * @static
  18302. */
  18303. public static function extend($driver, $callback)
  18304. {
  18305. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18306. return $instance->extend($driver, $callback);
  18307. }
  18308. /**
  18309. * Set the application instance used by the manager.
  18310. *
  18311. * @param \Illuminate\Contracts\Foundation\Application $app
  18312. * @return \Illuminate\Filesystem\FilesystemManager
  18313. * @static
  18314. */
  18315. public static function setApplication($app)
  18316. {
  18317. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18318. return $instance->setApplication($app);
  18319. }
  18320. /**
  18321. * Determine if temporary URLs can be generated.
  18322. *
  18323. * @return bool
  18324. * @static
  18325. */
  18326. public static function providesTemporaryUrls()
  18327. {
  18328. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18329. return $instance->providesTemporaryUrls();
  18330. }
  18331. /**
  18332. * Get a temporary URL for the file at the given path.
  18333. *
  18334. * @param string $path
  18335. * @param \DateTimeInterface $expiration
  18336. * @param array $options
  18337. * @return string
  18338. * @static
  18339. */
  18340. public static function temporaryUrl($path, $expiration, $options = [])
  18341. {
  18342. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18343. return $instance->temporaryUrl($path, $expiration, $options);
  18344. }
  18345. /**
  18346. * Specify the name of the disk the adapter is managing.
  18347. *
  18348. * @param string $disk
  18349. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18350. * @static
  18351. */
  18352. public static function diskName($disk)
  18353. {
  18354. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18355. return $instance->diskName($disk);
  18356. }
  18357. /**
  18358. * Indicate that signed URLs should serve the corresponding files.
  18359. *
  18360. * @param bool $serve
  18361. * @param \Closure|null $urlGeneratorResolver
  18362. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18363. * @static
  18364. */
  18365. public static function shouldServeSignedUrls($serve = true, $urlGeneratorResolver = null)
  18366. {
  18367. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18368. return $instance->shouldServeSignedUrls($serve, $urlGeneratorResolver);
  18369. }
  18370. /**
  18371. * Assert that the given file or directory exists.
  18372. *
  18373. * @param string|array $path
  18374. * @param string|null $content
  18375. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18376. * @static
  18377. */
  18378. public static function assertExists($path, $content = null)
  18379. {
  18380. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18381. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18382. return $instance->assertExists($path, $content);
  18383. }
  18384. /**
  18385. * Assert that the number of files in path equals the expected count.
  18386. *
  18387. * @param string $path
  18388. * @param int $count
  18389. * @param bool $recursive
  18390. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18391. * @static
  18392. */
  18393. public static function assertCount($path, $count, $recursive = false)
  18394. {
  18395. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18396. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18397. return $instance->assertCount($path, $count, $recursive);
  18398. }
  18399. /**
  18400. * Assert that the given file or directory does not exist.
  18401. *
  18402. * @param string|array $path
  18403. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18404. * @static
  18405. */
  18406. public static function assertMissing($path)
  18407. {
  18408. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18409. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18410. return $instance->assertMissing($path);
  18411. }
  18412. /**
  18413. * Assert that the given directory is empty.
  18414. *
  18415. * @param string $path
  18416. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18417. * @static
  18418. */
  18419. public static function assertDirectoryEmpty($path)
  18420. {
  18421. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18422. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18423. return $instance->assertDirectoryEmpty($path);
  18424. }
  18425. /**
  18426. * Determine if a file or directory exists.
  18427. *
  18428. * @param string $path
  18429. * @return bool
  18430. * @static
  18431. */
  18432. public static function exists($path)
  18433. {
  18434. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18435. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18436. return $instance->exists($path);
  18437. }
  18438. /**
  18439. * Determine if a file or directory is missing.
  18440. *
  18441. * @param string $path
  18442. * @return bool
  18443. * @static
  18444. */
  18445. public static function missing($path)
  18446. {
  18447. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18448. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18449. return $instance->missing($path);
  18450. }
  18451. /**
  18452. * Determine if a file exists.
  18453. *
  18454. * @param string $path
  18455. * @return bool
  18456. * @static
  18457. */
  18458. public static function fileExists($path)
  18459. {
  18460. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18461. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18462. return $instance->fileExists($path);
  18463. }
  18464. /**
  18465. * Determine if a file is missing.
  18466. *
  18467. * @param string $path
  18468. * @return bool
  18469. * @static
  18470. */
  18471. public static function fileMissing($path)
  18472. {
  18473. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18474. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18475. return $instance->fileMissing($path);
  18476. }
  18477. /**
  18478. * Determine if a directory exists.
  18479. *
  18480. * @param string $path
  18481. * @return bool
  18482. * @static
  18483. */
  18484. public static function directoryExists($path)
  18485. {
  18486. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18487. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18488. return $instance->directoryExists($path);
  18489. }
  18490. /**
  18491. * Determine if a directory is missing.
  18492. *
  18493. * @param string $path
  18494. * @return bool
  18495. * @static
  18496. */
  18497. public static function directoryMissing($path)
  18498. {
  18499. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18500. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18501. return $instance->directoryMissing($path);
  18502. }
  18503. /**
  18504. * Get the full path to the file that exists at the given relative path.
  18505. *
  18506. * @param string $path
  18507. * @return string
  18508. * @static
  18509. */
  18510. public static function path($path)
  18511. {
  18512. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18513. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18514. return $instance->path($path);
  18515. }
  18516. /**
  18517. * Get the contents of a file.
  18518. *
  18519. * @param string $path
  18520. * @return string|null
  18521. * @static
  18522. */
  18523. public static function get($path)
  18524. {
  18525. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18526. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18527. return $instance->get($path);
  18528. }
  18529. /**
  18530. * Get the contents of a file as decoded JSON.
  18531. *
  18532. * @param string $path
  18533. * @param int $flags
  18534. * @return array|null
  18535. * @static
  18536. */
  18537. public static function json($path, $flags = 0)
  18538. {
  18539. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18540. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18541. return $instance->json($path, $flags);
  18542. }
  18543. /**
  18544. * Create a streamed response for a given file.
  18545. *
  18546. * @param string $path
  18547. * @param string|null $name
  18548. * @param array $headers
  18549. * @param string|null $disposition
  18550. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18551. * @static
  18552. */
  18553. public static function response($path, $name = null, $headers = [], $disposition = 'inline')
  18554. {
  18555. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18556. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18557. return $instance->response($path, $name, $headers, $disposition);
  18558. }
  18559. /**
  18560. * Create a streamed download response for a given file.
  18561. *
  18562. * @param \Illuminate\Http\Request $request
  18563. * @param string $path
  18564. * @param string|null $name
  18565. * @param array $headers
  18566. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18567. * @static
  18568. */
  18569. public static function serve($request, $path, $name = null, $headers = [])
  18570. {
  18571. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18572. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18573. return $instance->serve($request, $path, $name, $headers);
  18574. }
  18575. /**
  18576. * Create a streamed download response for a given file.
  18577. *
  18578. * @param string $path
  18579. * @param string|null $name
  18580. * @param array $headers
  18581. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18582. * @static
  18583. */
  18584. public static function download($path, $name = null, $headers = [])
  18585. {
  18586. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18587. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18588. return $instance->download($path, $name, $headers);
  18589. }
  18590. /**
  18591. * Write the contents of a file.
  18592. *
  18593. * @param string $path
  18594. * @param \Psr\Http\Message\StreamInterface|\Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|resource $contents
  18595. * @param mixed $options
  18596. * @return string|bool
  18597. * @static
  18598. */
  18599. public static function put($path, $contents, $options = [])
  18600. {
  18601. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18602. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18603. return $instance->put($path, $contents, $options);
  18604. }
  18605. /**
  18606. * Store the uploaded file on the disk.
  18607. *
  18608. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18609. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18610. * @param mixed $options
  18611. * @return string|false
  18612. * @static
  18613. */
  18614. public static function putFile($path, $file = null, $options = [])
  18615. {
  18616. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18617. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18618. return $instance->putFile($path, $file, $options);
  18619. }
  18620. /**
  18621. * Store the uploaded file on the disk with a given name.
  18622. *
  18623. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18624. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18625. * @param string|array|null $name
  18626. * @param mixed $options
  18627. * @return string|false
  18628. * @static
  18629. */
  18630. public static function putFileAs($path, $file, $name = null, $options = [])
  18631. {
  18632. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18633. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18634. return $instance->putFileAs($path, $file, $name, $options);
  18635. }
  18636. /**
  18637. * Get the visibility for the given path.
  18638. *
  18639. * @param string $path
  18640. * @return string
  18641. * @static
  18642. */
  18643. public static function getVisibility($path)
  18644. {
  18645. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18646. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18647. return $instance->getVisibility($path);
  18648. }
  18649. /**
  18650. * Set the visibility for the given path.
  18651. *
  18652. * @param string $path
  18653. * @param string $visibility
  18654. * @return bool
  18655. * @static
  18656. */
  18657. public static function setVisibility($path, $visibility)
  18658. {
  18659. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18660. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18661. return $instance->setVisibility($path, $visibility);
  18662. }
  18663. /**
  18664. * Prepend to a file.
  18665. *
  18666. * @param string $path
  18667. * @param string $data
  18668. * @param string $separator
  18669. * @return bool
  18670. * @static
  18671. */
  18672. public static function prepend($path, $data, $separator = '
  18673. ')
  18674. {
  18675. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18676. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18677. return $instance->prepend($path, $data, $separator);
  18678. }
  18679. /**
  18680. * Append to a file.
  18681. *
  18682. * @param string $path
  18683. * @param string $data
  18684. * @param string $separator
  18685. * @return bool
  18686. * @static
  18687. */
  18688. public static function append($path, $data, $separator = '
  18689. ')
  18690. {
  18691. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18692. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18693. return $instance->append($path, $data, $separator);
  18694. }
  18695. /**
  18696. * Delete the file at a given path.
  18697. *
  18698. * @param string|array $paths
  18699. * @return bool
  18700. * @static
  18701. */
  18702. public static function delete($paths)
  18703. {
  18704. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18705. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18706. return $instance->delete($paths);
  18707. }
  18708. /**
  18709. * Copy a file to a new location.
  18710. *
  18711. * @param string $from
  18712. * @param string $to
  18713. * @return bool
  18714. * @static
  18715. */
  18716. public static function copy($from, $to)
  18717. {
  18718. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18719. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18720. return $instance->copy($from, $to);
  18721. }
  18722. /**
  18723. * Move a file to a new location.
  18724. *
  18725. * @param string $from
  18726. * @param string $to
  18727. * @return bool
  18728. * @static
  18729. */
  18730. public static function move($from, $to)
  18731. {
  18732. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18733. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18734. return $instance->move($from, $to);
  18735. }
  18736. /**
  18737. * Get the file size of a given file.
  18738. *
  18739. * @param string $path
  18740. * @return int
  18741. * @static
  18742. */
  18743. public static function size($path)
  18744. {
  18745. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18746. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18747. return $instance->size($path);
  18748. }
  18749. /**
  18750. * Get the checksum for a file.
  18751. *
  18752. * @return string|false
  18753. * @throws UnableToProvideChecksum
  18754. * @static
  18755. */
  18756. public static function checksum($path, $options = [])
  18757. {
  18758. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18759. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18760. return $instance->checksum($path, $options);
  18761. }
  18762. /**
  18763. * Get the mime-type of a given file.
  18764. *
  18765. * @param string $path
  18766. * @return string|false
  18767. * @static
  18768. */
  18769. public static function mimeType($path)
  18770. {
  18771. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18772. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18773. return $instance->mimeType($path);
  18774. }
  18775. /**
  18776. * Get the file's last modification time.
  18777. *
  18778. * @param string $path
  18779. * @return int
  18780. * @static
  18781. */
  18782. public static function lastModified($path)
  18783. {
  18784. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18785. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18786. return $instance->lastModified($path);
  18787. }
  18788. /**
  18789. * Get a resource to read the file.
  18790. *
  18791. * @param string $path
  18792. * @return resource|null The path resource or null on failure.
  18793. * @static
  18794. */
  18795. public static function readStream($path)
  18796. {
  18797. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18798. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18799. return $instance->readStream($path);
  18800. }
  18801. /**
  18802. * Write a new file using a stream.
  18803. *
  18804. * @param string $path
  18805. * @param resource $resource
  18806. * @param array $options
  18807. * @return bool
  18808. * @static
  18809. */
  18810. public static function writeStream($path, $resource, $options = [])
  18811. {
  18812. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18813. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18814. return $instance->writeStream($path, $resource, $options);
  18815. }
  18816. /**
  18817. * Get the URL for the file at the given path.
  18818. *
  18819. * @param string $path
  18820. * @return string
  18821. * @throws \RuntimeException
  18822. * @static
  18823. */
  18824. public static function url($path)
  18825. {
  18826. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18827. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18828. return $instance->url($path);
  18829. }
  18830. /**
  18831. * Get a temporary upload URL for the file at the given path.
  18832. *
  18833. * @param string $path
  18834. * @param \DateTimeInterface $expiration
  18835. * @param array $options
  18836. * @return array
  18837. * @throws \RuntimeException
  18838. * @static
  18839. */
  18840. public static function temporaryUploadUrl($path, $expiration, $options = [])
  18841. {
  18842. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18843. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18844. return $instance->temporaryUploadUrl($path, $expiration, $options);
  18845. }
  18846. /**
  18847. * Get an array of all files in a directory.
  18848. *
  18849. * @param string|null $directory
  18850. * @param bool $recursive
  18851. * @return array
  18852. * @static
  18853. */
  18854. public static function files($directory = null, $recursive = false)
  18855. {
  18856. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18857. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18858. return $instance->files($directory, $recursive);
  18859. }
  18860. /**
  18861. * Get all of the files from the given directory (recursive).
  18862. *
  18863. * @param string|null $directory
  18864. * @return array
  18865. * @static
  18866. */
  18867. public static function allFiles($directory = null)
  18868. {
  18869. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18870. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18871. return $instance->allFiles($directory);
  18872. }
  18873. /**
  18874. * Get all of the directories within a given directory.
  18875. *
  18876. * @param string|null $directory
  18877. * @param bool $recursive
  18878. * @return array
  18879. * @static
  18880. */
  18881. public static function directories($directory = null, $recursive = false)
  18882. {
  18883. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18884. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18885. return $instance->directories($directory, $recursive);
  18886. }
  18887. /**
  18888. * Get all the directories within a given directory (recursive).
  18889. *
  18890. * @param string|null $directory
  18891. * @return array
  18892. * @static
  18893. */
  18894. public static function allDirectories($directory = null)
  18895. {
  18896. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18897. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18898. return $instance->allDirectories($directory);
  18899. }
  18900. /**
  18901. * Create a directory.
  18902. *
  18903. * @param string $path
  18904. * @return bool
  18905. * @static
  18906. */
  18907. public static function makeDirectory($path)
  18908. {
  18909. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18910. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18911. return $instance->makeDirectory($path);
  18912. }
  18913. /**
  18914. * Recursively delete a directory.
  18915. *
  18916. * @param string $directory
  18917. * @return bool
  18918. * @static
  18919. */
  18920. public static function deleteDirectory($directory)
  18921. {
  18922. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18923. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18924. return $instance->deleteDirectory($directory);
  18925. }
  18926. /**
  18927. * Get the Flysystem driver.
  18928. *
  18929. * @return \League\Flysystem\FilesystemOperator
  18930. * @static
  18931. */
  18932. public static function getDriver()
  18933. {
  18934. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18935. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18936. return $instance->getDriver();
  18937. }
  18938. /**
  18939. * Get the Flysystem adapter.
  18940. *
  18941. * @return \League\Flysystem\FilesystemAdapter
  18942. * @static
  18943. */
  18944. public static function getAdapter()
  18945. {
  18946. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18947. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18948. return $instance->getAdapter();
  18949. }
  18950. /**
  18951. * Get the configuration values.
  18952. *
  18953. * @return array
  18954. * @static
  18955. */
  18956. public static function getConfig()
  18957. {
  18958. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18959. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18960. return $instance->getConfig();
  18961. }
  18962. /**
  18963. * Define a custom callback that generates file download responses.
  18964. *
  18965. * @param \Closure $callback
  18966. * @return void
  18967. * @static
  18968. */
  18969. public static function serveUsing($callback)
  18970. {
  18971. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18972. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18973. $instance->serveUsing($callback);
  18974. }
  18975. /**
  18976. * Define a custom temporary URL builder callback.
  18977. *
  18978. * @param \Closure $callback
  18979. * @return void
  18980. * @static
  18981. */
  18982. public static function buildTemporaryUrlsUsing($callback)
  18983. {
  18984. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18985. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18986. $instance->buildTemporaryUrlsUsing($callback);
  18987. }
  18988. /**
  18989. * Apply the callback if the given "value" is (or resolves to) truthy.
  18990. *
  18991. * @template TWhenParameter
  18992. * @template TWhenReturnType
  18993. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  18994. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  18995. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  18996. * @return $this|TWhenReturnType
  18997. * @static
  18998. */
  18999. public static function when($value = null, $callback = null, $default = null)
  19000. {
  19001. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  19002. return $instance->when($value, $callback, $default);
  19003. }
  19004. /**
  19005. * Apply the callback if the given "value" is (or resolves to) falsy.
  19006. *
  19007. * @template TUnlessParameter
  19008. * @template TUnlessReturnType
  19009. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  19010. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  19011. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  19012. * @return $this|TUnlessReturnType
  19013. * @static
  19014. */
  19015. public static function unless($value = null, $callback = null, $default = null)
  19016. {
  19017. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  19018. return $instance->unless($value, $callback, $default);
  19019. }
  19020. /**
  19021. * Register a custom macro.
  19022. *
  19023. * @param string $name
  19024. * @param object|callable $macro
  19025. * @param-closure-this static $macro
  19026. * @return void
  19027. * @static
  19028. */
  19029. public static function macro($name, $macro)
  19030. {
  19031. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19032. \Illuminate\Filesystem\LocalFilesystemAdapter::macro($name, $macro);
  19033. }
  19034. /**
  19035. * Mix another object into the class.
  19036. *
  19037. * @param object $mixin
  19038. * @param bool $replace
  19039. * @return void
  19040. * @throws \ReflectionException
  19041. * @static
  19042. */
  19043. public static function mixin($mixin, $replace = true)
  19044. {
  19045. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19046. \Illuminate\Filesystem\LocalFilesystemAdapter::mixin($mixin, $replace);
  19047. }
  19048. /**
  19049. * Checks if macro is registered.
  19050. *
  19051. * @param string $name
  19052. * @return bool
  19053. * @static
  19054. */
  19055. public static function hasMacro($name)
  19056. {
  19057. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19058. return \Illuminate\Filesystem\LocalFilesystemAdapter::hasMacro($name);
  19059. }
  19060. /**
  19061. * Flush the existing macros.
  19062. *
  19063. * @return void
  19064. * @static
  19065. */
  19066. public static function flushMacros()
  19067. {
  19068. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19069. \Illuminate\Filesystem\LocalFilesystemAdapter::flushMacros();
  19070. }
  19071. /**
  19072. * Dynamically handle calls to the class.
  19073. *
  19074. * @param string $method
  19075. * @param array $parameters
  19076. * @return mixed
  19077. * @throws \BadMethodCallException
  19078. * @static
  19079. */
  19080. public static function macroCall($method, $parameters)
  19081. {
  19082. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19083. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  19084. return $instance->macroCall($method, $parameters);
  19085. }
  19086. }
  19087. /**
  19088. * @see \Illuminate\Routing\UrlGenerator
  19089. */
  19090. class URL {
  19091. /**
  19092. * Get the full URL for the current request.
  19093. *
  19094. * @return string
  19095. * @static
  19096. */
  19097. public static function full()
  19098. {
  19099. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19100. return $instance->full();
  19101. }
  19102. /**
  19103. * Get the current URL for the request.
  19104. *
  19105. * @return string
  19106. * @static
  19107. */
  19108. public static function current()
  19109. {
  19110. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19111. return $instance->current();
  19112. }
  19113. /**
  19114. * Get the URL for the previous request.
  19115. *
  19116. * @param mixed $fallback
  19117. * @return string
  19118. * @static
  19119. */
  19120. public static function previous($fallback = false)
  19121. {
  19122. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19123. return $instance->previous($fallback);
  19124. }
  19125. /**
  19126. * Get the previous path info for the request.
  19127. *
  19128. * @param mixed $fallback
  19129. * @return string
  19130. * @static
  19131. */
  19132. public static function previousPath($fallback = false)
  19133. {
  19134. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19135. return $instance->previousPath($fallback);
  19136. }
  19137. /**
  19138. * Generate an absolute URL to the given path.
  19139. *
  19140. * @param string $path
  19141. * @param mixed $extra
  19142. * @param bool|null $secure
  19143. * @return string
  19144. * @static
  19145. */
  19146. public static function to($path, $extra = [], $secure = null)
  19147. {
  19148. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19149. return $instance->to($path, $extra, $secure);
  19150. }
  19151. /**
  19152. * Generate an absolute URL with the given query parameters.
  19153. *
  19154. * @param string $path
  19155. * @param array $query
  19156. * @param mixed $extra
  19157. * @param bool|null $secure
  19158. * @return string
  19159. * @static
  19160. */
  19161. public static function query($path, $query = [], $extra = [], $secure = null)
  19162. {
  19163. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19164. return $instance->query($path, $query, $extra, $secure);
  19165. }
  19166. /**
  19167. * Generate a secure, absolute URL to the given path.
  19168. *
  19169. * @param string $path
  19170. * @param array $parameters
  19171. * @return string
  19172. * @static
  19173. */
  19174. public static function secure($path, $parameters = [])
  19175. {
  19176. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19177. return $instance->secure($path, $parameters);
  19178. }
  19179. /**
  19180. * Generate the URL to an application asset.
  19181. *
  19182. * @param string $path
  19183. * @param bool|null $secure
  19184. * @return string
  19185. * @static
  19186. */
  19187. public static function asset($path, $secure = null)
  19188. {
  19189. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19190. return $instance->asset($path, $secure);
  19191. }
  19192. /**
  19193. * Generate the URL to a secure asset.
  19194. *
  19195. * @param string $path
  19196. * @return string
  19197. * @static
  19198. */
  19199. public static function secureAsset($path)
  19200. {
  19201. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19202. return $instance->secureAsset($path);
  19203. }
  19204. /**
  19205. * Generate the URL to an asset from a custom root domain such as CDN, etc.
  19206. *
  19207. * @param string $root
  19208. * @param string $path
  19209. * @param bool|null $secure
  19210. * @return string
  19211. * @static
  19212. */
  19213. public static function assetFrom($root, $path, $secure = null)
  19214. {
  19215. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19216. return $instance->assetFrom($root, $path, $secure);
  19217. }
  19218. /**
  19219. * Get the default scheme for a raw URL.
  19220. *
  19221. * @param bool|null $secure
  19222. * @return string
  19223. * @static
  19224. */
  19225. public static function formatScheme($secure = null)
  19226. {
  19227. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19228. return $instance->formatScheme($secure);
  19229. }
  19230. /**
  19231. * Create a signed route URL for a named route.
  19232. *
  19233. * @param \BackedEnum|string $name
  19234. * @param mixed $parameters
  19235. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  19236. * @param bool $absolute
  19237. * @return string
  19238. * @throws \InvalidArgumentException
  19239. * @static
  19240. */
  19241. public static function signedRoute($name, $parameters = [], $expiration = null, $absolute = true)
  19242. {
  19243. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19244. return $instance->signedRoute($name, $parameters, $expiration, $absolute);
  19245. }
  19246. /**
  19247. * Create a temporary signed route URL for a named route.
  19248. *
  19249. * @param \BackedEnum|string $name
  19250. * @param \DateTimeInterface|\DateInterval|int $expiration
  19251. * @param array $parameters
  19252. * @param bool $absolute
  19253. * @return string
  19254. * @static
  19255. */
  19256. public static function temporarySignedRoute($name, $expiration, $parameters = [], $absolute = true)
  19257. {
  19258. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19259. return $instance->temporarySignedRoute($name, $expiration, $parameters, $absolute);
  19260. }
  19261. /**
  19262. * Determine if the given request has a valid signature.
  19263. *
  19264. * @param \Illuminate\Http\Request $request
  19265. * @param bool $absolute
  19266. * @param \Closure|array $ignoreQuery
  19267. * @return bool
  19268. * @static
  19269. */
  19270. public static function hasValidSignature($request, $absolute = true, $ignoreQuery = [])
  19271. {
  19272. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19273. return $instance->hasValidSignature($request, $absolute, $ignoreQuery);
  19274. }
  19275. /**
  19276. * Determine if the given request has a valid signature for a relative URL.
  19277. *
  19278. * @param \Illuminate\Http\Request $request
  19279. * @param \Closure|array $ignoreQuery
  19280. * @return bool
  19281. * @static
  19282. */
  19283. public static function hasValidRelativeSignature($request, $ignoreQuery = [])
  19284. {
  19285. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19286. return $instance->hasValidRelativeSignature($request, $ignoreQuery);
  19287. }
  19288. /**
  19289. * Determine if the signature from the given request matches the URL.
  19290. *
  19291. * @param \Illuminate\Http\Request $request
  19292. * @param bool $absolute
  19293. * @param \Closure|array $ignoreQuery
  19294. * @return bool
  19295. * @static
  19296. */
  19297. public static function hasCorrectSignature($request, $absolute = true, $ignoreQuery = [])
  19298. {
  19299. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19300. return $instance->hasCorrectSignature($request, $absolute, $ignoreQuery);
  19301. }
  19302. /**
  19303. * Determine if the expires timestamp from the given request is not from the past.
  19304. *
  19305. * @param \Illuminate\Http\Request $request
  19306. * @return bool
  19307. * @static
  19308. */
  19309. public static function signatureHasNotExpired($request)
  19310. {
  19311. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19312. return $instance->signatureHasNotExpired($request);
  19313. }
  19314. /**
  19315. * Get the URL to a named route.
  19316. *
  19317. * @param \BackedEnum|string $name
  19318. * @param mixed $parameters
  19319. * @param bool $absolute
  19320. * @return string
  19321. * @throws \Symfony\Component\Routing\Exception\RouteNotFoundException|\InvalidArgumentException
  19322. * @static
  19323. */
  19324. public static function route($name, $parameters = [], $absolute = true)
  19325. {
  19326. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19327. return $instance->route($name, $parameters, $absolute);
  19328. }
  19329. /**
  19330. * Get the URL for a given route instance.
  19331. *
  19332. * @param \Illuminate\Routing\Route $route
  19333. * @param mixed $parameters
  19334. * @param bool $absolute
  19335. * @return string
  19336. * @throws \Illuminate\Routing\Exceptions\UrlGenerationException
  19337. * @static
  19338. */
  19339. public static function toRoute($route, $parameters, $absolute)
  19340. {
  19341. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19342. return $instance->toRoute($route, $parameters, $absolute);
  19343. }
  19344. /**
  19345. * Get the URL to a controller action.
  19346. *
  19347. * @param string|array $action
  19348. * @param mixed $parameters
  19349. * @param bool $absolute
  19350. * @return string
  19351. * @throws \InvalidArgumentException
  19352. * @static
  19353. */
  19354. public static function action($action, $parameters = [], $absolute = true)
  19355. {
  19356. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19357. return $instance->action($action, $parameters, $absolute);
  19358. }
  19359. /**
  19360. * Format the array of URL parameters.
  19361. *
  19362. * @param mixed $parameters
  19363. * @return array
  19364. * @static
  19365. */
  19366. public static function formatParameters($parameters)
  19367. {
  19368. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19369. return $instance->formatParameters($parameters);
  19370. }
  19371. /**
  19372. * Get the base URL for the request.
  19373. *
  19374. * @param string $scheme
  19375. * @param string|null $root
  19376. * @return string
  19377. * @static
  19378. */
  19379. public static function formatRoot($scheme, $root = null)
  19380. {
  19381. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19382. return $instance->formatRoot($scheme, $root);
  19383. }
  19384. /**
  19385. * Format the given URL segments into a single URL.
  19386. *
  19387. * @param string $root
  19388. * @param string $path
  19389. * @param \Illuminate\Routing\Route|null $route
  19390. * @return string
  19391. * @static
  19392. */
  19393. public static function format($root, $path, $route = null)
  19394. {
  19395. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19396. return $instance->format($root, $path, $route);
  19397. }
  19398. /**
  19399. * Determine if the given path is a valid URL.
  19400. *
  19401. * @param string $path
  19402. * @return bool
  19403. * @static
  19404. */
  19405. public static function isValidUrl($path)
  19406. {
  19407. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19408. return $instance->isValidUrl($path);
  19409. }
  19410. /**
  19411. * Set the default named parameters used by the URL generator.
  19412. *
  19413. * @param array $defaults
  19414. * @return void
  19415. * @static
  19416. */
  19417. public static function defaults($defaults)
  19418. {
  19419. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19420. $instance->defaults($defaults);
  19421. }
  19422. /**
  19423. * Get the default named parameters used by the URL generator.
  19424. *
  19425. * @return array
  19426. * @static
  19427. */
  19428. public static function getDefaultParameters()
  19429. {
  19430. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19431. return $instance->getDefaultParameters();
  19432. }
  19433. /**
  19434. * Force the scheme for URLs.
  19435. *
  19436. * @param string|null $scheme
  19437. * @return void
  19438. * @static
  19439. */
  19440. public static function forceScheme($scheme)
  19441. {
  19442. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19443. $instance->forceScheme($scheme);
  19444. }
  19445. /**
  19446. * Force the use of the HTTPS scheme for all generated URLs.
  19447. *
  19448. * @param bool $force
  19449. * @return void
  19450. * @static
  19451. */
  19452. public static function forceHttps($force = true)
  19453. {
  19454. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19455. $instance->forceHttps($force);
  19456. }
  19457. /**
  19458. * Set the URL origin for all generated URLs.
  19459. *
  19460. * @param string|null $root
  19461. * @return void
  19462. * @static
  19463. */
  19464. public static function useOrigin($root)
  19465. {
  19466. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19467. $instance->useOrigin($root);
  19468. }
  19469. /**
  19470. * Set the forced root URL.
  19471. *
  19472. * @param string|null $root
  19473. * @return void
  19474. * @deprecated Use useOrigin
  19475. * @static
  19476. */
  19477. public static function forceRootUrl($root)
  19478. {
  19479. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19480. $instance->forceRootUrl($root);
  19481. }
  19482. /**
  19483. * Set the URL origin for all generated asset URLs.
  19484. *
  19485. * @param string|null $root
  19486. * @return void
  19487. * @static
  19488. */
  19489. public static function useAssetOrigin($root)
  19490. {
  19491. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19492. $instance->useAssetOrigin($root);
  19493. }
  19494. /**
  19495. * Set a callback to be used to format the host of generated URLs.
  19496. *
  19497. * @param \Closure $callback
  19498. * @return \Illuminate\Routing\UrlGenerator
  19499. * @static
  19500. */
  19501. public static function formatHostUsing($callback)
  19502. {
  19503. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19504. return $instance->formatHostUsing($callback);
  19505. }
  19506. /**
  19507. * Set a callback to be used to format the path of generated URLs.
  19508. *
  19509. * @param \Closure $callback
  19510. * @return \Illuminate\Routing\UrlGenerator
  19511. * @static
  19512. */
  19513. public static function formatPathUsing($callback)
  19514. {
  19515. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19516. return $instance->formatPathUsing($callback);
  19517. }
  19518. /**
  19519. * Get the path formatter being used by the URL generator.
  19520. *
  19521. * @return \Closure
  19522. * @static
  19523. */
  19524. public static function pathFormatter()
  19525. {
  19526. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19527. return $instance->pathFormatter();
  19528. }
  19529. /**
  19530. * Get the request instance.
  19531. *
  19532. * @return \Illuminate\Http\Request
  19533. * @static
  19534. */
  19535. public static function getRequest()
  19536. {
  19537. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19538. return $instance->getRequest();
  19539. }
  19540. /**
  19541. * Set the current request instance.
  19542. *
  19543. * @param \Illuminate\Http\Request $request
  19544. * @return void
  19545. * @static
  19546. */
  19547. public static function setRequest($request)
  19548. {
  19549. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19550. $instance->setRequest($request);
  19551. }
  19552. /**
  19553. * Set the route collection.
  19554. *
  19555. * @param \Illuminate\Routing\RouteCollectionInterface $routes
  19556. * @return \Illuminate\Routing\UrlGenerator
  19557. * @static
  19558. */
  19559. public static function setRoutes($routes)
  19560. {
  19561. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19562. return $instance->setRoutes($routes);
  19563. }
  19564. /**
  19565. * Set the session resolver for the generator.
  19566. *
  19567. * @param callable $sessionResolver
  19568. * @return \Illuminate\Routing\UrlGenerator
  19569. * @static
  19570. */
  19571. public static function setSessionResolver($sessionResolver)
  19572. {
  19573. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19574. return $instance->setSessionResolver($sessionResolver);
  19575. }
  19576. /**
  19577. * Set the encryption key resolver.
  19578. *
  19579. * @param callable $keyResolver
  19580. * @return \Illuminate\Routing\UrlGenerator
  19581. * @static
  19582. */
  19583. public static function setKeyResolver($keyResolver)
  19584. {
  19585. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19586. return $instance->setKeyResolver($keyResolver);
  19587. }
  19588. /**
  19589. * Clone a new instance of the URL generator with a different encryption key resolver.
  19590. *
  19591. * @param callable $keyResolver
  19592. * @return \Illuminate\Routing\UrlGenerator
  19593. * @static
  19594. */
  19595. public static function withKeyResolver($keyResolver)
  19596. {
  19597. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19598. return $instance->withKeyResolver($keyResolver);
  19599. }
  19600. /**
  19601. * Set the callback that should be used to attempt to resolve missing named routes.
  19602. *
  19603. * @param callable $missingNamedRouteResolver
  19604. * @return \Illuminate\Routing\UrlGenerator
  19605. * @static
  19606. */
  19607. public static function resolveMissingNamedRoutesUsing($missingNamedRouteResolver)
  19608. {
  19609. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19610. return $instance->resolveMissingNamedRoutesUsing($missingNamedRouteResolver);
  19611. }
  19612. /**
  19613. * Get the root controller namespace.
  19614. *
  19615. * @return string
  19616. * @static
  19617. */
  19618. public static function getRootControllerNamespace()
  19619. {
  19620. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19621. return $instance->getRootControllerNamespace();
  19622. }
  19623. /**
  19624. * Set the root controller namespace.
  19625. *
  19626. * @param string $rootNamespace
  19627. * @return \Illuminate\Routing\UrlGenerator
  19628. * @static
  19629. */
  19630. public static function setRootControllerNamespace($rootNamespace)
  19631. {
  19632. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19633. return $instance->setRootControllerNamespace($rootNamespace);
  19634. }
  19635. /**
  19636. * Register a custom macro.
  19637. *
  19638. * @param string $name
  19639. * @param object|callable $macro
  19640. * @param-closure-this static $macro
  19641. * @return void
  19642. * @static
  19643. */
  19644. public static function macro($name, $macro)
  19645. {
  19646. \Illuminate\Routing\UrlGenerator::macro($name, $macro);
  19647. }
  19648. /**
  19649. * Mix another object into the class.
  19650. *
  19651. * @param object $mixin
  19652. * @param bool $replace
  19653. * @return void
  19654. * @throws \ReflectionException
  19655. * @static
  19656. */
  19657. public static function mixin($mixin, $replace = true)
  19658. {
  19659. \Illuminate\Routing\UrlGenerator::mixin($mixin, $replace);
  19660. }
  19661. /**
  19662. * Checks if macro is registered.
  19663. *
  19664. * @param string $name
  19665. * @return bool
  19666. * @static
  19667. */
  19668. public static function hasMacro($name)
  19669. {
  19670. return \Illuminate\Routing\UrlGenerator::hasMacro($name);
  19671. }
  19672. /**
  19673. * Flush the existing macros.
  19674. *
  19675. * @return void
  19676. * @static
  19677. */
  19678. public static function flushMacros()
  19679. {
  19680. \Illuminate\Routing\UrlGenerator::flushMacros();
  19681. }
  19682. }
  19683. /**
  19684. * @see \Illuminate\Validation\Factory
  19685. */
  19686. class Validator {
  19687. /**
  19688. * Create a new Validator instance.
  19689. *
  19690. * @param array $data
  19691. * @param array $rules
  19692. * @param array $messages
  19693. * @param array $attributes
  19694. * @return \Illuminate\Validation\Validator
  19695. * @static
  19696. */
  19697. public static function make($data, $rules, $messages = [], $attributes = [])
  19698. {
  19699. /** @var \Illuminate\Validation\Factory $instance */
  19700. return $instance->make($data, $rules, $messages, $attributes);
  19701. }
  19702. /**
  19703. * Validate the given data against the provided rules.
  19704. *
  19705. * @param array $data
  19706. * @param array $rules
  19707. * @param array $messages
  19708. * @param array $attributes
  19709. * @return array
  19710. * @throws \Illuminate\Validation\ValidationException
  19711. * @static
  19712. */
  19713. public static function validate($data, $rules, $messages = [], $attributes = [])
  19714. {
  19715. /** @var \Illuminate\Validation\Factory $instance */
  19716. return $instance->validate($data, $rules, $messages, $attributes);
  19717. }
  19718. /**
  19719. * Register a custom validator extension.
  19720. *
  19721. * @param string $rule
  19722. * @param \Closure|string $extension
  19723. * @param string|null $message
  19724. * @return void
  19725. * @static
  19726. */
  19727. public static function extend($rule, $extension, $message = null)
  19728. {
  19729. /** @var \Illuminate\Validation\Factory $instance */
  19730. $instance->extend($rule, $extension, $message);
  19731. }
  19732. /**
  19733. * Register a custom implicit validator extension.
  19734. *
  19735. * @param string $rule
  19736. * @param \Closure|string $extension
  19737. * @param string|null $message
  19738. * @return void
  19739. * @static
  19740. */
  19741. public static function extendImplicit($rule, $extension, $message = null)
  19742. {
  19743. /** @var \Illuminate\Validation\Factory $instance */
  19744. $instance->extendImplicit($rule, $extension, $message);
  19745. }
  19746. /**
  19747. * Register a custom dependent validator extension.
  19748. *
  19749. * @param string $rule
  19750. * @param \Closure|string $extension
  19751. * @param string|null $message
  19752. * @return void
  19753. * @static
  19754. */
  19755. public static function extendDependent($rule, $extension, $message = null)
  19756. {
  19757. /** @var \Illuminate\Validation\Factory $instance */
  19758. $instance->extendDependent($rule, $extension, $message);
  19759. }
  19760. /**
  19761. * Register a custom validator message replacer.
  19762. *
  19763. * @param string $rule
  19764. * @param \Closure|string $replacer
  19765. * @return void
  19766. * @static
  19767. */
  19768. public static function replacer($rule, $replacer)
  19769. {
  19770. /** @var \Illuminate\Validation\Factory $instance */
  19771. $instance->replacer($rule, $replacer);
  19772. }
  19773. /**
  19774. * Indicate that unvalidated array keys should be included in validated data when the parent array is validated.
  19775. *
  19776. * @return void
  19777. * @static
  19778. */
  19779. public static function includeUnvalidatedArrayKeys()
  19780. {
  19781. /** @var \Illuminate\Validation\Factory $instance */
  19782. $instance->includeUnvalidatedArrayKeys();
  19783. }
  19784. /**
  19785. * Indicate that unvalidated array keys should be excluded from the validated data, even if the parent array was validated.
  19786. *
  19787. * @return void
  19788. * @static
  19789. */
  19790. public static function excludeUnvalidatedArrayKeys()
  19791. {
  19792. /** @var \Illuminate\Validation\Factory $instance */
  19793. $instance->excludeUnvalidatedArrayKeys();
  19794. }
  19795. /**
  19796. * Set the Validator instance resolver.
  19797. *
  19798. * @param \Closure $resolver
  19799. * @return void
  19800. * @static
  19801. */
  19802. public static function resolver($resolver)
  19803. {
  19804. /** @var \Illuminate\Validation\Factory $instance */
  19805. $instance->resolver($resolver);
  19806. }
  19807. /**
  19808. * Get the Translator implementation.
  19809. *
  19810. * @return \Illuminate\Contracts\Translation\Translator
  19811. * @static
  19812. */
  19813. public static function getTranslator()
  19814. {
  19815. /** @var \Illuminate\Validation\Factory $instance */
  19816. return $instance->getTranslator();
  19817. }
  19818. /**
  19819. * Get the Presence Verifier implementation.
  19820. *
  19821. * @return \Illuminate\Validation\PresenceVerifierInterface
  19822. * @static
  19823. */
  19824. public static function getPresenceVerifier()
  19825. {
  19826. /** @var \Illuminate\Validation\Factory $instance */
  19827. return $instance->getPresenceVerifier();
  19828. }
  19829. /**
  19830. * Set the Presence Verifier implementation.
  19831. *
  19832. * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier
  19833. * @return void
  19834. * @static
  19835. */
  19836. public static function setPresenceVerifier($presenceVerifier)
  19837. {
  19838. /** @var \Illuminate\Validation\Factory $instance */
  19839. $instance->setPresenceVerifier($presenceVerifier);
  19840. }
  19841. /**
  19842. * Get the container instance used by the validation factory.
  19843. *
  19844. * @return \Illuminate\Contracts\Container\Container|null
  19845. * @static
  19846. */
  19847. public static function getContainer()
  19848. {
  19849. /** @var \Illuminate\Validation\Factory $instance */
  19850. return $instance->getContainer();
  19851. }
  19852. /**
  19853. * Set the container instance used by the validation factory.
  19854. *
  19855. * @param \Illuminate\Contracts\Container\Container $container
  19856. * @return \Illuminate\Validation\Factory
  19857. * @static
  19858. */
  19859. public static function setContainer($container)
  19860. {
  19861. /** @var \Illuminate\Validation\Factory $instance */
  19862. return $instance->setContainer($container);
  19863. }
  19864. }
  19865. /**
  19866. * @see \Illuminate\View\Factory
  19867. */
  19868. class View {
  19869. /**
  19870. * Get the evaluated view contents for the given view.
  19871. *
  19872. * @param string $path
  19873. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19874. * @param array $mergeData
  19875. * @return \Illuminate\Contracts\View\View
  19876. * @static
  19877. */
  19878. public static function file($path, $data = [], $mergeData = [])
  19879. {
  19880. /** @var \Illuminate\View\Factory $instance */
  19881. return $instance->file($path, $data, $mergeData);
  19882. }
  19883. /**
  19884. * Get the evaluated view contents for the given view.
  19885. *
  19886. * @param string $view
  19887. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19888. * @param array $mergeData
  19889. * @return \Illuminate\Contracts\View\View
  19890. * @static
  19891. */
  19892. public static function make($view, $data = [], $mergeData = [])
  19893. {
  19894. /** @var \Illuminate\View\Factory $instance */
  19895. return $instance->make($view, $data, $mergeData);
  19896. }
  19897. /**
  19898. * Get the first view that actually exists from the given list.
  19899. *
  19900. * @param array $views
  19901. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19902. * @param array $mergeData
  19903. * @return \Illuminate\Contracts\View\View
  19904. * @throws \InvalidArgumentException
  19905. * @static
  19906. */
  19907. public static function first($views, $data = [], $mergeData = [])
  19908. {
  19909. /** @var \Illuminate\View\Factory $instance */
  19910. return $instance->first($views, $data, $mergeData);
  19911. }
  19912. /**
  19913. * Get the rendered content of the view based on a given condition.
  19914. *
  19915. * @param bool $condition
  19916. * @param string $view
  19917. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19918. * @param array $mergeData
  19919. * @return string
  19920. * @static
  19921. */
  19922. public static function renderWhen($condition, $view, $data = [], $mergeData = [])
  19923. {
  19924. /** @var \Illuminate\View\Factory $instance */
  19925. return $instance->renderWhen($condition, $view, $data, $mergeData);
  19926. }
  19927. /**
  19928. * Get the rendered content of the view based on the negation of a given condition.
  19929. *
  19930. * @param bool $condition
  19931. * @param string $view
  19932. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19933. * @param array $mergeData
  19934. * @return string
  19935. * @static
  19936. */
  19937. public static function renderUnless($condition, $view, $data = [], $mergeData = [])
  19938. {
  19939. /** @var \Illuminate\View\Factory $instance */
  19940. return $instance->renderUnless($condition, $view, $data, $mergeData);
  19941. }
  19942. /**
  19943. * Get the rendered contents of a partial from a loop.
  19944. *
  19945. * @param string $view
  19946. * @param array $data
  19947. * @param string $iterator
  19948. * @param string $empty
  19949. * @return string
  19950. * @static
  19951. */
  19952. public static function renderEach($view, $data, $iterator, $empty = 'raw|')
  19953. {
  19954. /** @var \Illuminate\View\Factory $instance */
  19955. return $instance->renderEach($view, $data, $iterator, $empty);
  19956. }
  19957. /**
  19958. * Determine if a given view exists.
  19959. *
  19960. * @param string $view
  19961. * @return bool
  19962. * @static
  19963. */
  19964. public static function exists($view)
  19965. {
  19966. /** @var \Illuminate\View\Factory $instance */
  19967. return $instance->exists($view);
  19968. }
  19969. /**
  19970. * Get the appropriate view engine for the given path.
  19971. *
  19972. * @param string $path
  19973. * @return \Illuminate\Contracts\View\Engine
  19974. * @throws \InvalidArgumentException
  19975. * @static
  19976. */
  19977. public static function getEngineFromPath($path)
  19978. {
  19979. /** @var \Illuminate\View\Factory $instance */
  19980. return $instance->getEngineFromPath($path);
  19981. }
  19982. /**
  19983. * Add a piece of shared data to the environment.
  19984. *
  19985. * @param array|string $key
  19986. * @param mixed|null $value
  19987. * @return mixed
  19988. * @static
  19989. */
  19990. public static function share($key, $value = null)
  19991. {
  19992. /** @var \Illuminate\View\Factory $instance */
  19993. return $instance->share($key, $value);
  19994. }
  19995. /**
  19996. * Increment the rendering counter.
  19997. *
  19998. * @return void
  19999. * @static
  20000. */
  20001. public static function incrementRender()
  20002. {
  20003. /** @var \Illuminate\View\Factory $instance */
  20004. $instance->incrementRender();
  20005. }
  20006. /**
  20007. * Decrement the rendering counter.
  20008. *
  20009. * @return void
  20010. * @static
  20011. */
  20012. public static function decrementRender()
  20013. {
  20014. /** @var \Illuminate\View\Factory $instance */
  20015. $instance->decrementRender();
  20016. }
  20017. /**
  20018. * Check if there are no active render operations.
  20019. *
  20020. * @return bool
  20021. * @static
  20022. */
  20023. public static function doneRendering()
  20024. {
  20025. /** @var \Illuminate\View\Factory $instance */
  20026. return $instance->doneRendering();
  20027. }
  20028. /**
  20029. * Determine if the given once token has been rendered.
  20030. *
  20031. * @param string $id
  20032. * @return bool
  20033. * @static
  20034. */
  20035. public static function hasRenderedOnce($id)
  20036. {
  20037. /** @var \Illuminate\View\Factory $instance */
  20038. return $instance->hasRenderedOnce($id);
  20039. }
  20040. /**
  20041. * Mark the given once token as having been rendered.
  20042. *
  20043. * @param string $id
  20044. * @return void
  20045. * @static
  20046. */
  20047. public static function markAsRenderedOnce($id)
  20048. {
  20049. /** @var \Illuminate\View\Factory $instance */
  20050. $instance->markAsRenderedOnce($id);
  20051. }
  20052. /**
  20053. * Add a location to the array of view locations.
  20054. *
  20055. * @param string $location
  20056. * @return void
  20057. * @static
  20058. */
  20059. public static function addLocation($location)
  20060. {
  20061. /** @var \Illuminate\View\Factory $instance */
  20062. $instance->addLocation($location);
  20063. }
  20064. /**
  20065. * Prepend a location to the array of view locations.
  20066. *
  20067. * @param string $location
  20068. * @return void
  20069. * @static
  20070. */
  20071. public static function prependLocation($location)
  20072. {
  20073. /** @var \Illuminate\View\Factory $instance */
  20074. $instance->prependLocation($location);
  20075. }
  20076. /**
  20077. * Add a new namespace to the loader.
  20078. *
  20079. * @param string $namespace
  20080. * @param string|array $hints
  20081. * @return \Illuminate\View\Factory
  20082. * @static
  20083. */
  20084. public static function addNamespace($namespace, $hints)
  20085. {
  20086. /** @var \Illuminate\View\Factory $instance */
  20087. return $instance->addNamespace($namespace, $hints);
  20088. }
  20089. /**
  20090. * Prepend a new namespace to the loader.
  20091. *
  20092. * @param string $namespace
  20093. * @param string|array $hints
  20094. * @return \Illuminate\View\Factory
  20095. * @static
  20096. */
  20097. public static function prependNamespace($namespace, $hints)
  20098. {
  20099. /** @var \Illuminate\View\Factory $instance */
  20100. return $instance->prependNamespace($namespace, $hints);
  20101. }
  20102. /**
  20103. * Replace the namespace hints for the given namespace.
  20104. *
  20105. * @param string $namespace
  20106. * @param string|array $hints
  20107. * @return \Illuminate\View\Factory
  20108. * @static
  20109. */
  20110. public static function replaceNamespace($namespace, $hints)
  20111. {
  20112. /** @var \Illuminate\View\Factory $instance */
  20113. return $instance->replaceNamespace($namespace, $hints);
  20114. }
  20115. /**
  20116. * Register a valid view extension and its engine.
  20117. *
  20118. * @param string $extension
  20119. * @param string $engine
  20120. * @param \Closure|null $resolver
  20121. * @return void
  20122. * @static
  20123. */
  20124. public static function addExtension($extension, $engine, $resolver = null)
  20125. {
  20126. /** @var \Illuminate\View\Factory $instance */
  20127. $instance->addExtension($extension, $engine, $resolver);
  20128. }
  20129. /**
  20130. * Flush all of the factory state like sections and stacks.
  20131. *
  20132. * @return void
  20133. * @static
  20134. */
  20135. public static function flushState()
  20136. {
  20137. /** @var \Illuminate\View\Factory $instance */
  20138. $instance->flushState();
  20139. }
  20140. /**
  20141. * Flush all of the section contents if done rendering.
  20142. *
  20143. * @return void
  20144. * @static
  20145. */
  20146. public static function flushStateIfDoneRendering()
  20147. {
  20148. /** @var \Illuminate\View\Factory $instance */
  20149. $instance->flushStateIfDoneRendering();
  20150. }
  20151. /**
  20152. * Get the extension to engine bindings.
  20153. *
  20154. * @return array
  20155. * @static
  20156. */
  20157. public static function getExtensions()
  20158. {
  20159. /** @var \Illuminate\View\Factory $instance */
  20160. return $instance->getExtensions();
  20161. }
  20162. /**
  20163. * Get the engine resolver instance.
  20164. *
  20165. * @return \Illuminate\View\Engines\EngineResolver
  20166. * @static
  20167. */
  20168. public static function getEngineResolver()
  20169. {
  20170. /** @var \Illuminate\View\Factory $instance */
  20171. return $instance->getEngineResolver();
  20172. }
  20173. /**
  20174. * Get the view finder instance.
  20175. *
  20176. * @return \Illuminate\View\ViewFinderInterface
  20177. * @static
  20178. */
  20179. public static function getFinder()
  20180. {
  20181. /** @var \Illuminate\View\Factory $instance */
  20182. return $instance->getFinder();
  20183. }
  20184. /**
  20185. * Set the view finder instance.
  20186. *
  20187. * @param \Illuminate\View\ViewFinderInterface $finder
  20188. * @return void
  20189. * @static
  20190. */
  20191. public static function setFinder($finder)
  20192. {
  20193. /** @var \Illuminate\View\Factory $instance */
  20194. $instance->setFinder($finder);
  20195. }
  20196. /**
  20197. * Flush the cache of views located by the finder.
  20198. *
  20199. * @return void
  20200. * @static
  20201. */
  20202. public static function flushFinderCache()
  20203. {
  20204. /** @var \Illuminate\View\Factory $instance */
  20205. $instance->flushFinderCache();
  20206. }
  20207. /**
  20208. * Get the event dispatcher instance.
  20209. *
  20210. * @return \Illuminate\Contracts\Events\Dispatcher
  20211. * @static
  20212. */
  20213. public static function getDispatcher()
  20214. {
  20215. /** @var \Illuminate\View\Factory $instance */
  20216. return $instance->getDispatcher();
  20217. }
  20218. /**
  20219. * Set the event dispatcher instance.
  20220. *
  20221. * @param \Illuminate\Contracts\Events\Dispatcher $events
  20222. * @return void
  20223. * @static
  20224. */
  20225. public static function setDispatcher($events)
  20226. {
  20227. /** @var \Illuminate\View\Factory $instance */
  20228. $instance->setDispatcher($events);
  20229. }
  20230. /**
  20231. * Get the IoC container instance.
  20232. *
  20233. * @return \Illuminate\Contracts\Container\Container
  20234. * @static
  20235. */
  20236. public static function getContainer()
  20237. {
  20238. /** @var \Illuminate\View\Factory $instance */
  20239. return $instance->getContainer();
  20240. }
  20241. /**
  20242. * Set the IoC container instance.
  20243. *
  20244. * @param \Illuminate\Contracts\Container\Container $container
  20245. * @return void
  20246. * @static
  20247. */
  20248. public static function setContainer($container)
  20249. {
  20250. /** @var \Illuminate\View\Factory $instance */
  20251. $instance->setContainer($container);
  20252. }
  20253. /**
  20254. * Get an item from the shared data.
  20255. *
  20256. * @param string $key
  20257. * @param mixed $default
  20258. * @return mixed
  20259. * @static
  20260. */
  20261. public static function shared($key, $default = null)
  20262. {
  20263. /** @var \Illuminate\View\Factory $instance */
  20264. return $instance->shared($key, $default);
  20265. }
  20266. /**
  20267. * Get all of the shared data for the environment.
  20268. *
  20269. * @return array
  20270. * @static
  20271. */
  20272. public static function getShared()
  20273. {
  20274. /** @var \Illuminate\View\Factory $instance */
  20275. return $instance->getShared();
  20276. }
  20277. /**
  20278. * Register a custom macro.
  20279. *
  20280. * @param string $name
  20281. * @param object|callable $macro
  20282. * @param-closure-this static $macro
  20283. * @return void
  20284. * @static
  20285. */
  20286. public static function macro($name, $macro)
  20287. {
  20288. \Illuminate\View\Factory::macro($name, $macro);
  20289. }
  20290. /**
  20291. * Mix another object into the class.
  20292. *
  20293. * @param object $mixin
  20294. * @param bool $replace
  20295. * @return void
  20296. * @throws \ReflectionException
  20297. * @static
  20298. */
  20299. public static function mixin($mixin, $replace = true)
  20300. {
  20301. \Illuminate\View\Factory::mixin($mixin, $replace);
  20302. }
  20303. /**
  20304. * Checks if macro is registered.
  20305. *
  20306. * @param string $name
  20307. * @return bool
  20308. * @static
  20309. */
  20310. public static function hasMacro($name)
  20311. {
  20312. return \Illuminate\View\Factory::hasMacro($name);
  20313. }
  20314. /**
  20315. * Flush the existing macros.
  20316. *
  20317. * @return void
  20318. * @static
  20319. */
  20320. public static function flushMacros()
  20321. {
  20322. \Illuminate\View\Factory::flushMacros();
  20323. }
  20324. /**
  20325. * Start a component rendering process.
  20326. *
  20327. * @param \Illuminate\Contracts\View\View|\Illuminate\Contracts\Support\Htmlable|\Closure|string $view
  20328. * @param array $data
  20329. * @return void
  20330. * @static
  20331. */
  20332. public static function startComponent($view, $data = [])
  20333. {
  20334. /** @var \Illuminate\View\Factory $instance */
  20335. $instance->startComponent($view, $data);
  20336. }
  20337. /**
  20338. * Get the first view that actually exists from the given list, and start a component.
  20339. *
  20340. * @param array $names
  20341. * @param array $data
  20342. * @return void
  20343. * @static
  20344. */
  20345. public static function startComponentFirst($names, $data = [])
  20346. {
  20347. /** @var \Illuminate\View\Factory $instance */
  20348. $instance->startComponentFirst($names, $data);
  20349. }
  20350. /**
  20351. * Render the current component.
  20352. *
  20353. * @return string
  20354. * @static
  20355. */
  20356. public static function renderComponent()
  20357. {
  20358. /** @var \Illuminate\View\Factory $instance */
  20359. return $instance->renderComponent();
  20360. }
  20361. /**
  20362. * Get an item from the component data that exists above the current component.
  20363. *
  20364. * @param string $key
  20365. * @param mixed $default
  20366. * @return mixed|null
  20367. * @static
  20368. */
  20369. public static function getConsumableComponentData($key, $default = null)
  20370. {
  20371. /** @var \Illuminate\View\Factory $instance */
  20372. return $instance->getConsumableComponentData($key, $default);
  20373. }
  20374. /**
  20375. * Start the slot rendering process.
  20376. *
  20377. * @param string $name
  20378. * @param string|null $content
  20379. * @param array $attributes
  20380. * @return void
  20381. * @static
  20382. */
  20383. public static function slot($name, $content = null, $attributes = [])
  20384. {
  20385. /** @var \Illuminate\View\Factory $instance */
  20386. $instance->slot($name, $content, $attributes);
  20387. }
  20388. /**
  20389. * Save the slot content for rendering.
  20390. *
  20391. * @return void
  20392. * @static
  20393. */
  20394. public static function endSlot()
  20395. {
  20396. /** @var \Illuminate\View\Factory $instance */
  20397. $instance->endSlot();
  20398. }
  20399. /**
  20400. * Register a view creator event.
  20401. *
  20402. * @param array|string $views
  20403. * @param \Closure|string $callback
  20404. * @return array
  20405. * @static
  20406. */
  20407. public static function creator($views, $callback)
  20408. {
  20409. /** @var \Illuminate\View\Factory $instance */
  20410. return $instance->creator($views, $callback);
  20411. }
  20412. /**
  20413. * Register multiple view composers via an array.
  20414. *
  20415. * @param array $composers
  20416. * @return array
  20417. * @static
  20418. */
  20419. public static function composers($composers)
  20420. {
  20421. /** @var \Illuminate\View\Factory $instance */
  20422. return $instance->composers($composers);
  20423. }
  20424. /**
  20425. * Register a view composer event.
  20426. *
  20427. * @param array|string $views
  20428. * @param \Closure|string $callback
  20429. * @return array
  20430. * @static
  20431. */
  20432. public static function composer($views, $callback)
  20433. {
  20434. /** @var \Illuminate\View\Factory $instance */
  20435. return $instance->composer($views, $callback);
  20436. }
  20437. /**
  20438. * Call the composer for a given view.
  20439. *
  20440. * @param \Illuminate\Contracts\View\View $view
  20441. * @return void
  20442. * @static
  20443. */
  20444. public static function callComposer($view)
  20445. {
  20446. /** @var \Illuminate\View\Factory $instance */
  20447. $instance->callComposer($view);
  20448. }
  20449. /**
  20450. * Call the creator for a given view.
  20451. *
  20452. * @param \Illuminate\Contracts\View\View $view
  20453. * @return void
  20454. * @static
  20455. */
  20456. public static function callCreator($view)
  20457. {
  20458. /** @var \Illuminate\View\Factory $instance */
  20459. $instance->callCreator($view);
  20460. }
  20461. /**
  20462. * Start injecting content into a fragment.
  20463. *
  20464. * @param string $fragment
  20465. * @return void
  20466. * @static
  20467. */
  20468. public static function startFragment($fragment)
  20469. {
  20470. /** @var \Illuminate\View\Factory $instance */
  20471. $instance->startFragment($fragment);
  20472. }
  20473. /**
  20474. * Stop injecting content into a fragment.
  20475. *
  20476. * @return string
  20477. * @throws \InvalidArgumentException
  20478. * @static
  20479. */
  20480. public static function stopFragment()
  20481. {
  20482. /** @var \Illuminate\View\Factory $instance */
  20483. return $instance->stopFragment();
  20484. }
  20485. /**
  20486. * Get the contents of a fragment.
  20487. *
  20488. * @param string $name
  20489. * @param string|null $default
  20490. * @return mixed
  20491. * @static
  20492. */
  20493. public static function getFragment($name, $default = null)
  20494. {
  20495. /** @var \Illuminate\View\Factory $instance */
  20496. return $instance->getFragment($name, $default);
  20497. }
  20498. /**
  20499. * Get the entire array of rendered fragments.
  20500. *
  20501. * @return array
  20502. * @static
  20503. */
  20504. public static function getFragments()
  20505. {
  20506. /** @var \Illuminate\View\Factory $instance */
  20507. return $instance->getFragments();
  20508. }
  20509. /**
  20510. * Flush all of the fragments.
  20511. *
  20512. * @return void
  20513. * @static
  20514. */
  20515. public static function flushFragments()
  20516. {
  20517. /** @var \Illuminate\View\Factory $instance */
  20518. $instance->flushFragments();
  20519. }
  20520. /**
  20521. * Start injecting content into a section.
  20522. *
  20523. * @param string $section
  20524. * @param string|null $content
  20525. * @return void
  20526. * @static
  20527. */
  20528. public static function startSection($section, $content = null)
  20529. {
  20530. /** @var \Illuminate\View\Factory $instance */
  20531. $instance->startSection($section, $content);
  20532. }
  20533. /**
  20534. * Inject inline content into a section.
  20535. *
  20536. * @param string $section
  20537. * @param string $content
  20538. * @return void
  20539. * @static
  20540. */
  20541. public static function inject($section, $content)
  20542. {
  20543. /** @var \Illuminate\View\Factory $instance */
  20544. $instance->inject($section, $content);
  20545. }
  20546. /**
  20547. * Stop injecting content into a section and return its contents.
  20548. *
  20549. * @return string
  20550. * @static
  20551. */
  20552. public static function yieldSection()
  20553. {
  20554. /** @var \Illuminate\View\Factory $instance */
  20555. return $instance->yieldSection();
  20556. }
  20557. /**
  20558. * Stop injecting content into a section.
  20559. *
  20560. * @param bool $overwrite
  20561. * @return string
  20562. * @throws \InvalidArgumentException
  20563. * @static
  20564. */
  20565. public static function stopSection($overwrite = false)
  20566. {
  20567. /** @var \Illuminate\View\Factory $instance */
  20568. return $instance->stopSection($overwrite);
  20569. }
  20570. /**
  20571. * Stop injecting content into a section and append it.
  20572. *
  20573. * @return string
  20574. * @throws \InvalidArgumentException
  20575. * @static
  20576. */
  20577. public static function appendSection()
  20578. {
  20579. /** @var \Illuminate\View\Factory $instance */
  20580. return $instance->appendSection();
  20581. }
  20582. /**
  20583. * Get the string contents of a section.
  20584. *
  20585. * @param string $section
  20586. * @param string $default
  20587. * @return string
  20588. * @static
  20589. */
  20590. public static function yieldContent($section, $default = '')
  20591. {
  20592. /** @var \Illuminate\View\Factory $instance */
  20593. return $instance->yieldContent($section, $default);
  20594. }
  20595. /**
  20596. * Get the parent placeholder for the current request.
  20597. *
  20598. * @param string $section
  20599. * @return string
  20600. * @static
  20601. */
  20602. public static function parentPlaceholder($section = '')
  20603. {
  20604. return \Illuminate\View\Factory::parentPlaceholder($section);
  20605. }
  20606. /**
  20607. * Check if section exists.
  20608. *
  20609. * @param string $name
  20610. * @return bool
  20611. * @static
  20612. */
  20613. public static function hasSection($name)
  20614. {
  20615. /** @var \Illuminate\View\Factory $instance */
  20616. return $instance->hasSection($name);
  20617. }
  20618. /**
  20619. * Check if section does not exist.
  20620. *
  20621. * @param string $name
  20622. * @return bool
  20623. * @static
  20624. */
  20625. public static function sectionMissing($name)
  20626. {
  20627. /** @var \Illuminate\View\Factory $instance */
  20628. return $instance->sectionMissing($name);
  20629. }
  20630. /**
  20631. * Get the contents of a section.
  20632. *
  20633. * @param string $name
  20634. * @param string|null $default
  20635. * @return mixed
  20636. * @static
  20637. */
  20638. public static function getSection($name, $default = null)
  20639. {
  20640. /** @var \Illuminate\View\Factory $instance */
  20641. return $instance->getSection($name, $default);
  20642. }
  20643. /**
  20644. * Get the entire array of sections.
  20645. *
  20646. * @return array
  20647. * @static
  20648. */
  20649. public static function getSections()
  20650. {
  20651. /** @var \Illuminate\View\Factory $instance */
  20652. return $instance->getSections();
  20653. }
  20654. /**
  20655. * Flush all of the sections.
  20656. *
  20657. * @return void
  20658. * @static
  20659. */
  20660. public static function flushSections()
  20661. {
  20662. /** @var \Illuminate\View\Factory $instance */
  20663. $instance->flushSections();
  20664. }
  20665. /**
  20666. * Add new loop to the stack.
  20667. *
  20668. * @param \Countable|array $data
  20669. * @return void
  20670. * @static
  20671. */
  20672. public static function addLoop($data)
  20673. {
  20674. /** @var \Illuminate\View\Factory $instance */
  20675. $instance->addLoop($data);
  20676. }
  20677. /**
  20678. * Increment the top loop's indices.
  20679. *
  20680. * @return void
  20681. * @static
  20682. */
  20683. public static function incrementLoopIndices()
  20684. {
  20685. /** @var \Illuminate\View\Factory $instance */
  20686. $instance->incrementLoopIndices();
  20687. }
  20688. /**
  20689. * Pop a loop from the top of the loop stack.
  20690. *
  20691. * @return void
  20692. * @static
  20693. */
  20694. public static function popLoop()
  20695. {
  20696. /** @var \Illuminate\View\Factory $instance */
  20697. $instance->popLoop();
  20698. }
  20699. /**
  20700. * Get an instance of the last loop in the stack.
  20701. *
  20702. * @return \stdClass|null
  20703. * @static
  20704. */
  20705. public static function getLastLoop()
  20706. {
  20707. /** @var \Illuminate\View\Factory $instance */
  20708. return $instance->getLastLoop();
  20709. }
  20710. /**
  20711. * Get the entire loop stack.
  20712. *
  20713. * @return array
  20714. * @static
  20715. */
  20716. public static function getLoopStack()
  20717. {
  20718. /** @var \Illuminate\View\Factory $instance */
  20719. return $instance->getLoopStack();
  20720. }
  20721. /**
  20722. * Start injecting content into a push section.
  20723. *
  20724. * @param string $section
  20725. * @param string $content
  20726. * @return void
  20727. * @static
  20728. */
  20729. public static function startPush($section, $content = '')
  20730. {
  20731. /** @var \Illuminate\View\Factory $instance */
  20732. $instance->startPush($section, $content);
  20733. }
  20734. /**
  20735. * Stop injecting content into a push section.
  20736. *
  20737. * @return string
  20738. * @throws \InvalidArgumentException
  20739. * @static
  20740. */
  20741. public static function stopPush()
  20742. {
  20743. /** @var \Illuminate\View\Factory $instance */
  20744. return $instance->stopPush();
  20745. }
  20746. /**
  20747. * Start prepending content into a push section.
  20748. *
  20749. * @param string $section
  20750. * @param string $content
  20751. * @return void
  20752. * @static
  20753. */
  20754. public static function startPrepend($section, $content = '')
  20755. {
  20756. /** @var \Illuminate\View\Factory $instance */
  20757. $instance->startPrepend($section, $content);
  20758. }
  20759. /**
  20760. * Stop prepending content into a push section.
  20761. *
  20762. * @return string
  20763. * @throws \InvalidArgumentException
  20764. * @static
  20765. */
  20766. public static function stopPrepend()
  20767. {
  20768. /** @var \Illuminate\View\Factory $instance */
  20769. return $instance->stopPrepend();
  20770. }
  20771. /**
  20772. * Get the string contents of a push section.
  20773. *
  20774. * @param string $section
  20775. * @param string $default
  20776. * @return string
  20777. * @static
  20778. */
  20779. public static function yieldPushContent($section, $default = '')
  20780. {
  20781. /** @var \Illuminate\View\Factory $instance */
  20782. return $instance->yieldPushContent($section, $default);
  20783. }
  20784. /**
  20785. * Flush all of the stacks.
  20786. *
  20787. * @return void
  20788. * @static
  20789. */
  20790. public static function flushStacks()
  20791. {
  20792. /** @var \Illuminate\View\Factory $instance */
  20793. $instance->flushStacks();
  20794. }
  20795. /**
  20796. * Start a translation block.
  20797. *
  20798. * @param array $replacements
  20799. * @return void
  20800. * @static
  20801. */
  20802. public static function startTranslation($replacements = [])
  20803. {
  20804. /** @var \Illuminate\View\Factory $instance */
  20805. $instance->startTranslation($replacements);
  20806. }
  20807. /**
  20808. * Render the current translation.
  20809. *
  20810. * @return string
  20811. * @static
  20812. */
  20813. public static function renderTranslation()
  20814. {
  20815. /** @var \Illuminate\View\Factory $instance */
  20816. return $instance->renderTranslation();
  20817. }
  20818. }
  20819. /**
  20820. * @see \Illuminate\Foundation\Vite
  20821. */
  20822. class Vite {
  20823. /**
  20824. * Get the preloaded assets.
  20825. *
  20826. * @return array
  20827. * @static
  20828. */
  20829. public static function preloadedAssets()
  20830. {
  20831. /** @var \Illuminate\Foundation\Vite $instance */
  20832. return $instance->preloadedAssets();
  20833. }
  20834. /**
  20835. * Get the Content Security Policy nonce applied to all generated tags.
  20836. *
  20837. * @return string|null
  20838. * @static
  20839. */
  20840. public static function cspNonce()
  20841. {
  20842. /** @var \Illuminate\Foundation\Vite $instance */
  20843. return $instance->cspNonce();
  20844. }
  20845. /**
  20846. * Generate or set a Content Security Policy nonce to apply to all generated tags.
  20847. *
  20848. * @param string|null $nonce
  20849. * @return string
  20850. * @static
  20851. */
  20852. public static function useCspNonce($nonce = null)
  20853. {
  20854. /** @var \Illuminate\Foundation\Vite $instance */
  20855. return $instance->useCspNonce($nonce);
  20856. }
  20857. /**
  20858. * Use the given key to detect integrity hashes in the manifest.
  20859. *
  20860. * @param string|false $key
  20861. * @return \Illuminate\Foundation\Vite
  20862. * @static
  20863. */
  20864. public static function useIntegrityKey($key)
  20865. {
  20866. /** @var \Illuminate\Foundation\Vite $instance */
  20867. return $instance->useIntegrityKey($key);
  20868. }
  20869. /**
  20870. * Set the Vite entry points.
  20871. *
  20872. * @param array $entryPoints
  20873. * @return \Illuminate\Foundation\Vite
  20874. * @static
  20875. */
  20876. public static function withEntryPoints($entryPoints)
  20877. {
  20878. /** @var \Illuminate\Foundation\Vite $instance */
  20879. return $instance->withEntryPoints($entryPoints);
  20880. }
  20881. /**
  20882. * Merge additional Vite entry points with the current set.
  20883. *
  20884. * @param array $entryPoints
  20885. * @return \Illuminate\Foundation\Vite
  20886. * @static
  20887. */
  20888. public static function mergeEntryPoints($entryPoints)
  20889. {
  20890. /** @var \Illuminate\Foundation\Vite $instance */
  20891. return $instance->mergeEntryPoints($entryPoints);
  20892. }
  20893. /**
  20894. * Set the filename for the manifest file.
  20895. *
  20896. * @param string $filename
  20897. * @return \Illuminate\Foundation\Vite
  20898. * @static
  20899. */
  20900. public static function useManifestFilename($filename)
  20901. {
  20902. /** @var \Illuminate\Foundation\Vite $instance */
  20903. return $instance->useManifestFilename($filename);
  20904. }
  20905. /**
  20906. * Resolve asset paths using the provided resolver.
  20907. *
  20908. * @param callable|null $resolver
  20909. * @return \Illuminate\Foundation\Vite
  20910. * @static
  20911. */
  20912. public static function createAssetPathsUsing($resolver)
  20913. {
  20914. /** @var \Illuminate\Foundation\Vite $instance */
  20915. return $instance->createAssetPathsUsing($resolver);
  20916. }
  20917. /**
  20918. * Get the Vite "hot" file path.
  20919. *
  20920. * @return string
  20921. * @static
  20922. */
  20923. public static function hotFile()
  20924. {
  20925. /** @var \Illuminate\Foundation\Vite $instance */
  20926. return $instance->hotFile();
  20927. }
  20928. /**
  20929. * Set the Vite "hot" file path.
  20930. *
  20931. * @param string $path
  20932. * @return \Illuminate\Foundation\Vite
  20933. * @static
  20934. */
  20935. public static function useHotFile($path)
  20936. {
  20937. /** @var \Illuminate\Foundation\Vite $instance */
  20938. return $instance->useHotFile($path);
  20939. }
  20940. /**
  20941. * Set the Vite build directory.
  20942. *
  20943. * @param string $path
  20944. * @return \Illuminate\Foundation\Vite
  20945. * @static
  20946. */
  20947. public static function useBuildDirectory($path)
  20948. {
  20949. /** @var \Illuminate\Foundation\Vite $instance */
  20950. return $instance->useBuildDirectory($path);
  20951. }
  20952. /**
  20953. * Use the given callback to resolve attributes for script tags.
  20954. *
  20955. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20956. * @return \Illuminate\Foundation\Vite
  20957. * @static
  20958. */
  20959. public static function useScriptTagAttributes($attributes)
  20960. {
  20961. /** @var \Illuminate\Foundation\Vite $instance */
  20962. return $instance->useScriptTagAttributes($attributes);
  20963. }
  20964. /**
  20965. * Use the given callback to resolve attributes for style tags.
  20966. *
  20967. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20968. * @return \Illuminate\Foundation\Vite
  20969. * @static
  20970. */
  20971. public static function useStyleTagAttributes($attributes)
  20972. {
  20973. /** @var \Illuminate\Foundation\Vite $instance */
  20974. return $instance->useStyleTagAttributes($attributes);
  20975. }
  20976. /**
  20977. * Use the given callback to resolve attributes for preload tags.
  20978. *
  20979. * @param (callable(string, string, ?array, ?array): (array|false))|array|false $attributes
  20980. * @return \Illuminate\Foundation\Vite
  20981. * @static
  20982. */
  20983. public static function usePreloadTagAttributes($attributes)
  20984. {
  20985. /** @var \Illuminate\Foundation\Vite $instance */
  20986. return $instance->usePreloadTagAttributes($attributes);
  20987. }
  20988. /**
  20989. * Eagerly prefetch assets.
  20990. *
  20991. * @param int|null $concurrency
  20992. * @param string $event
  20993. * @return \Illuminate\Foundation\Vite
  20994. * @static
  20995. */
  20996. public static function prefetch($concurrency = null, $event = 'load')
  20997. {
  20998. /** @var \Illuminate\Foundation\Vite $instance */
  20999. return $instance->prefetch($concurrency, $event);
  21000. }
  21001. /**
  21002. * Use the "waterfall" prefetching strategy.
  21003. *
  21004. * @return \Illuminate\Foundation\Vite
  21005. * @static
  21006. */
  21007. public static function useWaterfallPrefetching($concurrency = null)
  21008. {
  21009. /** @var \Illuminate\Foundation\Vite $instance */
  21010. return $instance->useWaterfallPrefetching($concurrency);
  21011. }
  21012. /**
  21013. * Use the "aggressive" prefetching strategy.
  21014. *
  21015. * @return \Illuminate\Foundation\Vite
  21016. * @static
  21017. */
  21018. public static function useAggressivePrefetching()
  21019. {
  21020. /** @var \Illuminate\Foundation\Vite $instance */
  21021. return $instance->useAggressivePrefetching();
  21022. }
  21023. /**
  21024. * Set the prefetching strategy.
  21025. *
  21026. * @param 'waterfall'|'aggressive'|null $strategy
  21027. * @param array $config
  21028. * @return \Illuminate\Foundation\Vite
  21029. * @static
  21030. */
  21031. public static function usePrefetchStrategy($strategy, $config = [])
  21032. {
  21033. /** @var \Illuminate\Foundation\Vite $instance */
  21034. return $instance->usePrefetchStrategy($strategy, $config);
  21035. }
  21036. /**
  21037. * Generate React refresh runtime script.
  21038. *
  21039. * @return \Illuminate\Support\HtmlString|void
  21040. * @static
  21041. */
  21042. public static function reactRefresh()
  21043. {
  21044. /** @var \Illuminate\Foundation\Vite $instance */
  21045. return $instance->reactRefresh();
  21046. }
  21047. /**
  21048. * Get the URL for an asset.
  21049. *
  21050. * @param string $asset
  21051. * @param string|null $buildDirectory
  21052. * @return string
  21053. * @static
  21054. */
  21055. public static function asset($asset, $buildDirectory = null)
  21056. {
  21057. /** @var \Illuminate\Foundation\Vite $instance */
  21058. return $instance->asset($asset, $buildDirectory);
  21059. }
  21060. /**
  21061. * Get the content of a given asset.
  21062. *
  21063. * @param string $asset
  21064. * @param string|null $buildDirectory
  21065. * @return string
  21066. * @throws \Illuminate\Foundation\ViteException
  21067. * @static
  21068. */
  21069. public static function content($asset, $buildDirectory = null)
  21070. {
  21071. /** @var \Illuminate\Foundation\Vite $instance */
  21072. return $instance->content($asset, $buildDirectory);
  21073. }
  21074. /**
  21075. * Get a unique hash representing the current manifest, or null if there is no manifest.
  21076. *
  21077. * @param string|null $buildDirectory
  21078. * @return string|null
  21079. * @static
  21080. */
  21081. public static function manifestHash($buildDirectory = null)
  21082. {
  21083. /** @var \Illuminate\Foundation\Vite $instance */
  21084. return $instance->manifestHash($buildDirectory);
  21085. }
  21086. /**
  21087. * Determine if the HMR server is running.
  21088. *
  21089. * @return bool
  21090. * @static
  21091. */
  21092. public static function isRunningHot()
  21093. {
  21094. /** @var \Illuminate\Foundation\Vite $instance */
  21095. return $instance->isRunningHot();
  21096. }
  21097. /**
  21098. * Get the Vite tag content as a string of HTML.
  21099. *
  21100. * @return string
  21101. * @static
  21102. */
  21103. public static function toHtml()
  21104. {
  21105. /** @var \Illuminate\Foundation\Vite $instance */
  21106. return $instance->toHtml();
  21107. }
  21108. /**
  21109. * Flush state.
  21110. *
  21111. * @return void
  21112. * @static
  21113. */
  21114. public static function flush()
  21115. {
  21116. /** @var \Illuminate\Foundation\Vite $instance */
  21117. $instance->flush();
  21118. }
  21119. /**
  21120. * Register a custom macro.
  21121. *
  21122. * @param string $name
  21123. * @param object|callable $macro
  21124. * @param-closure-this static $macro
  21125. * @return void
  21126. * @static
  21127. */
  21128. public static function macro($name, $macro)
  21129. {
  21130. \Illuminate\Foundation\Vite::macro($name, $macro);
  21131. }
  21132. /**
  21133. * Mix another object into the class.
  21134. *
  21135. * @param object $mixin
  21136. * @param bool $replace
  21137. * @return void
  21138. * @throws \ReflectionException
  21139. * @static
  21140. */
  21141. public static function mixin($mixin, $replace = true)
  21142. {
  21143. \Illuminate\Foundation\Vite::mixin($mixin, $replace);
  21144. }
  21145. /**
  21146. * Checks if macro is registered.
  21147. *
  21148. * @param string $name
  21149. * @return bool
  21150. * @static
  21151. */
  21152. public static function hasMacro($name)
  21153. {
  21154. return \Illuminate\Foundation\Vite::hasMacro($name);
  21155. }
  21156. /**
  21157. * Flush the existing macros.
  21158. *
  21159. * @return void
  21160. * @static
  21161. */
  21162. public static function flushMacros()
  21163. {
  21164. \Illuminate\Foundation\Vite::flushMacros();
  21165. }
  21166. }
  21167. }
  21168. namespace Illuminate\Http {
  21169. /**
  21170. */
  21171. class Request extends \Symfony\Component\HttpFoundation\Request {
  21172. /**
  21173. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21174. * @param array $rules
  21175. * @param mixed $params
  21176. * @static
  21177. */
  21178. public static function validate($rules, ...$params)
  21179. {
  21180. return \Illuminate\Http\Request::validate($rules, ...$params);
  21181. }
  21182. /**
  21183. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21184. * @param string $errorBag
  21185. * @param array $rules
  21186. * @param mixed $params
  21187. * @static
  21188. */
  21189. public static function validateWithBag($errorBag, $rules, ...$params)
  21190. {
  21191. return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params);
  21192. }
  21193. /**
  21194. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21195. * @param mixed $absolute
  21196. * @static
  21197. */
  21198. public static function hasValidSignature($absolute = true)
  21199. {
  21200. return \Illuminate\Http\Request::hasValidSignature($absolute);
  21201. }
  21202. /**
  21203. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21204. * @static
  21205. */
  21206. public static function hasValidRelativeSignature()
  21207. {
  21208. return \Illuminate\Http\Request::hasValidRelativeSignature();
  21209. }
  21210. /**
  21211. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21212. * @param mixed $ignoreQuery
  21213. * @param mixed $absolute
  21214. * @static
  21215. */
  21216. public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)
  21217. {
  21218. return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute);
  21219. }
  21220. /**
  21221. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21222. * @param mixed $ignoreQuery
  21223. * @static
  21224. */
  21225. public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])
  21226. {
  21227. return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery);
  21228. }
  21229. }
  21230. }
  21231. namespace Illuminate\Database\Schema {
  21232. /**
  21233. */
  21234. class Blueprint {
  21235. /**
  21236. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21237. * @static
  21238. */
  21239. public static function nestedSet()
  21240. {
  21241. return \Illuminate\Database\Schema\Blueprint::nestedSet();
  21242. }
  21243. /**
  21244. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21245. * @static
  21246. */
  21247. public static function dropNestedSet()
  21248. {
  21249. return \Illuminate\Database\Schema\Blueprint::dropNestedSet();
  21250. }
  21251. }
  21252. }
  21253. namespace {
  21254. class App extends \Illuminate\Support\Facades\App {}
  21255. class Arr extends \Illuminate\Support\Arr {}
  21256. class Artisan extends \Illuminate\Support\Facades\Artisan {}
  21257. class Auth extends \Illuminate\Support\Facades\Auth {}
  21258. class Blade extends \Illuminate\Support\Facades\Blade {}
  21259. class Broadcast extends \Illuminate\Support\Facades\Broadcast {}
  21260. class Bus extends \Illuminate\Support\Facades\Bus {}
  21261. class Cache extends \Illuminate\Support\Facades\Cache {}
  21262. class Concurrency extends \Illuminate\Support\Facades\Concurrency {}
  21263. class Config extends \Illuminate\Support\Facades\Config {}
  21264. class Context extends \Illuminate\Support\Facades\Context {}
  21265. class Cookie extends \Illuminate\Support\Facades\Cookie {}
  21266. class Crypt extends \Illuminate\Support\Facades\Crypt {}
  21267. class Date extends \Illuminate\Support\Facades\Date {}
  21268. class DB extends \Illuminate\Support\Facades\DB {}
  21269. /**
  21270. * @template TCollection of static
  21271. * @template TModel of static
  21272. * @template TValue of static
  21273. * @template TValue of static
  21274. */
  21275. class Eloquent extends \Illuminate\Database\Eloquent\Model { /**
  21276. * Create and return an un-saved model instance.
  21277. *
  21278. * @param array $attributes
  21279. * @return TModel
  21280. * @static
  21281. */
  21282. public static function make($attributes = [])
  21283. {
  21284. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21285. return $instance->make($attributes);
  21286. }
  21287. /**
  21288. * Register a new global scope.
  21289. *
  21290. * @param string $identifier
  21291. * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope
  21292. * @return \Illuminate\Database\Eloquent\Builder<static>
  21293. * @static
  21294. */
  21295. public static function withGlobalScope($identifier, $scope)
  21296. {
  21297. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21298. return $instance->withGlobalScope($identifier, $scope);
  21299. }
  21300. /**
  21301. * Remove a registered global scope.
  21302. *
  21303. * @param \Illuminate\Database\Eloquent\Scope|string $scope
  21304. * @return \Illuminate\Database\Eloquent\Builder<static>
  21305. * @static
  21306. */
  21307. public static function withoutGlobalScope($scope)
  21308. {
  21309. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21310. return $instance->withoutGlobalScope($scope);
  21311. }
  21312. /**
  21313. * Remove all or passed registered global scopes.
  21314. *
  21315. * @param array|null $scopes
  21316. * @return \Illuminate\Database\Eloquent\Builder<static>
  21317. * @static
  21318. */
  21319. public static function withoutGlobalScopes($scopes = null)
  21320. {
  21321. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21322. return $instance->withoutGlobalScopes($scopes);
  21323. }
  21324. /**
  21325. * Get an array of global scopes that were removed from the query.
  21326. *
  21327. * @return array
  21328. * @static
  21329. */
  21330. public static function removedScopes()
  21331. {
  21332. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21333. return $instance->removedScopes();
  21334. }
  21335. /**
  21336. * Add a where clause on the primary key to the query.
  21337. *
  21338. * @param mixed $id
  21339. * @return \Illuminate\Database\Eloquent\Builder<static>
  21340. * @static
  21341. */
  21342. public static function whereKey($id)
  21343. {
  21344. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21345. return $instance->whereKey($id);
  21346. }
  21347. /**
  21348. * Add a where clause on the primary key to the query.
  21349. *
  21350. * @param mixed $id
  21351. * @return \Illuminate\Database\Eloquent\Builder<static>
  21352. * @static
  21353. */
  21354. public static function whereKeyNot($id)
  21355. {
  21356. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21357. return $instance->whereKeyNot($id);
  21358. }
  21359. /**
  21360. * Add a basic where clause to the query.
  21361. *
  21362. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21363. * @param mixed $operator
  21364. * @param mixed $value
  21365. * @param string $boolean
  21366. * @return \Illuminate\Database\Eloquent\Builder<static>
  21367. * @static
  21368. */
  21369. public static function where($column, $operator = null, $value = null, $boolean = 'and')
  21370. {
  21371. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21372. return $instance->where($column, $operator, $value, $boolean);
  21373. }
  21374. /**
  21375. * Add a basic where clause to the query, and return the first result.
  21376. *
  21377. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21378. * @param mixed $operator
  21379. * @param mixed $value
  21380. * @param string $boolean
  21381. * @return TModel|null
  21382. * @static
  21383. */
  21384. public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
  21385. {
  21386. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21387. return $instance->firstWhere($column, $operator, $value, $boolean);
  21388. }
  21389. /**
  21390. * Add an "or where" clause to the query.
  21391. *
  21392. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21393. * @param mixed $operator
  21394. * @param mixed $value
  21395. * @return \Illuminate\Database\Eloquent\Builder<static>
  21396. * @static
  21397. */
  21398. public static function orWhere($column, $operator = null, $value = null)
  21399. {
  21400. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21401. return $instance->orWhere($column, $operator, $value);
  21402. }
  21403. /**
  21404. * Add a basic "where not" clause to the query.
  21405. *
  21406. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21407. * @param mixed $operator
  21408. * @param mixed $value
  21409. * @param string $boolean
  21410. * @return \Illuminate\Database\Eloquent\Builder<static>
  21411. * @static
  21412. */
  21413. public static function whereNot($column, $operator = null, $value = null, $boolean = 'and')
  21414. {
  21415. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21416. return $instance->whereNot($column, $operator, $value, $boolean);
  21417. }
  21418. /**
  21419. * Add an "or where not" clause to the query.
  21420. *
  21421. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21422. * @param mixed $operator
  21423. * @param mixed $value
  21424. * @return \Illuminate\Database\Eloquent\Builder<static>
  21425. * @static
  21426. */
  21427. public static function orWhereNot($column, $operator = null, $value = null)
  21428. {
  21429. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21430. return $instance->orWhereNot($column, $operator, $value);
  21431. }
  21432. /**
  21433. * Add an "order by" clause for a timestamp to the query.
  21434. *
  21435. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21436. * @return \Illuminate\Database\Eloquent\Builder<static>
  21437. * @static
  21438. */
  21439. public static function latest($column = null)
  21440. {
  21441. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21442. return $instance->latest($column);
  21443. }
  21444. /**
  21445. * Add an "order by" clause for a timestamp to the query.
  21446. *
  21447. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21448. * @return \Illuminate\Database\Eloquent\Builder<static>
  21449. * @static
  21450. */
  21451. public static function oldest($column = null)
  21452. {
  21453. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21454. return $instance->oldest($column);
  21455. }
  21456. /**
  21457. * Create a collection of models from plain arrays.
  21458. *
  21459. * @param array $items
  21460. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21461. * @static
  21462. */
  21463. public static function hydrate($items)
  21464. {
  21465. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21466. return $instance->hydrate($items);
  21467. }
  21468. /**
  21469. * Insert into the database after merging the model's default attributes, setting timestamps, and casting values.
  21470. *
  21471. * @param array<int, array<string, mixed>> $values
  21472. * @return bool
  21473. * @static
  21474. */
  21475. public static function fillAndInsert($values)
  21476. {
  21477. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21478. return $instance->fillAndInsert($values);
  21479. }
  21480. /**
  21481. * Insert (ignoring errors) into the database after merging the model's default attributes, setting timestamps, and casting values.
  21482. *
  21483. * @param array<int, array<string, mixed>> $values
  21484. * @return int
  21485. * @static
  21486. */
  21487. public static function fillAndInsertOrIgnore($values)
  21488. {
  21489. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21490. return $instance->fillAndInsertOrIgnore($values);
  21491. }
  21492. /**
  21493. * Insert a record into the database and get its ID after merging the model's default attributes, setting timestamps, and casting values.
  21494. *
  21495. * @param array<string, mixed> $values
  21496. * @return int
  21497. * @static
  21498. */
  21499. public static function fillAndInsertGetId($values)
  21500. {
  21501. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21502. return $instance->fillAndInsertGetId($values);
  21503. }
  21504. /**
  21505. * Enrich the given values by merging in the model's default attributes, adding timestamps, and casting values.
  21506. *
  21507. * @param array<int, array<string, mixed>> $values
  21508. * @return array<int, array<string, mixed>>
  21509. * @static
  21510. */
  21511. public static function fillForInsert($values)
  21512. {
  21513. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21514. return $instance->fillForInsert($values);
  21515. }
  21516. /**
  21517. * Create a collection of models from a raw query.
  21518. *
  21519. * @param string $query
  21520. * @param array $bindings
  21521. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21522. * @static
  21523. */
  21524. public static function fromQuery($query, $bindings = [])
  21525. {
  21526. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21527. return $instance->fromQuery($query, $bindings);
  21528. }
  21529. /**
  21530. * Find a model by its primary key.
  21531. *
  21532. * @param mixed $id
  21533. * @param array|string $columns
  21534. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel|null)
  21535. * @static
  21536. */
  21537. public static function find($id, $columns = [])
  21538. {
  21539. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21540. return $instance->find($id, $columns);
  21541. }
  21542. /**
  21543. * Find a sole model by its primary key.
  21544. *
  21545. * @param mixed $id
  21546. * @param array|string $columns
  21547. * @return TModel
  21548. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21549. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21550. * @static
  21551. */
  21552. public static function findSole($id, $columns = [])
  21553. {
  21554. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21555. return $instance->findSole($id, $columns);
  21556. }
  21557. /**
  21558. * Find multiple models by their primary keys.
  21559. *
  21560. * @param \Illuminate\Contracts\Support\Arrayable|array $ids
  21561. * @param array|string $columns
  21562. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21563. * @static
  21564. */
  21565. public static function findMany($ids, $columns = [])
  21566. {
  21567. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21568. return $instance->findMany($ids, $columns);
  21569. }
  21570. /**
  21571. * Find a model by its primary key or throw an exception.
  21572. *
  21573. * @param mixed $id
  21574. * @param array|string $columns
  21575. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21576. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21577. * @static
  21578. */
  21579. public static function findOrFail($id, $columns = [])
  21580. {
  21581. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21582. return $instance->findOrFail($id, $columns);
  21583. }
  21584. /**
  21585. * Find a model by its primary key or return fresh model instance.
  21586. *
  21587. * @param mixed $id
  21588. * @param array|string $columns
  21589. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21590. * @static
  21591. */
  21592. public static function findOrNew($id, $columns = [])
  21593. {
  21594. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21595. return $instance->findOrNew($id, $columns);
  21596. }
  21597. /**
  21598. * Find a model by its primary key or call a callback.
  21599. *
  21600. * @template TValue
  21601. * @param mixed $id
  21602. * @param (\Closure(): TValue)|list<string>|string $columns
  21603. * @param (\Closure(): TValue)|null $callback
  21604. * @return ( $id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>)
  21605. * ? \Illuminate\Database\Eloquent\Collection<int, TModel>
  21606. * : TModel|TValue
  21607. * )
  21608. * @static
  21609. */
  21610. public static function findOr($id, $columns = [], $callback = null)
  21611. {
  21612. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21613. return $instance->findOr($id, $columns, $callback);
  21614. }
  21615. /**
  21616. * Get the first record matching the attributes or instantiate it.
  21617. *
  21618. * @param array $attributes
  21619. * @param array $values
  21620. * @return TModel
  21621. * @static
  21622. */
  21623. public static function firstOrNew($attributes = [], $values = [])
  21624. {
  21625. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21626. return $instance->firstOrNew($attributes, $values);
  21627. }
  21628. /**
  21629. * Get the first record matching the attributes. If the record is not found, create it.
  21630. *
  21631. * @param array $attributes
  21632. * @param array $values
  21633. * @return TModel
  21634. * @static
  21635. */
  21636. public static function firstOrCreate($attributes = [], $values = [])
  21637. {
  21638. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21639. return $instance->firstOrCreate($attributes, $values);
  21640. }
  21641. /**
  21642. * Attempt to create the record. If a unique constraint violation occurs, attempt to find the matching record.
  21643. *
  21644. * @param array $attributes
  21645. * @param array $values
  21646. * @return TModel
  21647. * @static
  21648. */
  21649. public static function createOrFirst($attributes = [], $values = [])
  21650. {
  21651. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21652. return $instance->createOrFirst($attributes, $values);
  21653. }
  21654. /**
  21655. * Create or update a record matching the attributes, and fill it with values.
  21656. *
  21657. * @param array $attributes
  21658. * @param array $values
  21659. * @return TModel
  21660. * @static
  21661. */
  21662. public static function updateOrCreate($attributes, $values = [])
  21663. {
  21664. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21665. return $instance->updateOrCreate($attributes, $values);
  21666. }
  21667. /**
  21668. * Create a record matching the attributes, or increment the existing record.
  21669. *
  21670. * @param array $attributes
  21671. * @param string $column
  21672. * @param int|float $default
  21673. * @param int|float $step
  21674. * @param array $extra
  21675. * @return TModel
  21676. * @static
  21677. */
  21678. public static function incrementOrCreate($attributes, $column = 'count', $default = 1, $step = 1, $extra = [])
  21679. {
  21680. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21681. return $instance->incrementOrCreate($attributes, $column, $default, $step, $extra);
  21682. }
  21683. /**
  21684. * Execute the query and get the first result or throw an exception.
  21685. *
  21686. * @param array|string $columns
  21687. * @return TModel
  21688. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21689. * @static
  21690. */
  21691. public static function firstOrFail($columns = [])
  21692. {
  21693. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21694. return $instance->firstOrFail($columns);
  21695. }
  21696. /**
  21697. * Execute the query and get the first result or call a callback.
  21698. *
  21699. * @template TValue
  21700. * @param (\Closure(): TValue)|list<string> $columns
  21701. * @param (\Closure(): TValue)|null $callback
  21702. * @return TModel|TValue
  21703. * @static
  21704. */
  21705. public static function firstOr($columns = [], $callback = null)
  21706. {
  21707. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21708. return $instance->firstOr($columns, $callback);
  21709. }
  21710. /**
  21711. * Execute the query and get the first result if it's the sole matching record.
  21712. *
  21713. * @param array|string $columns
  21714. * @return TModel
  21715. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21716. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21717. * @static
  21718. */
  21719. public static function sole($columns = [])
  21720. {
  21721. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21722. return $instance->sole($columns);
  21723. }
  21724. /**
  21725. * Get a single column's value from the first result of a query.
  21726. *
  21727. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21728. * @return mixed
  21729. * @static
  21730. */
  21731. public static function value($column)
  21732. {
  21733. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21734. return $instance->value($column);
  21735. }
  21736. /**
  21737. * Get a single column's value from the first result of a query if it's the sole matching record.
  21738. *
  21739. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21740. * @return mixed
  21741. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21742. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21743. * @static
  21744. */
  21745. public static function soleValue($column)
  21746. {
  21747. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21748. return $instance->soleValue($column);
  21749. }
  21750. /**
  21751. * Get a single column's value from the first result of the query or throw an exception.
  21752. *
  21753. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21754. * @return mixed
  21755. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21756. * @static
  21757. */
  21758. public static function valueOrFail($column)
  21759. {
  21760. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21761. return $instance->valueOrFail($column);
  21762. }
  21763. /**
  21764. * Execute the query as a "select" statement.
  21765. *
  21766. * @param array|string $columns
  21767. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21768. * @static
  21769. */
  21770. public static function get($columns = [])
  21771. {
  21772. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21773. return $instance->get($columns);
  21774. }
  21775. /**
  21776. * Get the hydrated models without eager loading.
  21777. *
  21778. * @param array|string $columns
  21779. * @return array<int, TModel>
  21780. * @static
  21781. */
  21782. public static function getModels($columns = [])
  21783. {
  21784. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21785. return $instance->getModels($columns);
  21786. }
  21787. /**
  21788. * Eager load the relationships for the models.
  21789. *
  21790. * @param array<int, TModel> $models
  21791. * @return array<int, TModel>
  21792. * @static
  21793. */
  21794. public static function eagerLoadRelations($models)
  21795. {
  21796. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21797. return $instance->eagerLoadRelations($models);
  21798. }
  21799. /**
  21800. * Register a closure to be invoked after the query is executed.
  21801. *
  21802. * @param \Closure $callback
  21803. * @return \Illuminate\Database\Eloquent\Builder<static>
  21804. * @static
  21805. */
  21806. public static function afterQuery($callback)
  21807. {
  21808. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21809. return $instance->afterQuery($callback);
  21810. }
  21811. /**
  21812. * Invoke the "after query" modification callbacks.
  21813. *
  21814. * @param mixed $result
  21815. * @return mixed
  21816. * @static
  21817. */
  21818. public static function applyAfterQueryCallbacks($result)
  21819. {
  21820. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21821. return $instance->applyAfterQueryCallbacks($result);
  21822. }
  21823. /**
  21824. * Get a lazy collection for the given query.
  21825. *
  21826. * @return \Illuminate\Support\LazyCollection<int, TModel>
  21827. * @static
  21828. */
  21829. public static function cursor()
  21830. {
  21831. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21832. return $instance->cursor();
  21833. }
  21834. /**
  21835. * Get a collection with the values of a given column.
  21836. *
  21837. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21838. * @param string|null $key
  21839. * @return \Illuminate\Support\Collection<array-key, mixed>
  21840. * @static
  21841. */
  21842. public static function pluck($column, $key = null)
  21843. {
  21844. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21845. return $instance->pluck($column, $key);
  21846. }
  21847. /**
  21848. * Paginate the given query.
  21849. *
  21850. * @param int|null|\Closure $perPage
  21851. * @param array|string $columns
  21852. * @param string $pageName
  21853. * @param int|null $page
  21854. * @param \Closure|int|null $total
  21855. * @return \Illuminate\Pagination\LengthAwarePaginator
  21856. * @throws \InvalidArgumentException
  21857. * @static
  21858. */
  21859. public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null, $total = null)
  21860. {
  21861. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21862. return $instance->paginate($perPage, $columns, $pageName, $page, $total);
  21863. }
  21864. /**
  21865. * Paginate the given query into a simple paginator.
  21866. *
  21867. * @param int|null $perPage
  21868. * @param array|string $columns
  21869. * @param string $pageName
  21870. * @param int|null $page
  21871. * @return \Illuminate\Contracts\Pagination\Paginator
  21872. * @static
  21873. */
  21874. public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null)
  21875. {
  21876. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21877. return $instance->simplePaginate($perPage, $columns, $pageName, $page);
  21878. }
  21879. /**
  21880. * Paginate the given query into a cursor paginator.
  21881. *
  21882. * @param int|null $perPage
  21883. * @param array|string $columns
  21884. * @param string $cursorName
  21885. * @param \Illuminate\Pagination\Cursor|string|null $cursor
  21886. * @return \Illuminate\Contracts\Pagination\CursorPaginator
  21887. * @static
  21888. */
  21889. public static function cursorPaginate($perPage = null, $columns = [], $cursorName = 'cursor', $cursor = null)
  21890. {
  21891. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21892. return $instance->cursorPaginate($perPage, $columns, $cursorName, $cursor);
  21893. }
  21894. /**
  21895. * Save a new model and return the instance.
  21896. *
  21897. * @param array $attributes
  21898. * @return TModel
  21899. * @static
  21900. */
  21901. public static function create($attributes = [])
  21902. {
  21903. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21904. return $instance->create($attributes);
  21905. }
  21906. /**
  21907. * Save a new model and return the instance without raising model events.
  21908. *
  21909. * @param array $attributes
  21910. * @return TModel
  21911. * @static
  21912. */
  21913. public static function createQuietly($attributes = [])
  21914. {
  21915. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21916. return $instance->createQuietly($attributes);
  21917. }
  21918. /**
  21919. * Save a new model and return the instance. Allow mass-assignment.
  21920. *
  21921. * @param array $attributes
  21922. * @return TModel
  21923. * @static
  21924. */
  21925. public static function forceCreate($attributes)
  21926. {
  21927. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21928. return $instance->forceCreate($attributes);
  21929. }
  21930. /**
  21931. * Save a new model instance with mass assignment without raising model events.
  21932. *
  21933. * @param array $attributes
  21934. * @return TModel
  21935. * @static
  21936. */
  21937. public static function forceCreateQuietly($attributes = [])
  21938. {
  21939. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21940. return $instance->forceCreateQuietly($attributes);
  21941. }
  21942. /**
  21943. * Insert new records or update the existing ones.
  21944. *
  21945. * @param array $values
  21946. * @param array|string $uniqueBy
  21947. * @param array|null $update
  21948. * @return int
  21949. * @static
  21950. */
  21951. public static function upsert($values, $uniqueBy, $update = null)
  21952. {
  21953. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21954. return $instance->upsert($values, $uniqueBy, $update);
  21955. }
  21956. /**
  21957. * Register a replacement for the default delete function.
  21958. *
  21959. * @param \Closure $callback
  21960. * @return void
  21961. * @static
  21962. */
  21963. public static function onDelete($callback)
  21964. {
  21965. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21966. $instance->onDelete($callback);
  21967. }
  21968. /**
  21969. * Call the given local model scopes.
  21970. *
  21971. * @param array|string $scopes
  21972. * @return static|mixed
  21973. * @static
  21974. */
  21975. public static function scopes($scopes)
  21976. {
  21977. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21978. return $instance->scopes($scopes);
  21979. }
  21980. /**
  21981. * Apply the scopes to the Eloquent builder instance and return it.
  21982. *
  21983. * @return static
  21984. * @static
  21985. */
  21986. public static function applyScopes()
  21987. {
  21988. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21989. return $instance->applyScopes();
  21990. }
  21991. /**
  21992. * Prevent the specified relations from being eager loaded.
  21993. *
  21994. * @param mixed $relations
  21995. * @return \Illuminate\Database\Eloquent\Builder<static>
  21996. * @static
  21997. */
  21998. public static function without($relations)
  21999. {
  22000. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22001. return $instance->without($relations);
  22002. }
  22003. /**
  22004. * Set the relationships that should be eager loaded while removing any previously added eager loading specifications.
  22005. *
  22006. * @param array<array-key, array|(\Closure(\Illuminate\Database\Eloquent\Relations\Relation<*,*,*>): mixed)|string>|string $relations
  22007. * @return \Illuminate\Database\Eloquent\Builder<static>
  22008. * @static
  22009. */
  22010. public static function withOnly($relations)
  22011. {
  22012. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22013. return $instance->withOnly($relations);
  22014. }
  22015. /**
  22016. * Create a new instance of the model being queried.
  22017. *
  22018. * @param array $attributes
  22019. * @return TModel
  22020. * @static
  22021. */
  22022. public static function newModelInstance($attributes = [])
  22023. {
  22024. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22025. return $instance->newModelInstance($attributes);
  22026. }
  22027. /**
  22028. * Specify attributes that should be added to any new models created by this builder.
  22029. *
  22030. * The given key / value pairs will also be added as where conditions to the query.
  22031. *
  22032. * @param \Illuminate\Contracts\Database\Query\Expression|array|string $attributes
  22033. * @param mixed $value
  22034. * @param bool $asConditions
  22035. * @return \Illuminate\Database\Eloquent\Builder<static>
  22036. * @static
  22037. */
  22038. public static function withAttributes($attributes, $value = null, $asConditions = true)
  22039. {
  22040. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22041. return $instance->withAttributes($attributes, $value, $asConditions);
  22042. }
  22043. /**
  22044. * Apply query-time casts to the model instance.
  22045. *
  22046. * @param array $casts
  22047. * @return \Illuminate\Database\Eloquent\Builder<static>
  22048. * @static
  22049. */
  22050. public static function withCasts($casts)
  22051. {
  22052. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22053. return $instance->withCasts($casts);
  22054. }
  22055. /**
  22056. * Execute the given Closure within a transaction savepoint if needed.
  22057. *
  22058. * @template TModelValue
  22059. * @param \Closure(): TModelValue $scope
  22060. * @return TModelValue
  22061. * @static
  22062. */
  22063. public static function withSavepointIfNeeded($scope)
  22064. {
  22065. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22066. return $instance->withSavepointIfNeeded($scope);
  22067. }
  22068. /**
  22069. * Get the underlying query builder instance.
  22070. *
  22071. * @return \Illuminate\Database\Query\Builder
  22072. * @static
  22073. */
  22074. public static function getQuery()
  22075. {
  22076. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22077. return $instance->getQuery();
  22078. }
  22079. /**
  22080. * Set the underlying query builder instance.
  22081. *
  22082. * @param \Illuminate\Database\Query\Builder $query
  22083. * @return \Illuminate\Database\Eloquent\Builder<static>
  22084. * @static
  22085. */
  22086. public static function setQuery($query)
  22087. {
  22088. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22089. return $instance->setQuery($query);
  22090. }
  22091. /**
  22092. * Get a base query builder instance.
  22093. *
  22094. * @return \Illuminate\Database\Query\Builder
  22095. * @static
  22096. */
  22097. public static function toBase()
  22098. {
  22099. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22100. return $instance->toBase();
  22101. }
  22102. /**
  22103. * Get the relationships being eagerly loaded.
  22104. *
  22105. * @return array
  22106. * @static
  22107. */
  22108. public static function getEagerLoads()
  22109. {
  22110. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22111. return $instance->getEagerLoads();
  22112. }
  22113. /**
  22114. * Set the relationships being eagerly loaded.
  22115. *
  22116. * @param array $eagerLoad
  22117. * @return \Illuminate\Database\Eloquent\Builder<static>
  22118. * @static
  22119. */
  22120. public static function setEagerLoads($eagerLoad)
  22121. {
  22122. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22123. return $instance->setEagerLoads($eagerLoad);
  22124. }
  22125. /**
  22126. * Indicate that the given relationships should not be eagerly loaded.
  22127. *
  22128. * @param array $relations
  22129. * @return \Illuminate\Database\Eloquent\Builder<static>
  22130. * @static
  22131. */
  22132. public static function withoutEagerLoad($relations)
  22133. {
  22134. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22135. return $instance->withoutEagerLoad($relations);
  22136. }
  22137. /**
  22138. * Flush the relationships being eagerly loaded.
  22139. *
  22140. * @return \Illuminate\Database\Eloquent\Builder<static>
  22141. * @static
  22142. */
  22143. public static function withoutEagerLoads()
  22144. {
  22145. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22146. return $instance->withoutEagerLoads();
  22147. }
  22148. /**
  22149. * Get the "limit" value from the query or null if it's not set.
  22150. *
  22151. * @return mixed
  22152. * @static
  22153. */
  22154. public static function getLimit()
  22155. {
  22156. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22157. return $instance->getLimit();
  22158. }
  22159. /**
  22160. * Get the "offset" value from the query or null if it's not set.
  22161. *
  22162. * @return mixed
  22163. * @static
  22164. */
  22165. public static function getOffset()
  22166. {
  22167. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22168. return $instance->getOffset();
  22169. }
  22170. /**
  22171. * Get the model instance being queried.
  22172. *
  22173. * @return TModel
  22174. * @static
  22175. */
  22176. public static function getModel()
  22177. {
  22178. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22179. return $instance->getModel();
  22180. }
  22181. /**
  22182. * Set a model instance for the model being queried.
  22183. *
  22184. * @template TModelNew of \Illuminate\Database\Eloquent\Model
  22185. * @param TModelNew $model
  22186. * @return static<TModelNew>
  22187. * @static
  22188. */
  22189. public static function setModel($model)
  22190. {
  22191. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22192. return $instance->setModel($model);
  22193. }
  22194. /**
  22195. * Get the given macro by name.
  22196. *
  22197. * @param string $name
  22198. * @return \Closure
  22199. * @static
  22200. */
  22201. public static function getMacro($name)
  22202. {
  22203. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22204. return $instance->getMacro($name);
  22205. }
  22206. /**
  22207. * Checks if a macro is registered.
  22208. *
  22209. * @param string $name
  22210. * @return bool
  22211. * @static
  22212. */
  22213. public static function hasMacro($name)
  22214. {
  22215. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22216. return $instance->hasMacro($name);
  22217. }
  22218. /**
  22219. * Get the given global macro by name.
  22220. *
  22221. * @param string $name
  22222. * @return \Closure
  22223. * @static
  22224. */
  22225. public static function getGlobalMacro($name)
  22226. {
  22227. return \Illuminate\Database\Eloquent\Builder::getGlobalMacro($name);
  22228. }
  22229. /**
  22230. * Checks if a global macro is registered.
  22231. *
  22232. * @param string $name
  22233. * @return bool
  22234. * @static
  22235. */
  22236. public static function hasGlobalMacro($name)
  22237. {
  22238. return \Illuminate\Database\Eloquent\Builder::hasGlobalMacro($name);
  22239. }
  22240. /**
  22241. * Clone the Eloquent query builder.
  22242. *
  22243. * @return static
  22244. * @static
  22245. */
  22246. public static function clone()
  22247. {
  22248. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22249. return $instance->clone();
  22250. }
  22251. /**
  22252. * Register a closure to be invoked on a clone.
  22253. *
  22254. * @param \Closure $callback
  22255. * @return \Illuminate\Database\Eloquent\Builder<static>
  22256. * @static
  22257. */
  22258. public static function onClone($callback)
  22259. {
  22260. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22261. return $instance->onClone($callback);
  22262. }
  22263. /**
  22264. * Chunk the results of the query.
  22265. *
  22266. * @param int $count
  22267. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22268. * @return bool
  22269. * @static
  22270. */
  22271. public static function chunk($count, $callback)
  22272. {
  22273. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22274. return $instance->chunk($count, $callback);
  22275. }
  22276. /**
  22277. * Run a map over each item while chunking.
  22278. *
  22279. * @template TReturn
  22280. * @param callable(TValue): TReturn $callback
  22281. * @param int $count
  22282. * @return \Illuminate\Support\Collection<int, TReturn>
  22283. * @static
  22284. */
  22285. public static function chunkMap($callback, $count = 1000)
  22286. {
  22287. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22288. return $instance->chunkMap($callback, $count);
  22289. }
  22290. /**
  22291. * Execute a callback over each item while chunking.
  22292. *
  22293. * @param callable(TValue, int): mixed $callback
  22294. * @param int $count
  22295. * @return bool
  22296. * @throws \RuntimeException
  22297. * @static
  22298. */
  22299. public static function each($callback, $count = 1000)
  22300. {
  22301. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22302. return $instance->each($callback, $count);
  22303. }
  22304. /**
  22305. * Chunk the results of a query by comparing IDs.
  22306. *
  22307. * @param int $count
  22308. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22309. * @param string|null $column
  22310. * @param string|null $alias
  22311. * @return bool
  22312. * @static
  22313. */
  22314. public static function chunkById($count, $callback, $column = null, $alias = null)
  22315. {
  22316. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22317. return $instance->chunkById($count, $callback, $column, $alias);
  22318. }
  22319. /**
  22320. * Chunk the results of a query by comparing IDs in descending order.
  22321. *
  22322. * @param int $count
  22323. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22324. * @param string|null $column
  22325. * @param string|null $alias
  22326. * @return bool
  22327. * @static
  22328. */
  22329. public static function chunkByIdDesc($count, $callback, $column = null, $alias = null)
  22330. {
  22331. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22332. return $instance->chunkByIdDesc($count, $callback, $column, $alias);
  22333. }
  22334. /**
  22335. * Chunk the results of a query by comparing IDs in a given order.
  22336. *
  22337. * @param int $count
  22338. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22339. * @param string|null $column
  22340. * @param string|null $alias
  22341. * @param bool $descending
  22342. * @return bool
  22343. * @throws \RuntimeException
  22344. * @static
  22345. */
  22346. public static function orderedChunkById($count, $callback, $column = null, $alias = null, $descending = false)
  22347. {
  22348. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22349. return $instance->orderedChunkById($count, $callback, $column, $alias, $descending);
  22350. }
  22351. /**
  22352. * Execute a callback over each item while chunking by ID.
  22353. *
  22354. * @param callable(TValue, int): mixed $callback
  22355. * @param int $count
  22356. * @param string|null $column
  22357. * @param string|null $alias
  22358. * @return bool
  22359. * @static
  22360. */
  22361. public static function eachById($callback, $count = 1000, $column = null, $alias = null)
  22362. {
  22363. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22364. return $instance->eachById($callback, $count, $column, $alias);
  22365. }
  22366. /**
  22367. * Query lazily, by chunks of the given size.
  22368. *
  22369. * @param int $chunkSize
  22370. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22371. * @throws \InvalidArgumentException
  22372. * @static
  22373. */
  22374. public static function lazy($chunkSize = 1000)
  22375. {
  22376. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22377. return $instance->lazy($chunkSize);
  22378. }
  22379. /**
  22380. * Query lazily, by chunking the results of a query by comparing IDs.
  22381. *
  22382. * @param int $chunkSize
  22383. * @param string|null $column
  22384. * @param string|null $alias
  22385. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22386. * @throws \InvalidArgumentException
  22387. * @static
  22388. */
  22389. public static function lazyById($chunkSize = 1000, $column = null, $alias = null)
  22390. {
  22391. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22392. return $instance->lazyById($chunkSize, $column, $alias);
  22393. }
  22394. /**
  22395. * Query lazily, by chunking the results of a query by comparing IDs in descending order.
  22396. *
  22397. * @param int $chunkSize
  22398. * @param string|null $column
  22399. * @param string|null $alias
  22400. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22401. * @throws \InvalidArgumentException
  22402. * @static
  22403. */
  22404. public static function lazyByIdDesc($chunkSize = 1000, $column = null, $alias = null)
  22405. {
  22406. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22407. return $instance->lazyByIdDesc($chunkSize, $column, $alias);
  22408. }
  22409. /**
  22410. * Execute the query and get the first result.
  22411. *
  22412. * @param array|string $columns
  22413. * @return TValue|null
  22414. * @static
  22415. */
  22416. public static function first($columns = [])
  22417. {
  22418. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22419. return $instance->first($columns);
  22420. }
  22421. /**
  22422. * Execute the query and get the first result if it's the sole matching record.
  22423. *
  22424. * @param array|string $columns
  22425. * @return TValue
  22426. * @throws \Illuminate\Database\RecordsNotFoundException
  22427. * @throws \Illuminate\Database\MultipleRecordsFoundException
  22428. * @static
  22429. */
  22430. public static function baseSole($columns = [])
  22431. {
  22432. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22433. return $instance->baseSole($columns);
  22434. }
  22435. /**
  22436. * Pass the query to a given callback and then return it.
  22437. *
  22438. * @param callable($this): mixed $callback
  22439. * @return \Illuminate\Database\Eloquent\Builder<static>
  22440. * @static
  22441. */
  22442. public static function tap($callback)
  22443. {
  22444. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22445. return $instance->tap($callback);
  22446. }
  22447. /**
  22448. * Pass the query to a given callback and return the result.
  22449. *
  22450. * @template TReturn
  22451. * @param (callable($this): TReturn) $callback
  22452. * @return (TReturn is null|void ? $this : TReturn)
  22453. * @static
  22454. */
  22455. public static function pipe($callback)
  22456. {
  22457. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22458. return $instance->pipe($callback);
  22459. }
  22460. /**
  22461. * Apply the callback if the given "value" is (or resolves to) truthy.
  22462. *
  22463. * @template TWhenParameter
  22464. * @template TWhenReturnType
  22465. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  22466. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  22467. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  22468. * @return $this|TWhenReturnType
  22469. * @static
  22470. */
  22471. public static function when($value = null, $callback = null, $default = null)
  22472. {
  22473. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22474. return $instance->when($value, $callback, $default);
  22475. }
  22476. /**
  22477. * Apply the callback if the given "value" is (or resolves to) falsy.
  22478. *
  22479. * @template TUnlessParameter
  22480. * @template TUnlessReturnType
  22481. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  22482. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  22483. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  22484. * @return $this|TUnlessReturnType
  22485. * @static
  22486. */
  22487. public static function unless($value = null, $callback = null, $default = null)
  22488. {
  22489. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22490. return $instance->unless($value, $callback, $default);
  22491. }
  22492. /**
  22493. * Add a relationship count / exists condition to the query.
  22494. *
  22495. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22496. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22497. * @param string $operator
  22498. * @param int $count
  22499. * @param string $boolean
  22500. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22501. * @return \Illuminate\Database\Eloquent\Builder<static>
  22502. * @throws \RuntimeException
  22503. * @static
  22504. */
  22505. public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22506. {
  22507. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22508. return $instance->has($relation, $operator, $count, $boolean, $callback);
  22509. }
  22510. /**
  22511. * Add a relationship count / exists condition to the query with an "or".
  22512. *
  22513. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22514. * @param string $operator
  22515. * @param int $count
  22516. * @return \Illuminate\Database\Eloquent\Builder<static>
  22517. * @static
  22518. */
  22519. public static function orHas($relation, $operator = '>=', $count = 1)
  22520. {
  22521. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22522. return $instance->orHas($relation, $operator, $count);
  22523. }
  22524. /**
  22525. * Add a relationship count / exists condition to the query.
  22526. *
  22527. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22528. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22529. * @param string $boolean
  22530. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22531. * @return \Illuminate\Database\Eloquent\Builder<static>
  22532. * @static
  22533. */
  22534. public static function doesntHave($relation, $boolean = 'and', $callback = null)
  22535. {
  22536. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22537. return $instance->doesntHave($relation, $boolean, $callback);
  22538. }
  22539. /**
  22540. * Add a relationship count / exists condition to the query with an "or".
  22541. *
  22542. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22543. * @return \Illuminate\Database\Eloquent\Builder<static>
  22544. * @static
  22545. */
  22546. public static function orDoesntHave($relation)
  22547. {
  22548. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22549. return $instance->orDoesntHave($relation);
  22550. }
  22551. /**
  22552. * Add a relationship count / exists condition to the query with where clauses.
  22553. *
  22554. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22555. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22556. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22557. * @param string $operator
  22558. * @param int $count
  22559. * @return \Illuminate\Database\Eloquent\Builder<static>
  22560. * @static
  22561. */
  22562. public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22563. {
  22564. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22565. return $instance->whereHas($relation, $callback, $operator, $count);
  22566. }
  22567. /**
  22568. * Add a relationship count / exists condition to the query with where clauses.
  22569. *
  22570. * Also load the relationship with the same condition.
  22571. *
  22572. * @param string $relation
  22573. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Database\Eloquent\Relations\Relation<*, *, *>): mixed)|null $callback
  22574. * @param string $operator
  22575. * @param int $count
  22576. * @return \Illuminate\Database\Eloquent\Builder<static>
  22577. * @static
  22578. */
  22579. public static function withWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22580. {
  22581. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22582. return $instance->withWhereHas($relation, $callback, $operator, $count);
  22583. }
  22584. /**
  22585. * Add a relationship count / exists condition to the query with where clauses and an "or".
  22586. *
  22587. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22588. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22589. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22590. * @param string $operator
  22591. * @param int $count
  22592. * @return \Illuminate\Database\Eloquent\Builder<static>
  22593. * @static
  22594. */
  22595. public static function orWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22596. {
  22597. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22598. return $instance->orWhereHas($relation, $callback, $operator, $count);
  22599. }
  22600. /**
  22601. * Add a relationship count / exists condition to the query with where clauses.
  22602. *
  22603. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22604. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22605. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22606. * @return \Illuminate\Database\Eloquent\Builder<static>
  22607. * @static
  22608. */
  22609. public static function whereDoesntHave($relation, $callback = null)
  22610. {
  22611. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22612. return $instance->whereDoesntHave($relation, $callback);
  22613. }
  22614. /**
  22615. * Add a relationship count / exists condition to the query with where clauses and an "or".
  22616. *
  22617. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22618. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22619. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22620. * @return \Illuminate\Database\Eloquent\Builder<static>
  22621. * @static
  22622. */
  22623. public static function orWhereDoesntHave($relation, $callback = null)
  22624. {
  22625. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22626. return $instance->orWhereDoesntHave($relation, $callback);
  22627. }
  22628. /**
  22629. * Add a polymorphic relationship count / exists condition to the query.
  22630. *
  22631. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22632. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22633. * @param string|array<int, string> $types
  22634. * @param string $operator
  22635. * @param int $count
  22636. * @param string $boolean
  22637. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22638. * @return \Illuminate\Database\Eloquent\Builder<static>
  22639. * @static
  22640. */
  22641. public static function hasMorph($relation, $types, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22642. {
  22643. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22644. return $instance->hasMorph($relation, $types, $operator, $count, $boolean, $callback);
  22645. }
  22646. /**
  22647. * Add a polymorphic relationship count / exists condition to the query with an "or".
  22648. *
  22649. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22650. * @param string|array<int, string> $types
  22651. * @param string $operator
  22652. * @param int $count
  22653. * @return \Illuminate\Database\Eloquent\Builder<static>
  22654. * @static
  22655. */
  22656. public static function orHasMorph($relation, $types, $operator = '>=', $count = 1)
  22657. {
  22658. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22659. return $instance->orHasMorph($relation, $types, $operator, $count);
  22660. }
  22661. /**
  22662. * Add a polymorphic relationship count / exists condition to the query.
  22663. *
  22664. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22665. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22666. * @param string|array<int, string> $types
  22667. * @param string $boolean
  22668. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22669. * @return \Illuminate\Database\Eloquent\Builder<static>
  22670. * @static
  22671. */
  22672. public static function doesntHaveMorph($relation, $types, $boolean = 'and', $callback = null)
  22673. {
  22674. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22675. return $instance->doesntHaveMorph($relation, $types, $boolean, $callback);
  22676. }
  22677. /**
  22678. * Add a polymorphic relationship count / exists condition to the query with an "or".
  22679. *
  22680. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22681. * @param string|array<int, string> $types
  22682. * @return \Illuminate\Database\Eloquent\Builder<static>
  22683. * @static
  22684. */
  22685. public static function orDoesntHaveMorph($relation, $types)
  22686. {
  22687. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22688. return $instance->orDoesntHaveMorph($relation, $types);
  22689. }
  22690. /**
  22691. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  22692. *
  22693. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22694. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22695. * @param string|array<int, string> $types
  22696. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22697. * @param string $operator
  22698. * @param int $count
  22699. * @return \Illuminate\Database\Eloquent\Builder<static>
  22700. * @static
  22701. */
  22702. public static function whereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  22703. {
  22704. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22705. return $instance->whereHasMorph($relation, $types, $callback, $operator, $count);
  22706. }
  22707. /**
  22708. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  22709. *
  22710. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22711. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22712. * @param string|array<int, string> $types
  22713. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22714. * @param string $operator
  22715. * @param int $count
  22716. * @return \Illuminate\Database\Eloquent\Builder<static>
  22717. * @static
  22718. */
  22719. public static function orWhereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  22720. {
  22721. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22722. return $instance->orWhereHasMorph($relation, $types, $callback, $operator, $count);
  22723. }
  22724. /**
  22725. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  22726. *
  22727. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22728. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22729. * @param string|array<int, string> $types
  22730. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22731. * @return \Illuminate\Database\Eloquent\Builder<static>
  22732. * @static
  22733. */
  22734. public static function whereDoesntHaveMorph($relation, $types, $callback = null)
  22735. {
  22736. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22737. return $instance->whereDoesntHaveMorph($relation, $types, $callback);
  22738. }
  22739. /**
  22740. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  22741. *
  22742. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22743. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22744. * @param string|array<int, string> $types
  22745. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22746. * @return \Illuminate\Database\Eloquent\Builder<static>
  22747. * @static
  22748. */
  22749. public static function orWhereDoesntHaveMorph($relation, $types, $callback = null)
  22750. {
  22751. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22752. return $instance->orWhereDoesntHaveMorph($relation, $types, $callback);
  22753. }
  22754. /**
  22755. * Add a basic where clause to a relationship query.
  22756. *
  22757. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22758. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22759. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22760. * @param mixed $operator
  22761. * @param mixed $value
  22762. * @return \Illuminate\Database\Eloquent\Builder<static>
  22763. * @static
  22764. */
  22765. public static function whereRelation($relation, $column, $operator = null, $value = null)
  22766. {
  22767. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22768. return $instance->whereRelation($relation, $column, $operator, $value);
  22769. }
  22770. /**
  22771. * Add a basic where clause to a relationship query and eager-load the relationship with the same conditions.
  22772. *
  22773. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22774. * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22775. * @param mixed $operator
  22776. * @param mixed $value
  22777. * @return \Illuminate\Database\Eloquent\Builder<static>
  22778. * @static
  22779. */
  22780. public static function withWhereRelation($relation, $column, $operator = null, $value = null)
  22781. {
  22782. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22783. return $instance->withWhereRelation($relation, $column, $operator, $value);
  22784. }
  22785. /**
  22786. * Add an "or where" clause to a relationship query.
  22787. *
  22788. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22789. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22790. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22791. * @param mixed $operator
  22792. * @param mixed $value
  22793. * @return \Illuminate\Database\Eloquent\Builder<static>
  22794. * @static
  22795. */
  22796. public static function orWhereRelation($relation, $column, $operator = null, $value = null)
  22797. {
  22798. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22799. return $instance->orWhereRelation($relation, $column, $operator, $value);
  22800. }
  22801. /**
  22802. * Add a basic count / exists condition to a relationship query.
  22803. *
  22804. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22805. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22806. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22807. * @param mixed $operator
  22808. * @param mixed $value
  22809. * @return \Illuminate\Database\Eloquent\Builder<static>
  22810. * @static
  22811. */
  22812. public static function whereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  22813. {
  22814. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22815. return $instance->whereDoesntHaveRelation($relation, $column, $operator, $value);
  22816. }
  22817. /**
  22818. * Add an "or where" clause to a relationship query.
  22819. *
  22820. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22821. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22822. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22823. * @param mixed $operator
  22824. * @param mixed $value
  22825. * @return \Illuminate\Database\Eloquent\Builder<static>
  22826. * @static
  22827. */
  22828. public static function orWhereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  22829. {
  22830. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22831. return $instance->orWhereDoesntHaveRelation($relation, $column, $operator, $value);
  22832. }
  22833. /**
  22834. * Add a polymorphic relationship condition to the query with a where clause.
  22835. *
  22836. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22837. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22838. * @param string|array<int, string> $types
  22839. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22840. * @param mixed $operator
  22841. * @param mixed $value
  22842. * @return \Illuminate\Database\Eloquent\Builder<static>
  22843. * @static
  22844. */
  22845. public static function whereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  22846. {
  22847. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22848. return $instance->whereMorphRelation($relation, $types, $column, $operator, $value);
  22849. }
  22850. /**
  22851. * Add a polymorphic relationship condition to the query with an "or where" clause.
  22852. *
  22853. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22854. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22855. * @param string|array<int, string> $types
  22856. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22857. * @param mixed $operator
  22858. * @param mixed $value
  22859. * @return \Illuminate\Database\Eloquent\Builder<static>
  22860. * @static
  22861. */
  22862. public static function orWhereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  22863. {
  22864. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22865. return $instance->orWhereMorphRelation($relation, $types, $column, $operator, $value);
  22866. }
  22867. /**
  22868. * Add a polymorphic relationship condition to the query with a doesn't have clause.
  22869. *
  22870. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22871. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22872. * @param string|array<int, string> $types
  22873. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22874. * @param mixed $operator
  22875. * @param mixed $value
  22876. * @return \Illuminate\Database\Eloquent\Builder<static>
  22877. * @static
  22878. */
  22879. public static function whereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  22880. {
  22881. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22882. return $instance->whereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  22883. }
  22884. /**
  22885. * Add a polymorphic relationship condition to the query with an "or doesn't have" clause.
  22886. *
  22887. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22888. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22889. * @param string|array<int, string> $types
  22890. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22891. * @param mixed $operator
  22892. * @param mixed $value
  22893. * @return \Illuminate\Database\Eloquent\Builder<static>
  22894. * @static
  22895. */
  22896. public static function orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  22897. {
  22898. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22899. return $instance->orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  22900. }
  22901. /**
  22902. * Add a morph-to relationship condition to the query.
  22903. *
  22904. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22905. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  22906. * @return \Illuminate\Database\Eloquent\Builder<static>
  22907. * @static
  22908. */
  22909. public static function whereMorphedTo($relation, $model, $boolean = 'and')
  22910. {
  22911. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22912. return $instance->whereMorphedTo($relation, $model, $boolean);
  22913. }
  22914. /**
  22915. * Add a not morph-to relationship condition to the query.
  22916. *
  22917. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22918. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  22919. * @return \Illuminate\Database\Eloquent\Builder<static>
  22920. * @static
  22921. */
  22922. public static function whereNotMorphedTo($relation, $model, $boolean = 'and')
  22923. {
  22924. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22925. return $instance->whereNotMorphedTo($relation, $model, $boolean);
  22926. }
  22927. /**
  22928. * Add a morph-to relationship condition to the query with an "or where" clause.
  22929. *
  22930. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22931. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  22932. * @return \Illuminate\Database\Eloquent\Builder<static>
  22933. * @static
  22934. */
  22935. public static function orWhereMorphedTo($relation, $model)
  22936. {
  22937. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22938. return $instance->orWhereMorphedTo($relation, $model);
  22939. }
  22940. /**
  22941. * Add a not morph-to relationship condition to the query with an "or where" clause.
  22942. *
  22943. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22944. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  22945. * @return \Illuminate\Database\Eloquent\Builder<static>
  22946. * @static
  22947. */
  22948. public static function orWhereNotMorphedTo($relation, $model)
  22949. {
  22950. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22951. return $instance->orWhereNotMorphedTo($relation, $model);
  22952. }
  22953. /**
  22954. * Add a "belongs to" relationship where clause to the query.
  22955. *
  22956. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  22957. * @param string|null $relationshipName
  22958. * @param string $boolean
  22959. * @return \Illuminate\Database\Eloquent\Builder<static>
  22960. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  22961. * @static
  22962. */
  22963. public static function whereBelongsTo($related, $relationshipName = null, $boolean = 'and')
  22964. {
  22965. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22966. return $instance->whereBelongsTo($related, $relationshipName, $boolean);
  22967. }
  22968. /**
  22969. * Add a "BelongsTo" relationship with an "or where" clause to the query.
  22970. *
  22971. * @param \Illuminate\Database\Eloquent\Model $related
  22972. * @param string|null $relationshipName
  22973. * @return \Illuminate\Database\Eloquent\Builder<static>
  22974. * @throws \RuntimeException
  22975. * @static
  22976. */
  22977. public static function orWhereBelongsTo($related, $relationshipName = null)
  22978. {
  22979. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22980. return $instance->orWhereBelongsTo($related, $relationshipName);
  22981. }
  22982. /**
  22983. * Add a "belongs to many" relationship where clause to the query.
  22984. *
  22985. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  22986. * @param string|null $relationshipName
  22987. * @param string $boolean
  22988. * @return \Illuminate\Database\Eloquent\Builder<static>
  22989. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  22990. * @static
  22991. */
  22992. public static function whereAttachedTo($related, $relationshipName = null, $boolean = 'and')
  22993. {
  22994. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22995. return $instance->whereAttachedTo($related, $relationshipName, $boolean);
  22996. }
  22997. /**
  22998. * Add a "belongs to many" relationship with an "or where" clause to the query.
  22999. *
  23000. * @param \Illuminate\Database\Eloquent\Model $related
  23001. * @param string|null $relationshipName
  23002. * @return \Illuminate\Database\Eloquent\Builder<static>
  23003. * @throws \RuntimeException
  23004. * @static
  23005. */
  23006. public static function orWhereAttachedTo($related, $relationshipName = null)
  23007. {
  23008. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23009. return $instance->orWhereAttachedTo($related, $relationshipName);
  23010. }
  23011. /**
  23012. * Add subselect queries to include an aggregate value for a relationship.
  23013. *
  23014. * @param mixed $relations
  23015. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23016. * @param string $function
  23017. * @return \Illuminate\Database\Eloquent\Builder<static>
  23018. * @static
  23019. */
  23020. public static function withAggregate($relations, $column, $function = null)
  23021. {
  23022. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23023. return $instance->withAggregate($relations, $column, $function);
  23024. }
  23025. /**
  23026. * Add subselect queries to count the relations.
  23027. *
  23028. * @param mixed $relations
  23029. * @return \Illuminate\Database\Eloquent\Builder<static>
  23030. * @static
  23031. */
  23032. public static function withCount($relations)
  23033. {
  23034. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23035. return $instance->withCount($relations);
  23036. }
  23037. /**
  23038. * Add subselect queries to include the max of the relation's column.
  23039. *
  23040. * @param string|array $relation
  23041. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23042. * @return \Illuminate\Database\Eloquent\Builder<static>
  23043. * @static
  23044. */
  23045. public static function withMax($relation, $column)
  23046. {
  23047. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23048. return $instance->withMax($relation, $column);
  23049. }
  23050. /**
  23051. * Add subselect queries to include the min of the relation's column.
  23052. *
  23053. * @param string|array $relation
  23054. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23055. * @return \Illuminate\Database\Eloquent\Builder<static>
  23056. * @static
  23057. */
  23058. public static function withMin($relation, $column)
  23059. {
  23060. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23061. return $instance->withMin($relation, $column);
  23062. }
  23063. /**
  23064. * Add subselect queries to include the sum of the relation's column.
  23065. *
  23066. * @param string|array $relation
  23067. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23068. * @return \Illuminate\Database\Eloquent\Builder<static>
  23069. * @static
  23070. */
  23071. public static function withSum($relation, $column)
  23072. {
  23073. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23074. return $instance->withSum($relation, $column);
  23075. }
  23076. /**
  23077. * Add subselect queries to include the average of the relation's column.
  23078. *
  23079. * @param string|array $relation
  23080. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23081. * @return \Illuminate\Database\Eloquent\Builder<static>
  23082. * @static
  23083. */
  23084. public static function withAvg($relation, $column)
  23085. {
  23086. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23087. return $instance->withAvg($relation, $column);
  23088. }
  23089. /**
  23090. * Add subselect queries to include the existence of related models.
  23091. *
  23092. * @param string|array $relation
  23093. * @return \Illuminate\Database\Eloquent\Builder<static>
  23094. * @static
  23095. */
  23096. public static function withExists($relation)
  23097. {
  23098. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23099. return $instance->withExists($relation);
  23100. }
  23101. /**
  23102. * Merge the where constraints from another query to the current query.
  23103. *
  23104. * @param \Illuminate\Database\Eloquent\Builder<*> $from
  23105. * @return \Illuminate\Database\Eloquent\Builder<static>
  23106. * @static
  23107. */
  23108. public static function mergeConstraintsFrom($from)
  23109. {
  23110. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23111. return $instance->mergeConstraintsFrom($from);
  23112. }
  23113. /**
  23114. * Set the columns to be selected.
  23115. *
  23116. * @param mixed $columns
  23117. * @return \Illuminate\Database\Eloquent\Builder<static>
  23118. * @static
  23119. */
  23120. public static function select($columns = [])
  23121. {
  23122. /** @var \Illuminate\Database\Query\Builder $instance */
  23123. return $instance->select($columns);
  23124. }
  23125. /**
  23126. * Add a subselect expression to the query.
  23127. *
  23128. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23129. * @param string $as
  23130. * @return \Illuminate\Database\Eloquent\Builder<static>
  23131. * @throws \InvalidArgumentException
  23132. * @static
  23133. */
  23134. public static function selectSub($query, $as)
  23135. {
  23136. /** @var \Illuminate\Database\Query\Builder $instance */
  23137. return $instance->selectSub($query, $as);
  23138. }
  23139. /**
  23140. * Add a new "raw" select expression to the query.
  23141. *
  23142. * @param string $expression
  23143. * @return \Illuminate\Database\Eloquent\Builder<static>
  23144. * @static
  23145. */
  23146. public static function selectRaw($expression, $bindings = [])
  23147. {
  23148. /** @var \Illuminate\Database\Query\Builder $instance */
  23149. return $instance->selectRaw($expression, $bindings);
  23150. }
  23151. /**
  23152. * Makes "from" fetch from a subquery.
  23153. *
  23154. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23155. * @param string $as
  23156. * @return \Illuminate\Database\Eloquent\Builder<static>
  23157. * @throws \InvalidArgumentException
  23158. * @static
  23159. */
  23160. public static function fromSub($query, $as)
  23161. {
  23162. /** @var \Illuminate\Database\Query\Builder $instance */
  23163. return $instance->fromSub($query, $as);
  23164. }
  23165. /**
  23166. * Add a raw from clause to the query.
  23167. *
  23168. * @param string $expression
  23169. * @param mixed $bindings
  23170. * @return \Illuminate\Database\Eloquent\Builder<static>
  23171. * @static
  23172. */
  23173. public static function fromRaw($expression, $bindings = [])
  23174. {
  23175. /** @var \Illuminate\Database\Query\Builder $instance */
  23176. return $instance->fromRaw($expression, $bindings);
  23177. }
  23178. /**
  23179. * Add a new select column to the query.
  23180. *
  23181. * @param mixed $column
  23182. * @return \Illuminate\Database\Eloquent\Builder<static>
  23183. * @static
  23184. */
  23185. public static function addSelect($column)
  23186. {
  23187. /** @var \Illuminate\Database\Query\Builder $instance */
  23188. return $instance->addSelect($column);
  23189. }
  23190. /**
  23191. * Force the query to only return distinct results.
  23192. *
  23193. * @return \Illuminate\Database\Eloquent\Builder<static>
  23194. * @static
  23195. */
  23196. public static function distinct()
  23197. {
  23198. /** @var \Illuminate\Database\Query\Builder $instance */
  23199. return $instance->distinct();
  23200. }
  23201. /**
  23202. * Set the table which the query is targeting.
  23203. *
  23204. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $table
  23205. * @param string|null $as
  23206. * @return \Illuminate\Database\Eloquent\Builder<static>
  23207. * @static
  23208. */
  23209. public static function from($table, $as = null)
  23210. {
  23211. /** @var \Illuminate\Database\Query\Builder $instance */
  23212. return $instance->from($table, $as);
  23213. }
  23214. /**
  23215. * Add an index hint to suggest a query index.
  23216. *
  23217. * @param string $index
  23218. * @return \Illuminate\Database\Eloquent\Builder<static>
  23219. * @static
  23220. */
  23221. public static function useIndex($index)
  23222. {
  23223. /** @var \Illuminate\Database\Query\Builder $instance */
  23224. return $instance->useIndex($index);
  23225. }
  23226. /**
  23227. * Add an index hint to force a query index.
  23228. *
  23229. * @param string $index
  23230. * @return \Illuminate\Database\Eloquent\Builder<static>
  23231. * @static
  23232. */
  23233. public static function forceIndex($index)
  23234. {
  23235. /** @var \Illuminate\Database\Query\Builder $instance */
  23236. return $instance->forceIndex($index);
  23237. }
  23238. /**
  23239. * Add an index hint to ignore a query index.
  23240. *
  23241. * @param string $index
  23242. * @return \Illuminate\Database\Eloquent\Builder<static>
  23243. * @static
  23244. */
  23245. public static function ignoreIndex($index)
  23246. {
  23247. /** @var \Illuminate\Database\Query\Builder $instance */
  23248. return $instance->ignoreIndex($index);
  23249. }
  23250. /**
  23251. * Add a join clause to the query.
  23252. *
  23253. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23254. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23255. * @param string|null $operator
  23256. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23257. * @param string $type
  23258. * @param bool $where
  23259. * @return \Illuminate\Database\Eloquent\Builder<static>
  23260. * @static
  23261. */
  23262. public static function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23263. {
  23264. /** @var \Illuminate\Database\Query\Builder $instance */
  23265. return $instance->join($table, $first, $operator, $second, $type, $where);
  23266. }
  23267. /**
  23268. * Add a "join where" clause to the query.
  23269. *
  23270. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23271. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23272. * @param string $operator
  23273. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23274. * @param string $type
  23275. * @return \Illuminate\Database\Eloquent\Builder<static>
  23276. * @static
  23277. */
  23278. public static function joinWhere($table, $first, $operator, $second, $type = 'inner')
  23279. {
  23280. /** @var \Illuminate\Database\Query\Builder $instance */
  23281. return $instance->joinWhere($table, $first, $operator, $second, $type);
  23282. }
  23283. /**
  23284. * Add a subquery join clause to the query.
  23285. *
  23286. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23287. * @param string $as
  23288. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23289. * @param string|null $operator
  23290. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23291. * @param string $type
  23292. * @param bool $where
  23293. * @return \Illuminate\Database\Eloquent\Builder<static>
  23294. * @throws \InvalidArgumentException
  23295. * @static
  23296. */
  23297. public static function joinSub($query, $as, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23298. {
  23299. /** @var \Illuminate\Database\Query\Builder $instance */
  23300. return $instance->joinSub($query, $as, $first, $operator, $second, $type, $where);
  23301. }
  23302. /**
  23303. * Add a lateral join clause to the query.
  23304. *
  23305. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23306. * @return \Illuminate\Database\Eloquent\Builder<static>
  23307. * @static
  23308. */
  23309. public static function joinLateral($query, $as, $type = 'inner')
  23310. {
  23311. /** @var \Illuminate\Database\Query\Builder $instance */
  23312. return $instance->joinLateral($query, $as, $type);
  23313. }
  23314. /**
  23315. * Add a lateral left join to the query.
  23316. *
  23317. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23318. * @return \Illuminate\Database\Eloquent\Builder<static>
  23319. * @static
  23320. */
  23321. public static function leftJoinLateral($query, $as)
  23322. {
  23323. /** @var \Illuminate\Database\Query\Builder $instance */
  23324. return $instance->leftJoinLateral($query, $as);
  23325. }
  23326. /**
  23327. * Add a left join to the query.
  23328. *
  23329. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23330. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23331. * @param string|null $operator
  23332. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23333. * @return \Illuminate\Database\Eloquent\Builder<static>
  23334. * @static
  23335. */
  23336. public static function leftJoin($table, $first, $operator = null, $second = null)
  23337. {
  23338. /** @var \Illuminate\Database\Query\Builder $instance */
  23339. return $instance->leftJoin($table, $first, $operator, $second);
  23340. }
  23341. /**
  23342. * Add a "join where" clause to the query.
  23343. *
  23344. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23345. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23346. * @param string $operator
  23347. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23348. * @return \Illuminate\Database\Eloquent\Builder<static>
  23349. * @static
  23350. */
  23351. public static function leftJoinWhere($table, $first, $operator, $second)
  23352. {
  23353. /** @var \Illuminate\Database\Query\Builder $instance */
  23354. return $instance->leftJoinWhere($table, $first, $operator, $second);
  23355. }
  23356. /**
  23357. * Add a subquery left join to the query.
  23358. *
  23359. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23360. * @param string $as
  23361. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23362. * @param string|null $operator
  23363. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23364. * @return \Illuminate\Database\Eloquent\Builder<static>
  23365. * @static
  23366. */
  23367. public static function leftJoinSub($query, $as, $first, $operator = null, $second = null)
  23368. {
  23369. /** @var \Illuminate\Database\Query\Builder $instance */
  23370. return $instance->leftJoinSub($query, $as, $first, $operator, $second);
  23371. }
  23372. /**
  23373. * Add a right join to the query.
  23374. *
  23375. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23376. * @param \Closure|string $first
  23377. * @param string|null $operator
  23378. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23379. * @return \Illuminate\Database\Eloquent\Builder<static>
  23380. * @static
  23381. */
  23382. public static function rightJoin($table, $first, $operator = null, $second = null)
  23383. {
  23384. /** @var \Illuminate\Database\Query\Builder $instance */
  23385. return $instance->rightJoin($table, $first, $operator, $second);
  23386. }
  23387. /**
  23388. * Add a "right join where" clause to the query.
  23389. *
  23390. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23391. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23392. * @param string $operator
  23393. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23394. * @return \Illuminate\Database\Eloquent\Builder<static>
  23395. * @static
  23396. */
  23397. public static function rightJoinWhere($table, $first, $operator, $second)
  23398. {
  23399. /** @var \Illuminate\Database\Query\Builder $instance */
  23400. return $instance->rightJoinWhere($table, $first, $operator, $second);
  23401. }
  23402. /**
  23403. * Add a subquery right join to the query.
  23404. *
  23405. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23406. * @param string $as
  23407. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23408. * @param string|null $operator
  23409. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23410. * @return \Illuminate\Database\Eloquent\Builder<static>
  23411. * @static
  23412. */
  23413. public static function rightJoinSub($query, $as, $first, $operator = null, $second = null)
  23414. {
  23415. /** @var \Illuminate\Database\Query\Builder $instance */
  23416. return $instance->rightJoinSub($query, $as, $first, $operator, $second);
  23417. }
  23418. /**
  23419. * Add a "cross join" clause to the query.
  23420. *
  23421. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23422. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string|null $first
  23423. * @param string|null $operator
  23424. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23425. * @return \Illuminate\Database\Eloquent\Builder<static>
  23426. * @static
  23427. */
  23428. public static function crossJoin($table, $first = null, $operator = null, $second = null)
  23429. {
  23430. /** @var \Illuminate\Database\Query\Builder $instance */
  23431. return $instance->crossJoin($table, $first, $operator, $second);
  23432. }
  23433. /**
  23434. * Add a subquery cross join to the query.
  23435. *
  23436. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23437. * @param string $as
  23438. * @return \Illuminate\Database\Eloquent\Builder<static>
  23439. * @static
  23440. */
  23441. public static function crossJoinSub($query, $as)
  23442. {
  23443. /** @var \Illuminate\Database\Query\Builder $instance */
  23444. return $instance->crossJoinSub($query, $as);
  23445. }
  23446. /**
  23447. * Merge an array of where clauses and bindings.
  23448. *
  23449. * @param array $wheres
  23450. * @param array $bindings
  23451. * @return \Illuminate\Database\Eloquent\Builder<static>
  23452. * @static
  23453. */
  23454. public static function mergeWheres($wheres, $bindings)
  23455. {
  23456. /** @var \Illuminate\Database\Query\Builder $instance */
  23457. return $instance->mergeWheres($wheres, $bindings);
  23458. }
  23459. /**
  23460. * Prepare the value and operator for a where clause.
  23461. *
  23462. * @param string $value
  23463. * @param string $operator
  23464. * @param bool $useDefault
  23465. * @return array
  23466. * @throws \InvalidArgumentException
  23467. * @static
  23468. */
  23469. public static function prepareValueAndOperator($value, $operator, $useDefault = false)
  23470. {
  23471. /** @var \Illuminate\Database\Query\Builder $instance */
  23472. return $instance->prepareValueAndOperator($value, $operator, $useDefault);
  23473. }
  23474. /**
  23475. * Add a "where" clause comparing two columns to the query.
  23476. *
  23477. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23478. * @param string|null $operator
  23479. * @param string|null $second
  23480. * @param string|null $boolean
  23481. * @return \Illuminate\Database\Eloquent\Builder<static>
  23482. * @static
  23483. */
  23484. public static function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
  23485. {
  23486. /** @var \Illuminate\Database\Query\Builder $instance */
  23487. return $instance->whereColumn($first, $operator, $second, $boolean);
  23488. }
  23489. /**
  23490. * Add an "or where" clause comparing two columns to the query.
  23491. *
  23492. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23493. * @param string|null $operator
  23494. * @param string|null $second
  23495. * @return \Illuminate\Database\Eloquent\Builder<static>
  23496. * @static
  23497. */
  23498. public static function orWhereColumn($first, $operator = null, $second = null)
  23499. {
  23500. /** @var \Illuminate\Database\Query\Builder $instance */
  23501. return $instance->orWhereColumn($first, $operator, $second);
  23502. }
  23503. /**
  23504. * Add a raw where clause to the query.
  23505. *
  23506. * @param \Illuminate\Contracts\Database\Query\Expression|string $sql
  23507. * @param mixed $bindings
  23508. * @param string $boolean
  23509. * @return \Illuminate\Database\Eloquent\Builder<static>
  23510. * @static
  23511. */
  23512. public static function whereRaw($sql, $bindings = [], $boolean = 'and')
  23513. {
  23514. /** @var \Illuminate\Database\Query\Builder $instance */
  23515. return $instance->whereRaw($sql, $bindings, $boolean);
  23516. }
  23517. /**
  23518. * Add a raw or where clause to the query.
  23519. *
  23520. * @param string $sql
  23521. * @param mixed $bindings
  23522. * @return \Illuminate\Database\Eloquent\Builder<static>
  23523. * @static
  23524. */
  23525. public static function orWhereRaw($sql, $bindings = [])
  23526. {
  23527. /** @var \Illuminate\Database\Query\Builder $instance */
  23528. return $instance->orWhereRaw($sql, $bindings);
  23529. }
  23530. /**
  23531. * Add a "where like" clause to the query.
  23532. *
  23533. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23534. * @param string $value
  23535. * @param bool $caseSensitive
  23536. * @param string $boolean
  23537. * @param bool $not
  23538. * @return \Illuminate\Database\Eloquent\Builder<static>
  23539. * @static
  23540. */
  23541. public static function whereLike($column, $value, $caseSensitive = false, $boolean = 'and', $not = false)
  23542. {
  23543. /** @var \Illuminate\Database\Query\Builder $instance */
  23544. return $instance->whereLike($column, $value, $caseSensitive, $boolean, $not);
  23545. }
  23546. /**
  23547. * Add an "or where like" clause to the query.
  23548. *
  23549. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23550. * @param string $value
  23551. * @param bool $caseSensitive
  23552. * @return \Illuminate\Database\Eloquent\Builder<static>
  23553. * @static
  23554. */
  23555. public static function orWhereLike($column, $value, $caseSensitive = false)
  23556. {
  23557. /** @var \Illuminate\Database\Query\Builder $instance */
  23558. return $instance->orWhereLike($column, $value, $caseSensitive);
  23559. }
  23560. /**
  23561. * Add a "where not like" clause to the query.
  23562. *
  23563. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23564. * @param string $value
  23565. * @param bool $caseSensitive
  23566. * @param string $boolean
  23567. * @return \Illuminate\Database\Eloquent\Builder<static>
  23568. * @static
  23569. */
  23570. public static function whereNotLike($column, $value, $caseSensitive = false, $boolean = 'and')
  23571. {
  23572. /** @var \Illuminate\Database\Query\Builder $instance */
  23573. return $instance->whereNotLike($column, $value, $caseSensitive, $boolean);
  23574. }
  23575. /**
  23576. * Add an "or where not like" clause to the query.
  23577. *
  23578. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23579. * @param string $value
  23580. * @param bool $caseSensitive
  23581. * @return \Illuminate\Database\Eloquent\Builder<static>
  23582. * @static
  23583. */
  23584. public static function orWhereNotLike($column, $value, $caseSensitive = false)
  23585. {
  23586. /** @var \Illuminate\Database\Query\Builder $instance */
  23587. return $instance->orWhereNotLike($column, $value, $caseSensitive);
  23588. }
  23589. /**
  23590. * Add a "where in" clause to the query.
  23591. *
  23592. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23593. * @param mixed $values
  23594. * @param string $boolean
  23595. * @param bool $not
  23596. * @return \Illuminate\Database\Eloquent\Builder<static>
  23597. * @static
  23598. */
  23599. public static function whereIn($column, $values, $boolean = 'and', $not = false)
  23600. {
  23601. /** @var \Illuminate\Database\Query\Builder $instance */
  23602. return $instance->whereIn($column, $values, $boolean, $not);
  23603. }
  23604. /**
  23605. * Add an "or where in" clause to the query.
  23606. *
  23607. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23608. * @param mixed $values
  23609. * @return \Illuminate\Database\Eloquent\Builder<static>
  23610. * @static
  23611. */
  23612. public static function orWhereIn($column, $values)
  23613. {
  23614. /** @var \Illuminate\Database\Query\Builder $instance */
  23615. return $instance->orWhereIn($column, $values);
  23616. }
  23617. /**
  23618. * Add a "where not in" clause to the query.
  23619. *
  23620. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23621. * @param mixed $values
  23622. * @param string $boolean
  23623. * @return \Illuminate\Database\Eloquent\Builder<static>
  23624. * @static
  23625. */
  23626. public static function whereNotIn($column, $values, $boolean = 'and')
  23627. {
  23628. /** @var \Illuminate\Database\Query\Builder $instance */
  23629. return $instance->whereNotIn($column, $values, $boolean);
  23630. }
  23631. /**
  23632. * Add an "or where not in" clause to the query.
  23633. *
  23634. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23635. * @param mixed $values
  23636. * @return \Illuminate\Database\Eloquent\Builder<static>
  23637. * @static
  23638. */
  23639. public static function orWhereNotIn($column, $values)
  23640. {
  23641. /** @var \Illuminate\Database\Query\Builder $instance */
  23642. return $instance->orWhereNotIn($column, $values);
  23643. }
  23644. /**
  23645. * Add a "where in raw" clause for integer values to the query.
  23646. *
  23647. * @param string $column
  23648. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23649. * @param string $boolean
  23650. * @param bool $not
  23651. * @return \Illuminate\Database\Eloquent\Builder<static>
  23652. * @static
  23653. */
  23654. public static function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false)
  23655. {
  23656. /** @var \Illuminate\Database\Query\Builder $instance */
  23657. return $instance->whereIntegerInRaw($column, $values, $boolean, $not);
  23658. }
  23659. /**
  23660. * Add an "or where in raw" clause for integer values to the query.
  23661. *
  23662. * @param string $column
  23663. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23664. * @return \Illuminate\Database\Eloquent\Builder<static>
  23665. * @static
  23666. */
  23667. public static function orWhereIntegerInRaw($column, $values)
  23668. {
  23669. /** @var \Illuminate\Database\Query\Builder $instance */
  23670. return $instance->orWhereIntegerInRaw($column, $values);
  23671. }
  23672. /**
  23673. * Add a "where not in raw" clause for integer values to the query.
  23674. *
  23675. * @param string $column
  23676. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23677. * @param string $boolean
  23678. * @return \Illuminate\Database\Eloquent\Builder<static>
  23679. * @static
  23680. */
  23681. public static function whereIntegerNotInRaw($column, $values, $boolean = 'and')
  23682. {
  23683. /** @var \Illuminate\Database\Query\Builder $instance */
  23684. return $instance->whereIntegerNotInRaw($column, $values, $boolean);
  23685. }
  23686. /**
  23687. * Add an "or where not in raw" clause for integer values to the query.
  23688. *
  23689. * @param string $column
  23690. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23691. * @return \Illuminate\Database\Eloquent\Builder<static>
  23692. * @static
  23693. */
  23694. public static function orWhereIntegerNotInRaw($column, $values)
  23695. {
  23696. /** @var \Illuminate\Database\Query\Builder $instance */
  23697. return $instance->orWhereIntegerNotInRaw($column, $values);
  23698. }
  23699. /**
  23700. * Add a "where null" clause to the query.
  23701. *
  23702. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  23703. * @param string $boolean
  23704. * @param bool $not
  23705. * @return \Illuminate\Database\Eloquent\Builder<static>
  23706. * @static
  23707. */
  23708. public static function whereNull($columns, $boolean = 'and', $not = false)
  23709. {
  23710. /** @var \Illuminate\Database\Query\Builder $instance */
  23711. return $instance->whereNull($columns, $boolean, $not);
  23712. }
  23713. /**
  23714. * Add an "or where null" clause to the query.
  23715. *
  23716. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23717. * @return \Illuminate\Database\Eloquent\Builder<static>
  23718. * @static
  23719. */
  23720. public static function orWhereNull($column)
  23721. {
  23722. /** @var \Illuminate\Database\Query\Builder $instance */
  23723. return $instance->orWhereNull($column);
  23724. }
  23725. /**
  23726. * Add a "where not null" clause to the query.
  23727. *
  23728. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  23729. * @param string $boolean
  23730. * @return \Illuminate\Database\Eloquent\Builder<static>
  23731. * @static
  23732. */
  23733. public static function whereNotNull($columns, $boolean = 'and')
  23734. {
  23735. /** @var \Illuminate\Database\Query\Builder $instance */
  23736. return $instance->whereNotNull($columns, $boolean);
  23737. }
  23738. /**
  23739. * Add a where between statement to the query.
  23740. *
  23741. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23742. * @param string $boolean
  23743. * @param bool $not
  23744. * @return \Illuminate\Database\Eloquent\Builder<static>
  23745. * @static
  23746. */
  23747. public static function whereBetween($column, $values, $boolean = 'and', $not = false)
  23748. {
  23749. /** @var \Illuminate\Database\Query\Builder $instance */
  23750. return $instance->whereBetween($column, $values, $boolean, $not);
  23751. }
  23752. /**
  23753. * Add a where between statement using columns to the query.
  23754. *
  23755. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23756. * @param string $boolean
  23757. * @param bool $not
  23758. * @return \Illuminate\Database\Eloquent\Builder<static>
  23759. * @static
  23760. */
  23761. public static function whereBetweenColumns($column, $values, $boolean = 'and', $not = false)
  23762. {
  23763. /** @var \Illuminate\Database\Query\Builder $instance */
  23764. return $instance->whereBetweenColumns($column, $values, $boolean, $not);
  23765. }
  23766. /**
  23767. * Add an or where between statement to the query.
  23768. *
  23769. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23770. * @return \Illuminate\Database\Eloquent\Builder<static>
  23771. * @static
  23772. */
  23773. public static function orWhereBetween($column, $values)
  23774. {
  23775. /** @var \Illuminate\Database\Query\Builder $instance */
  23776. return $instance->orWhereBetween($column, $values);
  23777. }
  23778. /**
  23779. * Add an or where between statement using columns to the query.
  23780. *
  23781. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23782. * @return \Illuminate\Database\Eloquent\Builder<static>
  23783. * @static
  23784. */
  23785. public static function orWhereBetweenColumns($column, $values)
  23786. {
  23787. /** @var \Illuminate\Database\Query\Builder $instance */
  23788. return $instance->orWhereBetweenColumns($column, $values);
  23789. }
  23790. /**
  23791. * Add a where not between statement to the query.
  23792. *
  23793. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23794. * @param string $boolean
  23795. * @return \Illuminate\Database\Eloquent\Builder<static>
  23796. * @static
  23797. */
  23798. public static function whereNotBetween($column, $values, $boolean = 'and')
  23799. {
  23800. /** @var \Illuminate\Database\Query\Builder $instance */
  23801. return $instance->whereNotBetween($column, $values, $boolean);
  23802. }
  23803. /**
  23804. * Add a where not between statement using columns to the query.
  23805. *
  23806. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23807. * @param string $boolean
  23808. * @return \Illuminate\Database\Eloquent\Builder<static>
  23809. * @static
  23810. */
  23811. public static function whereNotBetweenColumns($column, $values, $boolean = 'and')
  23812. {
  23813. /** @var \Illuminate\Database\Query\Builder $instance */
  23814. return $instance->whereNotBetweenColumns($column, $values, $boolean);
  23815. }
  23816. /**
  23817. * Add an or where not between statement to the query.
  23818. *
  23819. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23820. * @return \Illuminate\Database\Eloquent\Builder<static>
  23821. * @static
  23822. */
  23823. public static function orWhereNotBetween($column, $values)
  23824. {
  23825. /** @var \Illuminate\Database\Query\Builder $instance */
  23826. return $instance->orWhereNotBetween($column, $values);
  23827. }
  23828. /**
  23829. * Add an or where not between statement using columns to the query.
  23830. *
  23831. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23832. * @return \Illuminate\Database\Eloquent\Builder<static>
  23833. * @static
  23834. */
  23835. public static function orWhereNotBetweenColumns($column, $values)
  23836. {
  23837. /** @var \Illuminate\Database\Query\Builder $instance */
  23838. return $instance->orWhereNotBetweenColumns($column, $values);
  23839. }
  23840. /**
  23841. * Add an "or where not null" clause to the query.
  23842. *
  23843. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23844. * @return \Illuminate\Database\Eloquent\Builder<static>
  23845. * @static
  23846. */
  23847. public static function orWhereNotNull($column)
  23848. {
  23849. /** @var \Illuminate\Database\Query\Builder $instance */
  23850. return $instance->orWhereNotNull($column);
  23851. }
  23852. /**
  23853. * Add a "where date" statement to the query.
  23854. *
  23855. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23856. * @param \DateTimeInterface|string|null $operator
  23857. * @param \DateTimeInterface|string|null $value
  23858. * @param string $boolean
  23859. * @return \Illuminate\Database\Eloquent\Builder<static>
  23860. * @static
  23861. */
  23862. public static function whereDate($column, $operator, $value = null, $boolean = 'and')
  23863. {
  23864. /** @var \Illuminate\Database\Query\Builder $instance */
  23865. return $instance->whereDate($column, $operator, $value, $boolean);
  23866. }
  23867. /**
  23868. * Add an "or where date" statement to the query.
  23869. *
  23870. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23871. * @param \DateTimeInterface|string|null $operator
  23872. * @param \DateTimeInterface|string|null $value
  23873. * @return \Illuminate\Database\Eloquent\Builder<static>
  23874. * @static
  23875. */
  23876. public static function orWhereDate($column, $operator, $value = null)
  23877. {
  23878. /** @var \Illuminate\Database\Query\Builder $instance */
  23879. return $instance->orWhereDate($column, $operator, $value);
  23880. }
  23881. /**
  23882. * Add a "where time" statement to the query.
  23883. *
  23884. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23885. * @param \DateTimeInterface|string|null $operator
  23886. * @param \DateTimeInterface|string|null $value
  23887. * @param string $boolean
  23888. * @return \Illuminate\Database\Eloquent\Builder<static>
  23889. * @static
  23890. */
  23891. public static function whereTime($column, $operator, $value = null, $boolean = 'and')
  23892. {
  23893. /** @var \Illuminate\Database\Query\Builder $instance */
  23894. return $instance->whereTime($column, $operator, $value, $boolean);
  23895. }
  23896. /**
  23897. * Add an "or where time" statement to the query.
  23898. *
  23899. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23900. * @param \DateTimeInterface|string|null $operator
  23901. * @param \DateTimeInterface|string|null $value
  23902. * @return \Illuminate\Database\Eloquent\Builder<static>
  23903. * @static
  23904. */
  23905. public static function orWhereTime($column, $operator, $value = null)
  23906. {
  23907. /** @var \Illuminate\Database\Query\Builder $instance */
  23908. return $instance->orWhereTime($column, $operator, $value);
  23909. }
  23910. /**
  23911. * Add a "where day" statement to the query.
  23912. *
  23913. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23914. * @param \DateTimeInterface|string|int|null $operator
  23915. * @param \DateTimeInterface|string|int|null $value
  23916. * @param string $boolean
  23917. * @return \Illuminate\Database\Eloquent\Builder<static>
  23918. * @static
  23919. */
  23920. public static function whereDay($column, $operator, $value = null, $boolean = 'and')
  23921. {
  23922. /** @var \Illuminate\Database\Query\Builder $instance */
  23923. return $instance->whereDay($column, $operator, $value, $boolean);
  23924. }
  23925. /**
  23926. * Add an "or where day" statement to the query.
  23927. *
  23928. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23929. * @param \DateTimeInterface|string|int|null $operator
  23930. * @param \DateTimeInterface|string|int|null $value
  23931. * @return \Illuminate\Database\Eloquent\Builder<static>
  23932. * @static
  23933. */
  23934. public static function orWhereDay($column, $operator, $value = null)
  23935. {
  23936. /** @var \Illuminate\Database\Query\Builder $instance */
  23937. return $instance->orWhereDay($column, $operator, $value);
  23938. }
  23939. /**
  23940. * Add a "where month" statement to the query.
  23941. *
  23942. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23943. * @param \DateTimeInterface|string|int|null $operator
  23944. * @param \DateTimeInterface|string|int|null $value
  23945. * @param string $boolean
  23946. * @return \Illuminate\Database\Eloquent\Builder<static>
  23947. * @static
  23948. */
  23949. public static function whereMonth($column, $operator, $value = null, $boolean = 'and')
  23950. {
  23951. /** @var \Illuminate\Database\Query\Builder $instance */
  23952. return $instance->whereMonth($column, $operator, $value, $boolean);
  23953. }
  23954. /**
  23955. * Add an "or where month" statement to the query.
  23956. *
  23957. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23958. * @param \DateTimeInterface|string|int|null $operator
  23959. * @param \DateTimeInterface|string|int|null $value
  23960. * @return \Illuminate\Database\Eloquent\Builder<static>
  23961. * @static
  23962. */
  23963. public static function orWhereMonth($column, $operator, $value = null)
  23964. {
  23965. /** @var \Illuminate\Database\Query\Builder $instance */
  23966. return $instance->orWhereMonth($column, $operator, $value);
  23967. }
  23968. /**
  23969. * Add a "where year" statement to the query.
  23970. *
  23971. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23972. * @param \DateTimeInterface|string|int|null $operator
  23973. * @param \DateTimeInterface|string|int|null $value
  23974. * @param string $boolean
  23975. * @return \Illuminate\Database\Eloquent\Builder<static>
  23976. * @static
  23977. */
  23978. public static function whereYear($column, $operator, $value = null, $boolean = 'and')
  23979. {
  23980. /** @var \Illuminate\Database\Query\Builder $instance */
  23981. return $instance->whereYear($column, $operator, $value, $boolean);
  23982. }
  23983. /**
  23984. * Add an "or where year" statement to the query.
  23985. *
  23986. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23987. * @param \DateTimeInterface|string|int|null $operator
  23988. * @param \DateTimeInterface|string|int|null $value
  23989. * @return \Illuminate\Database\Eloquent\Builder<static>
  23990. * @static
  23991. */
  23992. public static function orWhereYear($column, $operator, $value = null)
  23993. {
  23994. /** @var \Illuminate\Database\Query\Builder $instance */
  23995. return $instance->orWhereYear($column, $operator, $value);
  23996. }
  23997. /**
  23998. * Add a nested where statement to the query.
  23999. *
  24000. * @param string $boolean
  24001. * @return \Illuminate\Database\Eloquent\Builder<static>
  24002. * @static
  24003. */
  24004. public static function whereNested($callback, $boolean = 'and')
  24005. {
  24006. /** @var \Illuminate\Database\Query\Builder $instance */
  24007. return $instance->whereNested($callback, $boolean);
  24008. }
  24009. /**
  24010. * Create a new query instance for nested where condition.
  24011. *
  24012. * @return \Illuminate\Database\Query\Builder
  24013. * @static
  24014. */
  24015. public static function forNestedWhere()
  24016. {
  24017. /** @var \Illuminate\Database\Query\Builder $instance */
  24018. return $instance->forNestedWhere();
  24019. }
  24020. /**
  24021. * Add another query builder as a nested where to the query builder.
  24022. *
  24023. * @param \Illuminate\Database\Query\Builder $query
  24024. * @param string $boolean
  24025. * @return \Illuminate\Database\Eloquent\Builder<static>
  24026. * @static
  24027. */
  24028. public static function addNestedWhereQuery($query, $boolean = 'and')
  24029. {
  24030. /** @var \Illuminate\Database\Query\Builder $instance */
  24031. return $instance->addNestedWhereQuery($query, $boolean);
  24032. }
  24033. /**
  24034. * Add an exists clause to the query.
  24035. *
  24036. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24037. * @param string $boolean
  24038. * @param bool $not
  24039. * @return \Illuminate\Database\Eloquent\Builder<static>
  24040. * @static
  24041. */
  24042. public static function whereExists($callback, $boolean = 'and', $not = false)
  24043. {
  24044. /** @var \Illuminate\Database\Query\Builder $instance */
  24045. return $instance->whereExists($callback, $boolean, $not);
  24046. }
  24047. /**
  24048. * Add an or exists clause to the query.
  24049. *
  24050. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24051. * @param bool $not
  24052. * @return \Illuminate\Database\Eloquent\Builder<static>
  24053. * @static
  24054. */
  24055. public static function orWhereExists($callback, $not = false)
  24056. {
  24057. /** @var \Illuminate\Database\Query\Builder $instance */
  24058. return $instance->orWhereExists($callback, $not);
  24059. }
  24060. /**
  24061. * Add a where not exists clause to the query.
  24062. *
  24063. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24064. * @param string $boolean
  24065. * @return \Illuminate\Database\Eloquent\Builder<static>
  24066. * @static
  24067. */
  24068. public static function whereNotExists($callback, $boolean = 'and')
  24069. {
  24070. /** @var \Illuminate\Database\Query\Builder $instance */
  24071. return $instance->whereNotExists($callback, $boolean);
  24072. }
  24073. /**
  24074. * Add a where not exists clause to the query.
  24075. *
  24076. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24077. * @return \Illuminate\Database\Eloquent\Builder<static>
  24078. * @static
  24079. */
  24080. public static function orWhereNotExists($callback)
  24081. {
  24082. /** @var \Illuminate\Database\Query\Builder $instance */
  24083. return $instance->orWhereNotExists($callback);
  24084. }
  24085. /**
  24086. * Add an exists clause to the query.
  24087. *
  24088. * @param string $boolean
  24089. * @param bool $not
  24090. * @return \Illuminate\Database\Eloquent\Builder<static>
  24091. * @static
  24092. */
  24093. public static function addWhereExistsQuery($query, $boolean = 'and', $not = false)
  24094. {
  24095. /** @var \Illuminate\Database\Query\Builder $instance */
  24096. return $instance->addWhereExistsQuery($query, $boolean, $not);
  24097. }
  24098. /**
  24099. * Adds a where condition using row values.
  24100. *
  24101. * @param array $columns
  24102. * @param string $operator
  24103. * @param array $values
  24104. * @param string $boolean
  24105. * @return \Illuminate\Database\Eloquent\Builder<static>
  24106. * @throws \InvalidArgumentException
  24107. * @static
  24108. */
  24109. public static function whereRowValues($columns, $operator, $values, $boolean = 'and')
  24110. {
  24111. /** @var \Illuminate\Database\Query\Builder $instance */
  24112. return $instance->whereRowValues($columns, $operator, $values, $boolean);
  24113. }
  24114. /**
  24115. * Adds an or where condition using row values.
  24116. *
  24117. * @param array $columns
  24118. * @param string $operator
  24119. * @param array $values
  24120. * @return \Illuminate\Database\Eloquent\Builder<static>
  24121. * @static
  24122. */
  24123. public static function orWhereRowValues($columns, $operator, $values)
  24124. {
  24125. /** @var \Illuminate\Database\Query\Builder $instance */
  24126. return $instance->orWhereRowValues($columns, $operator, $values);
  24127. }
  24128. /**
  24129. * Add a "where JSON contains" clause to the query.
  24130. *
  24131. * @param string $column
  24132. * @param mixed $value
  24133. * @param string $boolean
  24134. * @param bool $not
  24135. * @return \Illuminate\Database\Eloquent\Builder<static>
  24136. * @static
  24137. */
  24138. public static function whereJsonContains($column, $value, $boolean = 'and', $not = false)
  24139. {
  24140. /** @var \Illuminate\Database\Query\Builder $instance */
  24141. return $instance->whereJsonContains($column, $value, $boolean, $not);
  24142. }
  24143. /**
  24144. * Add an "or where JSON contains" clause to the query.
  24145. *
  24146. * @param string $column
  24147. * @param mixed $value
  24148. * @return \Illuminate\Database\Eloquent\Builder<static>
  24149. * @static
  24150. */
  24151. public static function orWhereJsonContains($column, $value)
  24152. {
  24153. /** @var \Illuminate\Database\Query\Builder $instance */
  24154. return $instance->orWhereJsonContains($column, $value);
  24155. }
  24156. /**
  24157. * Add a "where JSON not contains" clause to the query.
  24158. *
  24159. * @param string $column
  24160. * @param mixed $value
  24161. * @param string $boolean
  24162. * @return \Illuminate\Database\Eloquent\Builder<static>
  24163. * @static
  24164. */
  24165. public static function whereJsonDoesntContain($column, $value, $boolean = 'and')
  24166. {
  24167. /** @var \Illuminate\Database\Query\Builder $instance */
  24168. return $instance->whereJsonDoesntContain($column, $value, $boolean);
  24169. }
  24170. /**
  24171. * Add an "or where JSON not contains" clause to the query.
  24172. *
  24173. * @param string $column
  24174. * @param mixed $value
  24175. * @return \Illuminate\Database\Eloquent\Builder<static>
  24176. * @static
  24177. */
  24178. public static function orWhereJsonDoesntContain($column, $value)
  24179. {
  24180. /** @var \Illuminate\Database\Query\Builder $instance */
  24181. return $instance->orWhereJsonDoesntContain($column, $value);
  24182. }
  24183. /**
  24184. * Add a "where JSON overlaps" clause to the query.
  24185. *
  24186. * @param string $column
  24187. * @param mixed $value
  24188. * @param string $boolean
  24189. * @param bool $not
  24190. * @return \Illuminate\Database\Eloquent\Builder<static>
  24191. * @static
  24192. */
  24193. public static function whereJsonOverlaps($column, $value, $boolean = 'and', $not = false)
  24194. {
  24195. /** @var \Illuminate\Database\Query\Builder $instance */
  24196. return $instance->whereJsonOverlaps($column, $value, $boolean, $not);
  24197. }
  24198. /**
  24199. * Add an "or where JSON overlaps" clause to the query.
  24200. *
  24201. * @param string $column
  24202. * @param mixed $value
  24203. * @return \Illuminate\Database\Eloquent\Builder<static>
  24204. * @static
  24205. */
  24206. public static function orWhereJsonOverlaps($column, $value)
  24207. {
  24208. /** @var \Illuminate\Database\Query\Builder $instance */
  24209. return $instance->orWhereJsonOverlaps($column, $value);
  24210. }
  24211. /**
  24212. * Add a "where JSON not overlap" clause to the query.
  24213. *
  24214. * @param string $column
  24215. * @param mixed $value
  24216. * @param string $boolean
  24217. * @return \Illuminate\Database\Eloquent\Builder<static>
  24218. * @static
  24219. */
  24220. public static function whereJsonDoesntOverlap($column, $value, $boolean = 'and')
  24221. {
  24222. /** @var \Illuminate\Database\Query\Builder $instance */
  24223. return $instance->whereJsonDoesntOverlap($column, $value, $boolean);
  24224. }
  24225. /**
  24226. * Add an "or where JSON not overlap" clause to the query.
  24227. *
  24228. * @param string $column
  24229. * @param mixed $value
  24230. * @return \Illuminate\Database\Eloquent\Builder<static>
  24231. * @static
  24232. */
  24233. public static function orWhereJsonDoesntOverlap($column, $value)
  24234. {
  24235. /** @var \Illuminate\Database\Query\Builder $instance */
  24236. return $instance->orWhereJsonDoesntOverlap($column, $value);
  24237. }
  24238. /**
  24239. * Add a clause that determines if a JSON path exists to the query.
  24240. *
  24241. * @param string $column
  24242. * @param string $boolean
  24243. * @param bool $not
  24244. * @return \Illuminate\Database\Eloquent\Builder<static>
  24245. * @static
  24246. */
  24247. public static function whereJsonContainsKey($column, $boolean = 'and', $not = false)
  24248. {
  24249. /** @var \Illuminate\Database\Query\Builder $instance */
  24250. return $instance->whereJsonContainsKey($column, $boolean, $not);
  24251. }
  24252. /**
  24253. * Add an "or" clause that determines if a JSON path exists to the query.
  24254. *
  24255. * @param string $column
  24256. * @return \Illuminate\Database\Eloquent\Builder<static>
  24257. * @static
  24258. */
  24259. public static function orWhereJsonContainsKey($column)
  24260. {
  24261. /** @var \Illuminate\Database\Query\Builder $instance */
  24262. return $instance->orWhereJsonContainsKey($column);
  24263. }
  24264. /**
  24265. * Add a clause that determines if a JSON path does not exist to the query.
  24266. *
  24267. * @param string $column
  24268. * @param string $boolean
  24269. * @return \Illuminate\Database\Eloquent\Builder<static>
  24270. * @static
  24271. */
  24272. public static function whereJsonDoesntContainKey($column, $boolean = 'and')
  24273. {
  24274. /** @var \Illuminate\Database\Query\Builder $instance */
  24275. return $instance->whereJsonDoesntContainKey($column, $boolean);
  24276. }
  24277. /**
  24278. * Add an "or" clause that determines if a JSON path does not exist to the query.
  24279. *
  24280. * @param string $column
  24281. * @return \Illuminate\Database\Eloquent\Builder<static>
  24282. * @static
  24283. */
  24284. public static function orWhereJsonDoesntContainKey($column)
  24285. {
  24286. /** @var \Illuminate\Database\Query\Builder $instance */
  24287. return $instance->orWhereJsonDoesntContainKey($column);
  24288. }
  24289. /**
  24290. * Add a "where JSON length" clause to the query.
  24291. *
  24292. * @param string $column
  24293. * @param mixed $operator
  24294. * @param mixed $value
  24295. * @param string $boolean
  24296. * @return \Illuminate\Database\Eloquent\Builder<static>
  24297. * @static
  24298. */
  24299. public static function whereJsonLength($column, $operator, $value = null, $boolean = 'and')
  24300. {
  24301. /** @var \Illuminate\Database\Query\Builder $instance */
  24302. return $instance->whereJsonLength($column, $operator, $value, $boolean);
  24303. }
  24304. /**
  24305. * Add an "or where JSON length" clause to the query.
  24306. *
  24307. * @param string $column
  24308. * @param mixed $operator
  24309. * @param mixed $value
  24310. * @return \Illuminate\Database\Eloquent\Builder<static>
  24311. * @static
  24312. */
  24313. public static function orWhereJsonLength($column, $operator, $value = null)
  24314. {
  24315. /** @var \Illuminate\Database\Query\Builder $instance */
  24316. return $instance->orWhereJsonLength($column, $operator, $value);
  24317. }
  24318. /**
  24319. * Handles dynamic "where" clauses to the query.
  24320. *
  24321. * @param string $method
  24322. * @param array $parameters
  24323. * @return \Illuminate\Database\Eloquent\Builder<static>
  24324. * @static
  24325. */
  24326. public static function dynamicWhere($method, $parameters)
  24327. {
  24328. /** @var \Illuminate\Database\Query\Builder $instance */
  24329. return $instance->dynamicWhere($method, $parameters);
  24330. }
  24331. /**
  24332. * Add a "where fulltext" clause to the query.
  24333. *
  24334. * @param string|string[] $columns
  24335. * @param string $value
  24336. * @param string $boolean
  24337. * @return \Illuminate\Database\Eloquent\Builder<static>
  24338. * @static
  24339. */
  24340. public static function whereFullText($columns, $value, $options = [], $boolean = 'and')
  24341. {
  24342. /** @var \Illuminate\Database\Query\Builder $instance */
  24343. return $instance->whereFullText($columns, $value, $options, $boolean);
  24344. }
  24345. /**
  24346. * Add a "or where fulltext" clause to the query.
  24347. *
  24348. * @param string|string[] $columns
  24349. * @param string $value
  24350. * @return \Illuminate\Database\Eloquent\Builder<static>
  24351. * @static
  24352. */
  24353. public static function orWhereFullText($columns, $value, $options = [])
  24354. {
  24355. /** @var \Illuminate\Database\Query\Builder $instance */
  24356. return $instance->orWhereFullText($columns, $value, $options);
  24357. }
  24358. /**
  24359. * Add a "where" clause to the query for multiple columns with "and" conditions between them.
  24360. *
  24361. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24362. * @param mixed $operator
  24363. * @param mixed $value
  24364. * @param string $boolean
  24365. * @return \Illuminate\Database\Eloquent\Builder<static>
  24366. * @static
  24367. */
  24368. public static function whereAll($columns, $operator = null, $value = null, $boolean = 'and')
  24369. {
  24370. /** @var \Illuminate\Database\Query\Builder $instance */
  24371. return $instance->whereAll($columns, $operator, $value, $boolean);
  24372. }
  24373. /**
  24374. * Add an "or where" clause to the query for multiple columns with "and" conditions between them.
  24375. *
  24376. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24377. * @param mixed $operator
  24378. * @param mixed $value
  24379. * @return \Illuminate\Database\Eloquent\Builder<static>
  24380. * @static
  24381. */
  24382. public static function orWhereAll($columns, $operator = null, $value = null)
  24383. {
  24384. /** @var \Illuminate\Database\Query\Builder $instance */
  24385. return $instance->orWhereAll($columns, $operator, $value);
  24386. }
  24387. /**
  24388. * Add a "where" clause to the query for multiple columns with "or" conditions between them.
  24389. *
  24390. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24391. * @param mixed $operator
  24392. * @param mixed $value
  24393. * @param string $boolean
  24394. * @return \Illuminate\Database\Eloquent\Builder<static>
  24395. * @static
  24396. */
  24397. public static function whereAny($columns, $operator = null, $value = null, $boolean = 'and')
  24398. {
  24399. /** @var \Illuminate\Database\Query\Builder $instance */
  24400. return $instance->whereAny($columns, $operator, $value, $boolean);
  24401. }
  24402. /**
  24403. * Add an "or where" clause to the query for multiple columns with "or" conditions between them.
  24404. *
  24405. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24406. * @param mixed $operator
  24407. * @param mixed $value
  24408. * @return \Illuminate\Database\Eloquent\Builder<static>
  24409. * @static
  24410. */
  24411. public static function orWhereAny($columns, $operator = null, $value = null)
  24412. {
  24413. /** @var \Illuminate\Database\Query\Builder $instance */
  24414. return $instance->orWhereAny($columns, $operator, $value);
  24415. }
  24416. /**
  24417. * Add a "where not" clause to the query for multiple columns where none of the conditions should be true.
  24418. *
  24419. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24420. * @param mixed $operator
  24421. * @param mixed $value
  24422. * @param string $boolean
  24423. * @return \Illuminate\Database\Eloquent\Builder<static>
  24424. * @static
  24425. */
  24426. public static function whereNone($columns, $operator = null, $value = null, $boolean = 'and')
  24427. {
  24428. /** @var \Illuminate\Database\Query\Builder $instance */
  24429. return $instance->whereNone($columns, $operator, $value, $boolean);
  24430. }
  24431. /**
  24432. * Add an "or where not" clause to the query for multiple columns where none of the conditions should be true.
  24433. *
  24434. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24435. * @param mixed $operator
  24436. * @param mixed $value
  24437. * @return \Illuminate\Database\Eloquent\Builder<static>
  24438. * @static
  24439. */
  24440. public static function orWhereNone($columns, $operator = null, $value = null)
  24441. {
  24442. /** @var \Illuminate\Database\Query\Builder $instance */
  24443. return $instance->orWhereNone($columns, $operator, $value);
  24444. }
  24445. /**
  24446. * Add a "group by" clause to the query.
  24447. *
  24448. * @param array|\Illuminate\Contracts\Database\Query\Expression|string $groups
  24449. * @return \Illuminate\Database\Eloquent\Builder<static>
  24450. * @static
  24451. */
  24452. public static function groupBy(...$groups)
  24453. {
  24454. /** @var \Illuminate\Database\Query\Builder $instance */
  24455. return $instance->groupBy(...$groups);
  24456. }
  24457. /**
  24458. * Add a raw groupBy clause to the query.
  24459. *
  24460. * @param string $sql
  24461. * @return \Illuminate\Database\Eloquent\Builder<static>
  24462. * @static
  24463. */
  24464. public static function groupByRaw($sql, $bindings = [])
  24465. {
  24466. /** @var \Illuminate\Database\Query\Builder $instance */
  24467. return $instance->groupByRaw($sql, $bindings);
  24468. }
  24469. /**
  24470. * Add a "having" clause to the query.
  24471. *
  24472. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24473. * @param \DateTimeInterface|string|int|float|null $operator
  24474. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24475. * @param string $boolean
  24476. * @return \Illuminate\Database\Eloquent\Builder<static>
  24477. * @static
  24478. */
  24479. public static function having($column, $operator = null, $value = null, $boolean = 'and')
  24480. {
  24481. /** @var \Illuminate\Database\Query\Builder $instance */
  24482. return $instance->having($column, $operator, $value, $boolean);
  24483. }
  24484. /**
  24485. * Add an "or having" clause to the query.
  24486. *
  24487. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24488. * @param \DateTimeInterface|string|int|float|null $operator
  24489. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24490. * @return \Illuminate\Database\Eloquent\Builder<static>
  24491. * @static
  24492. */
  24493. public static function orHaving($column, $operator = null, $value = null)
  24494. {
  24495. /** @var \Illuminate\Database\Query\Builder $instance */
  24496. return $instance->orHaving($column, $operator, $value);
  24497. }
  24498. /**
  24499. * Add a nested having statement to the query.
  24500. *
  24501. * @param string $boolean
  24502. * @return \Illuminate\Database\Eloquent\Builder<static>
  24503. * @static
  24504. */
  24505. public static function havingNested($callback, $boolean = 'and')
  24506. {
  24507. /** @var \Illuminate\Database\Query\Builder $instance */
  24508. return $instance->havingNested($callback, $boolean);
  24509. }
  24510. /**
  24511. * Add another query builder as a nested having to the query builder.
  24512. *
  24513. * @param \Illuminate\Database\Query\Builder $query
  24514. * @param string $boolean
  24515. * @return \Illuminate\Database\Eloquent\Builder<static>
  24516. * @static
  24517. */
  24518. public static function addNestedHavingQuery($query, $boolean = 'and')
  24519. {
  24520. /** @var \Illuminate\Database\Query\Builder $instance */
  24521. return $instance->addNestedHavingQuery($query, $boolean);
  24522. }
  24523. /**
  24524. * Add a "having null" clause to the query.
  24525. *
  24526. * @param array|string $columns
  24527. * @param string $boolean
  24528. * @param bool $not
  24529. * @return \Illuminate\Database\Eloquent\Builder<static>
  24530. * @static
  24531. */
  24532. public static function havingNull($columns, $boolean = 'and', $not = false)
  24533. {
  24534. /** @var \Illuminate\Database\Query\Builder $instance */
  24535. return $instance->havingNull($columns, $boolean, $not);
  24536. }
  24537. /**
  24538. * Add an "or having null" clause to the query.
  24539. *
  24540. * @param string $column
  24541. * @return \Illuminate\Database\Eloquent\Builder<static>
  24542. * @static
  24543. */
  24544. public static function orHavingNull($column)
  24545. {
  24546. /** @var \Illuminate\Database\Query\Builder $instance */
  24547. return $instance->orHavingNull($column);
  24548. }
  24549. /**
  24550. * Add a "having not null" clause to the query.
  24551. *
  24552. * @param array|string $columns
  24553. * @param string $boolean
  24554. * @return \Illuminate\Database\Eloquent\Builder<static>
  24555. * @static
  24556. */
  24557. public static function havingNotNull($columns, $boolean = 'and')
  24558. {
  24559. /** @var \Illuminate\Database\Query\Builder $instance */
  24560. return $instance->havingNotNull($columns, $boolean);
  24561. }
  24562. /**
  24563. * Add an "or having not null" clause to the query.
  24564. *
  24565. * @param string $column
  24566. * @return \Illuminate\Database\Eloquent\Builder<static>
  24567. * @static
  24568. */
  24569. public static function orHavingNotNull($column)
  24570. {
  24571. /** @var \Illuminate\Database\Query\Builder $instance */
  24572. return $instance->orHavingNotNull($column);
  24573. }
  24574. /**
  24575. * Add a "having between " clause to the query.
  24576. *
  24577. * @param string $column
  24578. * @param string $boolean
  24579. * @param bool $not
  24580. * @return \Illuminate\Database\Eloquent\Builder<static>
  24581. * @static
  24582. */
  24583. public static function havingBetween($column, $values, $boolean = 'and', $not = false)
  24584. {
  24585. /** @var \Illuminate\Database\Query\Builder $instance */
  24586. return $instance->havingBetween($column, $values, $boolean, $not);
  24587. }
  24588. /**
  24589. * Add a raw having clause to the query.
  24590. *
  24591. * @param string $sql
  24592. * @param string $boolean
  24593. * @return \Illuminate\Database\Eloquent\Builder<static>
  24594. * @static
  24595. */
  24596. public static function havingRaw($sql, $bindings = [], $boolean = 'and')
  24597. {
  24598. /** @var \Illuminate\Database\Query\Builder $instance */
  24599. return $instance->havingRaw($sql, $bindings, $boolean);
  24600. }
  24601. /**
  24602. * Add a raw or having clause to the query.
  24603. *
  24604. * @param string $sql
  24605. * @return \Illuminate\Database\Eloquent\Builder<static>
  24606. * @static
  24607. */
  24608. public static function orHavingRaw($sql, $bindings = [])
  24609. {
  24610. /** @var \Illuminate\Database\Query\Builder $instance */
  24611. return $instance->orHavingRaw($sql, $bindings);
  24612. }
  24613. /**
  24614. * Add an "order by" clause to the query.
  24615. *
  24616. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24617. * @param string $direction
  24618. * @return \Illuminate\Database\Eloquent\Builder<static>
  24619. * @throws \InvalidArgumentException
  24620. * @static
  24621. */
  24622. public static function orderBy($column, $direction = 'asc')
  24623. {
  24624. /** @var \Illuminate\Database\Query\Builder $instance */
  24625. return $instance->orderBy($column, $direction);
  24626. }
  24627. /**
  24628. * Add a descending "order by" clause to the query.
  24629. *
  24630. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24631. * @return \Illuminate\Database\Eloquent\Builder<static>
  24632. * @static
  24633. */
  24634. public static function orderByDesc($column)
  24635. {
  24636. /** @var \Illuminate\Database\Query\Builder $instance */
  24637. return $instance->orderByDesc($column);
  24638. }
  24639. /**
  24640. * Put the query's results in random order.
  24641. *
  24642. * @param string|int $seed
  24643. * @return \Illuminate\Database\Eloquent\Builder<static>
  24644. * @static
  24645. */
  24646. public static function inRandomOrder($seed = '')
  24647. {
  24648. /** @var \Illuminate\Database\Query\Builder $instance */
  24649. return $instance->inRandomOrder($seed);
  24650. }
  24651. /**
  24652. * Add a raw "order by" clause to the query.
  24653. *
  24654. * @param string $sql
  24655. * @param array $bindings
  24656. * @return \Illuminate\Database\Eloquent\Builder<static>
  24657. * @static
  24658. */
  24659. public static function orderByRaw($sql, $bindings = [])
  24660. {
  24661. /** @var \Illuminate\Database\Query\Builder $instance */
  24662. return $instance->orderByRaw($sql, $bindings);
  24663. }
  24664. /**
  24665. * Alias to set the "offset" value of the query.
  24666. *
  24667. * @param int $value
  24668. * @return \Illuminate\Database\Eloquent\Builder<static>
  24669. * @static
  24670. */
  24671. public static function skip($value)
  24672. {
  24673. /** @var \Illuminate\Database\Query\Builder $instance */
  24674. return $instance->skip($value);
  24675. }
  24676. /**
  24677. * Set the "offset" value of the query.
  24678. *
  24679. * @param int $value
  24680. * @return \Illuminate\Database\Eloquent\Builder<static>
  24681. * @static
  24682. */
  24683. public static function offset($value)
  24684. {
  24685. /** @var \Illuminate\Database\Query\Builder $instance */
  24686. return $instance->offset($value);
  24687. }
  24688. /**
  24689. * Alias to set the "limit" value of the query.
  24690. *
  24691. * @param int $value
  24692. * @return \Illuminate\Database\Eloquent\Builder<static>
  24693. * @static
  24694. */
  24695. public static function take($value)
  24696. {
  24697. /** @var \Illuminate\Database\Query\Builder $instance */
  24698. return $instance->take($value);
  24699. }
  24700. /**
  24701. * Set the "limit" value of the query.
  24702. *
  24703. * @param int $value
  24704. * @return \Illuminate\Database\Eloquent\Builder<static>
  24705. * @static
  24706. */
  24707. public static function limit($value)
  24708. {
  24709. /** @var \Illuminate\Database\Query\Builder $instance */
  24710. return $instance->limit($value);
  24711. }
  24712. /**
  24713. * Add a "group limit" clause to the query.
  24714. *
  24715. * @param int $value
  24716. * @param string $column
  24717. * @return \Illuminate\Database\Eloquent\Builder<static>
  24718. * @static
  24719. */
  24720. public static function groupLimit($value, $column)
  24721. {
  24722. /** @var \Illuminate\Database\Query\Builder $instance */
  24723. return $instance->groupLimit($value, $column);
  24724. }
  24725. /**
  24726. * Set the limit and offset for a given page.
  24727. *
  24728. * @param int $page
  24729. * @param int $perPage
  24730. * @return \Illuminate\Database\Eloquent\Builder<static>
  24731. * @static
  24732. */
  24733. public static function forPage($page, $perPage = 15)
  24734. {
  24735. /** @var \Illuminate\Database\Query\Builder $instance */
  24736. return $instance->forPage($page, $perPage);
  24737. }
  24738. /**
  24739. * Constrain the query to the previous "page" of results before a given ID.
  24740. *
  24741. * @param int $perPage
  24742. * @param int|null $lastId
  24743. * @param string $column
  24744. * @return \Illuminate\Database\Eloquent\Builder<static>
  24745. * @static
  24746. */
  24747. public static function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id')
  24748. {
  24749. /** @var \Illuminate\Database\Query\Builder $instance */
  24750. return $instance->forPageBeforeId($perPage, $lastId, $column);
  24751. }
  24752. /**
  24753. * Constrain the query to the next "page" of results after a given ID.
  24754. *
  24755. * @param int $perPage
  24756. * @param int|null $lastId
  24757. * @param string $column
  24758. * @return \Illuminate\Database\Eloquent\Builder<static>
  24759. * @static
  24760. */
  24761. public static function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
  24762. {
  24763. /** @var \Illuminate\Database\Query\Builder $instance */
  24764. return $instance->forPageAfterId($perPage, $lastId, $column);
  24765. }
  24766. /**
  24767. * Remove all existing orders and optionally add a new order.
  24768. *
  24769. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  24770. * @param string $direction
  24771. * @return \Illuminate\Database\Eloquent\Builder<static>
  24772. * @static
  24773. */
  24774. public static function reorder($column = null, $direction = 'asc')
  24775. {
  24776. /** @var \Illuminate\Database\Query\Builder $instance */
  24777. return $instance->reorder($column, $direction);
  24778. }
  24779. /**
  24780. * Add descending "reorder" clause to the query.
  24781. *
  24782. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  24783. * @return \Illuminate\Database\Eloquent\Builder<static>
  24784. * @static
  24785. */
  24786. public static function reorderDesc($column)
  24787. {
  24788. /** @var \Illuminate\Database\Query\Builder $instance */
  24789. return $instance->reorderDesc($column);
  24790. }
  24791. /**
  24792. * Add a union statement to the query.
  24793. *
  24794. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  24795. * @param bool $all
  24796. * @return \Illuminate\Database\Eloquent\Builder<static>
  24797. * @static
  24798. */
  24799. public static function union($query, $all = false)
  24800. {
  24801. /** @var \Illuminate\Database\Query\Builder $instance */
  24802. return $instance->union($query, $all);
  24803. }
  24804. /**
  24805. * Add a union all statement to the query.
  24806. *
  24807. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  24808. * @return \Illuminate\Database\Eloquent\Builder<static>
  24809. * @static
  24810. */
  24811. public static function unionAll($query)
  24812. {
  24813. /** @var \Illuminate\Database\Query\Builder $instance */
  24814. return $instance->unionAll($query);
  24815. }
  24816. /**
  24817. * Lock the selected rows in the table.
  24818. *
  24819. * @param string|bool $value
  24820. * @return \Illuminate\Database\Eloquent\Builder<static>
  24821. * @static
  24822. */
  24823. public static function lock($value = true)
  24824. {
  24825. /** @var \Illuminate\Database\Query\Builder $instance */
  24826. return $instance->lock($value);
  24827. }
  24828. /**
  24829. * Lock the selected rows in the table for updating.
  24830. *
  24831. * @return \Illuminate\Database\Eloquent\Builder<static>
  24832. * @static
  24833. */
  24834. public static function lockForUpdate()
  24835. {
  24836. /** @var \Illuminate\Database\Query\Builder $instance */
  24837. return $instance->lockForUpdate();
  24838. }
  24839. /**
  24840. * Share lock the selected rows in the table.
  24841. *
  24842. * @return \Illuminate\Database\Eloquent\Builder<static>
  24843. * @static
  24844. */
  24845. public static function sharedLock()
  24846. {
  24847. /** @var \Illuminate\Database\Query\Builder $instance */
  24848. return $instance->sharedLock();
  24849. }
  24850. /**
  24851. * Register a closure to be invoked before the query is executed.
  24852. *
  24853. * @return \Illuminate\Database\Eloquent\Builder<static>
  24854. * @static
  24855. */
  24856. public static function beforeQuery($callback)
  24857. {
  24858. /** @var \Illuminate\Database\Query\Builder $instance */
  24859. return $instance->beforeQuery($callback);
  24860. }
  24861. /**
  24862. * Invoke the "before query" modification callbacks.
  24863. *
  24864. * @return void
  24865. * @static
  24866. */
  24867. public static function applyBeforeQueryCallbacks()
  24868. {
  24869. /** @var \Illuminate\Database\Query\Builder $instance */
  24870. $instance->applyBeforeQueryCallbacks();
  24871. }
  24872. /**
  24873. * Get the SQL representation of the query.
  24874. *
  24875. * @return string
  24876. * @static
  24877. */
  24878. public static function toSql()
  24879. {
  24880. /** @var \Illuminate\Database\Query\Builder $instance */
  24881. return $instance->toSql();
  24882. }
  24883. /**
  24884. * Get the raw SQL representation of the query with embedded bindings.
  24885. *
  24886. * @return string
  24887. * @static
  24888. */
  24889. public static function toRawSql()
  24890. {
  24891. /** @var \Illuminate\Database\Query\Builder $instance */
  24892. return $instance->toRawSql();
  24893. }
  24894. /**
  24895. * Get a single expression value from the first result of a query.
  24896. *
  24897. * @return mixed
  24898. * @static
  24899. */
  24900. public static function rawValue($expression, $bindings = [])
  24901. {
  24902. /** @var \Illuminate\Database\Query\Builder $instance */
  24903. return $instance->rawValue($expression, $bindings);
  24904. }
  24905. /**
  24906. * Get the count of the total records for the paginator.
  24907. *
  24908. * @param array<string|\Illuminate\Contracts\Database\Query\Expression> $columns
  24909. * @return int<0, max>
  24910. * @static
  24911. */
  24912. public static function getCountForPagination($columns = [])
  24913. {
  24914. /** @var \Illuminate\Database\Query\Builder $instance */
  24915. return $instance->getCountForPagination($columns);
  24916. }
  24917. /**
  24918. * Concatenate values of a given column as a string.
  24919. *
  24920. * @param string $column
  24921. * @param string $glue
  24922. * @return string
  24923. * @static
  24924. */
  24925. public static function implode($column, $glue = '')
  24926. {
  24927. /** @var \Illuminate\Database\Query\Builder $instance */
  24928. return $instance->implode($column, $glue);
  24929. }
  24930. /**
  24931. * Determine if any rows exist for the current query.
  24932. *
  24933. * @return bool
  24934. * @static
  24935. */
  24936. public static function exists()
  24937. {
  24938. /** @var \Illuminate\Database\Query\Builder $instance */
  24939. return $instance->exists();
  24940. }
  24941. /**
  24942. * Determine if no rows exist for the current query.
  24943. *
  24944. * @return bool
  24945. * @static
  24946. */
  24947. public static function doesntExist()
  24948. {
  24949. /** @var \Illuminate\Database\Query\Builder $instance */
  24950. return $instance->doesntExist();
  24951. }
  24952. /**
  24953. * Execute the given callback if no rows exist for the current query.
  24954. *
  24955. * @return mixed
  24956. * @static
  24957. */
  24958. public static function existsOr($callback)
  24959. {
  24960. /** @var \Illuminate\Database\Query\Builder $instance */
  24961. return $instance->existsOr($callback);
  24962. }
  24963. /**
  24964. * Execute the given callback if rows exist for the current query.
  24965. *
  24966. * @return mixed
  24967. * @static
  24968. */
  24969. public static function doesntExistOr($callback)
  24970. {
  24971. /** @var \Illuminate\Database\Query\Builder $instance */
  24972. return $instance->doesntExistOr($callback);
  24973. }
  24974. /**
  24975. * Retrieve the "count" result of the query.
  24976. *
  24977. * @param \Illuminate\Contracts\Database\Query\Expression|string $columns
  24978. * @return int<0, max>
  24979. * @static
  24980. */
  24981. public static function count($columns = '*')
  24982. {
  24983. /** @var \Illuminate\Database\Query\Builder $instance */
  24984. return $instance->count($columns);
  24985. }
  24986. /**
  24987. * Retrieve the minimum value of a given column.
  24988. *
  24989. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24990. * @return mixed
  24991. * @static
  24992. */
  24993. public static function min($column)
  24994. {
  24995. /** @var \Illuminate\Database\Query\Builder $instance */
  24996. return $instance->min($column);
  24997. }
  24998. /**
  24999. * Retrieve the maximum value of a given column.
  25000. *
  25001. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25002. * @return mixed
  25003. * @static
  25004. */
  25005. public static function max($column)
  25006. {
  25007. /** @var \Illuminate\Database\Query\Builder $instance */
  25008. return $instance->max($column);
  25009. }
  25010. /**
  25011. * Retrieve the sum of the values of a given column.
  25012. *
  25013. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25014. * @return mixed
  25015. * @static
  25016. */
  25017. public static function sum($column)
  25018. {
  25019. /** @var \Illuminate\Database\Query\Builder $instance */
  25020. return $instance->sum($column);
  25021. }
  25022. /**
  25023. * Retrieve the average of the values of a given column.
  25024. *
  25025. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25026. * @return mixed
  25027. * @static
  25028. */
  25029. public static function avg($column)
  25030. {
  25031. /** @var \Illuminate\Database\Query\Builder $instance */
  25032. return $instance->avg($column);
  25033. }
  25034. /**
  25035. * Alias for the "avg" method.
  25036. *
  25037. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25038. * @return mixed
  25039. * @static
  25040. */
  25041. public static function average($column)
  25042. {
  25043. /** @var \Illuminate\Database\Query\Builder $instance */
  25044. return $instance->average($column);
  25045. }
  25046. /**
  25047. * Execute an aggregate function on the database.
  25048. *
  25049. * @param string $function
  25050. * @param array $columns
  25051. * @return mixed
  25052. * @static
  25053. */
  25054. public static function aggregate($function, $columns = [])
  25055. {
  25056. /** @var \Illuminate\Database\Query\Builder $instance */
  25057. return $instance->aggregate($function, $columns);
  25058. }
  25059. /**
  25060. * Execute a numeric aggregate function on the database.
  25061. *
  25062. * @param string $function
  25063. * @param array $columns
  25064. * @return float|int
  25065. * @static
  25066. */
  25067. public static function numericAggregate($function, $columns = [])
  25068. {
  25069. /** @var \Illuminate\Database\Query\Builder $instance */
  25070. return $instance->numericAggregate($function, $columns);
  25071. }
  25072. /**
  25073. * Insert new records into the database.
  25074. *
  25075. * @return bool
  25076. * @static
  25077. */
  25078. public static function insert($values)
  25079. {
  25080. /** @var \Illuminate\Database\Query\Builder $instance */
  25081. return $instance->insert($values);
  25082. }
  25083. /**
  25084. * Insert new records into the database while ignoring errors.
  25085. *
  25086. * @return int<0, max>
  25087. * @static
  25088. */
  25089. public static function insertOrIgnore($values)
  25090. {
  25091. /** @var \Illuminate\Database\Query\Builder $instance */
  25092. return $instance->insertOrIgnore($values);
  25093. }
  25094. /**
  25095. * Insert a new record and get the value of the primary key.
  25096. *
  25097. * @param string|null $sequence
  25098. * @return int
  25099. * @static
  25100. */
  25101. public static function insertGetId($values, $sequence = null)
  25102. {
  25103. /** @var \Illuminate\Database\Query\Builder $instance */
  25104. return $instance->insertGetId($values, $sequence);
  25105. }
  25106. /**
  25107. * Insert new records into the table using a subquery.
  25108. *
  25109. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25110. * @return int
  25111. * @static
  25112. */
  25113. public static function insertUsing($columns, $query)
  25114. {
  25115. /** @var \Illuminate\Database\Query\Builder $instance */
  25116. return $instance->insertUsing($columns, $query);
  25117. }
  25118. /**
  25119. * Insert new records into the table using a subquery while ignoring errors.
  25120. *
  25121. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25122. * @return int
  25123. * @static
  25124. */
  25125. public static function insertOrIgnoreUsing($columns, $query)
  25126. {
  25127. /** @var \Illuminate\Database\Query\Builder $instance */
  25128. return $instance->insertOrIgnoreUsing($columns, $query);
  25129. }
  25130. /**
  25131. * Update records in a PostgreSQL database using the update from syntax.
  25132. *
  25133. * @return int
  25134. * @static
  25135. */
  25136. public static function updateFrom($values)
  25137. {
  25138. /** @var \Illuminate\Database\Query\Builder $instance */
  25139. return $instance->updateFrom($values);
  25140. }
  25141. /**
  25142. * Insert or update a record matching the attributes, and fill it with values.
  25143. *
  25144. * @return bool
  25145. * @static
  25146. */
  25147. public static function updateOrInsert($attributes, $values = [])
  25148. {
  25149. /** @var \Illuminate\Database\Query\Builder $instance */
  25150. return $instance->updateOrInsert($attributes, $values);
  25151. }
  25152. /**
  25153. * Increment the given column's values by the given amounts.
  25154. *
  25155. * @param array<string, float|int|numeric-string> $columns
  25156. * @param array<string, mixed> $extra
  25157. * @return int<0, max>
  25158. * @throws \InvalidArgumentException
  25159. * @static
  25160. */
  25161. public static function incrementEach($columns, $extra = [])
  25162. {
  25163. /** @var \Illuminate\Database\Query\Builder $instance */
  25164. return $instance->incrementEach($columns, $extra);
  25165. }
  25166. /**
  25167. * Decrement the given column's values by the given amounts.
  25168. *
  25169. * @param array<string, float|int|numeric-string> $columns
  25170. * @param array<string, mixed> $extra
  25171. * @return int<0, max>
  25172. * @throws \InvalidArgumentException
  25173. * @static
  25174. */
  25175. public static function decrementEach($columns, $extra = [])
  25176. {
  25177. /** @var \Illuminate\Database\Query\Builder $instance */
  25178. return $instance->decrementEach($columns, $extra);
  25179. }
  25180. /**
  25181. * Run a truncate statement on the table.
  25182. *
  25183. * @return void
  25184. * @static
  25185. */
  25186. public static function truncate()
  25187. {
  25188. /** @var \Illuminate\Database\Query\Builder $instance */
  25189. $instance->truncate();
  25190. }
  25191. /**
  25192. * Get all of the query builder's columns in a text-only array with all expressions evaluated.
  25193. *
  25194. * @return list<string>
  25195. * @static
  25196. */
  25197. public static function getColumns()
  25198. {
  25199. /** @var \Illuminate\Database\Query\Builder $instance */
  25200. return $instance->getColumns();
  25201. }
  25202. /**
  25203. * Create a raw database expression.
  25204. *
  25205. * @param mixed $value
  25206. * @return \Illuminate\Contracts\Database\Query\Expression
  25207. * @static
  25208. */
  25209. public static function raw($value)
  25210. {
  25211. /** @var \Illuminate\Database\Query\Builder $instance */
  25212. return $instance->raw($value);
  25213. }
  25214. /**
  25215. * Get the current query value bindings in a flattened array.
  25216. *
  25217. * @return list<mixed>
  25218. * @static
  25219. */
  25220. public static function getBindings()
  25221. {
  25222. /** @var \Illuminate\Database\Query\Builder $instance */
  25223. return $instance->getBindings();
  25224. }
  25225. /**
  25226. * Get the raw array of bindings.
  25227. *
  25228. * @return \Illuminate\Database\Query\array{ select: list<mixed>,
  25229. * from: list<mixed>,
  25230. * join: list<mixed>,
  25231. * where: list<mixed>,
  25232. * groupBy: list<mixed>,
  25233. * having: list<mixed>,
  25234. * order: list<mixed>,
  25235. * union: list<mixed>,
  25236. * unionOrder: list<mixed>,
  25237. * }
  25238. * @static
  25239. */
  25240. public static function getRawBindings()
  25241. {
  25242. /** @var \Illuminate\Database\Query\Builder $instance */
  25243. return $instance->getRawBindings();
  25244. }
  25245. /**
  25246. * Set the bindings on the query builder.
  25247. *
  25248. * @param list<mixed> $bindings
  25249. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25250. * @return \Illuminate\Database\Eloquent\Builder<static>
  25251. * @throws \InvalidArgumentException
  25252. * @static
  25253. */
  25254. public static function setBindings($bindings, $type = 'where')
  25255. {
  25256. /** @var \Illuminate\Database\Query\Builder $instance */
  25257. return $instance->setBindings($bindings, $type);
  25258. }
  25259. /**
  25260. * Add a binding to the query.
  25261. *
  25262. * @param mixed $value
  25263. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25264. * @return \Illuminate\Database\Eloquent\Builder<static>
  25265. * @throws \InvalidArgumentException
  25266. * @static
  25267. */
  25268. public static function addBinding($value, $type = 'where')
  25269. {
  25270. /** @var \Illuminate\Database\Query\Builder $instance */
  25271. return $instance->addBinding($value, $type);
  25272. }
  25273. /**
  25274. * Cast the given binding value.
  25275. *
  25276. * @param mixed $value
  25277. * @return mixed
  25278. * @static
  25279. */
  25280. public static function castBinding($value)
  25281. {
  25282. /** @var \Illuminate\Database\Query\Builder $instance */
  25283. return $instance->castBinding($value);
  25284. }
  25285. /**
  25286. * Merge an array of bindings into our bindings.
  25287. *
  25288. * @param self $query
  25289. * @return \Illuminate\Database\Eloquent\Builder<static>
  25290. * @static
  25291. */
  25292. public static function mergeBindings($query)
  25293. {
  25294. /** @var \Illuminate\Database\Query\Builder $instance */
  25295. return $instance->mergeBindings($query);
  25296. }
  25297. /**
  25298. * Remove all of the expressions from a list of bindings.
  25299. *
  25300. * @param array<mixed> $bindings
  25301. * @return list<mixed>
  25302. * @static
  25303. */
  25304. public static function cleanBindings($bindings)
  25305. {
  25306. /** @var \Illuminate\Database\Query\Builder $instance */
  25307. return $instance->cleanBindings($bindings);
  25308. }
  25309. /**
  25310. * Get the database query processor instance.
  25311. *
  25312. * @return \Illuminate\Database\Query\Processors\Processor
  25313. * @static
  25314. */
  25315. public static function getProcessor()
  25316. {
  25317. /** @var \Illuminate\Database\Query\Builder $instance */
  25318. return $instance->getProcessor();
  25319. }
  25320. /**
  25321. * Get the query grammar instance.
  25322. *
  25323. * @return \Illuminate\Database\Query\Grammars\Grammar
  25324. * @static
  25325. */
  25326. public static function getGrammar()
  25327. {
  25328. /** @var \Illuminate\Database\Query\Builder $instance */
  25329. return $instance->getGrammar();
  25330. }
  25331. /**
  25332. * Use the "write" PDO connection when executing the query.
  25333. *
  25334. * @return \Illuminate\Database\Eloquent\Builder<static>
  25335. * @static
  25336. */
  25337. public static function useWritePdo()
  25338. {
  25339. /** @var \Illuminate\Database\Query\Builder $instance */
  25340. return $instance->useWritePdo();
  25341. }
  25342. /**
  25343. * Clone the query without the given properties.
  25344. *
  25345. * @return static
  25346. * @static
  25347. */
  25348. public static function cloneWithout($properties)
  25349. {
  25350. /** @var \Illuminate\Database\Query\Builder $instance */
  25351. return $instance->cloneWithout($properties);
  25352. }
  25353. /**
  25354. * Clone the query without the given bindings.
  25355. *
  25356. * @return static
  25357. * @static
  25358. */
  25359. public static function cloneWithoutBindings($except)
  25360. {
  25361. /** @var \Illuminate\Database\Query\Builder $instance */
  25362. return $instance->cloneWithoutBindings($except);
  25363. }
  25364. /**
  25365. * Dump the current SQL and bindings.
  25366. *
  25367. * @param mixed $args
  25368. * @return \Illuminate\Database\Eloquent\Builder<static>
  25369. * @static
  25370. */
  25371. public static function dump(...$args)
  25372. {
  25373. /** @var \Illuminate\Database\Query\Builder $instance */
  25374. return $instance->dump(...$args);
  25375. }
  25376. /**
  25377. * Dump the raw current SQL with embedded bindings.
  25378. *
  25379. * @return \Illuminate\Database\Eloquent\Builder<static>
  25380. * @static
  25381. */
  25382. public static function dumpRawSql()
  25383. {
  25384. /** @var \Illuminate\Database\Query\Builder $instance */
  25385. return $instance->dumpRawSql();
  25386. }
  25387. /**
  25388. * Die and dump the current SQL and bindings.
  25389. *
  25390. * @return never
  25391. * @static
  25392. */
  25393. public static function dd()
  25394. {
  25395. /** @var \Illuminate\Database\Query\Builder $instance */
  25396. return $instance->dd();
  25397. }
  25398. /**
  25399. * Die and dump the current SQL with embedded bindings.
  25400. *
  25401. * @return never
  25402. * @static
  25403. */
  25404. public static function ddRawSql()
  25405. {
  25406. /** @var \Illuminate\Database\Query\Builder $instance */
  25407. return $instance->ddRawSql();
  25408. }
  25409. /**
  25410. * Add a where clause to determine if a "date" column is in the past to the query.
  25411. *
  25412. * @param array|string $columns
  25413. * @return \Illuminate\Database\Eloquent\Builder<static>
  25414. * @static
  25415. */
  25416. public static function wherePast($columns)
  25417. {
  25418. /** @var \Illuminate\Database\Query\Builder $instance */
  25419. return $instance->wherePast($columns);
  25420. }
  25421. /**
  25422. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25423. *
  25424. * @param array|string $columns
  25425. * @return \Illuminate\Database\Eloquent\Builder<static>
  25426. * @static
  25427. */
  25428. public static function whereNowOrPast($columns)
  25429. {
  25430. /** @var \Illuminate\Database\Query\Builder $instance */
  25431. return $instance->whereNowOrPast($columns);
  25432. }
  25433. /**
  25434. * Add an "or where" clause to determine if a "date" column is in the past to the query.
  25435. *
  25436. * @param array|string $columns
  25437. * @return \Illuminate\Database\Eloquent\Builder<static>
  25438. * @static
  25439. */
  25440. public static function orWherePast($columns)
  25441. {
  25442. /** @var \Illuminate\Database\Query\Builder $instance */
  25443. return $instance->orWherePast($columns);
  25444. }
  25445. /**
  25446. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25447. *
  25448. * @param array|string $columns
  25449. * @return \Illuminate\Database\Eloquent\Builder<static>
  25450. * @static
  25451. */
  25452. public static function orWhereNowOrPast($columns)
  25453. {
  25454. /** @var \Illuminate\Database\Query\Builder $instance */
  25455. return $instance->orWhereNowOrPast($columns);
  25456. }
  25457. /**
  25458. * Add a where clause to determine if a "date" column is in the future to the query.
  25459. *
  25460. * @param array|string $columns
  25461. * @return \Illuminate\Database\Eloquent\Builder<static>
  25462. * @static
  25463. */
  25464. public static function whereFuture($columns)
  25465. {
  25466. /** @var \Illuminate\Database\Query\Builder $instance */
  25467. return $instance->whereFuture($columns);
  25468. }
  25469. /**
  25470. * Add a where clause to determine if a "date" column is in the future or now to the query.
  25471. *
  25472. * @param array|string $columns
  25473. * @return \Illuminate\Database\Eloquent\Builder<static>
  25474. * @static
  25475. */
  25476. public static function whereNowOrFuture($columns)
  25477. {
  25478. /** @var \Illuminate\Database\Query\Builder $instance */
  25479. return $instance->whereNowOrFuture($columns);
  25480. }
  25481. /**
  25482. * Add an "or where" clause to determine if a "date" column is in the future to the query.
  25483. *
  25484. * @param array|string $columns
  25485. * @return \Illuminate\Database\Eloquent\Builder<static>
  25486. * @static
  25487. */
  25488. public static function orWhereFuture($columns)
  25489. {
  25490. /** @var \Illuminate\Database\Query\Builder $instance */
  25491. return $instance->orWhereFuture($columns);
  25492. }
  25493. /**
  25494. * Add an "or where" clause to determine if a "date" column is in the future or now to the query.
  25495. *
  25496. * @param array|string $columns
  25497. * @return \Illuminate\Database\Eloquent\Builder<static>
  25498. * @static
  25499. */
  25500. public static function orWhereNowOrFuture($columns)
  25501. {
  25502. /** @var \Illuminate\Database\Query\Builder $instance */
  25503. return $instance->orWhereNowOrFuture($columns);
  25504. }
  25505. /**
  25506. * Add a "where date" clause to determine if a "date" column is today to the query.
  25507. *
  25508. * @param array|string $columns
  25509. * @param string $boolean
  25510. * @return \Illuminate\Database\Eloquent\Builder<static>
  25511. * @static
  25512. */
  25513. public static function whereToday($columns, $boolean = 'and')
  25514. {
  25515. /** @var \Illuminate\Database\Query\Builder $instance */
  25516. return $instance->whereToday($columns, $boolean);
  25517. }
  25518. /**
  25519. * Add a "where date" clause to determine if a "date" column is before today.
  25520. *
  25521. * @param array|string $columns
  25522. * @return \Illuminate\Database\Eloquent\Builder<static>
  25523. * @static
  25524. */
  25525. public static function whereBeforeToday($columns)
  25526. {
  25527. /** @var \Illuminate\Database\Query\Builder $instance */
  25528. return $instance->whereBeforeToday($columns);
  25529. }
  25530. /**
  25531. * Add a "where date" clause to determine if a "date" column is today or before to the query.
  25532. *
  25533. * @param array|string $columns
  25534. * @return \Illuminate\Database\Eloquent\Builder<static>
  25535. * @static
  25536. */
  25537. public static function whereTodayOrBefore($columns)
  25538. {
  25539. /** @var \Illuminate\Database\Query\Builder $instance */
  25540. return $instance->whereTodayOrBefore($columns);
  25541. }
  25542. /**
  25543. * Add a "where date" clause to determine if a "date" column is after today.
  25544. *
  25545. * @param array|string $columns
  25546. * @return \Illuminate\Database\Eloquent\Builder<static>
  25547. * @static
  25548. */
  25549. public static function whereAfterToday($columns)
  25550. {
  25551. /** @var \Illuminate\Database\Query\Builder $instance */
  25552. return $instance->whereAfterToday($columns);
  25553. }
  25554. /**
  25555. * Add a "where date" clause to determine if a "date" column is today or after to the query.
  25556. *
  25557. * @param array|string $columns
  25558. * @return \Illuminate\Database\Eloquent\Builder<static>
  25559. * @static
  25560. */
  25561. public static function whereTodayOrAfter($columns)
  25562. {
  25563. /** @var \Illuminate\Database\Query\Builder $instance */
  25564. return $instance->whereTodayOrAfter($columns);
  25565. }
  25566. /**
  25567. * Add an "or where date" clause to determine if a "date" column is today to the query.
  25568. *
  25569. * @param array|string $columns
  25570. * @return \Illuminate\Database\Eloquent\Builder<static>
  25571. * @static
  25572. */
  25573. public static function orWhereToday($columns)
  25574. {
  25575. /** @var \Illuminate\Database\Query\Builder $instance */
  25576. return $instance->orWhereToday($columns);
  25577. }
  25578. /**
  25579. * Add an "or where date" clause to determine if a "date" column is before today.
  25580. *
  25581. * @param array|string $columns
  25582. * @return \Illuminate\Database\Eloquent\Builder<static>
  25583. * @static
  25584. */
  25585. public static function orWhereBeforeToday($columns)
  25586. {
  25587. /** @var \Illuminate\Database\Query\Builder $instance */
  25588. return $instance->orWhereBeforeToday($columns);
  25589. }
  25590. /**
  25591. * Add an "or where date" clause to determine if a "date" column is today or before to the query.
  25592. *
  25593. * @param array|string $columns
  25594. * @return \Illuminate\Database\Eloquent\Builder<static>
  25595. * @static
  25596. */
  25597. public static function orWhereTodayOrBefore($columns)
  25598. {
  25599. /** @var \Illuminate\Database\Query\Builder $instance */
  25600. return $instance->orWhereTodayOrBefore($columns);
  25601. }
  25602. /**
  25603. * Add an "or where date" clause to determine if a "date" column is after today.
  25604. *
  25605. * @param array|string $columns
  25606. * @return \Illuminate\Database\Eloquent\Builder<static>
  25607. * @static
  25608. */
  25609. public static function orWhereAfterToday($columns)
  25610. {
  25611. /** @var \Illuminate\Database\Query\Builder $instance */
  25612. return $instance->orWhereAfterToday($columns);
  25613. }
  25614. /**
  25615. * Add an "or where date" clause to determine if a "date" column is today or after to the query.
  25616. *
  25617. * @param array|string $columns
  25618. * @return \Illuminate\Database\Eloquent\Builder<static>
  25619. * @static
  25620. */
  25621. public static function orWhereTodayOrAfter($columns)
  25622. {
  25623. /** @var \Illuminate\Database\Query\Builder $instance */
  25624. return $instance->orWhereTodayOrAfter($columns);
  25625. }
  25626. /**
  25627. * Explains the query.
  25628. *
  25629. * @return \Illuminate\Support\Collection
  25630. * @static
  25631. */
  25632. public static function explain()
  25633. {
  25634. /** @var \Illuminate\Database\Query\Builder $instance */
  25635. return $instance->explain();
  25636. }
  25637. /**
  25638. * Register a custom macro.
  25639. *
  25640. * @param string $name
  25641. * @param object|callable $macro
  25642. * @param-closure-this static $macro
  25643. * @return void
  25644. * @static
  25645. */
  25646. public static function macro($name, $macro)
  25647. {
  25648. \Illuminate\Database\Query\Builder::macro($name, $macro);
  25649. }
  25650. /**
  25651. * Mix another object into the class.
  25652. *
  25653. * @param object $mixin
  25654. * @param bool $replace
  25655. * @return void
  25656. * @throws \ReflectionException
  25657. * @static
  25658. */
  25659. public static function mixin($mixin, $replace = true)
  25660. {
  25661. \Illuminate\Database\Query\Builder::mixin($mixin, $replace);
  25662. }
  25663. /**
  25664. * Flush the existing macros.
  25665. *
  25666. * @return void
  25667. * @static
  25668. */
  25669. public static function flushMacros()
  25670. {
  25671. \Illuminate\Database\Query\Builder::flushMacros();
  25672. }
  25673. /**
  25674. * Dynamically handle calls to the class.
  25675. *
  25676. * @param string $method
  25677. * @param array $parameters
  25678. * @return mixed
  25679. * @throws \BadMethodCallException
  25680. * @static
  25681. */
  25682. public static function macroCall($method, $parameters)
  25683. {
  25684. /** @var \Illuminate\Database\Query\Builder $instance */
  25685. return $instance->macroCall($method, $parameters);
  25686. }
  25687. }
  25688. class Event extends \Illuminate\Support\Facades\Event {}
  25689. class File extends \Illuminate\Support\Facades\File {}
  25690. class Gate extends \Illuminate\Support\Facades\Gate {}
  25691. class Hash extends \Illuminate\Support\Facades\Hash {}
  25692. class Http extends \Illuminate\Support\Facades\Http {}
  25693. class Js extends \Illuminate\Support\Js {}
  25694. class Lang extends \Illuminate\Support\Facades\Lang {}
  25695. class Log extends \Illuminate\Support\Facades\Log {}
  25696. class Mail extends \Illuminate\Support\Facades\Mail {}
  25697. class Notification extends \Illuminate\Support\Facades\Notification {}
  25698. class Number extends \Illuminate\Support\Number {}
  25699. class Password extends \Illuminate\Support\Facades\Password {}
  25700. class Process extends \Illuminate\Support\Facades\Process {}
  25701. class Queue extends \Illuminate\Support\Facades\Queue {}
  25702. class RateLimiter extends \Illuminate\Support\Facades\RateLimiter {}
  25703. class Redirect extends \Illuminate\Support\Facades\Redirect {}
  25704. class Request extends \Illuminate\Support\Facades\Request {}
  25705. class Response extends \Illuminate\Support\Facades\Response {}
  25706. class Route extends \Illuminate\Support\Facades\Route {}
  25707. class Schedule extends \Illuminate\Support\Facades\Schedule {}
  25708. class Schema extends \Illuminate\Support\Facades\Schema {}
  25709. class Session extends \Illuminate\Support\Facades\Session {}
  25710. class Storage extends \Illuminate\Support\Facades\Storage {}
  25711. class Str extends \Illuminate\Support\Str {}
  25712. class URL extends \Illuminate\Support\Facades\URL {}
  25713. class Uri extends \Illuminate\Support\Uri {}
  25714. class Validator extends \Illuminate\Support\Facades\Validator {}
  25715. class View extends \Illuminate\Support\Facades\View {}
  25716. class Vite extends \Illuminate\Support\Facades\Vite {}
  25717. }