_ide_helper.php 875 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686
  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\DatabaseStore $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\DatabaseStore $instance */
  4771. return $instance->restoreLock($name, $owner);
  4772. }
  4773. /**
  4774. * Remove an item from the cache if it is expired.
  4775. *
  4776. * @param string $key
  4777. * @return bool
  4778. * @static
  4779. */
  4780. public static function forgetIfExpired($key)
  4781. {
  4782. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4783. return $instance->forgetIfExpired($key);
  4784. }
  4785. /**
  4786. * Remove all items from the cache.
  4787. *
  4788. * @return bool
  4789. * @static
  4790. */
  4791. public static function flush()
  4792. {
  4793. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4794. return $instance->flush();
  4795. }
  4796. /**
  4797. * Get the underlying database connection.
  4798. *
  4799. * @return \Illuminate\Database\PostgresConnection
  4800. * @static
  4801. */
  4802. public static function getConnection()
  4803. {
  4804. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4805. return $instance->getConnection();
  4806. }
  4807. /**
  4808. * Specify the name of the connection that should be used to manage locks.
  4809. *
  4810. * @param \Illuminate\Database\ConnectionInterface $connection
  4811. * @return \Illuminate\Cache\DatabaseStore
  4812. * @static
  4813. */
  4814. public static function setLockConnection($connection)
  4815. {
  4816. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4817. return $instance->setLockConnection($connection);
  4818. }
  4819. /**
  4820. * Get the cache key prefix.
  4821. *
  4822. * @return string
  4823. * @static
  4824. */
  4825. public static function getPrefix()
  4826. {
  4827. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4828. return $instance->getPrefix();
  4829. }
  4830. /**
  4831. * Set the cache key prefix.
  4832. *
  4833. * @param string $prefix
  4834. * @return void
  4835. * @static
  4836. */
  4837. public static function setPrefix($prefix)
  4838. {
  4839. /** @var \Illuminate\Cache\DatabaseStore $instance */
  4840. $instance->setPrefix($prefix);
  4841. }
  4842. }
  4843. /**
  4844. * @method static array run(\Closure|array $tasks)
  4845. * @method static \Illuminate\Support\Defer\DeferredCallback defer(\Closure|array $tasks)
  4846. * @see \Illuminate\Concurrency\ConcurrencyManager
  4847. */
  4848. class Concurrency {
  4849. /**
  4850. * Get a driver instance by name.
  4851. *
  4852. * @param string|null $name
  4853. * @return mixed
  4854. * @static
  4855. */
  4856. public static function driver($name = null)
  4857. {
  4858. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4859. return $instance->driver($name);
  4860. }
  4861. /**
  4862. * Create an instance of the process concurrency driver.
  4863. *
  4864. * @param array $config
  4865. * @return \Illuminate\Concurrency\ProcessDriver
  4866. * @static
  4867. */
  4868. public static function createProcessDriver($config)
  4869. {
  4870. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4871. return $instance->createProcessDriver($config);
  4872. }
  4873. /**
  4874. * Create an instance of the fork concurrency driver.
  4875. *
  4876. * @param array $config
  4877. * @return \Illuminate\Concurrency\ForkDriver
  4878. * @throws \RuntimeException
  4879. * @static
  4880. */
  4881. public static function createForkDriver($config)
  4882. {
  4883. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4884. return $instance->createForkDriver($config);
  4885. }
  4886. /**
  4887. * Create an instance of the sync concurrency driver.
  4888. *
  4889. * @param array $config
  4890. * @return \Illuminate\Concurrency\SyncDriver
  4891. * @static
  4892. */
  4893. public static function createSyncDriver($config)
  4894. {
  4895. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4896. return $instance->createSyncDriver($config);
  4897. }
  4898. /**
  4899. * Get the default instance name.
  4900. *
  4901. * @return string
  4902. * @static
  4903. */
  4904. public static function getDefaultInstance()
  4905. {
  4906. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4907. return $instance->getDefaultInstance();
  4908. }
  4909. /**
  4910. * Set the default instance name.
  4911. *
  4912. * @param string $name
  4913. * @return void
  4914. * @static
  4915. */
  4916. public static function setDefaultInstance($name)
  4917. {
  4918. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4919. $instance->setDefaultInstance($name);
  4920. }
  4921. /**
  4922. * Get the instance specific configuration.
  4923. *
  4924. * @param string $name
  4925. * @return array
  4926. * @static
  4927. */
  4928. public static function getInstanceConfig($name)
  4929. {
  4930. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4931. return $instance->getInstanceConfig($name);
  4932. }
  4933. /**
  4934. * Get an instance by name.
  4935. *
  4936. * @param string|null $name
  4937. * @return mixed
  4938. * @static
  4939. */
  4940. public static function instance($name = null)
  4941. {
  4942. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4943. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4944. return $instance->instance($name);
  4945. }
  4946. /**
  4947. * Unset the given instances.
  4948. *
  4949. * @param array|string|null $name
  4950. * @return \Illuminate\Concurrency\ConcurrencyManager
  4951. * @static
  4952. */
  4953. public static function forgetInstance($name = null)
  4954. {
  4955. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4956. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4957. return $instance->forgetInstance($name);
  4958. }
  4959. /**
  4960. * Disconnect the given instance and remove from local cache.
  4961. *
  4962. * @param string|null $name
  4963. * @return void
  4964. * @static
  4965. */
  4966. public static function purge($name = null)
  4967. {
  4968. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4969. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4970. $instance->purge($name);
  4971. }
  4972. /**
  4973. * Register a custom instance creator Closure.
  4974. *
  4975. * @param string $name
  4976. * @param \Closure $callback
  4977. * @param-closure-this $this $callback
  4978. * @return \Illuminate\Concurrency\ConcurrencyManager
  4979. * @static
  4980. */
  4981. public static function extend($name, $callback)
  4982. {
  4983. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4984. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4985. return $instance->extend($name, $callback);
  4986. }
  4987. /**
  4988. * Set the application instance used by the manager.
  4989. *
  4990. * @param \Illuminate\Contracts\Foundation\Application $app
  4991. * @return \Illuminate\Concurrency\ConcurrencyManager
  4992. * @static
  4993. */
  4994. public static function setApplication($app)
  4995. {
  4996. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4997. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4998. return $instance->setApplication($app);
  4999. }
  5000. }
  5001. /**
  5002. * @see \Illuminate\Config\Repository
  5003. */
  5004. class Config {
  5005. /**
  5006. * Determine if the given configuration value exists.
  5007. *
  5008. * @param string $key
  5009. * @return bool
  5010. * @static
  5011. */
  5012. public static function has($key)
  5013. {
  5014. /** @var \Illuminate\Config\Repository $instance */
  5015. return $instance->has($key);
  5016. }
  5017. /**
  5018. * Get the specified configuration value.
  5019. *
  5020. * @param array|string $key
  5021. * @param mixed $default
  5022. * @return mixed
  5023. * @static
  5024. */
  5025. public static function get($key, $default = null)
  5026. {
  5027. /** @var \Illuminate\Config\Repository $instance */
  5028. return $instance->get($key, $default);
  5029. }
  5030. /**
  5031. * Get many configuration values.
  5032. *
  5033. * @param array<string|int,mixed> $keys
  5034. * @return array<string,mixed>
  5035. * @static
  5036. */
  5037. public static function getMany($keys)
  5038. {
  5039. /** @var \Illuminate\Config\Repository $instance */
  5040. return $instance->getMany($keys);
  5041. }
  5042. /**
  5043. * Get the specified string configuration value.
  5044. *
  5045. * @param string $key
  5046. * @param (\Closure():(string|null))|string|null $default
  5047. * @return string
  5048. * @static
  5049. */
  5050. public static function string($key, $default = null)
  5051. {
  5052. /** @var \Illuminate\Config\Repository $instance */
  5053. return $instance->string($key, $default);
  5054. }
  5055. /**
  5056. * Get the specified integer configuration value.
  5057. *
  5058. * @param string $key
  5059. * @param (\Closure():(int|null))|int|null $default
  5060. * @return int
  5061. * @static
  5062. */
  5063. public static function integer($key, $default = null)
  5064. {
  5065. /** @var \Illuminate\Config\Repository $instance */
  5066. return $instance->integer($key, $default);
  5067. }
  5068. /**
  5069. * Get the specified float configuration value.
  5070. *
  5071. * @param string $key
  5072. * @param (\Closure():(float|null))|float|null $default
  5073. * @return float
  5074. * @static
  5075. */
  5076. public static function float($key, $default = null)
  5077. {
  5078. /** @var \Illuminate\Config\Repository $instance */
  5079. return $instance->float($key, $default);
  5080. }
  5081. /**
  5082. * Get the specified boolean configuration value.
  5083. *
  5084. * @param string $key
  5085. * @param (\Closure():(bool|null))|bool|null $default
  5086. * @return bool
  5087. * @static
  5088. */
  5089. public static function boolean($key, $default = null)
  5090. {
  5091. /** @var \Illuminate\Config\Repository $instance */
  5092. return $instance->boolean($key, $default);
  5093. }
  5094. /**
  5095. * Get the specified array configuration value.
  5096. *
  5097. * @param string $key
  5098. * @param (\Closure():(array<array-key, mixed>|null))|array<array-key, mixed>|null $default
  5099. * @return array<array-key, mixed>
  5100. * @static
  5101. */
  5102. public static function array($key, $default = null)
  5103. {
  5104. /** @var \Illuminate\Config\Repository $instance */
  5105. return $instance->array($key, $default);
  5106. }
  5107. /**
  5108. * Get the specified array configuration value as a collection.
  5109. *
  5110. * @param string $key
  5111. * @param (\Closure():(array<array-key, mixed>|null))|array<array-key, mixed>|null $default
  5112. * @return Collection<array-key, mixed>
  5113. * @static
  5114. */
  5115. public static function collection($key, $default = null)
  5116. {
  5117. /** @var \Illuminate\Config\Repository $instance */
  5118. return $instance->collection($key, $default);
  5119. }
  5120. /**
  5121. * Set a given configuration value.
  5122. *
  5123. * @param array|string $key
  5124. * @param mixed $value
  5125. * @return void
  5126. * @static
  5127. */
  5128. public static function set($key, $value = null)
  5129. {
  5130. /** @var \Illuminate\Config\Repository $instance */
  5131. $instance->set($key, $value);
  5132. }
  5133. /**
  5134. * Prepend a value onto an array configuration value.
  5135. *
  5136. * @param string $key
  5137. * @param mixed $value
  5138. * @return void
  5139. * @static
  5140. */
  5141. public static function prepend($key, $value)
  5142. {
  5143. /** @var \Illuminate\Config\Repository $instance */
  5144. $instance->prepend($key, $value);
  5145. }
  5146. /**
  5147. * Push a value onto an array configuration value.
  5148. *
  5149. * @param string $key
  5150. * @param mixed $value
  5151. * @return void
  5152. * @static
  5153. */
  5154. public static function push($key, $value)
  5155. {
  5156. /** @var \Illuminate\Config\Repository $instance */
  5157. $instance->push($key, $value);
  5158. }
  5159. /**
  5160. * Get all of the configuration items for the application.
  5161. *
  5162. * @return array
  5163. * @static
  5164. */
  5165. public static function all()
  5166. {
  5167. /** @var \Illuminate\Config\Repository $instance */
  5168. return $instance->all();
  5169. }
  5170. /**
  5171. * Determine if the given configuration option exists.
  5172. *
  5173. * @param string $key
  5174. * @return bool
  5175. * @static
  5176. */
  5177. public static function offsetExists($key)
  5178. {
  5179. /** @var \Illuminate\Config\Repository $instance */
  5180. return $instance->offsetExists($key);
  5181. }
  5182. /**
  5183. * Get a configuration option.
  5184. *
  5185. * @param string $key
  5186. * @return mixed
  5187. * @static
  5188. */
  5189. public static function offsetGet($key)
  5190. {
  5191. /** @var \Illuminate\Config\Repository $instance */
  5192. return $instance->offsetGet($key);
  5193. }
  5194. /**
  5195. * Set a configuration option.
  5196. *
  5197. * @param string $key
  5198. * @param mixed $value
  5199. * @return void
  5200. * @static
  5201. */
  5202. public static function offsetSet($key, $value)
  5203. {
  5204. /** @var \Illuminate\Config\Repository $instance */
  5205. $instance->offsetSet($key, $value);
  5206. }
  5207. /**
  5208. * Unset a configuration option.
  5209. *
  5210. * @param string $key
  5211. * @return void
  5212. * @static
  5213. */
  5214. public static function offsetUnset($key)
  5215. {
  5216. /** @var \Illuminate\Config\Repository $instance */
  5217. $instance->offsetUnset($key);
  5218. }
  5219. /**
  5220. * Register a custom macro.
  5221. *
  5222. * @param string $name
  5223. * @param object|callable $macro
  5224. * @param-closure-this static $macro
  5225. * @return void
  5226. * @static
  5227. */
  5228. public static function macro($name, $macro)
  5229. {
  5230. \Illuminate\Config\Repository::macro($name, $macro);
  5231. }
  5232. /**
  5233. * Mix another object into the class.
  5234. *
  5235. * @param object $mixin
  5236. * @param bool $replace
  5237. * @return void
  5238. * @throws \ReflectionException
  5239. * @static
  5240. */
  5241. public static function mixin($mixin, $replace = true)
  5242. {
  5243. \Illuminate\Config\Repository::mixin($mixin, $replace);
  5244. }
  5245. /**
  5246. * Checks if macro is registered.
  5247. *
  5248. * @param string $name
  5249. * @return bool
  5250. * @static
  5251. */
  5252. public static function hasMacro($name)
  5253. {
  5254. return \Illuminate\Config\Repository::hasMacro($name);
  5255. }
  5256. /**
  5257. * Flush the existing macros.
  5258. *
  5259. * @return void
  5260. * @static
  5261. */
  5262. public static function flushMacros()
  5263. {
  5264. \Illuminate\Config\Repository::flushMacros();
  5265. }
  5266. }
  5267. /**
  5268. * @see \Illuminate\Log\Context\Repository
  5269. */
  5270. class Context {
  5271. /**
  5272. * Determine if the given key exists.
  5273. *
  5274. * @param string $key
  5275. * @return bool
  5276. * @static
  5277. */
  5278. public static function has($key)
  5279. {
  5280. /** @var \Illuminate\Log\Context\Repository $instance */
  5281. return $instance->has($key);
  5282. }
  5283. /**
  5284. * Determine if the given key is missing.
  5285. *
  5286. * @param string $key
  5287. * @return bool
  5288. * @static
  5289. */
  5290. public static function missing($key)
  5291. {
  5292. /** @var \Illuminate\Log\Context\Repository $instance */
  5293. return $instance->missing($key);
  5294. }
  5295. /**
  5296. * Determine if the given key exists within the hidden context data.
  5297. *
  5298. * @param string $key
  5299. * @return bool
  5300. * @static
  5301. */
  5302. public static function hasHidden($key)
  5303. {
  5304. /** @var \Illuminate\Log\Context\Repository $instance */
  5305. return $instance->hasHidden($key);
  5306. }
  5307. /**
  5308. * Determine if the given key is missing within the hidden context data.
  5309. *
  5310. * @param string $key
  5311. * @return bool
  5312. * @static
  5313. */
  5314. public static function missingHidden($key)
  5315. {
  5316. /** @var \Illuminate\Log\Context\Repository $instance */
  5317. return $instance->missingHidden($key);
  5318. }
  5319. /**
  5320. * Retrieve all the context data.
  5321. *
  5322. * @return array<string, mixed>
  5323. * @static
  5324. */
  5325. public static function all()
  5326. {
  5327. /** @var \Illuminate\Log\Context\Repository $instance */
  5328. return $instance->all();
  5329. }
  5330. /**
  5331. * Retrieve all the hidden context data.
  5332. *
  5333. * @return array<string, mixed>
  5334. * @static
  5335. */
  5336. public static function allHidden()
  5337. {
  5338. /** @var \Illuminate\Log\Context\Repository $instance */
  5339. return $instance->allHidden();
  5340. }
  5341. /**
  5342. * Retrieve the given key's value.
  5343. *
  5344. * @param string $key
  5345. * @param mixed $default
  5346. * @return mixed
  5347. * @static
  5348. */
  5349. public static function get($key, $default = null)
  5350. {
  5351. /** @var \Illuminate\Log\Context\Repository $instance */
  5352. return $instance->get($key, $default);
  5353. }
  5354. /**
  5355. * Retrieve the given key's hidden value.
  5356. *
  5357. * @param string $key
  5358. * @param mixed $default
  5359. * @return mixed
  5360. * @static
  5361. */
  5362. public static function getHidden($key, $default = null)
  5363. {
  5364. /** @var \Illuminate\Log\Context\Repository $instance */
  5365. return $instance->getHidden($key, $default);
  5366. }
  5367. /**
  5368. * Retrieve the given key's value and then forget it.
  5369. *
  5370. * @param string $key
  5371. * @param mixed $default
  5372. * @return mixed
  5373. * @static
  5374. */
  5375. public static function pull($key, $default = null)
  5376. {
  5377. /** @var \Illuminate\Log\Context\Repository $instance */
  5378. return $instance->pull($key, $default);
  5379. }
  5380. /**
  5381. * Retrieve the given key's hidden value and then forget it.
  5382. *
  5383. * @param string $key
  5384. * @param mixed $default
  5385. * @return mixed
  5386. * @static
  5387. */
  5388. public static function pullHidden($key, $default = null)
  5389. {
  5390. /** @var \Illuminate\Log\Context\Repository $instance */
  5391. return $instance->pullHidden($key, $default);
  5392. }
  5393. /**
  5394. * Retrieve only the values of the given keys.
  5395. *
  5396. * @param array<int, string> $keys
  5397. * @return array<string, mixed>
  5398. * @static
  5399. */
  5400. public static function only($keys)
  5401. {
  5402. /** @var \Illuminate\Log\Context\Repository $instance */
  5403. return $instance->only($keys);
  5404. }
  5405. /**
  5406. * Retrieve only the hidden values of the given keys.
  5407. *
  5408. * @param array<int, string> $keys
  5409. * @return array<string, mixed>
  5410. * @static
  5411. */
  5412. public static function onlyHidden($keys)
  5413. {
  5414. /** @var \Illuminate\Log\Context\Repository $instance */
  5415. return $instance->onlyHidden($keys);
  5416. }
  5417. /**
  5418. * Retrieve all values except those with the given keys.
  5419. *
  5420. * @param array<int, string> $keys
  5421. * @return array<string, mixed>
  5422. * @static
  5423. */
  5424. public static function except($keys)
  5425. {
  5426. /** @var \Illuminate\Log\Context\Repository $instance */
  5427. return $instance->except($keys);
  5428. }
  5429. /**
  5430. * Retrieve all hidden values except those with the given keys.
  5431. *
  5432. * @param array<int, string> $keys
  5433. * @return array<string, mixed>
  5434. * @static
  5435. */
  5436. public static function exceptHidden($keys)
  5437. {
  5438. /** @var \Illuminate\Log\Context\Repository $instance */
  5439. return $instance->exceptHidden($keys);
  5440. }
  5441. /**
  5442. * Add a context value.
  5443. *
  5444. * @param string|array<string, mixed> $key
  5445. * @param mixed $value
  5446. * @return \Illuminate\Log\Context\Repository
  5447. * @static
  5448. */
  5449. public static function add($key, $value = null)
  5450. {
  5451. /** @var \Illuminate\Log\Context\Repository $instance */
  5452. return $instance->add($key, $value);
  5453. }
  5454. /**
  5455. * Add a hidden context value.
  5456. *
  5457. * @param string|array<string, mixed> $key
  5458. * @param mixed $value
  5459. * @return \Illuminate\Log\Context\Repository
  5460. * @static
  5461. */
  5462. public static function addHidden($key, $value = null)
  5463. {
  5464. /** @var \Illuminate\Log\Context\Repository $instance */
  5465. return $instance->addHidden($key, $value);
  5466. }
  5467. /**
  5468. * Add a context value if it does not exist yet, and return the value.
  5469. *
  5470. * @param string $key
  5471. * @param mixed $value
  5472. * @return mixed
  5473. * @static
  5474. */
  5475. public static function remember($key, $value)
  5476. {
  5477. /** @var \Illuminate\Log\Context\Repository $instance */
  5478. return $instance->remember($key, $value);
  5479. }
  5480. /**
  5481. * Add a hidden context value if it does not exist yet, and return the value.
  5482. *
  5483. * @param string $key
  5484. * @param mixed $value
  5485. * @return mixed
  5486. * @static
  5487. */
  5488. public static function rememberHidden($key, $value)
  5489. {
  5490. /** @var \Illuminate\Log\Context\Repository $instance */
  5491. return $instance->rememberHidden($key, $value);
  5492. }
  5493. /**
  5494. * Forget the given context key.
  5495. *
  5496. * @param string|array<int, string> $key
  5497. * @return \Illuminate\Log\Context\Repository
  5498. * @static
  5499. */
  5500. public static function forget($key)
  5501. {
  5502. /** @var \Illuminate\Log\Context\Repository $instance */
  5503. return $instance->forget($key);
  5504. }
  5505. /**
  5506. * Forget the given hidden context key.
  5507. *
  5508. * @param string|array<int, string> $key
  5509. * @return \Illuminate\Log\Context\Repository
  5510. * @static
  5511. */
  5512. public static function forgetHidden($key)
  5513. {
  5514. /** @var \Illuminate\Log\Context\Repository $instance */
  5515. return $instance->forgetHidden($key);
  5516. }
  5517. /**
  5518. * Add a context value if it does not exist yet.
  5519. *
  5520. * @param string $key
  5521. * @param mixed $value
  5522. * @return \Illuminate\Log\Context\Repository
  5523. * @static
  5524. */
  5525. public static function addIf($key, $value)
  5526. {
  5527. /** @var \Illuminate\Log\Context\Repository $instance */
  5528. return $instance->addIf($key, $value);
  5529. }
  5530. /**
  5531. * Add a hidden context value if it does not exist yet.
  5532. *
  5533. * @param string $key
  5534. * @param mixed $value
  5535. * @return \Illuminate\Log\Context\Repository
  5536. * @static
  5537. */
  5538. public static function addHiddenIf($key, $value)
  5539. {
  5540. /** @var \Illuminate\Log\Context\Repository $instance */
  5541. return $instance->addHiddenIf($key, $value);
  5542. }
  5543. /**
  5544. * Push the given values onto the key's stack.
  5545. *
  5546. * @param string $key
  5547. * @param mixed $values
  5548. * @return \Illuminate\Log\Context\Repository
  5549. * @throws \RuntimeException
  5550. * @static
  5551. */
  5552. public static function push($key, ...$values)
  5553. {
  5554. /** @var \Illuminate\Log\Context\Repository $instance */
  5555. return $instance->push($key, ...$values);
  5556. }
  5557. /**
  5558. * Pop the latest value from the key's stack.
  5559. *
  5560. * @param string $key
  5561. * @return mixed
  5562. * @throws \RuntimeException
  5563. * @static
  5564. */
  5565. public static function pop($key)
  5566. {
  5567. /** @var \Illuminate\Log\Context\Repository $instance */
  5568. return $instance->pop($key);
  5569. }
  5570. /**
  5571. * Push the given hidden values onto the key's stack.
  5572. *
  5573. * @param string $key
  5574. * @param mixed $values
  5575. * @return \Illuminate\Log\Context\Repository
  5576. * @throws \RuntimeException
  5577. * @static
  5578. */
  5579. public static function pushHidden($key, ...$values)
  5580. {
  5581. /** @var \Illuminate\Log\Context\Repository $instance */
  5582. return $instance->pushHidden($key, ...$values);
  5583. }
  5584. /**
  5585. * Pop the latest hidden value from the key's stack.
  5586. *
  5587. * @param string $key
  5588. * @return mixed
  5589. * @throws \RuntimeException
  5590. * @static
  5591. */
  5592. public static function popHidden($key)
  5593. {
  5594. /** @var \Illuminate\Log\Context\Repository $instance */
  5595. return $instance->popHidden($key);
  5596. }
  5597. /**
  5598. * Increment a context counter.
  5599. *
  5600. * @param string $key
  5601. * @param int $amount
  5602. * @return \Illuminate\Log\Context\Repository
  5603. * @static
  5604. */
  5605. public static function increment($key, $amount = 1)
  5606. {
  5607. /** @var \Illuminate\Log\Context\Repository $instance */
  5608. return $instance->increment($key, $amount);
  5609. }
  5610. /**
  5611. * Decrement a context counter.
  5612. *
  5613. * @param string $key
  5614. * @param int $amount
  5615. * @return \Illuminate\Log\Context\Repository
  5616. * @static
  5617. */
  5618. public static function decrement($key, $amount = 1)
  5619. {
  5620. /** @var \Illuminate\Log\Context\Repository $instance */
  5621. return $instance->decrement($key, $amount);
  5622. }
  5623. /**
  5624. * Determine if the given value is in the given stack.
  5625. *
  5626. * @param string $key
  5627. * @param mixed $value
  5628. * @param bool $strict
  5629. * @return bool
  5630. * @throws \RuntimeException
  5631. * @static
  5632. */
  5633. public static function stackContains($key, $value, $strict = false)
  5634. {
  5635. /** @var \Illuminate\Log\Context\Repository $instance */
  5636. return $instance->stackContains($key, $value, $strict);
  5637. }
  5638. /**
  5639. * Determine if the given value is in the given hidden stack.
  5640. *
  5641. * @param string $key
  5642. * @param mixed $value
  5643. * @param bool $strict
  5644. * @return bool
  5645. * @throws \RuntimeException
  5646. * @static
  5647. */
  5648. public static function hiddenStackContains($key, $value, $strict = false)
  5649. {
  5650. /** @var \Illuminate\Log\Context\Repository $instance */
  5651. return $instance->hiddenStackContains($key, $value, $strict);
  5652. }
  5653. /**
  5654. * Run the callback function with the given context values and restore the original context state when complete.
  5655. *
  5656. * @param callable $callback
  5657. * @param array<string, mixed> $data
  5658. * @param array<string, mixed> $hidden
  5659. * @return mixed
  5660. * @static
  5661. */
  5662. public static function scope($callback, $data = [], $hidden = [])
  5663. {
  5664. /** @var \Illuminate\Log\Context\Repository $instance */
  5665. return $instance->scope($callback, $data, $hidden);
  5666. }
  5667. /**
  5668. * Determine if the repository is empty.
  5669. *
  5670. * @return bool
  5671. * @static
  5672. */
  5673. public static function isEmpty()
  5674. {
  5675. /** @var \Illuminate\Log\Context\Repository $instance */
  5676. return $instance->isEmpty();
  5677. }
  5678. /**
  5679. * Execute the given callback when context is about to be dehydrated.
  5680. *
  5681. * @param callable $callback
  5682. * @return \Illuminate\Log\Context\Repository
  5683. * @static
  5684. */
  5685. public static function dehydrating($callback)
  5686. {
  5687. /** @var \Illuminate\Log\Context\Repository $instance */
  5688. return $instance->dehydrating($callback);
  5689. }
  5690. /**
  5691. * Execute the given callback when context has been hydrated.
  5692. *
  5693. * @param callable $callback
  5694. * @return \Illuminate\Log\Context\Repository
  5695. * @static
  5696. */
  5697. public static function hydrated($callback)
  5698. {
  5699. /** @var \Illuminate\Log\Context\Repository $instance */
  5700. return $instance->hydrated($callback);
  5701. }
  5702. /**
  5703. * Handle unserialize exceptions using the given callback.
  5704. *
  5705. * @param callable|null $callback
  5706. * @return static
  5707. * @static
  5708. */
  5709. public static function handleUnserializeExceptionsUsing($callback)
  5710. {
  5711. /** @var \Illuminate\Log\Context\Repository $instance */
  5712. return $instance->handleUnserializeExceptionsUsing($callback);
  5713. }
  5714. /**
  5715. * Flush all context data.
  5716. *
  5717. * @return \Illuminate\Log\Context\Repository
  5718. * @static
  5719. */
  5720. public static function flush()
  5721. {
  5722. /** @var \Illuminate\Log\Context\Repository $instance */
  5723. return $instance->flush();
  5724. }
  5725. /**
  5726. * Dehydrate the context data.
  5727. *
  5728. * @internal
  5729. * @return \Illuminate\Log\Context\?array
  5730. * @static
  5731. */
  5732. public static function dehydrate()
  5733. {
  5734. /** @var \Illuminate\Log\Context\Repository $instance */
  5735. return $instance->dehydrate();
  5736. }
  5737. /**
  5738. * Hydrate the context instance.
  5739. *
  5740. * @internal
  5741. * @param \Illuminate\Log\Context\?array $context
  5742. * @return \Illuminate\Log\Context\Repository
  5743. * @throws \RuntimeException
  5744. * @static
  5745. */
  5746. public static function hydrate($context)
  5747. {
  5748. /** @var \Illuminate\Log\Context\Repository $instance */
  5749. return $instance->hydrate($context);
  5750. }
  5751. /**
  5752. * Apply the callback if the given "value" is (or resolves to) truthy.
  5753. *
  5754. * @template TWhenParameter
  5755. * @template TWhenReturnType
  5756. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  5757. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  5758. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  5759. * @return $this|TWhenReturnType
  5760. * @static
  5761. */
  5762. public static function when($value = null, $callback = null, $default = null)
  5763. {
  5764. /** @var \Illuminate\Log\Context\Repository $instance */
  5765. return $instance->when($value, $callback, $default);
  5766. }
  5767. /**
  5768. * Apply the callback if the given "value" is (or resolves to) falsy.
  5769. *
  5770. * @template TUnlessParameter
  5771. * @template TUnlessReturnType
  5772. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  5773. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  5774. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  5775. * @return $this|TUnlessReturnType
  5776. * @static
  5777. */
  5778. public static function unless($value = null, $callback = null, $default = null)
  5779. {
  5780. /** @var \Illuminate\Log\Context\Repository $instance */
  5781. return $instance->unless($value, $callback, $default);
  5782. }
  5783. /**
  5784. * Register a custom macro.
  5785. *
  5786. * @param string $name
  5787. * @param object|callable $macro
  5788. * @param-closure-this static $macro
  5789. * @return void
  5790. * @static
  5791. */
  5792. public static function macro($name, $macro)
  5793. {
  5794. \Illuminate\Log\Context\Repository::macro($name, $macro);
  5795. }
  5796. /**
  5797. * Mix another object into the class.
  5798. *
  5799. * @param object $mixin
  5800. * @param bool $replace
  5801. * @return void
  5802. * @throws \ReflectionException
  5803. * @static
  5804. */
  5805. public static function mixin($mixin, $replace = true)
  5806. {
  5807. \Illuminate\Log\Context\Repository::mixin($mixin, $replace);
  5808. }
  5809. /**
  5810. * Checks if macro is registered.
  5811. *
  5812. * @param string $name
  5813. * @return bool
  5814. * @static
  5815. */
  5816. public static function hasMacro($name)
  5817. {
  5818. return \Illuminate\Log\Context\Repository::hasMacro($name);
  5819. }
  5820. /**
  5821. * Flush the existing macros.
  5822. *
  5823. * @return void
  5824. * @static
  5825. */
  5826. public static function flushMacros()
  5827. {
  5828. \Illuminate\Log\Context\Repository::flushMacros();
  5829. }
  5830. /**
  5831. * Restore the model from the model identifier instance.
  5832. *
  5833. * @param \Illuminate\Contracts\Database\ModelIdentifier $value
  5834. * @return \Illuminate\Database\Eloquent\Model
  5835. * @static
  5836. */
  5837. public static function restoreModel($value)
  5838. {
  5839. /** @var \Illuminate\Log\Context\Repository $instance */
  5840. return $instance->restoreModel($value);
  5841. }
  5842. }
  5843. /**
  5844. * @see \Illuminate\Cookie\CookieJar
  5845. */
  5846. class Cookie {
  5847. /**
  5848. * Create a new cookie instance.
  5849. *
  5850. * @param string $name
  5851. * @param string $value
  5852. * @param int $minutes
  5853. * @param string|null $path
  5854. * @param string|null $domain
  5855. * @param bool|null $secure
  5856. * @param bool $httpOnly
  5857. * @param bool $raw
  5858. * @param string|null $sameSite
  5859. * @return \Symfony\Component\HttpFoundation\Cookie
  5860. * @static
  5861. */
  5862. public static function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
  5863. {
  5864. /** @var \Illuminate\Cookie\CookieJar $instance */
  5865. return $instance->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
  5866. }
  5867. /**
  5868. * Create a cookie that lasts "forever" (400 days).
  5869. *
  5870. * @param string $name
  5871. * @param string $value
  5872. * @param string|null $path
  5873. * @param string|null $domain
  5874. * @param bool|null $secure
  5875. * @param bool $httpOnly
  5876. * @param bool $raw
  5877. * @param string|null $sameSite
  5878. * @return \Symfony\Component\HttpFoundation\Cookie
  5879. * @static
  5880. */
  5881. public static function forever($name, $value, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
  5882. {
  5883. /** @var \Illuminate\Cookie\CookieJar $instance */
  5884. return $instance->forever($name, $value, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
  5885. }
  5886. /**
  5887. * Expire the given cookie.
  5888. *
  5889. * @param string $name
  5890. * @param string|null $path
  5891. * @param string|null $domain
  5892. * @return \Symfony\Component\HttpFoundation\Cookie
  5893. * @static
  5894. */
  5895. public static function forget($name, $path = null, $domain = null)
  5896. {
  5897. /** @var \Illuminate\Cookie\CookieJar $instance */
  5898. return $instance->forget($name, $path, $domain);
  5899. }
  5900. /**
  5901. * Determine if a cookie has been queued.
  5902. *
  5903. * @param string $key
  5904. * @param string|null $path
  5905. * @return bool
  5906. * @static
  5907. */
  5908. public static function hasQueued($key, $path = null)
  5909. {
  5910. /** @var \Illuminate\Cookie\CookieJar $instance */
  5911. return $instance->hasQueued($key, $path);
  5912. }
  5913. /**
  5914. * Get a queued cookie instance.
  5915. *
  5916. * @param string $key
  5917. * @param mixed $default
  5918. * @param string|null $path
  5919. * @return \Symfony\Component\HttpFoundation\Cookie|null
  5920. * @static
  5921. */
  5922. public static function queued($key, $default = null, $path = null)
  5923. {
  5924. /** @var \Illuminate\Cookie\CookieJar $instance */
  5925. return $instance->queued($key, $default, $path);
  5926. }
  5927. /**
  5928. * Queue a cookie to send with the next response.
  5929. *
  5930. * @param mixed $parameters
  5931. * @return void
  5932. * @static
  5933. */
  5934. public static function queue(...$parameters)
  5935. {
  5936. /** @var \Illuminate\Cookie\CookieJar $instance */
  5937. $instance->queue(...$parameters);
  5938. }
  5939. /**
  5940. * Queue a cookie to expire with the next response.
  5941. *
  5942. * @param string $name
  5943. * @param string|null $path
  5944. * @param string|null $domain
  5945. * @return void
  5946. * @static
  5947. */
  5948. public static function expire($name, $path = null, $domain = null)
  5949. {
  5950. /** @var \Illuminate\Cookie\CookieJar $instance */
  5951. $instance->expire($name, $path, $domain);
  5952. }
  5953. /**
  5954. * Remove a cookie from the queue.
  5955. *
  5956. * @param string $name
  5957. * @param string|null $path
  5958. * @return void
  5959. * @static
  5960. */
  5961. public static function unqueue($name, $path = null)
  5962. {
  5963. /** @var \Illuminate\Cookie\CookieJar $instance */
  5964. $instance->unqueue($name, $path);
  5965. }
  5966. /**
  5967. * Set the default path and domain for the jar.
  5968. *
  5969. * @param string $path
  5970. * @param string|null $domain
  5971. * @param bool|null $secure
  5972. * @param string|null $sameSite
  5973. * @return \Illuminate\Cookie\CookieJar
  5974. * @static
  5975. */
  5976. public static function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null)
  5977. {
  5978. /** @var \Illuminate\Cookie\CookieJar $instance */
  5979. return $instance->setDefaultPathAndDomain($path, $domain, $secure, $sameSite);
  5980. }
  5981. /**
  5982. * Get the cookies which have been queued for the next request.
  5983. *
  5984. * @return \Symfony\Component\HttpFoundation\Cookie[]
  5985. * @static
  5986. */
  5987. public static function getQueuedCookies()
  5988. {
  5989. /** @var \Illuminate\Cookie\CookieJar $instance */
  5990. return $instance->getQueuedCookies();
  5991. }
  5992. /**
  5993. * Flush the cookies which have been queued for the next request.
  5994. *
  5995. * @return \Illuminate\Cookie\CookieJar
  5996. * @static
  5997. */
  5998. public static function flushQueuedCookies()
  5999. {
  6000. /** @var \Illuminate\Cookie\CookieJar $instance */
  6001. return $instance->flushQueuedCookies();
  6002. }
  6003. /**
  6004. * Register a custom macro.
  6005. *
  6006. * @param string $name
  6007. * @param object|callable $macro
  6008. * @param-closure-this static $macro
  6009. * @return void
  6010. * @static
  6011. */
  6012. public static function macro($name, $macro)
  6013. {
  6014. \Illuminate\Cookie\CookieJar::macro($name, $macro);
  6015. }
  6016. /**
  6017. * Mix another object into the class.
  6018. *
  6019. * @param object $mixin
  6020. * @param bool $replace
  6021. * @return void
  6022. * @throws \ReflectionException
  6023. * @static
  6024. */
  6025. public static function mixin($mixin, $replace = true)
  6026. {
  6027. \Illuminate\Cookie\CookieJar::mixin($mixin, $replace);
  6028. }
  6029. /**
  6030. * Checks if macro is registered.
  6031. *
  6032. * @param string $name
  6033. * @return bool
  6034. * @static
  6035. */
  6036. public static function hasMacro($name)
  6037. {
  6038. return \Illuminate\Cookie\CookieJar::hasMacro($name);
  6039. }
  6040. /**
  6041. * Flush the existing macros.
  6042. *
  6043. * @return void
  6044. * @static
  6045. */
  6046. public static function flushMacros()
  6047. {
  6048. \Illuminate\Cookie\CookieJar::flushMacros();
  6049. }
  6050. }
  6051. /**
  6052. * @see \Illuminate\Encryption\Encrypter
  6053. */
  6054. class Crypt {
  6055. /**
  6056. * Determine if the given key and cipher combination is valid.
  6057. *
  6058. * @param string $key
  6059. * @param string $cipher
  6060. * @return bool
  6061. * @static
  6062. */
  6063. public static function supported($key, $cipher)
  6064. {
  6065. return \Illuminate\Encryption\Encrypter::supported($key, $cipher);
  6066. }
  6067. /**
  6068. * Create a new encryption key for the given cipher.
  6069. *
  6070. * @param string $cipher
  6071. * @return string
  6072. * @static
  6073. */
  6074. public static function generateKey($cipher)
  6075. {
  6076. return \Illuminate\Encryption\Encrypter::generateKey($cipher);
  6077. }
  6078. /**
  6079. * Encrypt the given value.
  6080. *
  6081. * @param mixed $value
  6082. * @param bool $serialize
  6083. * @return string
  6084. * @throws \Illuminate\Contracts\Encryption\EncryptException
  6085. * @static
  6086. */
  6087. public static function encrypt($value, $serialize = true)
  6088. {
  6089. /** @var \Illuminate\Encryption\Encrypter $instance */
  6090. return $instance->encrypt($value, $serialize);
  6091. }
  6092. /**
  6093. * Encrypt a string without serialization.
  6094. *
  6095. * @param string $value
  6096. * @return string
  6097. * @throws \Illuminate\Contracts\Encryption\EncryptException
  6098. * @static
  6099. */
  6100. public static function encryptString($value)
  6101. {
  6102. /** @var \Illuminate\Encryption\Encrypter $instance */
  6103. return $instance->encryptString($value);
  6104. }
  6105. /**
  6106. * Decrypt the given value.
  6107. *
  6108. * @param string $payload
  6109. * @param bool $unserialize
  6110. * @return mixed
  6111. * @throws \Illuminate\Contracts\Encryption\DecryptException
  6112. * @static
  6113. */
  6114. public static function decrypt($payload, $unserialize = true)
  6115. {
  6116. /** @var \Illuminate\Encryption\Encrypter $instance */
  6117. return $instance->decrypt($payload, $unserialize);
  6118. }
  6119. /**
  6120. * Decrypt the given string without unserialization.
  6121. *
  6122. * @param string $payload
  6123. * @return string
  6124. * @throws \Illuminate\Contracts\Encryption\DecryptException
  6125. * @static
  6126. */
  6127. public static function decryptString($payload)
  6128. {
  6129. /** @var \Illuminate\Encryption\Encrypter $instance */
  6130. return $instance->decryptString($payload);
  6131. }
  6132. /**
  6133. * Get the encryption key that the encrypter is currently using.
  6134. *
  6135. * @return string
  6136. * @static
  6137. */
  6138. public static function getKey()
  6139. {
  6140. /** @var \Illuminate\Encryption\Encrypter $instance */
  6141. return $instance->getKey();
  6142. }
  6143. /**
  6144. * Get the current encryption key and all previous encryption keys.
  6145. *
  6146. * @return array
  6147. * @static
  6148. */
  6149. public static function getAllKeys()
  6150. {
  6151. /** @var \Illuminate\Encryption\Encrypter $instance */
  6152. return $instance->getAllKeys();
  6153. }
  6154. /**
  6155. * Get the previous encryption keys.
  6156. *
  6157. * @return array
  6158. * @static
  6159. */
  6160. public static function getPreviousKeys()
  6161. {
  6162. /** @var \Illuminate\Encryption\Encrypter $instance */
  6163. return $instance->getPreviousKeys();
  6164. }
  6165. /**
  6166. * Set the previous / legacy encryption keys that should be utilized if decryption fails.
  6167. *
  6168. * @param array $keys
  6169. * @return \Illuminate\Encryption\Encrypter
  6170. * @static
  6171. */
  6172. public static function previousKeys($keys)
  6173. {
  6174. /** @var \Illuminate\Encryption\Encrypter $instance */
  6175. return $instance->previousKeys($keys);
  6176. }
  6177. }
  6178. /**
  6179. * @see https://carbon.nesbot.com/docs/
  6180. * @see https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Factory.php
  6181. * @method static bool canBeCreatedFromFormat(?string $date, string $format)
  6182. * @method static \Illuminate\Support\Carbon|null create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $timezone = null)
  6183. * @method static \Illuminate\Support\Carbon createFromDate($year = null, $month = null, $day = null, $timezone = null)
  6184. * @method static \Illuminate\Support\Carbon|null createFromFormat($format, $time, $timezone = null)
  6185. * @method static \Illuminate\Support\Carbon|null createFromIsoFormat(string $format, string $time, $timezone = null, ?string $locale = 'en', ?\Symfony\Contracts\Translation\TranslatorInterface $translator = null)
  6186. * @method static \Illuminate\Support\Carbon|null createFromLocaleFormat(string $format, string $locale, string $time, $timezone = null)
  6187. * @method static \Illuminate\Support\Carbon|null createFromLocaleIsoFormat(string $format, string $locale, string $time, $timezone = null)
  6188. * @method static \Illuminate\Support\Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $timezone = null)
  6189. * @method static \Illuminate\Support\Carbon createFromTimeString(string $time, \DateTimeZone|string|int|null $timezone = null)
  6190. * @method static \Illuminate\Support\Carbon createFromTimestamp(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
  6191. * @method static \Illuminate\Support\Carbon createFromTimestampMs(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
  6192. * @method static \Illuminate\Support\Carbon createFromTimestampMsUTC($timestamp)
  6193. * @method static \Illuminate\Support\Carbon createFromTimestampUTC(string|int|float $timestamp)
  6194. * @method static \Illuminate\Support\Carbon createMidnightDate($year = null, $month = null, $day = null, $timezone = null)
  6195. * @method static \Illuminate\Support\Carbon|null createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $timezone = null)
  6196. * @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)
  6197. * @method static void disableHumanDiffOption($humanDiffOption)
  6198. * @method static void enableHumanDiffOption($humanDiffOption)
  6199. * @method static mixed executeWithLocale(string $locale, callable $func)
  6200. * @method static \Illuminate\Support\Carbon fromSerialized($value)
  6201. * @method static array getAvailableLocales()
  6202. * @method static array getAvailableLocalesInfo()
  6203. * @method static array getDays()
  6204. * @method static ?string getFallbackLocale()
  6205. * @method static array getFormatsToIsoReplacements()
  6206. * @method static int getHumanDiffOptions()
  6207. * @method static array getIsoUnits()
  6208. * @method static array|false getLastErrors()
  6209. * @method static string getLocale()
  6210. * @method static int getMidDayAt()
  6211. * @method static string getTimeFormatByPrecision(string $unitPrecision)
  6212. * @method static string|\Closure|null getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null)
  6213. * @method static \Illuminate\Support\Carbon|null getTestNow()
  6214. * @method static \Symfony\Contracts\Translation\TranslatorInterface getTranslator()
  6215. * @method static int getWeekEndsAt(?string $locale = null)
  6216. * @method static int getWeekStartsAt(?string $locale = null)
  6217. * @method static array getWeekendDays()
  6218. * @method static bool hasFormat(string $date, string $format)
  6219. * @method static bool hasFormatWithModifiers(string $date, string $format)
  6220. * @method static bool hasMacro($name)
  6221. * @method static bool hasRelativeKeywords(?string $time)
  6222. * @method static bool hasTestNow()
  6223. * @method static \Illuminate\Support\Carbon instance(\DateTimeInterface $date)
  6224. * @method static bool isImmutable()
  6225. * @method static bool isModifiableUnit($unit)
  6226. * @method static bool isMutable()
  6227. * @method static bool isStrictModeEnabled()
  6228. * @method static bool localeHasDiffOneDayWords(string $locale)
  6229. * @method static bool localeHasDiffSyntax(string $locale)
  6230. * @method static bool localeHasDiffTwoDayWords(string $locale)
  6231. * @method static bool localeHasPeriodSyntax($locale)
  6232. * @method static bool localeHasShortUnits(string $locale)
  6233. * @method static void macro(string $name, ?callable $macro)
  6234. * @method static \Illuminate\Support\Carbon|null make($var, \DateTimeZone|string|null $timezone = null)
  6235. * @method static void mixin(object|string $mixin)
  6236. * @method static \Illuminate\Support\Carbon now(\DateTimeZone|string|int|null $timezone = null)
  6237. * @method static \Illuminate\Support\Carbon parse(\DateTimeInterface|\Carbon\WeekDay|\Carbon\Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
  6238. * @method static \Illuminate\Support\Carbon parseFromLocale(string $time, ?string $locale = null, \DateTimeZone|string|int|null $timezone = null)
  6239. * @method static string pluralUnit(string $unit)
  6240. * @method static \Illuminate\Support\Carbon|null rawCreateFromFormat(string $format, string $time, $timezone = null)
  6241. * @method static \Illuminate\Support\Carbon rawParse(\DateTimeInterface|\Carbon\WeekDay|\Carbon\Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
  6242. * @method static void resetMonthsOverflow()
  6243. * @method static void resetToStringFormat()
  6244. * @method static void resetYearsOverflow()
  6245. * @method static void serializeUsing($callback)
  6246. * @method static void setFallbackLocale(string $locale)
  6247. * @method static void setHumanDiffOptions($humanDiffOptions)
  6248. * @method static void setLocale(string $locale)
  6249. * @method static void setMidDayAt($hour)
  6250. * @method static void setTestNow(mixed $testNow = null)
  6251. * @method static void setTestNowAndTimezone(mixed $testNow = null, $timezone = null)
  6252. * @method static void setToStringFormat(string|\Closure|null $format)
  6253. * @method static void setTranslator(\Symfony\Contracts\Translation\TranslatorInterface $translator)
  6254. * @method static void setWeekEndsAt($day)
  6255. * @method static void setWeekStartsAt($day)
  6256. * @method static void setWeekendDays($days)
  6257. * @method static bool shouldOverflowMonths()
  6258. * @method static bool shouldOverflowYears()
  6259. * @method static string singularUnit(string $unit)
  6260. * @method static void sleep(int|float $seconds)
  6261. * @method static \Illuminate\Support\Carbon today(\DateTimeZone|string|int|null $timezone = null)
  6262. * @method static \Illuminate\Support\Carbon tomorrow(\DateTimeZone|string|int|null $timezone = null)
  6263. * @method static string translateTimeString(string $timeString, ?string $from = null, ?string $to = null, int $mode = \Carbon\CarbonInterface::TRANSLATE_ALL)
  6264. * @method static string translateWith(\Symfony\Contracts\Translation\TranslatorInterface $translator, string $key, array $parameters = [], $number = null)
  6265. * @method static void useMonthsOverflow($monthsOverflow = true)
  6266. * @method static void useStrictMode($strictModeEnabled = true)
  6267. * @method static void useYearsOverflow($yearsOverflow = true)
  6268. * @method static mixed withTestNow(mixed $testNow, callable $callback)
  6269. * @method static static withTimeZone(\DateTimeZone|string|int|null $timezone)
  6270. * @method static \Illuminate\Support\Carbon yesterday(\DateTimeZone|string|int|null $timezone = null)
  6271. * @see \Illuminate\Support\DateFactory
  6272. */
  6273. class Date {
  6274. /**
  6275. * Use the given handler when generating dates (class name, callable, or factory).
  6276. *
  6277. * @param mixed $handler
  6278. * @return mixed
  6279. * @throws \InvalidArgumentException
  6280. * @static
  6281. */
  6282. public static function use($handler)
  6283. {
  6284. return \Illuminate\Support\DateFactory::use($handler);
  6285. }
  6286. /**
  6287. * Use the default date class when generating dates.
  6288. *
  6289. * @return void
  6290. * @static
  6291. */
  6292. public static function useDefault()
  6293. {
  6294. \Illuminate\Support\DateFactory::useDefault();
  6295. }
  6296. /**
  6297. * Execute the given callable on each date creation.
  6298. *
  6299. * @param callable $callable
  6300. * @return void
  6301. * @static
  6302. */
  6303. public static function useCallable($callable)
  6304. {
  6305. \Illuminate\Support\DateFactory::useCallable($callable);
  6306. }
  6307. /**
  6308. * Use the given date type (class) when generating dates.
  6309. *
  6310. * @param string $dateClass
  6311. * @return void
  6312. * @static
  6313. */
  6314. public static function useClass($dateClass)
  6315. {
  6316. \Illuminate\Support\DateFactory::useClass($dateClass);
  6317. }
  6318. /**
  6319. * Use the given Carbon factory when generating dates.
  6320. *
  6321. * @param object $factory
  6322. * @return void
  6323. * @static
  6324. */
  6325. public static function useFactory($factory)
  6326. {
  6327. \Illuminate\Support\DateFactory::useFactory($factory);
  6328. }
  6329. }
  6330. /**
  6331. * @see \Illuminate\Database\DatabaseManager
  6332. */
  6333. class DB {
  6334. /**
  6335. * Get a database connection instance.
  6336. *
  6337. * @param string|null $name
  6338. * @return \Illuminate\Database\Connection
  6339. * @static
  6340. */
  6341. public static function connection($name = null)
  6342. {
  6343. /** @var \Illuminate\Database\DatabaseManager $instance */
  6344. return $instance->connection($name);
  6345. }
  6346. /**
  6347. * Build a database connection instance from the given configuration.
  6348. *
  6349. * @param array $config
  6350. * @return \Illuminate\Database\PostgresConnection
  6351. * @static
  6352. */
  6353. public static function build($config)
  6354. {
  6355. /** @var \Illuminate\Database\DatabaseManager $instance */
  6356. return $instance->build($config);
  6357. }
  6358. /**
  6359. * Calculate the dynamic connection name for an on-demand connection based on its configuration.
  6360. *
  6361. * @param array $config
  6362. * @return string
  6363. * @static
  6364. */
  6365. public static function calculateDynamicConnectionName($config)
  6366. {
  6367. return \Illuminate\Database\DatabaseManager::calculateDynamicConnectionName($config);
  6368. }
  6369. /**
  6370. * Get a database connection instance from the given configuration.
  6371. *
  6372. * @param string $name
  6373. * @param array $config
  6374. * @param bool $force
  6375. * @return \Illuminate\Database\PostgresConnection
  6376. * @static
  6377. */
  6378. public static function connectUsing($name, $config, $force = false)
  6379. {
  6380. /** @var \Illuminate\Database\DatabaseManager $instance */
  6381. return $instance->connectUsing($name, $config, $force);
  6382. }
  6383. /**
  6384. * Disconnect from the given database and remove from local cache.
  6385. *
  6386. * @param string|null $name
  6387. * @return void
  6388. * @static
  6389. */
  6390. public static function purge($name = null)
  6391. {
  6392. /** @var \Illuminate\Database\DatabaseManager $instance */
  6393. $instance->purge($name);
  6394. }
  6395. /**
  6396. * Disconnect from the given database.
  6397. *
  6398. * @param string|null $name
  6399. * @return void
  6400. * @static
  6401. */
  6402. public static function disconnect($name = null)
  6403. {
  6404. /** @var \Illuminate\Database\DatabaseManager $instance */
  6405. $instance->disconnect($name);
  6406. }
  6407. /**
  6408. * Reconnect to the given database.
  6409. *
  6410. * @param string|null $name
  6411. * @return \Illuminate\Database\Connection
  6412. * @static
  6413. */
  6414. public static function reconnect($name = null)
  6415. {
  6416. /** @var \Illuminate\Database\DatabaseManager $instance */
  6417. return $instance->reconnect($name);
  6418. }
  6419. /**
  6420. * Set the default database connection for the callback execution.
  6421. *
  6422. * @param string $name
  6423. * @param callable $callback
  6424. * @return mixed
  6425. * @static
  6426. */
  6427. public static function usingConnection($name, $callback)
  6428. {
  6429. /** @var \Illuminate\Database\DatabaseManager $instance */
  6430. return $instance->usingConnection($name, $callback);
  6431. }
  6432. /**
  6433. * Get the default connection name.
  6434. *
  6435. * @return string
  6436. * @static
  6437. */
  6438. public static function getDefaultConnection()
  6439. {
  6440. /** @var \Illuminate\Database\DatabaseManager $instance */
  6441. return $instance->getDefaultConnection();
  6442. }
  6443. /**
  6444. * Set the default connection name.
  6445. *
  6446. * @param string $name
  6447. * @return void
  6448. * @static
  6449. */
  6450. public static function setDefaultConnection($name)
  6451. {
  6452. /** @var \Illuminate\Database\DatabaseManager $instance */
  6453. $instance->setDefaultConnection($name);
  6454. }
  6455. /**
  6456. * Get all of the supported drivers.
  6457. *
  6458. * @return string[]
  6459. * @static
  6460. */
  6461. public static function supportedDrivers()
  6462. {
  6463. /** @var \Illuminate\Database\DatabaseManager $instance */
  6464. return $instance->supportedDrivers();
  6465. }
  6466. /**
  6467. * Get all of the drivers that are actually available.
  6468. *
  6469. * @return string[]
  6470. * @static
  6471. */
  6472. public static function availableDrivers()
  6473. {
  6474. /** @var \Illuminate\Database\DatabaseManager $instance */
  6475. return $instance->availableDrivers();
  6476. }
  6477. /**
  6478. * Register an extension connection resolver.
  6479. *
  6480. * @param string $name
  6481. * @param callable $resolver
  6482. * @return void
  6483. * @static
  6484. */
  6485. public static function extend($name, $resolver)
  6486. {
  6487. /** @var \Illuminate\Database\DatabaseManager $instance */
  6488. $instance->extend($name, $resolver);
  6489. }
  6490. /**
  6491. * Remove an extension connection resolver.
  6492. *
  6493. * @param string $name
  6494. * @return void
  6495. * @static
  6496. */
  6497. public static function forgetExtension($name)
  6498. {
  6499. /** @var \Illuminate\Database\DatabaseManager $instance */
  6500. $instance->forgetExtension($name);
  6501. }
  6502. /**
  6503. * Return all of the created connections.
  6504. *
  6505. * @return array<string, \Illuminate\Database\Connection>
  6506. * @static
  6507. */
  6508. public static function getConnections()
  6509. {
  6510. /** @var \Illuminate\Database\DatabaseManager $instance */
  6511. return $instance->getConnections();
  6512. }
  6513. /**
  6514. * Set the database reconnector callback.
  6515. *
  6516. * @param callable $reconnector
  6517. * @return void
  6518. * @static
  6519. */
  6520. public static function setReconnector($reconnector)
  6521. {
  6522. /** @var \Illuminate\Database\DatabaseManager $instance */
  6523. $instance->setReconnector($reconnector);
  6524. }
  6525. /**
  6526. * Set the application instance used by the manager.
  6527. *
  6528. * @param \Illuminate\Contracts\Foundation\Application $app
  6529. * @return \Illuminate\Database\DatabaseManager
  6530. * @static
  6531. */
  6532. public static function setApplication($app)
  6533. {
  6534. /** @var \Illuminate\Database\DatabaseManager $instance */
  6535. return $instance->setApplication($app);
  6536. }
  6537. /**
  6538. * Register a custom macro.
  6539. *
  6540. * @param string $name
  6541. * @param object|callable $macro
  6542. * @param-closure-this static $macro
  6543. * @return void
  6544. * @static
  6545. */
  6546. public static function macro($name, $macro)
  6547. {
  6548. \Illuminate\Database\DatabaseManager::macro($name, $macro);
  6549. }
  6550. /**
  6551. * Mix another object into the class.
  6552. *
  6553. * @param object $mixin
  6554. * @param bool $replace
  6555. * @return void
  6556. * @throws \ReflectionException
  6557. * @static
  6558. */
  6559. public static function mixin($mixin, $replace = true)
  6560. {
  6561. \Illuminate\Database\DatabaseManager::mixin($mixin, $replace);
  6562. }
  6563. /**
  6564. * Checks if macro is registered.
  6565. *
  6566. * @param string $name
  6567. * @return bool
  6568. * @static
  6569. */
  6570. public static function hasMacro($name)
  6571. {
  6572. return \Illuminate\Database\DatabaseManager::hasMacro($name);
  6573. }
  6574. /**
  6575. * Flush the existing macros.
  6576. *
  6577. * @return void
  6578. * @static
  6579. */
  6580. public static function flushMacros()
  6581. {
  6582. \Illuminate\Database\DatabaseManager::flushMacros();
  6583. }
  6584. /**
  6585. * Dynamically handle calls to the class.
  6586. *
  6587. * @param string $method
  6588. * @param array $parameters
  6589. * @return mixed
  6590. * @throws \BadMethodCallException
  6591. * @static
  6592. */
  6593. public static function macroCall($method, $parameters)
  6594. {
  6595. /** @var \Illuminate\Database\DatabaseManager $instance */
  6596. return $instance->macroCall($method, $parameters);
  6597. }
  6598. /**
  6599. * Get a human-readable name for the given connection driver.
  6600. *
  6601. * @return string
  6602. * @static
  6603. */
  6604. public static function getDriverTitle()
  6605. {
  6606. /** @var \Illuminate\Database\PostgresConnection $instance */
  6607. return $instance->getDriverTitle();
  6608. }
  6609. /**
  6610. * Get a schema builder instance for the connection.
  6611. *
  6612. * @return \Illuminate\Database\Schema\PostgresBuilder
  6613. * @static
  6614. */
  6615. public static function getSchemaBuilder()
  6616. {
  6617. /** @var \Illuminate\Database\PostgresConnection $instance */
  6618. return $instance->getSchemaBuilder();
  6619. }
  6620. /**
  6621. * Get the schema state for the connection.
  6622. *
  6623. * @param \Illuminate\Filesystem\Filesystem|null $files
  6624. * @param callable|null $processFactory
  6625. * @return \Illuminate\Database\Schema\PostgresSchemaState
  6626. * @static
  6627. */
  6628. public static function getSchemaState($files = null, $processFactory = null)
  6629. {
  6630. /** @var \Illuminate\Database\PostgresConnection $instance */
  6631. return $instance->getSchemaState($files, $processFactory);
  6632. }
  6633. /**
  6634. * Set the query grammar to the default implementation.
  6635. *
  6636. * @return void
  6637. * @static
  6638. */
  6639. public static function useDefaultQueryGrammar()
  6640. {
  6641. //Method inherited from \Illuminate\Database\Connection
  6642. /** @var \Illuminate\Database\PostgresConnection $instance */
  6643. $instance->useDefaultQueryGrammar();
  6644. }
  6645. /**
  6646. * Set the schema grammar to the default implementation.
  6647. *
  6648. * @return void
  6649. * @static
  6650. */
  6651. public static function useDefaultSchemaGrammar()
  6652. {
  6653. //Method inherited from \Illuminate\Database\Connection
  6654. /** @var \Illuminate\Database\PostgresConnection $instance */
  6655. $instance->useDefaultSchemaGrammar();
  6656. }
  6657. /**
  6658. * Set the query post processor to the default implementation.
  6659. *
  6660. * @return void
  6661. * @static
  6662. */
  6663. public static function useDefaultPostProcessor()
  6664. {
  6665. //Method inherited from \Illuminate\Database\Connection
  6666. /** @var \Illuminate\Database\PostgresConnection $instance */
  6667. $instance->useDefaultPostProcessor();
  6668. }
  6669. /**
  6670. * Begin a fluent query against a database table.
  6671. *
  6672. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string $table
  6673. * @param string|null $as
  6674. * @return \Illuminate\Database\Query\Builder
  6675. * @static
  6676. */
  6677. public static function table($table, $as = null)
  6678. {
  6679. //Method inherited from \Illuminate\Database\Connection
  6680. /** @var \Illuminate\Database\PostgresConnection $instance */
  6681. return $instance->table($table, $as);
  6682. }
  6683. /**
  6684. * Get a new query builder instance.
  6685. *
  6686. * @return \Illuminate\Database\Query\Builder
  6687. * @static
  6688. */
  6689. public static function query()
  6690. {
  6691. //Method inherited from \Illuminate\Database\Connection
  6692. /** @var \Illuminate\Database\PostgresConnection $instance */
  6693. return $instance->query();
  6694. }
  6695. /**
  6696. * Run a select statement and return a single result.
  6697. *
  6698. * @param string $query
  6699. * @param array $bindings
  6700. * @param bool $useReadPdo
  6701. * @return mixed
  6702. * @static
  6703. */
  6704. public static function selectOne($query, $bindings = [], $useReadPdo = true)
  6705. {
  6706. //Method inherited from \Illuminate\Database\Connection
  6707. /** @var \Illuminate\Database\PostgresConnection $instance */
  6708. return $instance->selectOne($query, $bindings, $useReadPdo);
  6709. }
  6710. /**
  6711. * Run a select statement and return the first column of the first row.
  6712. *
  6713. * @param string $query
  6714. * @param array $bindings
  6715. * @param bool $useReadPdo
  6716. * @return mixed
  6717. * @throws \Illuminate\Database\MultipleColumnsSelectedException
  6718. * @static
  6719. */
  6720. public static function scalar($query, $bindings = [], $useReadPdo = true)
  6721. {
  6722. //Method inherited from \Illuminate\Database\Connection
  6723. /** @var \Illuminate\Database\PostgresConnection $instance */
  6724. return $instance->scalar($query, $bindings, $useReadPdo);
  6725. }
  6726. /**
  6727. * Run a select statement against the database.
  6728. *
  6729. * @param string $query
  6730. * @param array $bindings
  6731. * @return array
  6732. * @static
  6733. */
  6734. public static function selectFromWriteConnection($query, $bindings = [])
  6735. {
  6736. //Method inherited from \Illuminate\Database\Connection
  6737. /** @var \Illuminate\Database\PostgresConnection $instance */
  6738. return $instance->selectFromWriteConnection($query, $bindings);
  6739. }
  6740. /**
  6741. * Run a select statement against the database.
  6742. *
  6743. * @param string $query
  6744. * @param array $bindings
  6745. * @param bool $useReadPdo
  6746. * @return array
  6747. * @static
  6748. */
  6749. public static function select($query, $bindings = [], $useReadPdo = true)
  6750. {
  6751. //Method inherited from \Illuminate\Database\Connection
  6752. /** @var \Illuminate\Database\PostgresConnection $instance */
  6753. return $instance->select($query, $bindings, $useReadPdo);
  6754. }
  6755. /**
  6756. * Run a select statement against the database and returns all of the result sets.
  6757. *
  6758. * @param string $query
  6759. * @param array $bindings
  6760. * @param bool $useReadPdo
  6761. * @return array
  6762. * @static
  6763. */
  6764. public static function selectResultSets($query, $bindings = [], $useReadPdo = true)
  6765. {
  6766. //Method inherited from \Illuminate\Database\Connection
  6767. /** @var \Illuminate\Database\PostgresConnection $instance */
  6768. return $instance->selectResultSets($query, $bindings, $useReadPdo);
  6769. }
  6770. /**
  6771. * Run a select statement against the database and returns a generator.
  6772. *
  6773. * @param string $query
  6774. * @param array $bindings
  6775. * @param bool $useReadPdo
  6776. * @return \Generator<int, \stdClass>
  6777. * @static
  6778. */
  6779. public static function cursor($query, $bindings = [], $useReadPdo = true)
  6780. {
  6781. //Method inherited from \Illuminate\Database\Connection
  6782. /** @var \Illuminate\Database\PostgresConnection $instance */
  6783. return $instance->cursor($query, $bindings, $useReadPdo);
  6784. }
  6785. /**
  6786. * Run an insert statement against the database.
  6787. *
  6788. * @param string $query
  6789. * @param array $bindings
  6790. * @return bool
  6791. * @static
  6792. */
  6793. public static function insert($query, $bindings = [])
  6794. {
  6795. //Method inherited from \Illuminate\Database\Connection
  6796. /** @var \Illuminate\Database\PostgresConnection $instance */
  6797. return $instance->insert($query, $bindings);
  6798. }
  6799. /**
  6800. * Run an update statement against the database.
  6801. *
  6802. * @param string $query
  6803. * @param array $bindings
  6804. * @return int
  6805. * @static
  6806. */
  6807. public static function update($query, $bindings = [])
  6808. {
  6809. //Method inherited from \Illuminate\Database\Connection
  6810. /** @var \Illuminate\Database\PostgresConnection $instance */
  6811. return $instance->update($query, $bindings);
  6812. }
  6813. /**
  6814. * Run a delete statement against the database.
  6815. *
  6816. * @param string $query
  6817. * @param array $bindings
  6818. * @return int
  6819. * @static
  6820. */
  6821. public static function delete($query, $bindings = [])
  6822. {
  6823. //Method inherited from \Illuminate\Database\Connection
  6824. /** @var \Illuminate\Database\PostgresConnection $instance */
  6825. return $instance->delete($query, $bindings);
  6826. }
  6827. /**
  6828. * Execute an SQL statement and return the boolean result.
  6829. *
  6830. * @param string $query
  6831. * @param array $bindings
  6832. * @return bool
  6833. * @static
  6834. */
  6835. public static function statement($query, $bindings = [])
  6836. {
  6837. //Method inherited from \Illuminate\Database\Connection
  6838. /** @var \Illuminate\Database\PostgresConnection $instance */
  6839. return $instance->statement($query, $bindings);
  6840. }
  6841. /**
  6842. * Run an SQL statement and get the number of rows affected.
  6843. *
  6844. * @param string $query
  6845. * @param array $bindings
  6846. * @return int
  6847. * @static
  6848. */
  6849. public static function affectingStatement($query, $bindings = [])
  6850. {
  6851. //Method inherited from \Illuminate\Database\Connection
  6852. /** @var \Illuminate\Database\PostgresConnection $instance */
  6853. return $instance->affectingStatement($query, $bindings);
  6854. }
  6855. /**
  6856. * Run a raw, unprepared query against the PDO connection.
  6857. *
  6858. * @param string $query
  6859. * @return bool
  6860. * @static
  6861. */
  6862. public static function unprepared($query)
  6863. {
  6864. //Method inherited from \Illuminate\Database\Connection
  6865. /** @var \Illuminate\Database\PostgresConnection $instance */
  6866. return $instance->unprepared($query);
  6867. }
  6868. /**
  6869. * Get the number of open connections for the database.
  6870. *
  6871. * @return int|null
  6872. * @static
  6873. */
  6874. public static function threadCount()
  6875. {
  6876. //Method inherited from \Illuminate\Database\Connection
  6877. /** @var \Illuminate\Database\PostgresConnection $instance */
  6878. return $instance->threadCount();
  6879. }
  6880. /**
  6881. * Execute the given callback in "dry run" mode.
  6882. *
  6883. * @param \Closure $callback
  6884. * @return array
  6885. * @static
  6886. */
  6887. public static function pretend($callback)
  6888. {
  6889. //Method inherited from \Illuminate\Database\Connection
  6890. /** @var \Illuminate\Database\PostgresConnection $instance */
  6891. return $instance->pretend($callback);
  6892. }
  6893. /**
  6894. * Execute the given callback without "pretending".
  6895. *
  6896. * @param \Closure $callback
  6897. * @return mixed
  6898. * @static
  6899. */
  6900. public static function withoutPretending($callback)
  6901. {
  6902. //Method inherited from \Illuminate\Database\Connection
  6903. /** @var \Illuminate\Database\PostgresConnection $instance */
  6904. return $instance->withoutPretending($callback);
  6905. }
  6906. /**
  6907. * Bind values to their parameters in the given statement.
  6908. *
  6909. * @param \PDOStatement $statement
  6910. * @param array $bindings
  6911. * @return void
  6912. * @static
  6913. */
  6914. public static function bindValues($statement, $bindings)
  6915. {
  6916. //Method inherited from \Illuminate\Database\Connection
  6917. /** @var \Illuminate\Database\PostgresConnection $instance */
  6918. $instance->bindValues($statement, $bindings);
  6919. }
  6920. /**
  6921. * Prepare the query bindings for execution.
  6922. *
  6923. * @param array $bindings
  6924. * @return array
  6925. * @static
  6926. */
  6927. public static function prepareBindings($bindings)
  6928. {
  6929. //Method inherited from \Illuminate\Database\Connection
  6930. /** @var \Illuminate\Database\PostgresConnection $instance */
  6931. return $instance->prepareBindings($bindings);
  6932. }
  6933. /**
  6934. * Log a query in the connection's query log.
  6935. *
  6936. * @param string $query
  6937. * @param array $bindings
  6938. * @param float|null $time
  6939. * @return void
  6940. * @static
  6941. */
  6942. public static function logQuery($query, $bindings, $time = null)
  6943. {
  6944. //Method inherited from \Illuminate\Database\Connection
  6945. /** @var \Illuminate\Database\PostgresConnection $instance */
  6946. $instance->logQuery($query, $bindings, $time);
  6947. }
  6948. /**
  6949. * Register a callback to be invoked when the connection queries for longer than a given amount of time.
  6950. *
  6951. * @param \DateTimeInterface|\Carbon\CarbonInterval|float|int $threshold
  6952. * @param callable $handler
  6953. * @return void
  6954. * @static
  6955. */
  6956. public static function whenQueryingForLongerThan($threshold, $handler)
  6957. {
  6958. //Method inherited from \Illuminate\Database\Connection
  6959. /** @var \Illuminate\Database\PostgresConnection $instance */
  6960. $instance->whenQueryingForLongerThan($threshold, $handler);
  6961. }
  6962. /**
  6963. * Allow all the query duration handlers to run again, even if they have already run.
  6964. *
  6965. * @return void
  6966. * @static
  6967. */
  6968. public static function allowQueryDurationHandlersToRunAgain()
  6969. {
  6970. //Method inherited from \Illuminate\Database\Connection
  6971. /** @var \Illuminate\Database\PostgresConnection $instance */
  6972. $instance->allowQueryDurationHandlersToRunAgain();
  6973. }
  6974. /**
  6975. * Get the duration of all run queries in milliseconds.
  6976. *
  6977. * @return float
  6978. * @static
  6979. */
  6980. public static function totalQueryDuration()
  6981. {
  6982. //Method inherited from \Illuminate\Database\Connection
  6983. /** @var \Illuminate\Database\PostgresConnection $instance */
  6984. return $instance->totalQueryDuration();
  6985. }
  6986. /**
  6987. * Reset the duration of all run queries.
  6988. *
  6989. * @return void
  6990. * @static
  6991. */
  6992. public static function resetTotalQueryDuration()
  6993. {
  6994. //Method inherited from \Illuminate\Database\Connection
  6995. /** @var \Illuminate\Database\PostgresConnection $instance */
  6996. $instance->resetTotalQueryDuration();
  6997. }
  6998. /**
  6999. * Reconnect to the database if a PDO connection is missing.
  7000. *
  7001. * @return void
  7002. * @static
  7003. */
  7004. public static function reconnectIfMissingConnection()
  7005. {
  7006. //Method inherited from \Illuminate\Database\Connection
  7007. /** @var \Illuminate\Database\PostgresConnection $instance */
  7008. $instance->reconnectIfMissingConnection();
  7009. }
  7010. /**
  7011. * Register a hook to be run just before a database transaction is started.
  7012. *
  7013. * @param \Closure $callback
  7014. * @return \Illuminate\Database\PostgresConnection
  7015. * @static
  7016. */
  7017. public static function beforeStartingTransaction($callback)
  7018. {
  7019. //Method inherited from \Illuminate\Database\Connection
  7020. /** @var \Illuminate\Database\PostgresConnection $instance */
  7021. return $instance->beforeStartingTransaction($callback);
  7022. }
  7023. /**
  7024. * Register a hook to be run just before a database query is executed.
  7025. *
  7026. * @param \Closure $callback
  7027. * @return \Illuminate\Database\PostgresConnection
  7028. * @static
  7029. */
  7030. public static function beforeExecuting($callback)
  7031. {
  7032. //Method inherited from \Illuminate\Database\Connection
  7033. /** @var \Illuminate\Database\PostgresConnection $instance */
  7034. return $instance->beforeExecuting($callback);
  7035. }
  7036. /**
  7037. * Register a database query listener with the connection.
  7038. *
  7039. * @param \Closure $callback
  7040. * @return void
  7041. * @static
  7042. */
  7043. public static function listen($callback)
  7044. {
  7045. //Method inherited from \Illuminate\Database\Connection
  7046. /** @var \Illuminate\Database\PostgresConnection $instance */
  7047. $instance->listen($callback);
  7048. }
  7049. /**
  7050. * Get a new raw query expression.
  7051. *
  7052. * @param mixed $value
  7053. * @return \Illuminate\Contracts\Database\Query\Expression
  7054. * @static
  7055. */
  7056. public static function raw($value)
  7057. {
  7058. //Method inherited from \Illuminate\Database\Connection
  7059. /** @var \Illuminate\Database\PostgresConnection $instance */
  7060. return $instance->raw($value);
  7061. }
  7062. /**
  7063. * Escape a value for safe SQL embedding.
  7064. *
  7065. * @param string|float|int|bool|null $value
  7066. * @param bool $binary
  7067. * @return string
  7068. * @static
  7069. */
  7070. public static function escape($value, $binary = false)
  7071. {
  7072. //Method inherited from \Illuminate\Database\Connection
  7073. /** @var \Illuminate\Database\PostgresConnection $instance */
  7074. return $instance->escape($value, $binary);
  7075. }
  7076. /**
  7077. * Determine if the database connection has modified any database records.
  7078. *
  7079. * @return bool
  7080. * @static
  7081. */
  7082. public static function hasModifiedRecords()
  7083. {
  7084. //Method inherited from \Illuminate\Database\Connection
  7085. /** @var \Illuminate\Database\PostgresConnection $instance */
  7086. return $instance->hasModifiedRecords();
  7087. }
  7088. /**
  7089. * Indicate if any records have been modified.
  7090. *
  7091. * @param bool $value
  7092. * @return void
  7093. * @static
  7094. */
  7095. public static function recordsHaveBeenModified($value = true)
  7096. {
  7097. //Method inherited from \Illuminate\Database\Connection
  7098. /** @var \Illuminate\Database\PostgresConnection $instance */
  7099. $instance->recordsHaveBeenModified($value);
  7100. }
  7101. /**
  7102. * Set the record modification state.
  7103. *
  7104. * @param bool $value
  7105. * @return \Illuminate\Database\PostgresConnection
  7106. * @static
  7107. */
  7108. public static function setRecordModificationState($value)
  7109. {
  7110. //Method inherited from \Illuminate\Database\Connection
  7111. /** @var \Illuminate\Database\PostgresConnection $instance */
  7112. return $instance->setRecordModificationState($value);
  7113. }
  7114. /**
  7115. * Reset the record modification state.
  7116. *
  7117. * @return void
  7118. * @static
  7119. */
  7120. public static function forgetRecordModificationState()
  7121. {
  7122. //Method inherited from \Illuminate\Database\Connection
  7123. /** @var \Illuminate\Database\PostgresConnection $instance */
  7124. $instance->forgetRecordModificationState();
  7125. }
  7126. /**
  7127. * Indicate that the connection should use the write PDO connection for reads.
  7128. *
  7129. * @param bool $value
  7130. * @return \Illuminate\Database\PostgresConnection
  7131. * @static
  7132. */
  7133. public static function useWriteConnectionWhenReading($value = true)
  7134. {
  7135. //Method inherited from \Illuminate\Database\Connection
  7136. /** @var \Illuminate\Database\PostgresConnection $instance */
  7137. return $instance->useWriteConnectionWhenReading($value);
  7138. }
  7139. /**
  7140. * Get the current PDO connection.
  7141. *
  7142. * @return \PDO
  7143. * @static
  7144. */
  7145. public static function getPdo()
  7146. {
  7147. //Method inherited from \Illuminate\Database\Connection
  7148. /** @var \Illuminate\Database\PostgresConnection $instance */
  7149. return $instance->getPdo();
  7150. }
  7151. /**
  7152. * Get the current PDO connection parameter without executing any reconnect logic.
  7153. *
  7154. * @return \PDO|\Closure|null
  7155. * @static
  7156. */
  7157. public static function getRawPdo()
  7158. {
  7159. //Method inherited from \Illuminate\Database\Connection
  7160. /** @var \Illuminate\Database\PostgresConnection $instance */
  7161. return $instance->getRawPdo();
  7162. }
  7163. /**
  7164. * Get the current PDO connection used for reading.
  7165. *
  7166. * @return \PDO
  7167. * @static
  7168. */
  7169. public static function getReadPdo()
  7170. {
  7171. //Method inherited from \Illuminate\Database\Connection
  7172. /** @var \Illuminate\Database\PostgresConnection $instance */
  7173. return $instance->getReadPdo();
  7174. }
  7175. /**
  7176. * Get the current read PDO connection parameter without executing any reconnect logic.
  7177. *
  7178. * @return \PDO|\Closure|null
  7179. * @static
  7180. */
  7181. public static function getRawReadPdo()
  7182. {
  7183. //Method inherited from \Illuminate\Database\Connection
  7184. /** @var \Illuminate\Database\PostgresConnection $instance */
  7185. return $instance->getRawReadPdo();
  7186. }
  7187. /**
  7188. * Set the PDO connection.
  7189. *
  7190. * @param \PDO|\Closure|null $pdo
  7191. * @return \Illuminate\Database\PostgresConnection
  7192. * @static
  7193. */
  7194. public static function setPdo($pdo)
  7195. {
  7196. //Method inherited from \Illuminate\Database\Connection
  7197. /** @var \Illuminate\Database\PostgresConnection $instance */
  7198. return $instance->setPdo($pdo);
  7199. }
  7200. /**
  7201. * Set the PDO connection used for reading.
  7202. *
  7203. * @param \PDO|\Closure|null $pdo
  7204. * @return \Illuminate\Database\PostgresConnection
  7205. * @static
  7206. */
  7207. public static function setReadPdo($pdo)
  7208. {
  7209. //Method inherited from \Illuminate\Database\Connection
  7210. /** @var \Illuminate\Database\PostgresConnection $instance */
  7211. return $instance->setReadPdo($pdo);
  7212. }
  7213. /**
  7214. * Get the database connection name.
  7215. *
  7216. * @return string|null
  7217. * @static
  7218. */
  7219. public static function getName()
  7220. {
  7221. //Method inherited from \Illuminate\Database\Connection
  7222. /** @var \Illuminate\Database\PostgresConnection $instance */
  7223. return $instance->getName();
  7224. }
  7225. /**
  7226. * Get the database connection full name.
  7227. *
  7228. * @return string|null
  7229. * @static
  7230. */
  7231. public static function getNameWithReadWriteType()
  7232. {
  7233. //Method inherited from \Illuminate\Database\Connection
  7234. /** @var \Illuminate\Database\PostgresConnection $instance */
  7235. return $instance->getNameWithReadWriteType();
  7236. }
  7237. /**
  7238. * Get an option from the configuration options.
  7239. *
  7240. * @param string|null $option
  7241. * @return mixed
  7242. * @static
  7243. */
  7244. public static function getConfig($option = null)
  7245. {
  7246. //Method inherited from \Illuminate\Database\Connection
  7247. /** @var \Illuminate\Database\PostgresConnection $instance */
  7248. return $instance->getConfig($option);
  7249. }
  7250. /**
  7251. * Get the PDO driver name.
  7252. *
  7253. * @return string
  7254. * @static
  7255. */
  7256. public static function getDriverName()
  7257. {
  7258. //Method inherited from \Illuminate\Database\Connection
  7259. /** @var \Illuminate\Database\PostgresConnection $instance */
  7260. return $instance->getDriverName();
  7261. }
  7262. /**
  7263. * Get the query grammar used by the connection.
  7264. *
  7265. * @return \Illuminate\Database\Query\Grammars\Grammar
  7266. * @static
  7267. */
  7268. public static function getQueryGrammar()
  7269. {
  7270. //Method inherited from \Illuminate\Database\Connection
  7271. /** @var \Illuminate\Database\PostgresConnection $instance */
  7272. return $instance->getQueryGrammar();
  7273. }
  7274. /**
  7275. * Set the query grammar used by the connection.
  7276. *
  7277. * @param \Illuminate\Database\Query\Grammars\Grammar $grammar
  7278. * @return \Illuminate\Database\PostgresConnection
  7279. * @static
  7280. */
  7281. public static function setQueryGrammar($grammar)
  7282. {
  7283. //Method inherited from \Illuminate\Database\Connection
  7284. /** @var \Illuminate\Database\PostgresConnection $instance */
  7285. return $instance->setQueryGrammar($grammar);
  7286. }
  7287. /**
  7288. * Get the schema grammar used by the connection.
  7289. *
  7290. * @return \Illuminate\Database\Schema\Grammars\Grammar
  7291. * @static
  7292. */
  7293. public static function getSchemaGrammar()
  7294. {
  7295. //Method inherited from \Illuminate\Database\Connection
  7296. /** @var \Illuminate\Database\PostgresConnection $instance */
  7297. return $instance->getSchemaGrammar();
  7298. }
  7299. /**
  7300. * Set the schema grammar used by the connection.
  7301. *
  7302. * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
  7303. * @return \Illuminate\Database\PostgresConnection
  7304. * @static
  7305. */
  7306. public static function setSchemaGrammar($grammar)
  7307. {
  7308. //Method inherited from \Illuminate\Database\Connection
  7309. /** @var \Illuminate\Database\PostgresConnection $instance */
  7310. return $instance->setSchemaGrammar($grammar);
  7311. }
  7312. /**
  7313. * Get the query post processor used by the connection.
  7314. *
  7315. * @return \Illuminate\Database\Query\Processors\Processor
  7316. * @static
  7317. */
  7318. public static function getPostProcessor()
  7319. {
  7320. //Method inherited from \Illuminate\Database\Connection
  7321. /** @var \Illuminate\Database\PostgresConnection $instance */
  7322. return $instance->getPostProcessor();
  7323. }
  7324. /**
  7325. * Set the query post processor used by the connection.
  7326. *
  7327. * @param \Illuminate\Database\Query\Processors\Processor $processor
  7328. * @return \Illuminate\Database\PostgresConnection
  7329. * @static
  7330. */
  7331. public static function setPostProcessor($processor)
  7332. {
  7333. //Method inherited from \Illuminate\Database\Connection
  7334. /** @var \Illuminate\Database\PostgresConnection $instance */
  7335. return $instance->setPostProcessor($processor);
  7336. }
  7337. /**
  7338. * Get the event dispatcher used by the connection.
  7339. *
  7340. * @return \Illuminate\Contracts\Events\Dispatcher
  7341. * @static
  7342. */
  7343. public static function getEventDispatcher()
  7344. {
  7345. //Method inherited from \Illuminate\Database\Connection
  7346. /** @var \Illuminate\Database\PostgresConnection $instance */
  7347. return $instance->getEventDispatcher();
  7348. }
  7349. /**
  7350. * Set the event dispatcher instance on the connection.
  7351. *
  7352. * @param \Illuminate\Contracts\Events\Dispatcher $events
  7353. * @return \Illuminate\Database\PostgresConnection
  7354. * @static
  7355. */
  7356. public static function setEventDispatcher($events)
  7357. {
  7358. //Method inherited from \Illuminate\Database\Connection
  7359. /** @var \Illuminate\Database\PostgresConnection $instance */
  7360. return $instance->setEventDispatcher($events);
  7361. }
  7362. /**
  7363. * Unset the event dispatcher for this connection.
  7364. *
  7365. * @return void
  7366. * @static
  7367. */
  7368. public static function unsetEventDispatcher()
  7369. {
  7370. //Method inherited from \Illuminate\Database\Connection
  7371. /** @var \Illuminate\Database\PostgresConnection $instance */
  7372. $instance->unsetEventDispatcher();
  7373. }
  7374. /**
  7375. * Set the transaction manager instance on the connection.
  7376. *
  7377. * @param \Illuminate\Database\DatabaseTransactionsManager $manager
  7378. * @return \Illuminate\Database\PostgresConnection
  7379. * @static
  7380. */
  7381. public static function setTransactionManager($manager)
  7382. {
  7383. //Method inherited from \Illuminate\Database\Connection
  7384. /** @var \Illuminate\Database\PostgresConnection $instance */
  7385. return $instance->setTransactionManager($manager);
  7386. }
  7387. /**
  7388. * Unset the transaction manager for this connection.
  7389. *
  7390. * @return void
  7391. * @static
  7392. */
  7393. public static function unsetTransactionManager()
  7394. {
  7395. //Method inherited from \Illuminate\Database\Connection
  7396. /** @var \Illuminate\Database\PostgresConnection $instance */
  7397. $instance->unsetTransactionManager();
  7398. }
  7399. /**
  7400. * Determine if the connection is in a "dry run".
  7401. *
  7402. * @return bool
  7403. * @static
  7404. */
  7405. public static function pretending()
  7406. {
  7407. //Method inherited from \Illuminate\Database\Connection
  7408. /** @var \Illuminate\Database\PostgresConnection $instance */
  7409. return $instance->pretending();
  7410. }
  7411. /**
  7412. * Get the connection query log.
  7413. *
  7414. * @return array
  7415. * @static
  7416. */
  7417. public static function getQueryLog()
  7418. {
  7419. //Method inherited from \Illuminate\Database\Connection
  7420. /** @var \Illuminate\Database\PostgresConnection $instance */
  7421. return $instance->getQueryLog();
  7422. }
  7423. /**
  7424. * Get the connection query log with embedded bindings.
  7425. *
  7426. * @return array
  7427. * @static
  7428. */
  7429. public static function getRawQueryLog()
  7430. {
  7431. //Method inherited from \Illuminate\Database\Connection
  7432. /** @var \Illuminate\Database\PostgresConnection $instance */
  7433. return $instance->getRawQueryLog();
  7434. }
  7435. /**
  7436. * Clear the query log.
  7437. *
  7438. * @return void
  7439. * @static
  7440. */
  7441. public static function flushQueryLog()
  7442. {
  7443. //Method inherited from \Illuminate\Database\Connection
  7444. /** @var \Illuminate\Database\PostgresConnection $instance */
  7445. $instance->flushQueryLog();
  7446. }
  7447. /**
  7448. * Enable the query log on the connection.
  7449. *
  7450. * @return void
  7451. * @static
  7452. */
  7453. public static function enableQueryLog()
  7454. {
  7455. //Method inherited from \Illuminate\Database\Connection
  7456. /** @var \Illuminate\Database\PostgresConnection $instance */
  7457. $instance->enableQueryLog();
  7458. }
  7459. /**
  7460. * Disable the query log on the connection.
  7461. *
  7462. * @return void
  7463. * @static
  7464. */
  7465. public static function disableQueryLog()
  7466. {
  7467. //Method inherited from \Illuminate\Database\Connection
  7468. /** @var \Illuminate\Database\PostgresConnection $instance */
  7469. $instance->disableQueryLog();
  7470. }
  7471. /**
  7472. * Determine whether we're logging queries.
  7473. *
  7474. * @return bool
  7475. * @static
  7476. */
  7477. public static function logging()
  7478. {
  7479. //Method inherited from \Illuminate\Database\Connection
  7480. /** @var \Illuminate\Database\PostgresConnection $instance */
  7481. return $instance->logging();
  7482. }
  7483. /**
  7484. * Get the name of the connected database.
  7485. *
  7486. * @return string
  7487. * @static
  7488. */
  7489. public static function getDatabaseName()
  7490. {
  7491. //Method inherited from \Illuminate\Database\Connection
  7492. /** @var \Illuminate\Database\PostgresConnection $instance */
  7493. return $instance->getDatabaseName();
  7494. }
  7495. /**
  7496. * Set the name of the connected database.
  7497. *
  7498. * @param string $database
  7499. * @return \Illuminate\Database\PostgresConnection
  7500. * @static
  7501. */
  7502. public static function setDatabaseName($database)
  7503. {
  7504. //Method inherited from \Illuminate\Database\Connection
  7505. /** @var \Illuminate\Database\PostgresConnection $instance */
  7506. return $instance->setDatabaseName($database);
  7507. }
  7508. /**
  7509. * Set the read / write type of the connection.
  7510. *
  7511. * @param string|null $readWriteType
  7512. * @return \Illuminate\Database\PostgresConnection
  7513. * @static
  7514. */
  7515. public static function setReadWriteType($readWriteType)
  7516. {
  7517. //Method inherited from \Illuminate\Database\Connection
  7518. /** @var \Illuminate\Database\PostgresConnection $instance */
  7519. return $instance->setReadWriteType($readWriteType);
  7520. }
  7521. /**
  7522. * Get the table prefix for the connection.
  7523. *
  7524. * @return string
  7525. * @static
  7526. */
  7527. public static function getTablePrefix()
  7528. {
  7529. //Method inherited from \Illuminate\Database\Connection
  7530. /** @var \Illuminate\Database\PostgresConnection $instance */
  7531. return $instance->getTablePrefix();
  7532. }
  7533. /**
  7534. * Set the table prefix in use by the connection.
  7535. *
  7536. * @param string $prefix
  7537. * @return \Illuminate\Database\PostgresConnection
  7538. * @static
  7539. */
  7540. public static function setTablePrefix($prefix)
  7541. {
  7542. //Method inherited from \Illuminate\Database\Connection
  7543. /** @var \Illuminate\Database\PostgresConnection $instance */
  7544. return $instance->setTablePrefix($prefix);
  7545. }
  7546. /**
  7547. * Execute the given callback without table prefix.
  7548. *
  7549. * @param \Closure $callback
  7550. * @return mixed
  7551. * @static
  7552. */
  7553. public static function withoutTablePrefix($callback)
  7554. {
  7555. //Method inherited from \Illuminate\Database\Connection
  7556. /** @var \Illuminate\Database\PostgresConnection $instance */
  7557. return $instance->withoutTablePrefix($callback);
  7558. }
  7559. /**
  7560. * Get the server version for the connection.
  7561. *
  7562. * @return string
  7563. * @static
  7564. */
  7565. public static function getServerVersion()
  7566. {
  7567. //Method inherited from \Illuminate\Database\Connection
  7568. /** @var \Illuminate\Database\PostgresConnection $instance */
  7569. return $instance->getServerVersion();
  7570. }
  7571. /**
  7572. * Register a connection resolver.
  7573. *
  7574. * @param string $driver
  7575. * @param \Closure $callback
  7576. * @return void
  7577. * @static
  7578. */
  7579. public static function resolverFor($driver, $callback)
  7580. {
  7581. //Method inherited from \Illuminate\Database\Connection
  7582. \Illuminate\Database\PostgresConnection::resolverFor($driver, $callback);
  7583. }
  7584. /**
  7585. * Get the connection resolver for the given driver.
  7586. *
  7587. * @param string $driver
  7588. * @return \Closure|null
  7589. * @static
  7590. */
  7591. public static function getResolver($driver)
  7592. {
  7593. //Method inherited from \Illuminate\Database\Connection
  7594. return \Illuminate\Database\PostgresConnection::getResolver($driver);
  7595. }
  7596. /**
  7597. * @template TReturn of mixed
  7598. *
  7599. * Execute a Closure within a transaction.
  7600. * @param (\Closure(static): TReturn) $callback
  7601. * @param int $attempts
  7602. * @return TReturn
  7603. * @throws \Throwable
  7604. * @static
  7605. */
  7606. public static function transaction($callback, $attempts = 1)
  7607. {
  7608. //Method inherited from \Illuminate\Database\Connection
  7609. /** @var \Illuminate\Database\PostgresConnection $instance */
  7610. return $instance->transaction($callback, $attempts);
  7611. }
  7612. /**
  7613. * Start a new database transaction.
  7614. *
  7615. * @return void
  7616. * @throws \Throwable
  7617. * @static
  7618. */
  7619. public static function beginTransaction()
  7620. {
  7621. //Method inherited from \Illuminate\Database\Connection
  7622. /** @var \Illuminate\Database\PostgresConnection $instance */
  7623. $instance->beginTransaction();
  7624. }
  7625. /**
  7626. * Commit the active database transaction.
  7627. *
  7628. * @return void
  7629. * @throws \Throwable
  7630. * @static
  7631. */
  7632. public static function commit()
  7633. {
  7634. //Method inherited from \Illuminate\Database\Connection
  7635. /** @var \Illuminate\Database\PostgresConnection $instance */
  7636. $instance->commit();
  7637. }
  7638. /**
  7639. * Rollback the active database transaction.
  7640. *
  7641. * @param int|null $toLevel
  7642. * @return void
  7643. * @throws \Throwable
  7644. * @static
  7645. */
  7646. public static function rollBack($toLevel = null)
  7647. {
  7648. //Method inherited from \Illuminate\Database\Connection
  7649. /** @var \Illuminate\Database\PostgresConnection $instance */
  7650. $instance->rollBack($toLevel);
  7651. }
  7652. /**
  7653. * Get the number of active transactions.
  7654. *
  7655. * @return int
  7656. * @static
  7657. */
  7658. public static function transactionLevel()
  7659. {
  7660. //Method inherited from \Illuminate\Database\Connection
  7661. /** @var \Illuminate\Database\PostgresConnection $instance */
  7662. return $instance->transactionLevel();
  7663. }
  7664. /**
  7665. * Execute the callback after a transaction commits.
  7666. *
  7667. * @param callable $callback
  7668. * @return void
  7669. * @throws \RuntimeException
  7670. * @static
  7671. */
  7672. public static function afterCommit($callback)
  7673. {
  7674. //Method inherited from \Illuminate\Database\Connection
  7675. /** @var \Illuminate\Database\PostgresConnection $instance */
  7676. $instance->afterCommit($callback);
  7677. }
  7678. }
  7679. /**
  7680. * @see \Illuminate\Events\Dispatcher
  7681. * @see \Illuminate\Support\Testing\Fakes\EventFake
  7682. */
  7683. class Event {
  7684. /**
  7685. * Register an event listener with the dispatcher.
  7686. *
  7687. * @param \Illuminate\Events\Queued\Closure|callable|array|class-string|string $events
  7688. * @param \Illuminate\Events\Queued\Closure|callable|array|class-string|null $listener
  7689. * @return void
  7690. * @static
  7691. */
  7692. public static function listen($events, $listener = null)
  7693. {
  7694. /** @var \Illuminate\Events\Dispatcher $instance */
  7695. $instance->listen($events, $listener);
  7696. }
  7697. /**
  7698. * Determine if a given event has listeners.
  7699. *
  7700. * @param string $eventName
  7701. * @return bool
  7702. * @static
  7703. */
  7704. public static function hasListeners($eventName)
  7705. {
  7706. /** @var \Illuminate\Events\Dispatcher $instance */
  7707. return $instance->hasListeners($eventName);
  7708. }
  7709. /**
  7710. * Determine if the given event has any wildcard listeners.
  7711. *
  7712. * @param string $eventName
  7713. * @return bool
  7714. * @static
  7715. */
  7716. public static function hasWildcardListeners($eventName)
  7717. {
  7718. /** @var \Illuminate\Events\Dispatcher $instance */
  7719. return $instance->hasWildcardListeners($eventName);
  7720. }
  7721. /**
  7722. * Register an event and payload to be fired later.
  7723. *
  7724. * @param string $event
  7725. * @param object|array $payload
  7726. * @return void
  7727. * @static
  7728. */
  7729. public static function push($event, $payload = [])
  7730. {
  7731. /** @var \Illuminate\Events\Dispatcher $instance */
  7732. $instance->push($event, $payload);
  7733. }
  7734. /**
  7735. * Flush a set of pushed events.
  7736. *
  7737. * @param string $event
  7738. * @return void
  7739. * @static
  7740. */
  7741. public static function flush($event)
  7742. {
  7743. /** @var \Illuminate\Events\Dispatcher $instance */
  7744. $instance->flush($event);
  7745. }
  7746. /**
  7747. * Register an event subscriber with the dispatcher.
  7748. *
  7749. * @param object|string $subscriber
  7750. * @return void
  7751. * @static
  7752. */
  7753. public static function subscribe($subscriber)
  7754. {
  7755. /** @var \Illuminate\Events\Dispatcher $instance */
  7756. $instance->subscribe($subscriber);
  7757. }
  7758. /**
  7759. * Fire an event until the first non-null response is returned.
  7760. *
  7761. * @param string|object $event
  7762. * @param mixed $payload
  7763. * @return mixed
  7764. * @static
  7765. */
  7766. public static function until($event, $payload = [])
  7767. {
  7768. /** @var \Illuminate\Events\Dispatcher $instance */
  7769. return $instance->until($event, $payload);
  7770. }
  7771. /**
  7772. * Fire an event and call the listeners.
  7773. *
  7774. * @param string|object $event
  7775. * @param mixed $payload
  7776. * @param bool $halt
  7777. * @return array|null
  7778. * @static
  7779. */
  7780. public static function dispatch($event, $payload = [], $halt = false)
  7781. {
  7782. /** @var \Illuminate\Events\Dispatcher $instance */
  7783. return $instance->dispatch($event, $payload, $halt);
  7784. }
  7785. /**
  7786. * Get all of the listeners for a given event name.
  7787. *
  7788. * @param string $eventName
  7789. * @return array
  7790. * @static
  7791. */
  7792. public static function getListeners($eventName)
  7793. {
  7794. /** @var \Illuminate\Events\Dispatcher $instance */
  7795. return $instance->getListeners($eventName);
  7796. }
  7797. /**
  7798. * Register an event listener with the dispatcher.
  7799. *
  7800. * @param \Closure|string|array $listener
  7801. * @param bool $wildcard
  7802. * @return \Closure
  7803. * @static
  7804. */
  7805. public static function makeListener($listener, $wildcard = false)
  7806. {
  7807. /** @var \Illuminate\Events\Dispatcher $instance */
  7808. return $instance->makeListener($listener, $wildcard);
  7809. }
  7810. /**
  7811. * Create a class based listener using the IoC container.
  7812. *
  7813. * @param string $listener
  7814. * @param bool $wildcard
  7815. * @return \Closure
  7816. * @static
  7817. */
  7818. public static function createClassListener($listener, $wildcard = false)
  7819. {
  7820. /** @var \Illuminate\Events\Dispatcher $instance */
  7821. return $instance->createClassListener($listener, $wildcard);
  7822. }
  7823. /**
  7824. * Remove a set of listeners from the dispatcher.
  7825. *
  7826. * @param string $event
  7827. * @return void
  7828. * @static
  7829. */
  7830. public static function forget($event)
  7831. {
  7832. /** @var \Illuminate\Events\Dispatcher $instance */
  7833. $instance->forget($event);
  7834. }
  7835. /**
  7836. * Forget all of the pushed listeners.
  7837. *
  7838. * @return void
  7839. * @static
  7840. */
  7841. public static function forgetPushed()
  7842. {
  7843. /** @var \Illuminate\Events\Dispatcher $instance */
  7844. $instance->forgetPushed();
  7845. }
  7846. /**
  7847. * Set the queue resolver implementation.
  7848. *
  7849. * @param callable $resolver
  7850. * @return \Illuminate\Events\Dispatcher
  7851. * @static
  7852. */
  7853. public static function setQueueResolver($resolver)
  7854. {
  7855. /** @var \Illuminate\Events\Dispatcher $instance */
  7856. return $instance->setQueueResolver($resolver);
  7857. }
  7858. /**
  7859. * Set the database transaction manager resolver implementation.
  7860. *
  7861. * @param callable $resolver
  7862. * @return \Illuminate\Events\Dispatcher
  7863. * @static
  7864. */
  7865. public static function setTransactionManagerResolver($resolver)
  7866. {
  7867. /** @var \Illuminate\Events\Dispatcher $instance */
  7868. return $instance->setTransactionManagerResolver($resolver);
  7869. }
  7870. /**
  7871. * Gets the raw, unprepared listeners.
  7872. *
  7873. * @return array
  7874. * @static
  7875. */
  7876. public static function getRawListeners()
  7877. {
  7878. /** @var \Illuminate\Events\Dispatcher $instance */
  7879. return $instance->getRawListeners();
  7880. }
  7881. /**
  7882. * Register a custom macro.
  7883. *
  7884. * @param string $name
  7885. * @param object|callable $macro
  7886. * @param-closure-this static $macro
  7887. * @return void
  7888. * @static
  7889. */
  7890. public static function macro($name, $macro)
  7891. {
  7892. \Illuminate\Events\Dispatcher::macro($name, $macro);
  7893. }
  7894. /**
  7895. * Mix another object into the class.
  7896. *
  7897. * @param object $mixin
  7898. * @param bool $replace
  7899. * @return void
  7900. * @throws \ReflectionException
  7901. * @static
  7902. */
  7903. public static function mixin($mixin, $replace = true)
  7904. {
  7905. \Illuminate\Events\Dispatcher::mixin($mixin, $replace);
  7906. }
  7907. /**
  7908. * Checks if macro is registered.
  7909. *
  7910. * @param string $name
  7911. * @return bool
  7912. * @static
  7913. */
  7914. public static function hasMacro($name)
  7915. {
  7916. return \Illuminate\Events\Dispatcher::hasMacro($name);
  7917. }
  7918. /**
  7919. * Flush the existing macros.
  7920. *
  7921. * @return void
  7922. * @static
  7923. */
  7924. public static function flushMacros()
  7925. {
  7926. \Illuminate\Events\Dispatcher::flushMacros();
  7927. }
  7928. /**
  7929. * Specify the events that should be dispatched instead of faked.
  7930. *
  7931. * @param array|string $eventsToDispatch
  7932. * @return \Illuminate\Support\Testing\Fakes\EventFake
  7933. * @static
  7934. */
  7935. public static function except($eventsToDispatch)
  7936. {
  7937. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7938. return $instance->except($eventsToDispatch);
  7939. }
  7940. /**
  7941. * Assert if an event has a listener attached to it.
  7942. *
  7943. * @param string $expectedEvent
  7944. * @param string|array $expectedListener
  7945. * @return void
  7946. * @static
  7947. */
  7948. public static function assertListening($expectedEvent, $expectedListener)
  7949. {
  7950. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7951. $instance->assertListening($expectedEvent, $expectedListener);
  7952. }
  7953. /**
  7954. * Assert if an event was dispatched based on a truth-test callback.
  7955. *
  7956. * @param string|\Closure $event
  7957. * @param callable|int|null $callback
  7958. * @return void
  7959. * @static
  7960. */
  7961. public static function assertDispatched($event, $callback = null)
  7962. {
  7963. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7964. $instance->assertDispatched($event, $callback);
  7965. }
  7966. /**
  7967. * Assert if an event was dispatched a number of times.
  7968. *
  7969. * @param string $event
  7970. * @param int $times
  7971. * @return void
  7972. * @static
  7973. */
  7974. public static function assertDispatchedTimes($event, $times = 1)
  7975. {
  7976. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7977. $instance->assertDispatchedTimes($event, $times);
  7978. }
  7979. /**
  7980. * Determine if an event was dispatched based on a truth-test callback.
  7981. *
  7982. * @param string|\Closure $event
  7983. * @param callable|null $callback
  7984. * @return void
  7985. * @static
  7986. */
  7987. public static function assertNotDispatched($event, $callback = null)
  7988. {
  7989. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7990. $instance->assertNotDispatched($event, $callback);
  7991. }
  7992. /**
  7993. * Assert that no events were dispatched.
  7994. *
  7995. * @return void
  7996. * @static
  7997. */
  7998. public static function assertNothingDispatched()
  7999. {
  8000. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8001. $instance->assertNothingDispatched();
  8002. }
  8003. /**
  8004. * Get all of the events matching a truth-test callback.
  8005. *
  8006. * @param string $event
  8007. * @param callable|null $callback
  8008. * @return \Illuminate\Support\Collection
  8009. * @static
  8010. */
  8011. public static function dispatched($event, $callback = null)
  8012. {
  8013. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8014. return $instance->dispatched($event, $callback);
  8015. }
  8016. /**
  8017. * Determine if the given event has been dispatched.
  8018. *
  8019. * @param string $event
  8020. * @return bool
  8021. * @static
  8022. */
  8023. public static function hasDispatched($event)
  8024. {
  8025. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8026. return $instance->hasDispatched($event);
  8027. }
  8028. /**
  8029. * Get the events that have been dispatched.
  8030. *
  8031. * @return array
  8032. * @static
  8033. */
  8034. public static function dispatchedEvents()
  8035. {
  8036. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8037. return $instance->dispatchedEvents();
  8038. }
  8039. }
  8040. /**
  8041. * @see \Illuminate\Filesystem\Filesystem
  8042. */
  8043. class File {
  8044. /**
  8045. * Determine if a file or directory exists.
  8046. *
  8047. * @param string $path
  8048. * @return bool
  8049. * @static
  8050. */
  8051. public static function exists($path)
  8052. {
  8053. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8054. return $instance->exists($path);
  8055. }
  8056. /**
  8057. * Determine if a file or directory is missing.
  8058. *
  8059. * @param string $path
  8060. * @return bool
  8061. * @static
  8062. */
  8063. public static function missing($path)
  8064. {
  8065. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8066. return $instance->missing($path);
  8067. }
  8068. /**
  8069. * Get the contents of a file.
  8070. *
  8071. * @param string $path
  8072. * @param bool $lock
  8073. * @return string
  8074. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8075. * @static
  8076. */
  8077. public static function get($path, $lock = false)
  8078. {
  8079. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8080. return $instance->get($path, $lock);
  8081. }
  8082. /**
  8083. * Get the contents of a file as decoded JSON.
  8084. *
  8085. * @param string $path
  8086. * @param int $flags
  8087. * @param bool $lock
  8088. * @return array
  8089. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8090. * @static
  8091. */
  8092. public static function json($path, $flags = 0, $lock = false)
  8093. {
  8094. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8095. return $instance->json($path, $flags, $lock);
  8096. }
  8097. /**
  8098. * Get contents of a file with shared access.
  8099. *
  8100. * @param string $path
  8101. * @return string
  8102. * @static
  8103. */
  8104. public static function sharedGet($path)
  8105. {
  8106. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8107. return $instance->sharedGet($path);
  8108. }
  8109. /**
  8110. * Get the returned value of a file.
  8111. *
  8112. * @param string $path
  8113. * @param array $data
  8114. * @return mixed
  8115. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8116. * @static
  8117. */
  8118. public static function getRequire($path, $data = [])
  8119. {
  8120. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8121. return $instance->getRequire($path, $data);
  8122. }
  8123. /**
  8124. * Require the given file once.
  8125. *
  8126. * @param string $path
  8127. * @param array $data
  8128. * @return mixed
  8129. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8130. * @static
  8131. */
  8132. public static function requireOnce($path, $data = [])
  8133. {
  8134. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8135. return $instance->requireOnce($path, $data);
  8136. }
  8137. /**
  8138. * Get the contents of a file one line at a time.
  8139. *
  8140. * @param string $path
  8141. * @return \Illuminate\Support\LazyCollection
  8142. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8143. * @static
  8144. */
  8145. public static function lines($path)
  8146. {
  8147. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8148. return $instance->lines($path);
  8149. }
  8150. /**
  8151. * Get the hash of the file at the given path.
  8152. *
  8153. * @param string $path
  8154. * @param string $algorithm
  8155. * @return string|false
  8156. * @static
  8157. */
  8158. public static function hash($path, $algorithm = 'md5')
  8159. {
  8160. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8161. return $instance->hash($path, $algorithm);
  8162. }
  8163. /**
  8164. * Write the contents of a file.
  8165. *
  8166. * @param string $path
  8167. * @param string $contents
  8168. * @param bool $lock
  8169. * @return int|bool
  8170. * @static
  8171. */
  8172. public static function put($path, $contents, $lock = false)
  8173. {
  8174. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8175. return $instance->put($path, $contents, $lock);
  8176. }
  8177. /**
  8178. * Write the contents of a file, replacing it atomically if it already exists.
  8179. *
  8180. * @param string $path
  8181. * @param string $content
  8182. * @param int|null $mode
  8183. * @return void
  8184. * @static
  8185. */
  8186. public static function replace($path, $content, $mode = null)
  8187. {
  8188. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8189. $instance->replace($path, $content, $mode);
  8190. }
  8191. /**
  8192. * Replace a given string within a given file.
  8193. *
  8194. * @param array|string $search
  8195. * @param array|string $replace
  8196. * @param string $path
  8197. * @return void
  8198. * @static
  8199. */
  8200. public static function replaceInFile($search, $replace, $path)
  8201. {
  8202. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8203. $instance->replaceInFile($search, $replace, $path);
  8204. }
  8205. /**
  8206. * Prepend to a file.
  8207. *
  8208. * @param string $path
  8209. * @param string $data
  8210. * @return int
  8211. * @static
  8212. */
  8213. public static function prepend($path, $data)
  8214. {
  8215. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8216. return $instance->prepend($path, $data);
  8217. }
  8218. /**
  8219. * Append to a file.
  8220. *
  8221. * @param string $path
  8222. * @param string $data
  8223. * @param bool $lock
  8224. * @return int
  8225. * @static
  8226. */
  8227. public static function append($path, $data, $lock = false)
  8228. {
  8229. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8230. return $instance->append($path, $data, $lock);
  8231. }
  8232. /**
  8233. * Get or set UNIX mode of a file or directory.
  8234. *
  8235. * @param string $path
  8236. * @param int|null $mode
  8237. * @return mixed
  8238. * @static
  8239. */
  8240. public static function chmod($path, $mode = null)
  8241. {
  8242. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8243. return $instance->chmod($path, $mode);
  8244. }
  8245. /**
  8246. * Delete the file at a given path.
  8247. *
  8248. * @param string|array $paths
  8249. * @return bool
  8250. * @static
  8251. */
  8252. public static function delete($paths)
  8253. {
  8254. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8255. return $instance->delete($paths);
  8256. }
  8257. /**
  8258. * Move a file to a new location.
  8259. *
  8260. * @param string $path
  8261. * @param string $target
  8262. * @return bool
  8263. * @static
  8264. */
  8265. public static function move($path, $target)
  8266. {
  8267. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8268. return $instance->move($path, $target);
  8269. }
  8270. /**
  8271. * Copy a file to a new location.
  8272. *
  8273. * @param string $path
  8274. * @param string $target
  8275. * @return bool
  8276. * @static
  8277. */
  8278. public static function copy($path, $target)
  8279. {
  8280. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8281. return $instance->copy($path, $target);
  8282. }
  8283. /**
  8284. * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file.
  8285. *
  8286. * @param string $target
  8287. * @param string $link
  8288. * @return bool|null
  8289. * @static
  8290. */
  8291. public static function link($target, $link)
  8292. {
  8293. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8294. return $instance->link($target, $link);
  8295. }
  8296. /**
  8297. * Create a relative symlink to the target file or directory.
  8298. *
  8299. * @param string $target
  8300. * @param string $link
  8301. * @return void
  8302. * @throws \RuntimeException
  8303. * @static
  8304. */
  8305. public static function relativeLink($target, $link)
  8306. {
  8307. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8308. $instance->relativeLink($target, $link);
  8309. }
  8310. /**
  8311. * Extract the file name from a file path.
  8312. *
  8313. * @param string $path
  8314. * @return string
  8315. * @static
  8316. */
  8317. public static function name($path)
  8318. {
  8319. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8320. return $instance->name($path);
  8321. }
  8322. /**
  8323. * Extract the trailing name component from a file path.
  8324. *
  8325. * @param string $path
  8326. * @return string
  8327. * @static
  8328. */
  8329. public static function basename($path)
  8330. {
  8331. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8332. return $instance->basename($path);
  8333. }
  8334. /**
  8335. * Extract the parent directory from a file path.
  8336. *
  8337. * @param string $path
  8338. * @return string
  8339. * @static
  8340. */
  8341. public static function dirname($path)
  8342. {
  8343. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8344. return $instance->dirname($path);
  8345. }
  8346. /**
  8347. * Extract the file extension from a file path.
  8348. *
  8349. * @param string $path
  8350. * @return string
  8351. * @static
  8352. */
  8353. public static function extension($path)
  8354. {
  8355. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8356. return $instance->extension($path);
  8357. }
  8358. /**
  8359. * Guess the file extension from the mime-type of a given file.
  8360. *
  8361. * @param string $path
  8362. * @return string|null
  8363. * @throws \RuntimeException
  8364. * @static
  8365. */
  8366. public static function guessExtension($path)
  8367. {
  8368. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8369. return $instance->guessExtension($path);
  8370. }
  8371. /**
  8372. * Get the file type of a given file.
  8373. *
  8374. * @param string $path
  8375. * @return string
  8376. * @static
  8377. */
  8378. public static function type($path)
  8379. {
  8380. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8381. return $instance->type($path);
  8382. }
  8383. /**
  8384. * Get the mime-type of a given file.
  8385. *
  8386. * @param string $path
  8387. * @return string|false
  8388. * @static
  8389. */
  8390. public static function mimeType($path)
  8391. {
  8392. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8393. return $instance->mimeType($path);
  8394. }
  8395. /**
  8396. * Get the file size of a given file.
  8397. *
  8398. * @param string $path
  8399. * @return int
  8400. * @static
  8401. */
  8402. public static function size($path)
  8403. {
  8404. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8405. return $instance->size($path);
  8406. }
  8407. /**
  8408. * Get the file's last modification time.
  8409. *
  8410. * @param string $path
  8411. * @return int
  8412. * @static
  8413. */
  8414. public static function lastModified($path)
  8415. {
  8416. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8417. return $instance->lastModified($path);
  8418. }
  8419. /**
  8420. * Determine if the given path is a directory.
  8421. *
  8422. * @param string $directory
  8423. * @return bool
  8424. * @static
  8425. */
  8426. public static function isDirectory($directory)
  8427. {
  8428. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8429. return $instance->isDirectory($directory);
  8430. }
  8431. /**
  8432. * Determine if the given path is a directory that does not contain any other files or directories.
  8433. *
  8434. * @param string $directory
  8435. * @param bool $ignoreDotFiles
  8436. * @return bool
  8437. * @static
  8438. */
  8439. public static function isEmptyDirectory($directory, $ignoreDotFiles = false)
  8440. {
  8441. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8442. return $instance->isEmptyDirectory($directory, $ignoreDotFiles);
  8443. }
  8444. /**
  8445. * Determine if the given path is readable.
  8446. *
  8447. * @param string $path
  8448. * @return bool
  8449. * @static
  8450. */
  8451. public static function isReadable($path)
  8452. {
  8453. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8454. return $instance->isReadable($path);
  8455. }
  8456. /**
  8457. * Determine if the given path is writable.
  8458. *
  8459. * @param string $path
  8460. * @return bool
  8461. * @static
  8462. */
  8463. public static function isWritable($path)
  8464. {
  8465. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8466. return $instance->isWritable($path);
  8467. }
  8468. /**
  8469. * Determine if two files are the same by comparing their hashes.
  8470. *
  8471. * @param string $firstFile
  8472. * @param string $secondFile
  8473. * @return bool
  8474. * @static
  8475. */
  8476. public static function hasSameHash($firstFile, $secondFile)
  8477. {
  8478. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8479. return $instance->hasSameHash($firstFile, $secondFile);
  8480. }
  8481. /**
  8482. * Determine if the given path is a file.
  8483. *
  8484. * @param string $file
  8485. * @return bool
  8486. * @static
  8487. */
  8488. public static function isFile($file)
  8489. {
  8490. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8491. return $instance->isFile($file);
  8492. }
  8493. /**
  8494. * Find path names matching a given pattern.
  8495. *
  8496. * @param string $pattern
  8497. * @param int $flags
  8498. * @return array
  8499. * @static
  8500. */
  8501. public static function glob($pattern, $flags = 0)
  8502. {
  8503. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8504. return $instance->glob($pattern, $flags);
  8505. }
  8506. /**
  8507. * Get an array of all files in a directory.
  8508. *
  8509. * @param string $directory
  8510. * @param bool $hidden
  8511. * @return \Symfony\Component\Finder\SplFileInfo[]
  8512. * @static
  8513. */
  8514. public static function files($directory, $hidden = false)
  8515. {
  8516. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8517. return $instance->files($directory, $hidden);
  8518. }
  8519. /**
  8520. * Get all of the files from the given directory (recursive).
  8521. *
  8522. * @param string $directory
  8523. * @param bool $hidden
  8524. * @return \Symfony\Component\Finder\SplFileInfo[]
  8525. * @static
  8526. */
  8527. public static function allFiles($directory, $hidden = false)
  8528. {
  8529. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8530. return $instance->allFiles($directory, $hidden);
  8531. }
  8532. /**
  8533. * Get all of the directories within a given directory.
  8534. *
  8535. * @param string $directory
  8536. * @return array
  8537. * @static
  8538. */
  8539. public static function directories($directory)
  8540. {
  8541. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8542. return $instance->directories($directory);
  8543. }
  8544. /**
  8545. * Ensure a directory exists.
  8546. *
  8547. * @param string $path
  8548. * @param int $mode
  8549. * @param bool $recursive
  8550. * @return void
  8551. * @static
  8552. */
  8553. public static function ensureDirectoryExists($path, $mode = 493, $recursive = true)
  8554. {
  8555. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8556. $instance->ensureDirectoryExists($path, $mode, $recursive);
  8557. }
  8558. /**
  8559. * Create a directory.
  8560. *
  8561. * @param string $path
  8562. * @param int $mode
  8563. * @param bool $recursive
  8564. * @param bool $force
  8565. * @return bool
  8566. * @static
  8567. */
  8568. public static function makeDirectory($path, $mode = 493, $recursive = false, $force = false)
  8569. {
  8570. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8571. return $instance->makeDirectory($path, $mode, $recursive, $force);
  8572. }
  8573. /**
  8574. * Move a directory.
  8575. *
  8576. * @param string $from
  8577. * @param string $to
  8578. * @param bool $overwrite
  8579. * @return bool
  8580. * @static
  8581. */
  8582. public static function moveDirectory($from, $to, $overwrite = false)
  8583. {
  8584. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8585. return $instance->moveDirectory($from, $to, $overwrite);
  8586. }
  8587. /**
  8588. * Copy a directory from one location to another.
  8589. *
  8590. * @param string $directory
  8591. * @param string $destination
  8592. * @param int|null $options
  8593. * @return bool
  8594. * @static
  8595. */
  8596. public static function copyDirectory($directory, $destination, $options = null)
  8597. {
  8598. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8599. return $instance->copyDirectory($directory, $destination, $options);
  8600. }
  8601. /**
  8602. * Recursively delete a directory.
  8603. *
  8604. * The directory itself may be optionally preserved.
  8605. *
  8606. * @param string $directory
  8607. * @param bool $preserve
  8608. * @return bool
  8609. * @static
  8610. */
  8611. public static function deleteDirectory($directory, $preserve = false)
  8612. {
  8613. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8614. return $instance->deleteDirectory($directory, $preserve);
  8615. }
  8616. /**
  8617. * Remove all of the directories within a given directory.
  8618. *
  8619. * @param string $directory
  8620. * @return bool
  8621. * @static
  8622. */
  8623. public static function deleteDirectories($directory)
  8624. {
  8625. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8626. return $instance->deleteDirectories($directory);
  8627. }
  8628. /**
  8629. * Empty the specified directory of all files and folders.
  8630. *
  8631. * @param string $directory
  8632. * @return bool
  8633. * @static
  8634. */
  8635. public static function cleanDirectory($directory)
  8636. {
  8637. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8638. return $instance->cleanDirectory($directory);
  8639. }
  8640. /**
  8641. * Apply the callback if the given "value" is (or resolves to) truthy.
  8642. *
  8643. * @template TWhenParameter
  8644. * @template TWhenReturnType
  8645. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  8646. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  8647. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  8648. * @return $this|TWhenReturnType
  8649. * @static
  8650. */
  8651. public static function when($value = null, $callback = null, $default = null)
  8652. {
  8653. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8654. return $instance->when($value, $callback, $default);
  8655. }
  8656. /**
  8657. * Apply the callback if the given "value" is (or resolves to) falsy.
  8658. *
  8659. * @template TUnlessParameter
  8660. * @template TUnlessReturnType
  8661. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  8662. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  8663. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  8664. * @return $this|TUnlessReturnType
  8665. * @static
  8666. */
  8667. public static function unless($value = null, $callback = null, $default = null)
  8668. {
  8669. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8670. return $instance->unless($value, $callback, $default);
  8671. }
  8672. /**
  8673. * Register a custom macro.
  8674. *
  8675. * @param string $name
  8676. * @param object|callable $macro
  8677. * @param-closure-this static $macro
  8678. * @return void
  8679. * @static
  8680. */
  8681. public static function macro($name, $macro)
  8682. {
  8683. \Illuminate\Filesystem\Filesystem::macro($name, $macro);
  8684. }
  8685. /**
  8686. * Mix another object into the class.
  8687. *
  8688. * @param object $mixin
  8689. * @param bool $replace
  8690. * @return void
  8691. * @throws \ReflectionException
  8692. * @static
  8693. */
  8694. public static function mixin($mixin, $replace = true)
  8695. {
  8696. \Illuminate\Filesystem\Filesystem::mixin($mixin, $replace);
  8697. }
  8698. /**
  8699. * Checks if macro is registered.
  8700. *
  8701. * @param string $name
  8702. * @return bool
  8703. * @static
  8704. */
  8705. public static function hasMacro($name)
  8706. {
  8707. return \Illuminate\Filesystem\Filesystem::hasMacro($name);
  8708. }
  8709. /**
  8710. * Flush the existing macros.
  8711. *
  8712. * @return void
  8713. * @static
  8714. */
  8715. public static function flushMacros()
  8716. {
  8717. \Illuminate\Filesystem\Filesystem::flushMacros();
  8718. }
  8719. }
  8720. /**
  8721. * @see \Illuminate\Auth\Access\Gate
  8722. */
  8723. class Gate {
  8724. /**
  8725. * Determine if a given ability has been defined.
  8726. *
  8727. * @param string|array $ability
  8728. * @return bool
  8729. * @static
  8730. */
  8731. public static function has($ability)
  8732. {
  8733. /** @var \Illuminate\Auth\Access\Gate $instance */
  8734. return $instance->has($ability);
  8735. }
  8736. /**
  8737. * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is false.
  8738. *
  8739. * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition
  8740. * @param string|null $message
  8741. * @param string|null $code
  8742. * @return \Illuminate\Auth\Access\Response
  8743. * @throws \Illuminate\Auth\Access\AuthorizationException
  8744. * @static
  8745. */
  8746. public static function allowIf($condition, $message = null, $code = null)
  8747. {
  8748. /** @var \Illuminate\Auth\Access\Gate $instance */
  8749. return $instance->allowIf($condition, $message, $code);
  8750. }
  8751. /**
  8752. * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is true.
  8753. *
  8754. * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition
  8755. * @param string|null $message
  8756. * @param string|null $code
  8757. * @return \Illuminate\Auth\Access\Response
  8758. * @throws \Illuminate\Auth\Access\AuthorizationException
  8759. * @static
  8760. */
  8761. public static function denyIf($condition, $message = null, $code = null)
  8762. {
  8763. /** @var \Illuminate\Auth\Access\Gate $instance */
  8764. return $instance->denyIf($condition, $message, $code);
  8765. }
  8766. /**
  8767. * Define a new ability.
  8768. *
  8769. * @param \UnitEnum|string $ability
  8770. * @param callable|array|string $callback
  8771. * @return \Illuminate\Auth\Access\Gate
  8772. * @throws \InvalidArgumentException
  8773. * @static
  8774. */
  8775. public static function define($ability, $callback)
  8776. {
  8777. /** @var \Illuminate\Auth\Access\Gate $instance */
  8778. return $instance->define($ability, $callback);
  8779. }
  8780. /**
  8781. * Define abilities for a resource.
  8782. *
  8783. * @param string $name
  8784. * @param string $class
  8785. * @param array|null $abilities
  8786. * @return \Illuminate\Auth\Access\Gate
  8787. * @static
  8788. */
  8789. public static function resource($name, $class, $abilities = null)
  8790. {
  8791. /** @var \Illuminate\Auth\Access\Gate $instance */
  8792. return $instance->resource($name, $class, $abilities);
  8793. }
  8794. /**
  8795. * Define a policy class for a given class type.
  8796. *
  8797. * @param string $class
  8798. * @param string $policy
  8799. * @return \Illuminate\Auth\Access\Gate
  8800. * @static
  8801. */
  8802. public static function policy($class, $policy)
  8803. {
  8804. /** @var \Illuminate\Auth\Access\Gate $instance */
  8805. return $instance->policy($class, $policy);
  8806. }
  8807. /**
  8808. * Register a callback to run before all Gate checks.
  8809. *
  8810. * @param callable $callback
  8811. * @return \Illuminate\Auth\Access\Gate
  8812. * @static
  8813. */
  8814. public static function before($callback)
  8815. {
  8816. /** @var \Illuminate\Auth\Access\Gate $instance */
  8817. return $instance->before($callback);
  8818. }
  8819. /**
  8820. * Register a callback to run after all Gate checks.
  8821. *
  8822. * @param callable $callback
  8823. * @return \Illuminate\Auth\Access\Gate
  8824. * @static
  8825. */
  8826. public static function after($callback)
  8827. {
  8828. /** @var \Illuminate\Auth\Access\Gate $instance */
  8829. return $instance->after($callback);
  8830. }
  8831. /**
  8832. * Determine if all of the given abilities should be granted for the current user.
  8833. *
  8834. * @param iterable|\UnitEnum|string $ability
  8835. * @param array|mixed $arguments
  8836. * @return bool
  8837. * @static
  8838. */
  8839. public static function allows($ability, $arguments = [])
  8840. {
  8841. /** @var \Illuminate\Auth\Access\Gate $instance */
  8842. return $instance->allows($ability, $arguments);
  8843. }
  8844. /**
  8845. * Determine if any of the given abilities should be denied for the current user.
  8846. *
  8847. * @param iterable|\UnitEnum|string $ability
  8848. * @param array|mixed $arguments
  8849. * @return bool
  8850. * @static
  8851. */
  8852. public static function denies($ability, $arguments = [])
  8853. {
  8854. /** @var \Illuminate\Auth\Access\Gate $instance */
  8855. return $instance->denies($ability, $arguments);
  8856. }
  8857. /**
  8858. * Determine if all of the given abilities should be granted for the current user.
  8859. *
  8860. * @param iterable|\UnitEnum|string $abilities
  8861. * @param array|mixed $arguments
  8862. * @return bool
  8863. * @static
  8864. */
  8865. public static function check($abilities, $arguments = [])
  8866. {
  8867. /** @var \Illuminate\Auth\Access\Gate $instance */
  8868. return $instance->check($abilities, $arguments);
  8869. }
  8870. /**
  8871. * Determine if any one of the given abilities should be granted for the current user.
  8872. *
  8873. * @param iterable|\UnitEnum|string $abilities
  8874. * @param array|mixed $arguments
  8875. * @return bool
  8876. * @static
  8877. */
  8878. public static function any($abilities, $arguments = [])
  8879. {
  8880. /** @var \Illuminate\Auth\Access\Gate $instance */
  8881. return $instance->any($abilities, $arguments);
  8882. }
  8883. /**
  8884. * Determine if all of the given abilities should be denied for the current user.
  8885. *
  8886. * @param iterable|\UnitEnum|string $abilities
  8887. * @param array|mixed $arguments
  8888. * @return bool
  8889. * @static
  8890. */
  8891. public static function none($abilities, $arguments = [])
  8892. {
  8893. /** @var \Illuminate\Auth\Access\Gate $instance */
  8894. return $instance->none($abilities, $arguments);
  8895. }
  8896. /**
  8897. * Determine if the given ability should be granted for the current user.
  8898. *
  8899. * @param \UnitEnum|string $ability
  8900. * @param array|mixed $arguments
  8901. * @return \Illuminate\Auth\Access\Response
  8902. * @throws \Illuminate\Auth\Access\AuthorizationException
  8903. * @static
  8904. */
  8905. public static function authorize($ability, $arguments = [])
  8906. {
  8907. /** @var \Illuminate\Auth\Access\Gate $instance */
  8908. return $instance->authorize($ability, $arguments);
  8909. }
  8910. /**
  8911. * Inspect the user for the given ability.
  8912. *
  8913. * @param \UnitEnum|string $ability
  8914. * @param array|mixed $arguments
  8915. * @return \Illuminate\Auth\Access\Response
  8916. * @static
  8917. */
  8918. public static function inspect($ability, $arguments = [])
  8919. {
  8920. /** @var \Illuminate\Auth\Access\Gate $instance */
  8921. return $instance->inspect($ability, $arguments);
  8922. }
  8923. /**
  8924. * Get the raw result from the authorization callback.
  8925. *
  8926. * @param string $ability
  8927. * @param array|mixed $arguments
  8928. * @return mixed
  8929. * @throws \Illuminate\Auth\Access\AuthorizationException
  8930. * @static
  8931. */
  8932. public static function raw($ability, $arguments = [])
  8933. {
  8934. /** @var \Illuminate\Auth\Access\Gate $instance */
  8935. return $instance->raw($ability, $arguments);
  8936. }
  8937. /**
  8938. * Get a policy instance for a given class.
  8939. *
  8940. * @param object|string $class
  8941. * @return mixed
  8942. * @static
  8943. */
  8944. public static function getPolicyFor($class)
  8945. {
  8946. /** @var \Illuminate\Auth\Access\Gate $instance */
  8947. return $instance->getPolicyFor($class);
  8948. }
  8949. /**
  8950. * Specify a callback to be used to guess policy names.
  8951. *
  8952. * @param callable $callback
  8953. * @return \Illuminate\Auth\Access\Gate
  8954. * @static
  8955. */
  8956. public static function guessPolicyNamesUsing($callback)
  8957. {
  8958. /** @var \Illuminate\Auth\Access\Gate $instance */
  8959. return $instance->guessPolicyNamesUsing($callback);
  8960. }
  8961. /**
  8962. * Build a policy class instance of the given type.
  8963. *
  8964. * @param object|string $class
  8965. * @return mixed
  8966. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  8967. * @static
  8968. */
  8969. public static function resolvePolicy($class)
  8970. {
  8971. /** @var \Illuminate\Auth\Access\Gate $instance */
  8972. return $instance->resolvePolicy($class);
  8973. }
  8974. /**
  8975. * Get a gate instance for the given user.
  8976. *
  8977. * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user
  8978. * @return static
  8979. * @static
  8980. */
  8981. public static function forUser($user)
  8982. {
  8983. /** @var \Illuminate\Auth\Access\Gate $instance */
  8984. return $instance->forUser($user);
  8985. }
  8986. /**
  8987. * Get all of the defined abilities.
  8988. *
  8989. * @return array
  8990. * @static
  8991. */
  8992. public static function abilities()
  8993. {
  8994. /** @var \Illuminate\Auth\Access\Gate $instance */
  8995. return $instance->abilities();
  8996. }
  8997. /**
  8998. * Get all of the defined policies.
  8999. *
  9000. * @return array
  9001. * @static
  9002. */
  9003. public static function policies()
  9004. {
  9005. /** @var \Illuminate\Auth\Access\Gate $instance */
  9006. return $instance->policies();
  9007. }
  9008. /**
  9009. * Set the default denial response for gates and policies.
  9010. *
  9011. * @param \Illuminate\Auth\Access\Response $response
  9012. * @return \Illuminate\Auth\Access\Gate
  9013. * @static
  9014. */
  9015. public static function defaultDenialResponse($response)
  9016. {
  9017. /** @var \Illuminate\Auth\Access\Gate $instance */
  9018. return $instance->defaultDenialResponse($response);
  9019. }
  9020. /**
  9021. * Set the container instance used by the gate.
  9022. *
  9023. * @param \Illuminate\Contracts\Container\Container $container
  9024. * @return \Illuminate\Auth\Access\Gate
  9025. * @static
  9026. */
  9027. public static function setContainer($container)
  9028. {
  9029. /** @var \Illuminate\Auth\Access\Gate $instance */
  9030. return $instance->setContainer($container);
  9031. }
  9032. /**
  9033. * Deny with a HTTP status code.
  9034. *
  9035. * @param int $status
  9036. * @param string|null $message
  9037. * @param int|null $code
  9038. * @return \Illuminate\Auth\Access\Response
  9039. * @static
  9040. */
  9041. public static function denyWithStatus($status, $message = null, $code = null)
  9042. {
  9043. /** @var \Illuminate\Auth\Access\Gate $instance */
  9044. return $instance->denyWithStatus($status, $message, $code);
  9045. }
  9046. /**
  9047. * Deny with a 404 HTTP status code.
  9048. *
  9049. * @param string|null $message
  9050. * @param int|null $code
  9051. * @return \Illuminate\Auth\Access\Response
  9052. * @static
  9053. */
  9054. public static function denyAsNotFound($message = null, $code = null)
  9055. {
  9056. /** @var \Illuminate\Auth\Access\Gate $instance */
  9057. return $instance->denyAsNotFound($message, $code);
  9058. }
  9059. }
  9060. /**
  9061. * @see \Illuminate\Hashing\HashManager
  9062. * @see \Illuminate\Hashing\AbstractHasher
  9063. */
  9064. class Hash {
  9065. /**
  9066. * Create an instance of the Bcrypt hash Driver.
  9067. *
  9068. * @return \Illuminate\Hashing\BcryptHasher
  9069. * @static
  9070. */
  9071. public static function createBcryptDriver()
  9072. {
  9073. /** @var \Illuminate\Hashing\HashManager $instance */
  9074. return $instance->createBcryptDriver();
  9075. }
  9076. /**
  9077. * Create an instance of the Argon2i hash Driver.
  9078. *
  9079. * @return \Illuminate\Hashing\ArgonHasher
  9080. * @static
  9081. */
  9082. public static function createArgonDriver()
  9083. {
  9084. /** @var \Illuminate\Hashing\HashManager $instance */
  9085. return $instance->createArgonDriver();
  9086. }
  9087. /**
  9088. * Create an instance of the Argon2id hash Driver.
  9089. *
  9090. * @return \Illuminate\Hashing\Argon2IdHasher
  9091. * @static
  9092. */
  9093. public static function createArgon2idDriver()
  9094. {
  9095. /** @var \Illuminate\Hashing\HashManager $instance */
  9096. return $instance->createArgon2idDriver();
  9097. }
  9098. /**
  9099. * Get information about the given hashed value.
  9100. *
  9101. * @param string $hashedValue
  9102. * @return array
  9103. * @static
  9104. */
  9105. public static function info($hashedValue)
  9106. {
  9107. /** @var \Illuminate\Hashing\HashManager $instance */
  9108. return $instance->info($hashedValue);
  9109. }
  9110. /**
  9111. * Hash the given value.
  9112. *
  9113. * @param string $value
  9114. * @param array $options
  9115. * @return string
  9116. * @static
  9117. */
  9118. public static function make($value, $options = [])
  9119. {
  9120. /** @var \Illuminate\Hashing\HashManager $instance */
  9121. return $instance->make($value, $options);
  9122. }
  9123. /**
  9124. * Check the given plain value against a hash.
  9125. *
  9126. * @param string $value
  9127. * @param string $hashedValue
  9128. * @param array $options
  9129. * @return bool
  9130. * @static
  9131. */
  9132. public static function check($value, $hashedValue, $options = [])
  9133. {
  9134. /** @var \Illuminate\Hashing\HashManager $instance */
  9135. return $instance->check($value, $hashedValue, $options);
  9136. }
  9137. /**
  9138. * Check if the given hash has been hashed using the given options.
  9139. *
  9140. * @param string $hashedValue
  9141. * @param array $options
  9142. * @return bool
  9143. * @static
  9144. */
  9145. public static function needsRehash($hashedValue, $options = [])
  9146. {
  9147. /** @var \Illuminate\Hashing\HashManager $instance */
  9148. return $instance->needsRehash($hashedValue, $options);
  9149. }
  9150. /**
  9151. * Determine if a given string is already hashed.
  9152. *
  9153. * @param string $value
  9154. * @return bool
  9155. * @static
  9156. */
  9157. public static function isHashed($value)
  9158. {
  9159. /** @var \Illuminate\Hashing\HashManager $instance */
  9160. return $instance->isHashed($value);
  9161. }
  9162. /**
  9163. * Get the default driver name.
  9164. *
  9165. * @return string
  9166. * @static
  9167. */
  9168. public static function getDefaultDriver()
  9169. {
  9170. /** @var \Illuminate\Hashing\HashManager $instance */
  9171. return $instance->getDefaultDriver();
  9172. }
  9173. /**
  9174. * Verifies that the configuration is less than or equal to what is configured.
  9175. *
  9176. * @param array $value
  9177. * @return bool
  9178. * @internal
  9179. * @static
  9180. */
  9181. public static function verifyConfiguration($value)
  9182. {
  9183. /** @var \Illuminate\Hashing\HashManager $instance */
  9184. return $instance->verifyConfiguration($value);
  9185. }
  9186. /**
  9187. * Get a driver instance.
  9188. *
  9189. * @param string|null $driver
  9190. * @return mixed
  9191. * @throws \InvalidArgumentException
  9192. * @static
  9193. */
  9194. public static function driver($driver = null)
  9195. {
  9196. //Method inherited from \Illuminate\Support\Manager
  9197. /** @var \Illuminate\Hashing\HashManager $instance */
  9198. return $instance->driver($driver);
  9199. }
  9200. /**
  9201. * Register a custom driver creator Closure.
  9202. *
  9203. * @param string $driver
  9204. * @param \Closure $callback
  9205. * @return \Illuminate\Hashing\HashManager
  9206. * @static
  9207. */
  9208. public static function extend($driver, $callback)
  9209. {
  9210. //Method inherited from \Illuminate\Support\Manager
  9211. /** @var \Illuminate\Hashing\HashManager $instance */
  9212. return $instance->extend($driver, $callback);
  9213. }
  9214. /**
  9215. * Get all of the created "drivers".
  9216. *
  9217. * @return array
  9218. * @static
  9219. */
  9220. public static function getDrivers()
  9221. {
  9222. //Method inherited from \Illuminate\Support\Manager
  9223. /** @var \Illuminate\Hashing\HashManager $instance */
  9224. return $instance->getDrivers();
  9225. }
  9226. /**
  9227. * Get the container instance used by the manager.
  9228. *
  9229. * @return \Illuminate\Contracts\Container\Container
  9230. * @static
  9231. */
  9232. public static function getContainer()
  9233. {
  9234. //Method inherited from \Illuminate\Support\Manager
  9235. /** @var \Illuminate\Hashing\HashManager $instance */
  9236. return $instance->getContainer();
  9237. }
  9238. /**
  9239. * Set the container instance used by the manager.
  9240. *
  9241. * @param \Illuminate\Contracts\Container\Container $container
  9242. * @return \Illuminate\Hashing\HashManager
  9243. * @static
  9244. */
  9245. public static function setContainer($container)
  9246. {
  9247. //Method inherited from \Illuminate\Support\Manager
  9248. /** @var \Illuminate\Hashing\HashManager $instance */
  9249. return $instance->setContainer($container);
  9250. }
  9251. /**
  9252. * Forget all of the resolved driver instances.
  9253. *
  9254. * @return \Illuminate\Hashing\HashManager
  9255. * @static
  9256. */
  9257. public static function forgetDrivers()
  9258. {
  9259. //Method inherited from \Illuminate\Support\Manager
  9260. /** @var \Illuminate\Hashing\HashManager $instance */
  9261. return $instance->forgetDrivers();
  9262. }
  9263. }
  9264. /**
  9265. * @method static \Illuminate\Http\Client\PendingRequest baseUrl(string $url)
  9266. * @method static \Illuminate\Http\Client\PendingRequest withBody(\Psr\Http\Message\StreamInterface|string $content, string $contentType = 'application/json')
  9267. * @method static \Illuminate\Http\Client\PendingRequest asJson()
  9268. * @method static \Illuminate\Http\Client\PendingRequest asForm()
  9269. * @method static \Illuminate\Http\Client\PendingRequest attach(string|array $name, string|resource $contents = '', string|null $filename = null, array $headers = [])
  9270. * @method static \Illuminate\Http\Client\PendingRequest asMultipart()
  9271. * @method static \Illuminate\Http\Client\PendingRequest bodyFormat(string $format)
  9272. * @method static \Illuminate\Http\Client\PendingRequest withQueryParameters(array $parameters)
  9273. * @method static \Illuminate\Http\Client\PendingRequest contentType(string $contentType)
  9274. * @method static \Illuminate\Http\Client\PendingRequest acceptJson()
  9275. * @method static \Illuminate\Http\Client\PendingRequest accept(string $contentType)
  9276. * @method static \Illuminate\Http\Client\PendingRequest withHeaders(array $headers)
  9277. * @method static \Illuminate\Http\Client\PendingRequest withHeader(string $name, mixed $value)
  9278. * @method static \Illuminate\Http\Client\PendingRequest replaceHeaders(array $headers)
  9279. * @method static \Illuminate\Http\Client\PendingRequest withBasicAuth(string $username, string $password)
  9280. * @method static \Illuminate\Http\Client\PendingRequest withDigestAuth(string $username, string $password)
  9281. * @method static \Illuminate\Http\Client\PendingRequest withToken(string $token, string $type = 'Bearer')
  9282. * @method static \Illuminate\Http\Client\PendingRequest withUserAgent(string|bool $userAgent)
  9283. * @method static \Illuminate\Http\Client\PendingRequest withUrlParameters(array $parameters = [])
  9284. * @method static \Illuminate\Http\Client\PendingRequest withCookies(array $cookies, string $domain)
  9285. * @method static \Illuminate\Http\Client\PendingRequest maxRedirects(int $max)
  9286. * @method static \Illuminate\Http\Client\PendingRequest withoutRedirecting()
  9287. * @method static \Illuminate\Http\Client\PendingRequest withoutVerifying()
  9288. * @method static \Illuminate\Http\Client\PendingRequest sink(string|resource $to)
  9289. * @method static \Illuminate\Http\Client\PendingRequest timeout(int|float $seconds)
  9290. * @method static \Illuminate\Http\Client\PendingRequest connectTimeout(int|float $seconds)
  9291. * @method static \Illuminate\Http\Client\PendingRequest retry(array|int $times, \Closure|int $sleepMilliseconds = 0, callable|null $when = null, bool $throw = true)
  9292. * @method static \Illuminate\Http\Client\PendingRequest withOptions(array $options)
  9293. * @method static \Illuminate\Http\Client\PendingRequest withMiddleware(callable $middleware)
  9294. * @method static \Illuminate\Http\Client\PendingRequest withRequestMiddleware(callable $middleware)
  9295. * @method static \Illuminate\Http\Client\PendingRequest withResponseMiddleware(callable $middleware)
  9296. * @method static \Illuminate\Http\Client\PendingRequest beforeSending(callable $callback)
  9297. * @method static \Illuminate\Http\Client\PendingRequest throw(callable|null $callback = null)
  9298. * @method static \Illuminate\Http\Client\PendingRequest throwIf(callable|bool $condition)
  9299. * @method static \Illuminate\Http\Client\PendingRequest throwUnless(callable|bool $condition)
  9300. * @method static \Illuminate\Http\Client\PendingRequest dump()
  9301. * @method static \Illuminate\Http\Client\PendingRequest dd()
  9302. * @method static \Illuminate\Http\Client\Response get(string $url, array|string|null $query = null)
  9303. * @method static \Illuminate\Http\Client\Response head(string $url, array|string|null $query = null)
  9304. * @method static \Illuminate\Http\Client\Response post(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9305. * @method static \Illuminate\Http\Client\Response patch(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9306. * @method static \Illuminate\Http\Client\Response put(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9307. * @method static \Illuminate\Http\Client\Response delete(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9308. * @method static array pool(callable $callback)
  9309. * @method static \Illuminate\Http\Client\Response send(string $method, string $url, array $options = [])
  9310. * @method static \GuzzleHttp\Client buildClient()
  9311. * @method static \GuzzleHttp\Client createClient(\GuzzleHttp\HandlerStack $handlerStack)
  9312. * @method static \GuzzleHttp\HandlerStack buildHandlerStack()
  9313. * @method static \GuzzleHttp\HandlerStack pushHandlers(\GuzzleHttp\HandlerStack $handlerStack)
  9314. * @method static \Closure buildBeforeSendingHandler()
  9315. * @method static \Closure buildRecorderHandler()
  9316. * @method static \Closure buildStubHandler()
  9317. * @method static \GuzzleHttp\Psr7\RequestInterface runBeforeSendingCallbacks(\GuzzleHttp\Psr7\RequestInterface $request, array $options)
  9318. * @method static array mergeOptions(array ...$options)
  9319. * @method static \Illuminate\Http\Client\PendingRequest stub(callable $callback)
  9320. * @method static \Illuminate\Http\Client\PendingRequest async(bool $async = true)
  9321. * @method static \GuzzleHttp\Promise\PromiseInterface|null getPromise()
  9322. * @method static \Illuminate\Http\Client\PendingRequest truncateExceptionsAt(int $length)
  9323. * @method static \Illuminate\Http\Client\PendingRequest dontTruncateExceptions()
  9324. * @method static \Illuminate\Http\Client\PendingRequest setClient(\GuzzleHttp\Client $client)
  9325. * @method static \Illuminate\Http\Client\PendingRequest setHandler(callable $handler)
  9326. * @method static array getOptions()
  9327. * @method static \Illuminate\Http\Client\PendingRequest|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  9328. * @method static \Illuminate\Http\Client\PendingRequest|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  9329. * @see \Illuminate\Http\Client\Factory
  9330. */
  9331. class Http {
  9332. /**
  9333. * Add middleware to apply to every request.
  9334. *
  9335. * @param callable $middleware
  9336. * @return \Illuminate\Http\Client\Factory
  9337. * @static
  9338. */
  9339. public static function globalMiddleware($middleware)
  9340. {
  9341. /** @var \Illuminate\Http\Client\Factory $instance */
  9342. return $instance->globalMiddleware($middleware);
  9343. }
  9344. /**
  9345. * Add request middleware to apply to every request.
  9346. *
  9347. * @param callable $middleware
  9348. * @return \Illuminate\Http\Client\Factory
  9349. * @static
  9350. */
  9351. public static function globalRequestMiddleware($middleware)
  9352. {
  9353. /** @var \Illuminate\Http\Client\Factory $instance */
  9354. return $instance->globalRequestMiddleware($middleware);
  9355. }
  9356. /**
  9357. * Add response middleware to apply to every request.
  9358. *
  9359. * @param callable $middleware
  9360. * @return \Illuminate\Http\Client\Factory
  9361. * @static
  9362. */
  9363. public static function globalResponseMiddleware($middleware)
  9364. {
  9365. /** @var \Illuminate\Http\Client\Factory $instance */
  9366. return $instance->globalResponseMiddleware($middleware);
  9367. }
  9368. /**
  9369. * Set the options to apply to every request.
  9370. *
  9371. * @param \Closure|array $options
  9372. * @return \Illuminate\Http\Client\Factory
  9373. * @static
  9374. */
  9375. public static function globalOptions($options)
  9376. {
  9377. /** @var \Illuminate\Http\Client\Factory $instance */
  9378. return $instance->globalOptions($options);
  9379. }
  9380. /**
  9381. * Create a new response instance for use during stubbing.
  9382. *
  9383. * @param array|string|null $body
  9384. * @param int $status
  9385. * @param array $headers
  9386. * @return \GuzzleHttp\Promise\PromiseInterface
  9387. * @static
  9388. */
  9389. public static function response($body = null, $status = 200, $headers = [])
  9390. {
  9391. return \Illuminate\Http\Client\Factory::response($body, $status, $headers);
  9392. }
  9393. /**
  9394. * Create a new PSR-7 response instance for use during stubbing.
  9395. *
  9396. * @param array|string|null $body
  9397. * @param int $status
  9398. * @param array<string, mixed> $headers
  9399. * @return \GuzzleHttp\Psr7\Response
  9400. * @static
  9401. */
  9402. public static function psr7Response($body = null, $status = 200, $headers = [])
  9403. {
  9404. return \Illuminate\Http\Client\Factory::psr7Response($body, $status, $headers);
  9405. }
  9406. /**
  9407. * Create a new RequestException instance for use during stubbing.
  9408. *
  9409. * @param array|string|null $body
  9410. * @param int $status
  9411. * @param array<string, mixed> $headers
  9412. * @return \Illuminate\Http\Client\RequestException
  9413. * @static
  9414. */
  9415. public static function failedRequest($body = null, $status = 200, $headers = [])
  9416. {
  9417. return \Illuminate\Http\Client\Factory::failedRequest($body, $status, $headers);
  9418. }
  9419. /**
  9420. * Create a new connection exception for use during stubbing.
  9421. *
  9422. * @param string|null $message
  9423. * @return \Closure(\Illuminate\Http\Client\Request): \GuzzleHttp\Promise\PromiseInterface
  9424. * @static
  9425. */
  9426. public static function failedConnection($message = null)
  9427. {
  9428. return \Illuminate\Http\Client\Factory::failedConnection($message);
  9429. }
  9430. /**
  9431. * Get an invokable object that returns a sequence of responses in order for use during stubbing.
  9432. *
  9433. * @param array $responses
  9434. * @return \Illuminate\Http\Client\ResponseSequence
  9435. * @static
  9436. */
  9437. public static function sequence($responses = [])
  9438. {
  9439. /** @var \Illuminate\Http\Client\Factory $instance */
  9440. return $instance->sequence($responses);
  9441. }
  9442. /**
  9443. * Register a stub callable that will intercept requests and be able to return stub responses.
  9444. *
  9445. * @param callable|array<string, mixed>|null $callback
  9446. * @return \Illuminate\Http\Client\Factory
  9447. * @static
  9448. */
  9449. public static function fake($callback = null)
  9450. {
  9451. /** @var \Illuminate\Http\Client\Factory $instance */
  9452. return $instance->fake($callback);
  9453. }
  9454. /**
  9455. * Register a response sequence for the given URL pattern.
  9456. *
  9457. * @param string $url
  9458. * @return \Illuminate\Http\Client\ResponseSequence
  9459. * @static
  9460. */
  9461. public static function fakeSequence($url = '*')
  9462. {
  9463. /** @var \Illuminate\Http\Client\Factory $instance */
  9464. return $instance->fakeSequence($url);
  9465. }
  9466. /**
  9467. * Stub the given URL using the given callback.
  9468. *
  9469. * @param string $url
  9470. * @param \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface|callable|int|string|array|\Illuminate\Http\Client\ResponseSequence $callback
  9471. * @return \Illuminate\Http\Client\Factory
  9472. * @static
  9473. */
  9474. public static function stubUrl($url, $callback)
  9475. {
  9476. /** @var \Illuminate\Http\Client\Factory $instance */
  9477. return $instance->stubUrl($url, $callback);
  9478. }
  9479. /**
  9480. * Indicate that an exception should be thrown if any request is not faked.
  9481. *
  9482. * @param bool $prevent
  9483. * @return \Illuminate\Http\Client\Factory
  9484. * @static
  9485. */
  9486. public static function preventStrayRequests($prevent = true)
  9487. {
  9488. /** @var \Illuminate\Http\Client\Factory $instance */
  9489. return $instance->preventStrayRequests($prevent);
  9490. }
  9491. /**
  9492. * Determine if stray requests are being prevented.
  9493. *
  9494. * @return bool
  9495. * @static
  9496. */
  9497. public static function preventingStrayRequests()
  9498. {
  9499. /** @var \Illuminate\Http\Client\Factory $instance */
  9500. return $instance->preventingStrayRequests();
  9501. }
  9502. /**
  9503. * Indicate that an exception should not be thrown if any request is not faked.
  9504. *
  9505. * @return \Illuminate\Http\Client\Factory
  9506. * @static
  9507. */
  9508. public static function allowStrayRequests()
  9509. {
  9510. /** @var \Illuminate\Http\Client\Factory $instance */
  9511. return $instance->allowStrayRequests();
  9512. }
  9513. /**
  9514. * Begin recording request / response pairs.
  9515. *
  9516. * @return \Illuminate\Http\Client\Factory
  9517. * @static
  9518. */
  9519. public static function record()
  9520. {
  9521. /** @var \Illuminate\Http\Client\Factory $instance */
  9522. return $instance->record();
  9523. }
  9524. /**
  9525. * Record a request response pair.
  9526. *
  9527. * @param \Illuminate\Http\Client\Request $request
  9528. * @param \Illuminate\Http\Client\Response|null $response
  9529. * @return void
  9530. * @static
  9531. */
  9532. public static function recordRequestResponsePair($request, $response)
  9533. {
  9534. /** @var \Illuminate\Http\Client\Factory $instance */
  9535. $instance->recordRequestResponsePair($request, $response);
  9536. }
  9537. /**
  9538. * Assert that a request / response pair was recorded matching a given truth test.
  9539. *
  9540. * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
  9541. * @return void
  9542. * @static
  9543. */
  9544. public static function assertSent($callback)
  9545. {
  9546. /** @var \Illuminate\Http\Client\Factory $instance */
  9547. $instance->assertSent($callback);
  9548. }
  9549. /**
  9550. * Assert that the given request was sent in the given order.
  9551. *
  9552. * @param list<string|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)|callable> $callbacks
  9553. * @return void
  9554. * @static
  9555. */
  9556. public static function assertSentInOrder($callbacks)
  9557. {
  9558. /** @var \Illuminate\Http\Client\Factory $instance */
  9559. $instance->assertSentInOrder($callbacks);
  9560. }
  9561. /**
  9562. * Assert that a request / response pair was not recorded matching a given truth test.
  9563. *
  9564. * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
  9565. * @return void
  9566. * @static
  9567. */
  9568. public static function assertNotSent($callback)
  9569. {
  9570. /** @var \Illuminate\Http\Client\Factory $instance */
  9571. $instance->assertNotSent($callback);
  9572. }
  9573. /**
  9574. * Assert that no request / response pair was recorded.
  9575. *
  9576. * @return void
  9577. * @static
  9578. */
  9579. public static function assertNothingSent()
  9580. {
  9581. /** @var \Illuminate\Http\Client\Factory $instance */
  9582. $instance->assertNothingSent();
  9583. }
  9584. /**
  9585. * Assert how many requests have been recorded.
  9586. *
  9587. * @param int $count
  9588. * @return void
  9589. * @static
  9590. */
  9591. public static function assertSentCount($count)
  9592. {
  9593. /** @var \Illuminate\Http\Client\Factory $instance */
  9594. $instance->assertSentCount($count);
  9595. }
  9596. /**
  9597. * Assert that every created response sequence is empty.
  9598. *
  9599. * @return void
  9600. * @static
  9601. */
  9602. public static function assertSequencesAreEmpty()
  9603. {
  9604. /** @var \Illuminate\Http\Client\Factory $instance */
  9605. $instance->assertSequencesAreEmpty();
  9606. }
  9607. /**
  9608. * Get a collection of the request / response pairs matching the given truth test.
  9609. *
  9610. * @param (\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)|callable $callback
  9611. * @return \Illuminate\Support\Collection<int, array{0: \Illuminate\Http\Client\Request, 1: \Illuminate\Http\Client\Response|null}>
  9612. * @static
  9613. */
  9614. public static function recorded($callback = null)
  9615. {
  9616. /** @var \Illuminate\Http\Client\Factory $instance */
  9617. return $instance->recorded($callback);
  9618. }
  9619. /**
  9620. * Create a new pending request instance for this factory.
  9621. *
  9622. * @return \Illuminate\Http\Client\PendingRequest
  9623. * @static
  9624. */
  9625. public static function createPendingRequest()
  9626. {
  9627. /** @var \Illuminate\Http\Client\Factory $instance */
  9628. return $instance->createPendingRequest();
  9629. }
  9630. /**
  9631. * Get the current event dispatcher implementation.
  9632. *
  9633. * @return \Illuminate\Contracts\Events\Dispatcher|null
  9634. * @static
  9635. */
  9636. public static function getDispatcher()
  9637. {
  9638. /** @var \Illuminate\Http\Client\Factory $instance */
  9639. return $instance->getDispatcher();
  9640. }
  9641. /**
  9642. * Get the array of global middleware.
  9643. *
  9644. * @return array
  9645. * @static
  9646. */
  9647. public static function getGlobalMiddleware()
  9648. {
  9649. /** @var \Illuminate\Http\Client\Factory $instance */
  9650. return $instance->getGlobalMiddleware();
  9651. }
  9652. /**
  9653. * Register a custom macro.
  9654. *
  9655. * @param string $name
  9656. * @param object|callable $macro
  9657. * @param-closure-this static $macro
  9658. * @return void
  9659. * @static
  9660. */
  9661. public static function macro($name, $macro)
  9662. {
  9663. \Illuminate\Http\Client\Factory::macro($name, $macro);
  9664. }
  9665. /**
  9666. * Mix another object into the class.
  9667. *
  9668. * @param object $mixin
  9669. * @param bool $replace
  9670. * @return void
  9671. * @throws \ReflectionException
  9672. * @static
  9673. */
  9674. public static function mixin($mixin, $replace = true)
  9675. {
  9676. \Illuminate\Http\Client\Factory::mixin($mixin, $replace);
  9677. }
  9678. /**
  9679. * Checks if macro is registered.
  9680. *
  9681. * @param string $name
  9682. * @return bool
  9683. * @static
  9684. */
  9685. public static function hasMacro($name)
  9686. {
  9687. return \Illuminate\Http\Client\Factory::hasMacro($name);
  9688. }
  9689. /**
  9690. * Flush the existing macros.
  9691. *
  9692. * @return void
  9693. * @static
  9694. */
  9695. public static function flushMacros()
  9696. {
  9697. \Illuminate\Http\Client\Factory::flushMacros();
  9698. }
  9699. /**
  9700. * Dynamically handle calls to the class.
  9701. *
  9702. * @param string $method
  9703. * @param array $parameters
  9704. * @return mixed
  9705. * @throws \BadMethodCallException
  9706. * @static
  9707. */
  9708. public static function macroCall($method, $parameters)
  9709. {
  9710. /** @var \Illuminate\Http\Client\Factory $instance */
  9711. return $instance->macroCall($method, $parameters);
  9712. }
  9713. }
  9714. /**
  9715. * @see \Illuminate\Translation\Translator
  9716. */
  9717. class Lang {
  9718. /**
  9719. * Determine if a translation exists for a given locale.
  9720. *
  9721. * @param string $key
  9722. * @param string|null $locale
  9723. * @return bool
  9724. * @static
  9725. */
  9726. public static function hasForLocale($key, $locale = null)
  9727. {
  9728. /** @var \Illuminate\Translation\Translator $instance */
  9729. return $instance->hasForLocale($key, $locale);
  9730. }
  9731. /**
  9732. * Determine if a translation exists.
  9733. *
  9734. * @param string $key
  9735. * @param string|null $locale
  9736. * @param bool $fallback
  9737. * @return bool
  9738. * @static
  9739. */
  9740. public static function has($key, $locale = null, $fallback = true)
  9741. {
  9742. /** @var \Illuminate\Translation\Translator $instance */
  9743. return $instance->has($key, $locale, $fallback);
  9744. }
  9745. /**
  9746. * Get the translation for the given key.
  9747. *
  9748. * @param string $key
  9749. * @param array $replace
  9750. * @param string|null $locale
  9751. * @param bool $fallback
  9752. * @return string|array
  9753. * @static
  9754. */
  9755. public static function get($key, $replace = [], $locale = null, $fallback = true)
  9756. {
  9757. /** @var \Illuminate\Translation\Translator $instance */
  9758. return $instance->get($key, $replace, $locale, $fallback);
  9759. }
  9760. /**
  9761. * Get a translation according to an integer value.
  9762. *
  9763. * @param string $key
  9764. * @param \Countable|int|float|array $number
  9765. * @param array $replace
  9766. * @param string|null $locale
  9767. * @return string
  9768. * @static
  9769. */
  9770. public static function choice($key, $number, $replace = [], $locale = null)
  9771. {
  9772. /** @var \Illuminate\Translation\Translator $instance */
  9773. return $instance->choice($key, $number, $replace, $locale);
  9774. }
  9775. /**
  9776. * Add translation lines to the given locale.
  9777. *
  9778. * @param array $lines
  9779. * @param string $locale
  9780. * @param string $namespace
  9781. * @return void
  9782. * @static
  9783. */
  9784. public static function addLines($lines, $locale, $namespace = '*')
  9785. {
  9786. /** @var \Illuminate\Translation\Translator $instance */
  9787. $instance->addLines($lines, $locale, $namespace);
  9788. }
  9789. /**
  9790. * Load the specified language group.
  9791. *
  9792. * @param string $namespace
  9793. * @param string $group
  9794. * @param string $locale
  9795. * @return void
  9796. * @static
  9797. */
  9798. public static function load($namespace, $group, $locale)
  9799. {
  9800. /** @var \Illuminate\Translation\Translator $instance */
  9801. $instance->load($namespace, $group, $locale);
  9802. }
  9803. /**
  9804. * Register a callback that is responsible for handling missing translation keys.
  9805. *
  9806. * @param callable|null $callback
  9807. * @return static
  9808. * @static
  9809. */
  9810. public static function handleMissingKeysUsing($callback)
  9811. {
  9812. /** @var \Illuminate\Translation\Translator $instance */
  9813. return $instance->handleMissingKeysUsing($callback);
  9814. }
  9815. /**
  9816. * Add a new namespace to the loader.
  9817. *
  9818. * @param string $namespace
  9819. * @param string $hint
  9820. * @return void
  9821. * @static
  9822. */
  9823. public static function addNamespace($namespace, $hint)
  9824. {
  9825. /** @var \Illuminate\Translation\Translator $instance */
  9826. $instance->addNamespace($namespace, $hint);
  9827. }
  9828. /**
  9829. * Add a new path to the loader.
  9830. *
  9831. * @param string $path
  9832. * @return void
  9833. * @static
  9834. */
  9835. public static function addPath($path)
  9836. {
  9837. /** @var \Illuminate\Translation\Translator $instance */
  9838. $instance->addPath($path);
  9839. }
  9840. /**
  9841. * Add a new JSON path to the loader.
  9842. *
  9843. * @param string $path
  9844. * @return void
  9845. * @static
  9846. */
  9847. public static function addJsonPath($path)
  9848. {
  9849. /** @var \Illuminate\Translation\Translator $instance */
  9850. $instance->addJsonPath($path);
  9851. }
  9852. /**
  9853. * Parse a key into namespace, group, and item.
  9854. *
  9855. * @param string $key
  9856. * @return array
  9857. * @static
  9858. */
  9859. public static function parseKey($key)
  9860. {
  9861. /** @var \Illuminate\Translation\Translator $instance */
  9862. return $instance->parseKey($key);
  9863. }
  9864. /**
  9865. * Specify a callback that should be invoked to determined the applicable locale array.
  9866. *
  9867. * @param callable $callback
  9868. * @return void
  9869. * @static
  9870. */
  9871. public static function determineLocalesUsing($callback)
  9872. {
  9873. /** @var \Illuminate\Translation\Translator $instance */
  9874. $instance->determineLocalesUsing($callback);
  9875. }
  9876. /**
  9877. * Get the message selector instance.
  9878. *
  9879. * @return \Illuminate\Translation\MessageSelector
  9880. * @static
  9881. */
  9882. public static function getSelector()
  9883. {
  9884. /** @var \Illuminate\Translation\Translator $instance */
  9885. return $instance->getSelector();
  9886. }
  9887. /**
  9888. * Set the message selector instance.
  9889. *
  9890. * @param \Illuminate\Translation\MessageSelector $selector
  9891. * @return void
  9892. * @static
  9893. */
  9894. public static function setSelector($selector)
  9895. {
  9896. /** @var \Illuminate\Translation\Translator $instance */
  9897. $instance->setSelector($selector);
  9898. }
  9899. /**
  9900. * Get the language line loader implementation.
  9901. *
  9902. * @return \Illuminate\Contracts\Translation\Loader
  9903. * @static
  9904. */
  9905. public static function getLoader()
  9906. {
  9907. /** @var \Illuminate\Translation\Translator $instance */
  9908. return $instance->getLoader();
  9909. }
  9910. /**
  9911. * Get the default locale being used.
  9912. *
  9913. * @return string
  9914. * @static
  9915. */
  9916. public static function locale()
  9917. {
  9918. /** @var \Illuminate\Translation\Translator $instance */
  9919. return $instance->locale();
  9920. }
  9921. /**
  9922. * Get the default locale being used.
  9923. *
  9924. * @return string
  9925. * @static
  9926. */
  9927. public static function getLocale()
  9928. {
  9929. /** @var \Illuminate\Translation\Translator $instance */
  9930. return $instance->getLocale();
  9931. }
  9932. /**
  9933. * Set the default locale.
  9934. *
  9935. * @param string $locale
  9936. * @return void
  9937. * @throws \InvalidArgumentException
  9938. * @static
  9939. */
  9940. public static function setLocale($locale)
  9941. {
  9942. /** @var \Illuminate\Translation\Translator $instance */
  9943. $instance->setLocale($locale);
  9944. }
  9945. /**
  9946. * Get the fallback locale being used.
  9947. *
  9948. * @return string
  9949. * @static
  9950. */
  9951. public static function getFallback()
  9952. {
  9953. /** @var \Illuminate\Translation\Translator $instance */
  9954. return $instance->getFallback();
  9955. }
  9956. /**
  9957. * Set the fallback locale being used.
  9958. *
  9959. * @param string $fallback
  9960. * @return void
  9961. * @static
  9962. */
  9963. public static function setFallback($fallback)
  9964. {
  9965. /** @var \Illuminate\Translation\Translator $instance */
  9966. $instance->setFallback($fallback);
  9967. }
  9968. /**
  9969. * Set the loaded translation groups.
  9970. *
  9971. * @param array $loaded
  9972. * @return void
  9973. * @static
  9974. */
  9975. public static function setLoaded($loaded)
  9976. {
  9977. /** @var \Illuminate\Translation\Translator $instance */
  9978. $instance->setLoaded($loaded);
  9979. }
  9980. /**
  9981. * Add a handler to be executed in order to format a given class to a string during translation replacements.
  9982. *
  9983. * @param callable|string $class
  9984. * @param callable|null $handler
  9985. * @return void
  9986. * @static
  9987. */
  9988. public static function stringable($class, $handler = null)
  9989. {
  9990. /** @var \Illuminate\Translation\Translator $instance */
  9991. $instance->stringable($class, $handler);
  9992. }
  9993. /**
  9994. * Set the parsed value of a key.
  9995. *
  9996. * @param string $key
  9997. * @param array $parsed
  9998. * @return void
  9999. * @static
  10000. */
  10001. public static function setParsedKey($key, $parsed)
  10002. {
  10003. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  10004. /** @var \Illuminate\Translation\Translator $instance */
  10005. $instance->setParsedKey($key, $parsed);
  10006. }
  10007. /**
  10008. * Flush the cache of parsed keys.
  10009. *
  10010. * @return void
  10011. * @static
  10012. */
  10013. public static function flushParsedKeys()
  10014. {
  10015. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  10016. /** @var \Illuminate\Translation\Translator $instance */
  10017. $instance->flushParsedKeys();
  10018. }
  10019. /**
  10020. * Register a custom macro.
  10021. *
  10022. * @param string $name
  10023. * @param object|callable $macro
  10024. * @param-closure-this static $macro
  10025. * @return void
  10026. * @static
  10027. */
  10028. public static function macro($name, $macro)
  10029. {
  10030. \Illuminate\Translation\Translator::macro($name, $macro);
  10031. }
  10032. /**
  10033. * Mix another object into the class.
  10034. *
  10035. * @param object $mixin
  10036. * @param bool $replace
  10037. * @return void
  10038. * @throws \ReflectionException
  10039. * @static
  10040. */
  10041. public static function mixin($mixin, $replace = true)
  10042. {
  10043. \Illuminate\Translation\Translator::mixin($mixin, $replace);
  10044. }
  10045. /**
  10046. * Checks if macro is registered.
  10047. *
  10048. * @param string $name
  10049. * @return bool
  10050. * @static
  10051. */
  10052. public static function hasMacro($name)
  10053. {
  10054. return \Illuminate\Translation\Translator::hasMacro($name);
  10055. }
  10056. /**
  10057. * Flush the existing macros.
  10058. *
  10059. * @return void
  10060. * @static
  10061. */
  10062. public static function flushMacros()
  10063. {
  10064. \Illuminate\Translation\Translator::flushMacros();
  10065. }
  10066. }
  10067. /**
  10068. * @method static void write(string $level, \Illuminate\Contracts\Support\Arrayable|\Illuminate\Contracts\Support\Jsonable|\Illuminate\Support\Stringable|array|string $message, array $context = [])
  10069. * @method static \Illuminate\Log\Logger withContext(array $context = [])
  10070. * @method static void listen(\Closure $callback)
  10071. * @method static \Psr\Log\LoggerInterface getLogger()
  10072. * @method static \Illuminate\Contracts\Events\Dispatcher getEventDispatcher()
  10073. * @method static void setEventDispatcher(\Illuminate\Contracts\Events\Dispatcher $dispatcher)
  10074. * @method static \Illuminate\Log\Logger|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  10075. * @method static \Illuminate\Log\Logger|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  10076. * @see \Illuminate\Log\LogManager
  10077. */
  10078. class Log {
  10079. /**
  10080. * Build an on-demand log channel.
  10081. *
  10082. * @param array $config
  10083. * @return \Psr\Log\LoggerInterface
  10084. * @static
  10085. */
  10086. public static function build($config)
  10087. {
  10088. /** @var \Illuminate\Log\LogManager $instance */
  10089. return $instance->build($config);
  10090. }
  10091. /**
  10092. * Create a new, on-demand aggregate logger instance.
  10093. *
  10094. * @param array $channels
  10095. * @param string|null $channel
  10096. * @return \Psr\Log\LoggerInterface
  10097. * @static
  10098. */
  10099. public static function stack($channels, $channel = null)
  10100. {
  10101. /** @var \Illuminate\Log\LogManager $instance */
  10102. return $instance->stack($channels, $channel);
  10103. }
  10104. /**
  10105. * Get a log channel instance.
  10106. *
  10107. * @param string|null $channel
  10108. * @return \Psr\Log\LoggerInterface
  10109. * @static
  10110. */
  10111. public static function channel($channel = null)
  10112. {
  10113. /** @var \Illuminate\Log\LogManager $instance */
  10114. return $instance->channel($channel);
  10115. }
  10116. /**
  10117. * Get a log driver instance.
  10118. *
  10119. * @param string|null $driver
  10120. * @return \Psr\Log\LoggerInterface
  10121. * @static
  10122. */
  10123. public static function driver($driver = null)
  10124. {
  10125. /** @var \Illuminate\Log\LogManager $instance */
  10126. return $instance->driver($driver);
  10127. }
  10128. /**
  10129. * Share context across channels and stacks.
  10130. *
  10131. * @param array $context
  10132. * @return \Illuminate\Log\LogManager
  10133. * @static
  10134. */
  10135. public static function shareContext($context)
  10136. {
  10137. /** @var \Illuminate\Log\LogManager $instance */
  10138. return $instance->shareContext($context);
  10139. }
  10140. /**
  10141. * The context shared across channels and stacks.
  10142. *
  10143. * @return array
  10144. * @static
  10145. */
  10146. public static function sharedContext()
  10147. {
  10148. /** @var \Illuminate\Log\LogManager $instance */
  10149. return $instance->sharedContext();
  10150. }
  10151. /**
  10152. * Flush the log context on all currently resolved channels.
  10153. *
  10154. * @param string[]|null $keys
  10155. * @return \Illuminate\Log\LogManager
  10156. * @static
  10157. */
  10158. public static function withoutContext($keys = null)
  10159. {
  10160. /** @var \Illuminate\Log\LogManager $instance */
  10161. return $instance->withoutContext($keys);
  10162. }
  10163. /**
  10164. * Flush the shared context.
  10165. *
  10166. * @return \Illuminate\Log\LogManager
  10167. * @static
  10168. */
  10169. public static function flushSharedContext()
  10170. {
  10171. /** @var \Illuminate\Log\LogManager $instance */
  10172. return $instance->flushSharedContext();
  10173. }
  10174. /**
  10175. * Get the default log driver name.
  10176. *
  10177. * @return string|null
  10178. * @static
  10179. */
  10180. public static function getDefaultDriver()
  10181. {
  10182. /** @var \Illuminate\Log\LogManager $instance */
  10183. return $instance->getDefaultDriver();
  10184. }
  10185. /**
  10186. * Set the default log driver name.
  10187. *
  10188. * @param string $name
  10189. * @return void
  10190. * @static
  10191. */
  10192. public static function setDefaultDriver($name)
  10193. {
  10194. /** @var \Illuminate\Log\LogManager $instance */
  10195. $instance->setDefaultDriver($name);
  10196. }
  10197. /**
  10198. * Register a custom driver creator Closure.
  10199. *
  10200. * @param string $driver
  10201. * @param \Closure $callback
  10202. * @param-closure-this $this $callback
  10203. * @return \Illuminate\Log\LogManager
  10204. * @static
  10205. */
  10206. public static function extend($driver, $callback)
  10207. {
  10208. /** @var \Illuminate\Log\LogManager $instance */
  10209. return $instance->extend($driver, $callback);
  10210. }
  10211. /**
  10212. * Unset the given channel instance.
  10213. *
  10214. * @param string|null $driver
  10215. * @return void
  10216. * @static
  10217. */
  10218. public static function forgetChannel($driver = null)
  10219. {
  10220. /** @var \Illuminate\Log\LogManager $instance */
  10221. $instance->forgetChannel($driver);
  10222. }
  10223. /**
  10224. * Get all of the resolved log channels.
  10225. *
  10226. * @return array
  10227. * @static
  10228. */
  10229. public static function getChannels()
  10230. {
  10231. /** @var \Illuminate\Log\LogManager $instance */
  10232. return $instance->getChannels();
  10233. }
  10234. /**
  10235. * System is unusable.
  10236. *
  10237. * @param string|\Stringable $message
  10238. * @param array $context
  10239. * @return void
  10240. * @static
  10241. */
  10242. public static function emergency($message, $context = [])
  10243. {
  10244. /** @var \Illuminate\Log\LogManager $instance */
  10245. $instance->emergency($message, $context);
  10246. }
  10247. /**
  10248. * Action must be taken immediately.
  10249. *
  10250. * Example: Entire website down, database unavailable, etc. This should
  10251. * trigger the SMS alerts and wake you up.
  10252. *
  10253. * @param string|\Stringable $message
  10254. * @param array $context
  10255. * @return void
  10256. * @static
  10257. */
  10258. public static function alert($message, $context = [])
  10259. {
  10260. /** @var \Illuminate\Log\LogManager $instance */
  10261. $instance->alert($message, $context);
  10262. }
  10263. /**
  10264. * Critical conditions.
  10265. *
  10266. * Example: Application component unavailable, unexpected exception.
  10267. *
  10268. * @param string|\Stringable $message
  10269. * @param array $context
  10270. * @return void
  10271. * @static
  10272. */
  10273. public static function critical($message, $context = [])
  10274. {
  10275. /** @var \Illuminate\Log\LogManager $instance */
  10276. $instance->critical($message, $context);
  10277. }
  10278. /**
  10279. * Runtime errors that do not require immediate action but should typically
  10280. * be logged and monitored.
  10281. *
  10282. * @param string|\Stringable $message
  10283. * @param array $context
  10284. * @return void
  10285. * @static
  10286. */
  10287. public static function error($message, $context = [])
  10288. {
  10289. /** @var \Illuminate\Log\LogManager $instance */
  10290. $instance->error($message, $context);
  10291. }
  10292. /**
  10293. * Exceptional occurrences that are not errors.
  10294. *
  10295. * Example: Use of deprecated APIs, poor use of an API, undesirable things
  10296. * that are not necessarily wrong.
  10297. *
  10298. * @param string|\Stringable $message
  10299. * @param array $context
  10300. * @return void
  10301. * @static
  10302. */
  10303. public static function warning($message, $context = [])
  10304. {
  10305. /** @var \Illuminate\Log\LogManager $instance */
  10306. $instance->warning($message, $context);
  10307. }
  10308. /**
  10309. * Normal but significant events.
  10310. *
  10311. * @param string|\Stringable $message
  10312. * @param array $context
  10313. * @return void
  10314. * @static
  10315. */
  10316. public static function notice($message, $context = [])
  10317. {
  10318. /** @var \Illuminate\Log\LogManager $instance */
  10319. $instance->notice($message, $context);
  10320. }
  10321. /**
  10322. * Interesting events.
  10323. *
  10324. * Example: User logs in, SQL logs.
  10325. *
  10326. * @param string|\Stringable $message
  10327. * @param array $context
  10328. * @return void
  10329. * @static
  10330. */
  10331. public static function info($message, $context = [])
  10332. {
  10333. /** @var \Illuminate\Log\LogManager $instance */
  10334. $instance->info($message, $context);
  10335. }
  10336. /**
  10337. * Detailed debug information.
  10338. *
  10339. * @param string|\Stringable $message
  10340. * @param array $context
  10341. * @return void
  10342. * @static
  10343. */
  10344. public static function debug($message, $context = [])
  10345. {
  10346. /** @var \Illuminate\Log\LogManager $instance */
  10347. $instance->debug($message, $context);
  10348. }
  10349. /**
  10350. * Logs with an arbitrary level.
  10351. *
  10352. * @param mixed $level
  10353. * @param string|\Stringable $message
  10354. * @param array $context
  10355. * @return void
  10356. * @static
  10357. */
  10358. public static function log($level, $message, $context = [])
  10359. {
  10360. /** @var \Illuminate\Log\LogManager $instance */
  10361. $instance->log($level, $message, $context);
  10362. }
  10363. /**
  10364. * Set the application instance used by the manager.
  10365. *
  10366. * @param \Illuminate\Contracts\Foundation\Application $app
  10367. * @return \Illuminate\Log\LogManager
  10368. * @static
  10369. */
  10370. public static function setApplication($app)
  10371. {
  10372. /** @var \Illuminate\Log\LogManager $instance */
  10373. return $instance->setApplication($app);
  10374. }
  10375. }
  10376. /**
  10377. * @method static void alwaysFrom(string $address, string|null $name = null)
  10378. * @method static void alwaysReplyTo(string $address, string|null $name = null)
  10379. * @method static void alwaysReturnPath(string $address)
  10380. * @method static void alwaysTo(string $address, string|null $name = null)
  10381. * @method static \Illuminate\Mail\SentMessage|null html(string $html, mixed $callback)
  10382. * @method static \Illuminate\Mail\SentMessage|null plain(string $view, array $data, mixed $callback)
  10383. * @method static string render(string|array $view, array $data = [])
  10384. * @method static mixed onQueue(\BackedEnum|string|null $queue, \Illuminate\Contracts\Mail\Mailable $view)
  10385. * @method static mixed queueOn(string $queue, \Illuminate\Contracts\Mail\Mailable $view)
  10386. * @method static mixed laterOn(string $queue, \DateTimeInterface|\DateInterval|int $delay, \Illuminate\Contracts\Mail\Mailable $view)
  10387. * @method static \Symfony\Component\Mailer\Transport\TransportInterface getSymfonyTransport()
  10388. * @method static \Illuminate\Contracts\View\Factory getViewFactory()
  10389. * @method static void setSymfonyTransport(\Symfony\Component\Mailer\Transport\TransportInterface $transport)
  10390. * @method static \Illuminate\Mail\Mailer setQueue(\Illuminate\Contracts\Queue\Factory $queue)
  10391. * @method static void macro(string $name, object|callable $macro)
  10392. * @method static void mixin(object $mixin, bool $replace = true)
  10393. * @method static bool hasMacro(string $name)
  10394. * @method static void flushMacros()
  10395. * @see \Illuminate\Mail\MailManager
  10396. * @see \Illuminate\Support\Testing\Fakes\MailFake
  10397. */
  10398. class Mail {
  10399. /**
  10400. * Get a mailer instance by name.
  10401. *
  10402. * @param string|null $name
  10403. * @return \Illuminate\Contracts\Mail\Mailer
  10404. * @static
  10405. */
  10406. public static function mailer($name = null)
  10407. {
  10408. /** @var \Illuminate\Mail\MailManager $instance */
  10409. return $instance->mailer($name);
  10410. }
  10411. /**
  10412. * Get a mailer driver instance.
  10413. *
  10414. * @param string|null $driver
  10415. * @return \Illuminate\Mail\Mailer
  10416. * @static
  10417. */
  10418. public static function driver($driver = null)
  10419. {
  10420. /** @var \Illuminate\Mail\MailManager $instance */
  10421. return $instance->driver($driver);
  10422. }
  10423. /**
  10424. * Build a new mailer instance.
  10425. *
  10426. * @param array $config
  10427. * @return \Illuminate\Mail\Mailer
  10428. * @static
  10429. */
  10430. public static function build($config)
  10431. {
  10432. /** @var \Illuminate\Mail\MailManager $instance */
  10433. return $instance->build($config);
  10434. }
  10435. /**
  10436. * Create a new transport instance.
  10437. *
  10438. * @param array $config
  10439. * @return \Symfony\Component\Mailer\Transport\TransportInterface
  10440. * @throws \InvalidArgumentException
  10441. * @static
  10442. */
  10443. public static function createSymfonyTransport($config)
  10444. {
  10445. /** @var \Illuminate\Mail\MailManager $instance */
  10446. return $instance->createSymfonyTransport($config);
  10447. }
  10448. /**
  10449. * Get the default mail driver name.
  10450. *
  10451. * @return string
  10452. * @static
  10453. */
  10454. public static function getDefaultDriver()
  10455. {
  10456. /** @var \Illuminate\Mail\MailManager $instance */
  10457. return $instance->getDefaultDriver();
  10458. }
  10459. /**
  10460. * Set the default mail driver name.
  10461. *
  10462. * @param string $name
  10463. * @return void
  10464. * @static
  10465. */
  10466. public static function setDefaultDriver($name)
  10467. {
  10468. /** @var \Illuminate\Mail\MailManager $instance */
  10469. $instance->setDefaultDriver($name);
  10470. }
  10471. /**
  10472. * Disconnect the given mailer and remove from local cache.
  10473. *
  10474. * @param string|null $name
  10475. * @return void
  10476. * @static
  10477. */
  10478. public static function purge($name = null)
  10479. {
  10480. /** @var \Illuminate\Mail\MailManager $instance */
  10481. $instance->purge($name);
  10482. }
  10483. /**
  10484. * Register a custom transport creator Closure.
  10485. *
  10486. * @param string $driver
  10487. * @param \Closure $callback
  10488. * @return \Illuminate\Mail\MailManager
  10489. * @static
  10490. */
  10491. public static function extend($driver, $callback)
  10492. {
  10493. /** @var \Illuminate\Mail\MailManager $instance */
  10494. return $instance->extend($driver, $callback);
  10495. }
  10496. /**
  10497. * Get the application instance used by the manager.
  10498. *
  10499. * @return \Illuminate\Contracts\Foundation\Application
  10500. * @static
  10501. */
  10502. public static function getApplication()
  10503. {
  10504. /** @var \Illuminate\Mail\MailManager $instance */
  10505. return $instance->getApplication();
  10506. }
  10507. /**
  10508. * Set the application instance used by the manager.
  10509. *
  10510. * @param \Illuminate\Contracts\Foundation\Application $app
  10511. * @return \Illuminate\Mail\MailManager
  10512. * @static
  10513. */
  10514. public static function setApplication($app)
  10515. {
  10516. /** @var \Illuminate\Mail\MailManager $instance */
  10517. return $instance->setApplication($app);
  10518. }
  10519. /**
  10520. * Forget all of the resolved mailer instances.
  10521. *
  10522. * @return \Illuminate\Mail\MailManager
  10523. * @static
  10524. */
  10525. public static function forgetMailers()
  10526. {
  10527. /** @var \Illuminate\Mail\MailManager $instance */
  10528. return $instance->forgetMailers();
  10529. }
  10530. /**
  10531. * Assert if a mailable was sent based on a truth-test callback.
  10532. *
  10533. * @param string|\Closure $mailable
  10534. * @param callable|array|string|int|null $callback
  10535. * @return void
  10536. * @static
  10537. */
  10538. public static function assertSent($mailable, $callback = null)
  10539. {
  10540. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10541. $instance->assertSent($mailable, $callback);
  10542. }
  10543. /**
  10544. * Determine if a mailable was not sent or queued to be sent based on a truth-test callback.
  10545. *
  10546. * @param string|\Closure $mailable
  10547. * @param callable|null $callback
  10548. * @return void
  10549. * @static
  10550. */
  10551. public static function assertNotOutgoing($mailable, $callback = null)
  10552. {
  10553. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10554. $instance->assertNotOutgoing($mailable, $callback);
  10555. }
  10556. /**
  10557. * Determine if a mailable was not sent based on a truth-test callback.
  10558. *
  10559. * @param string|\Closure $mailable
  10560. * @param callable|array|string|null $callback
  10561. * @return void
  10562. * @static
  10563. */
  10564. public static function assertNotSent($mailable, $callback = null)
  10565. {
  10566. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10567. $instance->assertNotSent($mailable, $callback);
  10568. }
  10569. /**
  10570. * Assert that no mailables were sent or queued to be sent.
  10571. *
  10572. * @return void
  10573. * @static
  10574. */
  10575. public static function assertNothingOutgoing()
  10576. {
  10577. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10578. $instance->assertNothingOutgoing();
  10579. }
  10580. /**
  10581. * Assert that no mailables were sent.
  10582. *
  10583. * @return void
  10584. * @static
  10585. */
  10586. public static function assertNothingSent()
  10587. {
  10588. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10589. $instance->assertNothingSent();
  10590. }
  10591. /**
  10592. * Assert if a mailable was queued based on a truth-test callback.
  10593. *
  10594. * @param string|\Closure $mailable
  10595. * @param callable|array|string|int|null $callback
  10596. * @return void
  10597. * @static
  10598. */
  10599. public static function assertQueued($mailable, $callback = null)
  10600. {
  10601. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10602. $instance->assertQueued($mailable, $callback);
  10603. }
  10604. /**
  10605. * Determine if a mailable was not queued based on a truth-test callback.
  10606. *
  10607. * @param string|\Closure $mailable
  10608. * @param callable|array|string|null $callback
  10609. * @return void
  10610. * @static
  10611. */
  10612. public static function assertNotQueued($mailable, $callback = null)
  10613. {
  10614. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10615. $instance->assertNotQueued($mailable, $callback);
  10616. }
  10617. /**
  10618. * Assert that no mailables were queued.
  10619. *
  10620. * @return void
  10621. * @static
  10622. */
  10623. public static function assertNothingQueued()
  10624. {
  10625. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10626. $instance->assertNothingQueued();
  10627. }
  10628. /**
  10629. * Assert the total number of mailables that were sent.
  10630. *
  10631. * @param int $count
  10632. * @return void
  10633. * @static
  10634. */
  10635. public static function assertSentCount($count)
  10636. {
  10637. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10638. $instance->assertSentCount($count);
  10639. }
  10640. /**
  10641. * Assert the total number of mailables that were queued.
  10642. *
  10643. * @param int $count
  10644. * @return void
  10645. * @static
  10646. */
  10647. public static function assertQueuedCount($count)
  10648. {
  10649. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10650. $instance->assertQueuedCount($count);
  10651. }
  10652. /**
  10653. * Assert the total number of mailables that were sent or queued.
  10654. *
  10655. * @param int $count
  10656. * @return void
  10657. * @static
  10658. */
  10659. public static function assertOutgoingCount($count)
  10660. {
  10661. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10662. $instance->assertOutgoingCount($count);
  10663. }
  10664. /**
  10665. * Get all of the mailables matching a truth-test callback.
  10666. *
  10667. * @param string|\Closure $mailable
  10668. * @param callable|null $callback
  10669. * @return \Illuminate\Support\Collection
  10670. * @static
  10671. */
  10672. public static function sent($mailable, $callback = null)
  10673. {
  10674. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10675. return $instance->sent($mailable, $callback);
  10676. }
  10677. /**
  10678. * Determine if the given mailable has been sent.
  10679. *
  10680. * @param string $mailable
  10681. * @return bool
  10682. * @static
  10683. */
  10684. public static function hasSent($mailable)
  10685. {
  10686. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10687. return $instance->hasSent($mailable);
  10688. }
  10689. /**
  10690. * Get all of the queued mailables matching a truth-test callback.
  10691. *
  10692. * @param string|\Closure $mailable
  10693. * @param callable|null $callback
  10694. * @return \Illuminate\Support\Collection
  10695. * @static
  10696. */
  10697. public static function queued($mailable, $callback = null)
  10698. {
  10699. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10700. return $instance->queued($mailable, $callback);
  10701. }
  10702. /**
  10703. * Determine if the given mailable has been queued.
  10704. *
  10705. * @param string $mailable
  10706. * @return bool
  10707. * @static
  10708. */
  10709. public static function hasQueued($mailable)
  10710. {
  10711. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10712. return $instance->hasQueued($mailable);
  10713. }
  10714. /**
  10715. * Begin the process of mailing a mailable class instance.
  10716. *
  10717. * @param mixed $users
  10718. * @return \Illuminate\Mail\PendingMail
  10719. * @static
  10720. */
  10721. public static function to($users)
  10722. {
  10723. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10724. return $instance->to($users);
  10725. }
  10726. /**
  10727. * Begin the process of mailing a mailable class instance.
  10728. *
  10729. * @param mixed $users
  10730. * @return \Illuminate\Mail\PendingMail
  10731. * @static
  10732. */
  10733. public static function cc($users)
  10734. {
  10735. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10736. return $instance->cc($users);
  10737. }
  10738. /**
  10739. * Begin the process of mailing a mailable class instance.
  10740. *
  10741. * @param mixed $users
  10742. * @return \Illuminate\Mail\PendingMail
  10743. * @static
  10744. */
  10745. public static function bcc($users)
  10746. {
  10747. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10748. return $instance->bcc($users);
  10749. }
  10750. /**
  10751. * Send a new message with only a raw text part.
  10752. *
  10753. * @param string $text
  10754. * @param \Closure|string $callback
  10755. * @return void
  10756. * @static
  10757. */
  10758. public static function raw($text, $callback)
  10759. {
  10760. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10761. $instance->raw($text, $callback);
  10762. }
  10763. /**
  10764. * Send a new message using a view.
  10765. *
  10766. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10767. * @param array $data
  10768. * @param \Closure|string|null $callback
  10769. * @return mixed|void
  10770. * @static
  10771. */
  10772. public static function send($view, $data = [], $callback = null)
  10773. {
  10774. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10775. return $instance->send($view, $data, $callback);
  10776. }
  10777. /**
  10778. * Send a new message synchronously using a view.
  10779. *
  10780. * @param \Illuminate\Contracts\Mail\Mailable|string|array $mailable
  10781. * @param array $data
  10782. * @param \Closure|string|null $callback
  10783. * @return void
  10784. * @static
  10785. */
  10786. public static function sendNow($mailable, $data = [], $callback = null)
  10787. {
  10788. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10789. $instance->sendNow($mailable, $data, $callback);
  10790. }
  10791. /**
  10792. * Queue a new message for sending.
  10793. *
  10794. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10795. * @param string|null $queue
  10796. * @return mixed
  10797. * @static
  10798. */
  10799. public static function queue($view, $queue = null)
  10800. {
  10801. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10802. return $instance->queue($view, $queue);
  10803. }
  10804. /**
  10805. * Queue a new e-mail message for sending after (n) seconds.
  10806. *
  10807. * @param \DateTimeInterface|\DateInterval|int $delay
  10808. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10809. * @param string|null $queue
  10810. * @return mixed
  10811. * @static
  10812. */
  10813. public static function later($delay, $view, $queue = null)
  10814. {
  10815. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10816. return $instance->later($delay, $view, $queue);
  10817. }
  10818. }
  10819. /**
  10820. * @see \Illuminate\Notifications\ChannelManager
  10821. * @see \Illuminate\Support\Testing\Fakes\NotificationFake
  10822. */
  10823. class Notification {
  10824. /**
  10825. * Send the given notification to the given notifiable entities.
  10826. *
  10827. * @param \Illuminate\Support\Collection|array|mixed $notifiables
  10828. * @param mixed $notification
  10829. * @return void
  10830. * @static
  10831. */
  10832. public static function send($notifiables, $notification)
  10833. {
  10834. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10835. $instance->send($notifiables, $notification);
  10836. }
  10837. /**
  10838. * Send the given notification immediately.
  10839. *
  10840. * @param \Illuminate\Support\Collection|array|mixed $notifiables
  10841. * @param mixed $notification
  10842. * @param array|null $channels
  10843. * @return void
  10844. * @static
  10845. */
  10846. public static function sendNow($notifiables, $notification, $channels = null)
  10847. {
  10848. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10849. $instance->sendNow($notifiables, $notification, $channels);
  10850. }
  10851. /**
  10852. * Get a channel instance.
  10853. *
  10854. * @param string|null $name
  10855. * @return mixed
  10856. * @static
  10857. */
  10858. public static function channel($name = null)
  10859. {
  10860. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10861. return $instance->channel($name);
  10862. }
  10863. /**
  10864. * Get the default channel driver name.
  10865. *
  10866. * @return string
  10867. * @static
  10868. */
  10869. public static function getDefaultDriver()
  10870. {
  10871. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10872. return $instance->getDefaultDriver();
  10873. }
  10874. /**
  10875. * Get the default channel driver name.
  10876. *
  10877. * @return string
  10878. * @static
  10879. */
  10880. public static function deliversVia()
  10881. {
  10882. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10883. return $instance->deliversVia();
  10884. }
  10885. /**
  10886. * Set the default channel driver name.
  10887. *
  10888. * @param string $channel
  10889. * @return void
  10890. * @static
  10891. */
  10892. public static function deliverVia($channel)
  10893. {
  10894. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10895. $instance->deliverVia($channel);
  10896. }
  10897. /**
  10898. * Set the locale of notifications.
  10899. *
  10900. * @param string $locale
  10901. * @return \Illuminate\Notifications\ChannelManager
  10902. * @static
  10903. */
  10904. public static function locale($locale)
  10905. {
  10906. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10907. return $instance->locale($locale);
  10908. }
  10909. /**
  10910. * Get a driver instance.
  10911. *
  10912. * @param string|null $driver
  10913. * @return mixed
  10914. * @throws \InvalidArgumentException
  10915. * @static
  10916. */
  10917. public static function driver($driver = null)
  10918. {
  10919. //Method inherited from \Illuminate\Support\Manager
  10920. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10921. return $instance->driver($driver);
  10922. }
  10923. /**
  10924. * Register a custom driver creator Closure.
  10925. *
  10926. * @param string $driver
  10927. * @param \Closure $callback
  10928. * @return \Illuminate\Notifications\ChannelManager
  10929. * @static
  10930. */
  10931. public static function extend($driver, $callback)
  10932. {
  10933. //Method inherited from \Illuminate\Support\Manager
  10934. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10935. return $instance->extend($driver, $callback);
  10936. }
  10937. /**
  10938. * Get all of the created "drivers".
  10939. *
  10940. * @return array
  10941. * @static
  10942. */
  10943. public static function getDrivers()
  10944. {
  10945. //Method inherited from \Illuminate\Support\Manager
  10946. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10947. return $instance->getDrivers();
  10948. }
  10949. /**
  10950. * Get the container instance used by the manager.
  10951. *
  10952. * @return \Illuminate\Contracts\Container\Container
  10953. * @static
  10954. */
  10955. public static function getContainer()
  10956. {
  10957. //Method inherited from \Illuminate\Support\Manager
  10958. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10959. return $instance->getContainer();
  10960. }
  10961. /**
  10962. * Set the container instance used by the manager.
  10963. *
  10964. * @param \Illuminate\Contracts\Container\Container $container
  10965. * @return \Illuminate\Notifications\ChannelManager
  10966. * @static
  10967. */
  10968. public static function setContainer($container)
  10969. {
  10970. //Method inherited from \Illuminate\Support\Manager
  10971. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10972. return $instance->setContainer($container);
  10973. }
  10974. /**
  10975. * Forget all of the resolved driver instances.
  10976. *
  10977. * @return \Illuminate\Notifications\ChannelManager
  10978. * @static
  10979. */
  10980. public static function forgetDrivers()
  10981. {
  10982. //Method inherited from \Illuminate\Support\Manager
  10983. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10984. return $instance->forgetDrivers();
  10985. }
  10986. /**
  10987. * Assert if a notification was sent on-demand based on a truth-test callback.
  10988. *
  10989. * @param string|\Closure $notification
  10990. * @param callable|null $callback
  10991. * @return void
  10992. * @throws \Exception
  10993. * @static
  10994. */
  10995. public static function assertSentOnDemand($notification, $callback = null)
  10996. {
  10997. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  10998. $instance->assertSentOnDemand($notification, $callback);
  10999. }
  11000. /**
  11001. * Assert if a notification was sent based on a truth-test callback.
  11002. *
  11003. * @param mixed $notifiable
  11004. * @param string|\Closure $notification
  11005. * @param callable|null $callback
  11006. * @return void
  11007. * @throws \Exception
  11008. * @static
  11009. */
  11010. public static function assertSentTo($notifiable, $notification, $callback = null)
  11011. {
  11012. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11013. $instance->assertSentTo($notifiable, $notification, $callback);
  11014. }
  11015. /**
  11016. * Assert if a notification was sent on-demand a number of times.
  11017. *
  11018. * @param string $notification
  11019. * @param int $times
  11020. * @return void
  11021. * @static
  11022. */
  11023. public static function assertSentOnDemandTimes($notification, $times = 1)
  11024. {
  11025. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11026. $instance->assertSentOnDemandTimes($notification, $times);
  11027. }
  11028. /**
  11029. * Assert if a notification was sent a number of times.
  11030. *
  11031. * @param mixed $notifiable
  11032. * @param string $notification
  11033. * @param int $times
  11034. * @return void
  11035. * @static
  11036. */
  11037. public static function assertSentToTimes($notifiable, $notification, $times = 1)
  11038. {
  11039. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11040. $instance->assertSentToTimes($notifiable, $notification, $times);
  11041. }
  11042. /**
  11043. * Determine if a notification was sent based on a truth-test callback.
  11044. *
  11045. * @param mixed $notifiable
  11046. * @param string|\Closure $notification
  11047. * @param callable|null $callback
  11048. * @return void
  11049. * @throws \Exception
  11050. * @static
  11051. */
  11052. public static function assertNotSentTo($notifiable, $notification, $callback = null)
  11053. {
  11054. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11055. $instance->assertNotSentTo($notifiable, $notification, $callback);
  11056. }
  11057. /**
  11058. * Assert that no notifications were sent.
  11059. *
  11060. * @return void
  11061. * @static
  11062. */
  11063. public static function assertNothingSent()
  11064. {
  11065. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11066. $instance->assertNothingSent();
  11067. }
  11068. /**
  11069. * Assert that no notifications were sent to the given notifiable.
  11070. *
  11071. * @param mixed $notifiable
  11072. * @return void
  11073. * @throws \Exception
  11074. * @static
  11075. */
  11076. public static function assertNothingSentTo($notifiable)
  11077. {
  11078. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11079. $instance->assertNothingSentTo($notifiable);
  11080. }
  11081. /**
  11082. * Assert the total amount of times a notification was sent.
  11083. *
  11084. * @param string $notification
  11085. * @param int $expectedCount
  11086. * @return void
  11087. * @static
  11088. */
  11089. public static function assertSentTimes($notification, $expectedCount)
  11090. {
  11091. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11092. $instance->assertSentTimes($notification, $expectedCount);
  11093. }
  11094. /**
  11095. * Assert the total count of notification that were sent.
  11096. *
  11097. * @param int $expectedCount
  11098. * @return void
  11099. * @static
  11100. */
  11101. public static function assertCount($expectedCount)
  11102. {
  11103. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11104. $instance->assertCount($expectedCount);
  11105. }
  11106. /**
  11107. * Get all of the notifications matching a truth-test callback.
  11108. *
  11109. * @param mixed $notifiable
  11110. * @param string $notification
  11111. * @param callable|null $callback
  11112. * @return \Illuminate\Support\Collection
  11113. * @static
  11114. */
  11115. public static function sent($notifiable, $notification, $callback = null)
  11116. {
  11117. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11118. return $instance->sent($notifiable, $notification, $callback);
  11119. }
  11120. /**
  11121. * Determine if there are more notifications left to inspect.
  11122. *
  11123. * @param mixed $notifiable
  11124. * @param string $notification
  11125. * @return bool
  11126. * @static
  11127. */
  11128. public static function hasSent($notifiable, $notification)
  11129. {
  11130. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11131. return $instance->hasSent($notifiable, $notification);
  11132. }
  11133. /**
  11134. * Specify if notification should be serialized and restored when being "pushed" to the queue.
  11135. *
  11136. * @param bool $serializeAndRestore
  11137. * @return \Illuminate\Support\Testing\Fakes\NotificationFake
  11138. * @static
  11139. */
  11140. public static function serializeAndRestore($serializeAndRestore = true)
  11141. {
  11142. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11143. return $instance->serializeAndRestore($serializeAndRestore);
  11144. }
  11145. /**
  11146. * Get the notifications that have been sent.
  11147. *
  11148. * @return array
  11149. * @static
  11150. */
  11151. public static function sentNotifications()
  11152. {
  11153. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11154. return $instance->sentNotifications();
  11155. }
  11156. /**
  11157. * Register a custom macro.
  11158. *
  11159. * @param string $name
  11160. * @param object|callable $macro
  11161. * @param-closure-this static $macro
  11162. * @return void
  11163. * @static
  11164. */
  11165. public static function macro($name, $macro)
  11166. {
  11167. \Illuminate\Support\Testing\Fakes\NotificationFake::macro($name, $macro);
  11168. }
  11169. /**
  11170. * Mix another object into the class.
  11171. *
  11172. * @param object $mixin
  11173. * @param bool $replace
  11174. * @return void
  11175. * @throws \ReflectionException
  11176. * @static
  11177. */
  11178. public static function mixin($mixin, $replace = true)
  11179. {
  11180. \Illuminate\Support\Testing\Fakes\NotificationFake::mixin($mixin, $replace);
  11181. }
  11182. /**
  11183. * Checks if macro is registered.
  11184. *
  11185. * @param string $name
  11186. * @return bool
  11187. * @static
  11188. */
  11189. public static function hasMacro($name)
  11190. {
  11191. return \Illuminate\Support\Testing\Fakes\NotificationFake::hasMacro($name);
  11192. }
  11193. /**
  11194. * Flush the existing macros.
  11195. *
  11196. * @return void
  11197. * @static
  11198. */
  11199. public static function flushMacros()
  11200. {
  11201. \Illuminate\Support\Testing\Fakes\NotificationFake::flushMacros();
  11202. }
  11203. }
  11204. /**
  11205. * @method static string sendResetLink(array $credentials, \Closure|null $callback = null)
  11206. * @method static mixed reset(array $credentials, \Closure $callback)
  11207. * @method static \Illuminate\Contracts\Auth\CanResetPassword|null getUser(array $credentials)
  11208. * @method static string createToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  11209. * @method static void deleteToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  11210. * @method static bool tokenExists(\Illuminate\Contracts\Auth\CanResetPassword $user, string $token)
  11211. * @method static \Illuminate\Auth\Passwords\TokenRepositoryInterface getRepository()
  11212. * @method static \Illuminate\Support\Timebox getTimebox()
  11213. * @see \Illuminate\Auth\Passwords\PasswordBrokerManager
  11214. * @see \Illuminate\Auth\Passwords\PasswordBroker
  11215. */
  11216. class Password {
  11217. /**
  11218. * Attempt to get the broker from the local cache.
  11219. *
  11220. * @param string|null $name
  11221. * @return \Illuminate\Contracts\Auth\PasswordBroker
  11222. * @static
  11223. */
  11224. public static function broker($name = null)
  11225. {
  11226. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11227. return $instance->broker($name);
  11228. }
  11229. /**
  11230. * Get the default password broker name.
  11231. *
  11232. * @return string
  11233. * @static
  11234. */
  11235. public static function getDefaultDriver()
  11236. {
  11237. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11238. return $instance->getDefaultDriver();
  11239. }
  11240. /**
  11241. * Set the default password broker name.
  11242. *
  11243. * @param string $name
  11244. * @return void
  11245. * @static
  11246. */
  11247. public static function setDefaultDriver($name)
  11248. {
  11249. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11250. $instance->setDefaultDriver($name);
  11251. }
  11252. }
  11253. /**
  11254. * @method static \Illuminate\Process\PendingProcess command(array|string $command)
  11255. * @method static \Illuminate\Process\PendingProcess path(string $path)
  11256. * @method static \Illuminate\Process\PendingProcess timeout(int $timeout)
  11257. * @method static \Illuminate\Process\PendingProcess idleTimeout(int $timeout)
  11258. * @method static \Illuminate\Process\PendingProcess forever()
  11259. * @method static \Illuminate\Process\PendingProcess env(array $environment)
  11260. * @method static \Illuminate\Process\PendingProcess input(\Traversable|resource|string|int|float|bool|null $input)
  11261. * @method static \Illuminate\Process\PendingProcess quietly()
  11262. * @method static \Illuminate\Process\PendingProcess tty(bool $tty = true)
  11263. * @method static \Illuminate\Process\PendingProcess options(array $options)
  11264. * @method static \Illuminate\Contracts\Process\ProcessResult run(array|string|null $command = null, callable|null $output = null)
  11265. * @method static \Illuminate\Process\InvokedProcess start(array|string|null $command = null, callable|null $output = null)
  11266. * @method static bool supportsTty()
  11267. * @method static \Illuminate\Process\PendingProcess withFakeHandlers(array $fakeHandlers)
  11268. * @method static \Illuminate\Process\PendingProcess|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  11269. * @method static \Illuminate\Process\PendingProcess|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  11270. * @see \Illuminate\Process\PendingProcess
  11271. * @see \Illuminate\Process\Factory
  11272. */
  11273. class Process {
  11274. /**
  11275. * Create a new fake process response for testing purposes.
  11276. *
  11277. * @param array|string $output
  11278. * @param array|string $errorOutput
  11279. * @param int $exitCode
  11280. * @return \Illuminate\Process\FakeProcessResult
  11281. * @static
  11282. */
  11283. public static function result($output = '', $errorOutput = '', $exitCode = 0)
  11284. {
  11285. /** @var \Illuminate\Process\Factory $instance */
  11286. return $instance->result($output, $errorOutput, $exitCode);
  11287. }
  11288. /**
  11289. * Begin describing a fake process lifecycle.
  11290. *
  11291. * @return \Illuminate\Process\FakeProcessDescription
  11292. * @static
  11293. */
  11294. public static function describe()
  11295. {
  11296. /** @var \Illuminate\Process\Factory $instance */
  11297. return $instance->describe();
  11298. }
  11299. /**
  11300. * Begin describing a fake process sequence.
  11301. *
  11302. * @param array $processes
  11303. * @return \Illuminate\Process\FakeProcessSequence
  11304. * @static
  11305. */
  11306. public static function sequence($processes = [])
  11307. {
  11308. /** @var \Illuminate\Process\Factory $instance */
  11309. return $instance->sequence($processes);
  11310. }
  11311. /**
  11312. * Indicate that the process factory should fake processes.
  11313. *
  11314. * @param \Closure|array|null $callback
  11315. * @return \Illuminate\Process\Factory
  11316. * @static
  11317. */
  11318. public static function fake($callback = null)
  11319. {
  11320. /** @var \Illuminate\Process\Factory $instance */
  11321. return $instance->fake($callback);
  11322. }
  11323. /**
  11324. * Determine if the process factory has fake process handlers and is recording processes.
  11325. *
  11326. * @return bool
  11327. * @static
  11328. */
  11329. public static function isRecording()
  11330. {
  11331. /** @var \Illuminate\Process\Factory $instance */
  11332. return $instance->isRecording();
  11333. }
  11334. /**
  11335. * Record the given process if processes should be recorded.
  11336. *
  11337. * @param \Illuminate\Process\PendingProcess $process
  11338. * @param \Illuminate\Contracts\Process\ProcessResult $result
  11339. * @return \Illuminate\Process\Factory
  11340. * @static
  11341. */
  11342. public static function recordIfRecording($process, $result)
  11343. {
  11344. /** @var \Illuminate\Process\Factory $instance */
  11345. return $instance->recordIfRecording($process, $result);
  11346. }
  11347. /**
  11348. * Record the given process.
  11349. *
  11350. * @param \Illuminate\Process\PendingProcess $process
  11351. * @param \Illuminate\Contracts\Process\ProcessResult $result
  11352. * @return \Illuminate\Process\Factory
  11353. * @static
  11354. */
  11355. public static function record($process, $result)
  11356. {
  11357. /** @var \Illuminate\Process\Factory $instance */
  11358. return $instance->record($process, $result);
  11359. }
  11360. /**
  11361. * Indicate that an exception should be thrown if any process is not faked.
  11362. *
  11363. * @param bool $prevent
  11364. * @return \Illuminate\Process\Factory
  11365. * @static
  11366. */
  11367. public static function preventStrayProcesses($prevent = true)
  11368. {
  11369. /** @var \Illuminate\Process\Factory $instance */
  11370. return $instance->preventStrayProcesses($prevent);
  11371. }
  11372. /**
  11373. * Determine if stray processes are being prevented.
  11374. *
  11375. * @return bool
  11376. * @static
  11377. */
  11378. public static function preventingStrayProcesses()
  11379. {
  11380. /** @var \Illuminate\Process\Factory $instance */
  11381. return $instance->preventingStrayProcesses();
  11382. }
  11383. /**
  11384. * Assert that a process was recorded matching a given truth test.
  11385. *
  11386. * @param \Closure|string $callback
  11387. * @return \Illuminate\Process\Factory
  11388. * @static
  11389. */
  11390. public static function assertRan($callback)
  11391. {
  11392. /** @var \Illuminate\Process\Factory $instance */
  11393. return $instance->assertRan($callback);
  11394. }
  11395. /**
  11396. * Assert that a process was recorded a given number of times matching a given truth test.
  11397. *
  11398. * @param \Closure|string $callback
  11399. * @param int $times
  11400. * @return \Illuminate\Process\Factory
  11401. * @static
  11402. */
  11403. public static function assertRanTimes($callback, $times = 1)
  11404. {
  11405. /** @var \Illuminate\Process\Factory $instance */
  11406. return $instance->assertRanTimes($callback, $times);
  11407. }
  11408. /**
  11409. * Assert that a process was not recorded matching a given truth test.
  11410. *
  11411. * @param \Closure|string $callback
  11412. * @return \Illuminate\Process\Factory
  11413. * @static
  11414. */
  11415. public static function assertNotRan($callback)
  11416. {
  11417. /** @var \Illuminate\Process\Factory $instance */
  11418. return $instance->assertNotRan($callback);
  11419. }
  11420. /**
  11421. * Assert that a process was not recorded matching a given truth test.
  11422. *
  11423. * @param \Closure|string $callback
  11424. * @return \Illuminate\Process\Factory
  11425. * @static
  11426. */
  11427. public static function assertDidntRun($callback)
  11428. {
  11429. /** @var \Illuminate\Process\Factory $instance */
  11430. return $instance->assertDidntRun($callback);
  11431. }
  11432. /**
  11433. * Assert that no processes were recorded.
  11434. *
  11435. * @return \Illuminate\Process\Factory
  11436. * @static
  11437. */
  11438. public static function assertNothingRan()
  11439. {
  11440. /** @var \Illuminate\Process\Factory $instance */
  11441. return $instance->assertNothingRan();
  11442. }
  11443. /**
  11444. * Start defining a pool of processes.
  11445. *
  11446. * @param callable $callback
  11447. * @return \Illuminate\Process\Pool
  11448. * @static
  11449. */
  11450. public static function pool($callback)
  11451. {
  11452. /** @var \Illuminate\Process\Factory $instance */
  11453. return $instance->pool($callback);
  11454. }
  11455. /**
  11456. * Start defining a series of piped processes.
  11457. *
  11458. * @param callable|array $callback
  11459. * @return \Illuminate\Contracts\Process\ProcessResult
  11460. * @static
  11461. */
  11462. public static function pipe($callback, $output = null)
  11463. {
  11464. /** @var \Illuminate\Process\Factory $instance */
  11465. return $instance->pipe($callback, $output);
  11466. }
  11467. /**
  11468. * Run a pool of processes and wait for them to finish executing.
  11469. *
  11470. * @param callable $callback
  11471. * @param callable|null $output
  11472. * @return \Illuminate\Process\ProcessPoolResults
  11473. * @static
  11474. */
  11475. public static function concurrently($callback, $output = null)
  11476. {
  11477. /** @var \Illuminate\Process\Factory $instance */
  11478. return $instance->concurrently($callback, $output);
  11479. }
  11480. /**
  11481. * Create a new pending process associated with this factory.
  11482. *
  11483. * @return \Illuminate\Process\PendingProcess
  11484. * @static
  11485. */
  11486. public static function newPendingProcess()
  11487. {
  11488. /** @var \Illuminate\Process\Factory $instance */
  11489. return $instance->newPendingProcess();
  11490. }
  11491. /**
  11492. * Register a custom macro.
  11493. *
  11494. * @param string $name
  11495. * @param object|callable $macro
  11496. * @param-closure-this static $macro
  11497. * @return void
  11498. * @static
  11499. */
  11500. public static function macro($name, $macro)
  11501. {
  11502. \Illuminate\Process\Factory::macro($name, $macro);
  11503. }
  11504. /**
  11505. * Mix another object into the class.
  11506. *
  11507. * @param object $mixin
  11508. * @param bool $replace
  11509. * @return void
  11510. * @throws \ReflectionException
  11511. * @static
  11512. */
  11513. public static function mixin($mixin, $replace = true)
  11514. {
  11515. \Illuminate\Process\Factory::mixin($mixin, $replace);
  11516. }
  11517. /**
  11518. * Checks if macro is registered.
  11519. *
  11520. * @param string $name
  11521. * @return bool
  11522. * @static
  11523. */
  11524. public static function hasMacro($name)
  11525. {
  11526. return \Illuminate\Process\Factory::hasMacro($name);
  11527. }
  11528. /**
  11529. * Flush the existing macros.
  11530. *
  11531. * @return void
  11532. * @static
  11533. */
  11534. public static function flushMacros()
  11535. {
  11536. \Illuminate\Process\Factory::flushMacros();
  11537. }
  11538. /**
  11539. * Dynamically handle calls to the class.
  11540. *
  11541. * @param string $method
  11542. * @param array $parameters
  11543. * @return mixed
  11544. * @throws \BadMethodCallException
  11545. * @static
  11546. */
  11547. public static function macroCall($method, $parameters)
  11548. {
  11549. /** @var \Illuminate\Process\Factory $instance */
  11550. return $instance->macroCall($method, $parameters);
  11551. }
  11552. }
  11553. /**
  11554. * @see \Illuminate\Queue\QueueManager
  11555. * @see \Illuminate\Queue\Queue
  11556. * @see \Illuminate\Support\Testing\Fakes\QueueFake
  11557. */
  11558. class Queue {
  11559. /**
  11560. * Register an event listener for the before job event.
  11561. *
  11562. * @param mixed $callback
  11563. * @return void
  11564. * @static
  11565. */
  11566. public static function before($callback)
  11567. {
  11568. /** @var \Illuminate\Queue\QueueManager $instance */
  11569. $instance->before($callback);
  11570. }
  11571. /**
  11572. * Register an event listener for the after job event.
  11573. *
  11574. * @param mixed $callback
  11575. * @return void
  11576. * @static
  11577. */
  11578. public static function after($callback)
  11579. {
  11580. /** @var \Illuminate\Queue\QueueManager $instance */
  11581. $instance->after($callback);
  11582. }
  11583. /**
  11584. * Register an event listener for the exception occurred job event.
  11585. *
  11586. * @param mixed $callback
  11587. * @return void
  11588. * @static
  11589. */
  11590. public static function exceptionOccurred($callback)
  11591. {
  11592. /** @var \Illuminate\Queue\QueueManager $instance */
  11593. $instance->exceptionOccurred($callback);
  11594. }
  11595. /**
  11596. * Register an event listener for the daemon queue loop.
  11597. *
  11598. * @param mixed $callback
  11599. * @return void
  11600. * @static
  11601. */
  11602. public static function looping($callback)
  11603. {
  11604. /** @var \Illuminate\Queue\QueueManager $instance */
  11605. $instance->looping($callback);
  11606. }
  11607. /**
  11608. * Register an event listener for the failed job event.
  11609. *
  11610. * @param mixed $callback
  11611. * @return void
  11612. * @static
  11613. */
  11614. public static function failing($callback)
  11615. {
  11616. /** @var \Illuminate\Queue\QueueManager $instance */
  11617. $instance->failing($callback);
  11618. }
  11619. /**
  11620. * Register an event listener for the daemon queue starting.
  11621. *
  11622. * @param mixed $callback
  11623. * @return void
  11624. * @static
  11625. */
  11626. public static function starting($callback)
  11627. {
  11628. /** @var \Illuminate\Queue\QueueManager $instance */
  11629. $instance->starting($callback);
  11630. }
  11631. /**
  11632. * Register an event listener for the daemon queue stopping.
  11633. *
  11634. * @param mixed $callback
  11635. * @return void
  11636. * @static
  11637. */
  11638. public static function stopping($callback)
  11639. {
  11640. /** @var \Illuminate\Queue\QueueManager $instance */
  11641. $instance->stopping($callback);
  11642. }
  11643. /**
  11644. * Determine if the driver is connected.
  11645. *
  11646. * @param string|null $name
  11647. * @return bool
  11648. * @static
  11649. */
  11650. public static function connected($name = null)
  11651. {
  11652. /** @var \Illuminate\Queue\QueueManager $instance */
  11653. return $instance->connected($name);
  11654. }
  11655. /**
  11656. * Resolve a queue connection instance.
  11657. *
  11658. * @param string|null $name
  11659. * @return \Illuminate\Contracts\Queue\Queue
  11660. * @static
  11661. */
  11662. public static function connection($name = null)
  11663. {
  11664. /** @var \Illuminate\Queue\QueueManager $instance */
  11665. return $instance->connection($name);
  11666. }
  11667. /**
  11668. * Add a queue connection resolver.
  11669. *
  11670. * @param string $driver
  11671. * @param \Closure $resolver
  11672. * @return void
  11673. * @static
  11674. */
  11675. public static function extend($driver, $resolver)
  11676. {
  11677. /** @var \Illuminate\Queue\QueueManager $instance */
  11678. $instance->extend($driver, $resolver);
  11679. }
  11680. /**
  11681. * Add a queue connection resolver.
  11682. *
  11683. * @param string $driver
  11684. * @param \Closure $resolver
  11685. * @return void
  11686. * @static
  11687. */
  11688. public static function addConnector($driver, $resolver)
  11689. {
  11690. /** @var \Illuminate\Queue\QueueManager $instance */
  11691. $instance->addConnector($driver, $resolver);
  11692. }
  11693. /**
  11694. * Get the name of the default queue connection.
  11695. *
  11696. * @return string
  11697. * @static
  11698. */
  11699. public static function getDefaultDriver()
  11700. {
  11701. /** @var \Illuminate\Queue\QueueManager $instance */
  11702. return $instance->getDefaultDriver();
  11703. }
  11704. /**
  11705. * Set the name of the default queue connection.
  11706. *
  11707. * @param string $name
  11708. * @return void
  11709. * @static
  11710. */
  11711. public static function setDefaultDriver($name)
  11712. {
  11713. /** @var \Illuminate\Queue\QueueManager $instance */
  11714. $instance->setDefaultDriver($name);
  11715. }
  11716. /**
  11717. * Get the full name for the given connection.
  11718. *
  11719. * @param string|null $connection
  11720. * @return string
  11721. * @static
  11722. */
  11723. public static function getName($connection = null)
  11724. {
  11725. /** @var \Illuminate\Queue\QueueManager $instance */
  11726. return $instance->getName($connection);
  11727. }
  11728. /**
  11729. * Get the application instance used by the manager.
  11730. *
  11731. * @return \Illuminate\Contracts\Foundation\Application
  11732. * @static
  11733. */
  11734. public static function getApplication()
  11735. {
  11736. /** @var \Illuminate\Queue\QueueManager $instance */
  11737. return $instance->getApplication();
  11738. }
  11739. /**
  11740. * Set the application instance used by the manager.
  11741. *
  11742. * @param \Illuminate\Contracts\Foundation\Application $app
  11743. * @return \Illuminate\Queue\QueueManager
  11744. * @static
  11745. */
  11746. public static function setApplication($app)
  11747. {
  11748. /** @var \Illuminate\Queue\QueueManager $instance */
  11749. return $instance->setApplication($app);
  11750. }
  11751. /**
  11752. * Specify the jobs that should be queued instead of faked.
  11753. *
  11754. * @param array|string $jobsToBeQueued
  11755. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  11756. * @static
  11757. */
  11758. public static function except($jobsToBeQueued)
  11759. {
  11760. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11761. return $instance->except($jobsToBeQueued);
  11762. }
  11763. /**
  11764. * Assert if a job was pushed based on a truth-test callback.
  11765. *
  11766. * @param string|\Closure $job
  11767. * @param callable|int|null $callback
  11768. * @return void
  11769. * @static
  11770. */
  11771. public static function assertPushed($job, $callback = null)
  11772. {
  11773. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11774. $instance->assertPushed($job, $callback);
  11775. }
  11776. /**
  11777. * Assert if a job was pushed based on a truth-test callback.
  11778. *
  11779. * @param string $queue
  11780. * @param string|\Closure $job
  11781. * @param callable|null $callback
  11782. * @return void
  11783. * @static
  11784. */
  11785. public static function assertPushedOn($queue, $job, $callback = null)
  11786. {
  11787. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11788. $instance->assertPushedOn($queue, $job, $callback);
  11789. }
  11790. /**
  11791. * Assert if a job was pushed with chained jobs based on a truth-test callback.
  11792. *
  11793. * @param string $job
  11794. * @param array $expectedChain
  11795. * @param callable|null $callback
  11796. * @return void
  11797. * @static
  11798. */
  11799. public static function assertPushedWithChain($job, $expectedChain = [], $callback = null)
  11800. {
  11801. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11802. $instance->assertPushedWithChain($job, $expectedChain, $callback);
  11803. }
  11804. /**
  11805. * Assert if a job was pushed with an empty chain based on a truth-test callback.
  11806. *
  11807. * @param string $job
  11808. * @param callable|null $callback
  11809. * @return void
  11810. * @static
  11811. */
  11812. public static function assertPushedWithoutChain($job, $callback = null)
  11813. {
  11814. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11815. $instance->assertPushedWithoutChain($job, $callback);
  11816. }
  11817. /**
  11818. * Assert if a closure was pushed based on a truth-test callback.
  11819. *
  11820. * @param callable|int|null $callback
  11821. * @return void
  11822. * @static
  11823. */
  11824. public static function assertClosurePushed($callback = null)
  11825. {
  11826. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11827. $instance->assertClosurePushed($callback);
  11828. }
  11829. /**
  11830. * Assert that a closure was not pushed based on a truth-test callback.
  11831. *
  11832. * @param callable|null $callback
  11833. * @return void
  11834. * @static
  11835. */
  11836. public static function assertClosureNotPushed($callback = null)
  11837. {
  11838. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11839. $instance->assertClosureNotPushed($callback);
  11840. }
  11841. /**
  11842. * Determine if a job was pushed based on a truth-test callback.
  11843. *
  11844. * @param string|\Closure $job
  11845. * @param callable|null $callback
  11846. * @return void
  11847. * @static
  11848. */
  11849. public static function assertNotPushed($job, $callback = null)
  11850. {
  11851. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11852. $instance->assertNotPushed($job, $callback);
  11853. }
  11854. /**
  11855. * Assert the total count of jobs that were pushed.
  11856. *
  11857. * @param int $expectedCount
  11858. * @return void
  11859. * @static
  11860. */
  11861. public static function assertCount($expectedCount)
  11862. {
  11863. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11864. $instance->assertCount($expectedCount);
  11865. }
  11866. /**
  11867. * Assert that no jobs were pushed.
  11868. *
  11869. * @return void
  11870. * @static
  11871. */
  11872. public static function assertNothingPushed()
  11873. {
  11874. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11875. $instance->assertNothingPushed();
  11876. }
  11877. /**
  11878. * Get all of the jobs matching a truth-test callback.
  11879. *
  11880. * @param string $job
  11881. * @param callable|null $callback
  11882. * @return \Illuminate\Support\Collection
  11883. * @static
  11884. */
  11885. public static function pushed($job, $callback = null)
  11886. {
  11887. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11888. return $instance->pushed($job, $callback);
  11889. }
  11890. /**
  11891. * Get all of the raw pushes matching a truth-test callback.
  11892. *
  11893. * @param null|\Closure(string, ?string, array): bool $callback
  11894. * @return \Illuminate\Support\Collection<int, RawPushType>
  11895. * @static
  11896. */
  11897. public static function pushedRaw($callback = null)
  11898. {
  11899. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11900. return $instance->pushedRaw($callback);
  11901. }
  11902. /**
  11903. * Get all of the jobs by listener class, passing an optional truth-test callback.
  11904. *
  11905. * @param class-string $listenerClass
  11906. * @param (\Closure(mixed, \Illuminate\Events\CallQueuedListener, string|null, mixed): bool)|null $callback
  11907. * @return \Illuminate\Support\Collection<int, \Illuminate\Events\CallQueuedListener>
  11908. * @static
  11909. */
  11910. public static function listenersPushed($listenerClass, $callback = null)
  11911. {
  11912. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11913. return $instance->listenersPushed($listenerClass, $callback);
  11914. }
  11915. /**
  11916. * Determine if there are any stored jobs for a given class.
  11917. *
  11918. * @param string $job
  11919. * @return bool
  11920. * @static
  11921. */
  11922. public static function hasPushed($job)
  11923. {
  11924. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11925. return $instance->hasPushed($job);
  11926. }
  11927. /**
  11928. * Get the size of the queue.
  11929. *
  11930. * @param string|null $queue
  11931. * @return int
  11932. * @static
  11933. */
  11934. public static function size($queue = null)
  11935. {
  11936. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11937. return $instance->size($queue);
  11938. }
  11939. /**
  11940. * Get the number of pending jobs.
  11941. *
  11942. * @param string|null $queue
  11943. * @return int
  11944. * @static
  11945. */
  11946. public static function pendingSize($queue = null)
  11947. {
  11948. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11949. return $instance->pendingSize($queue);
  11950. }
  11951. /**
  11952. * Get the number of delayed jobs.
  11953. *
  11954. * @param string|null $queue
  11955. * @return int
  11956. * @static
  11957. */
  11958. public static function delayedSize($queue = null)
  11959. {
  11960. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11961. return $instance->delayedSize($queue);
  11962. }
  11963. /**
  11964. * Get the number of reserved jobs.
  11965. *
  11966. * @param string|null $queue
  11967. * @return int
  11968. * @static
  11969. */
  11970. public static function reservedSize($queue = null)
  11971. {
  11972. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11973. return $instance->reservedSize($queue);
  11974. }
  11975. /**
  11976. * Get the creation timestamp of the oldest pending job, excluding delayed jobs.
  11977. *
  11978. * @param string|null $queue
  11979. * @return int|null
  11980. * @static
  11981. */
  11982. public static function creationTimeOfOldestPendingJob($queue = null)
  11983. {
  11984. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11985. return $instance->creationTimeOfOldestPendingJob($queue);
  11986. }
  11987. /**
  11988. * Push a new job onto the queue.
  11989. *
  11990. * @param string|object $job
  11991. * @param mixed $data
  11992. * @param string|null $queue
  11993. * @return mixed
  11994. * @static
  11995. */
  11996. public static function push($job, $data = '', $queue = null)
  11997. {
  11998. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11999. return $instance->push($job, $data, $queue);
  12000. }
  12001. /**
  12002. * Determine if a job should be faked or actually dispatched.
  12003. *
  12004. * @param object $job
  12005. * @return bool
  12006. * @static
  12007. */
  12008. public static function shouldFakeJob($job)
  12009. {
  12010. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12011. return $instance->shouldFakeJob($job);
  12012. }
  12013. /**
  12014. * Push a raw payload onto the queue.
  12015. *
  12016. * @param string $payload
  12017. * @param string|null $queue
  12018. * @param array $options
  12019. * @return mixed
  12020. * @static
  12021. */
  12022. public static function pushRaw($payload, $queue = null, $options = [])
  12023. {
  12024. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12025. return $instance->pushRaw($payload, $queue, $options);
  12026. }
  12027. /**
  12028. * Push a new job onto the queue after (n) seconds.
  12029. *
  12030. * @param \DateTimeInterface|\DateInterval|int $delay
  12031. * @param string|object $job
  12032. * @param mixed $data
  12033. * @param string|null $queue
  12034. * @return mixed
  12035. * @static
  12036. */
  12037. public static function later($delay, $job, $data = '', $queue = null)
  12038. {
  12039. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12040. return $instance->later($delay, $job, $data, $queue);
  12041. }
  12042. /**
  12043. * Push a new job onto the queue.
  12044. *
  12045. * @param string $queue
  12046. * @param string|object $job
  12047. * @param mixed $data
  12048. * @return mixed
  12049. * @static
  12050. */
  12051. public static function pushOn($queue, $job, $data = '')
  12052. {
  12053. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12054. return $instance->pushOn($queue, $job, $data);
  12055. }
  12056. /**
  12057. * Push a new job onto a specific queue after (n) seconds.
  12058. *
  12059. * @param string $queue
  12060. * @param \DateTimeInterface|\DateInterval|int $delay
  12061. * @param string|object $job
  12062. * @param mixed $data
  12063. * @return mixed
  12064. * @static
  12065. */
  12066. public static function laterOn($queue, $delay, $job, $data = '')
  12067. {
  12068. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12069. return $instance->laterOn($queue, $delay, $job, $data);
  12070. }
  12071. /**
  12072. * Pop the next job off of the queue.
  12073. *
  12074. * @param string|null $queue
  12075. * @return \Illuminate\Contracts\Queue\Job|null
  12076. * @static
  12077. */
  12078. public static function pop($queue = null)
  12079. {
  12080. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12081. return $instance->pop($queue);
  12082. }
  12083. /**
  12084. * Push an array of jobs onto the queue.
  12085. *
  12086. * @param array $jobs
  12087. * @param mixed $data
  12088. * @param string|null $queue
  12089. * @return mixed
  12090. * @static
  12091. */
  12092. public static function bulk($jobs, $data = '', $queue = null)
  12093. {
  12094. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12095. return $instance->bulk($jobs, $data, $queue);
  12096. }
  12097. /**
  12098. * Get the jobs that have been pushed.
  12099. *
  12100. * @return array
  12101. * @static
  12102. */
  12103. public static function pushedJobs()
  12104. {
  12105. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12106. return $instance->pushedJobs();
  12107. }
  12108. /**
  12109. * Get the payloads that were pushed raw.
  12110. *
  12111. * @return list<RawPushType>
  12112. * @static
  12113. */
  12114. public static function rawPushes()
  12115. {
  12116. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12117. return $instance->rawPushes();
  12118. }
  12119. /**
  12120. * Specify if jobs should be serialized and restored when being "pushed" to the queue.
  12121. *
  12122. * @param bool $serializeAndRestore
  12123. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  12124. * @static
  12125. */
  12126. public static function serializeAndRestore($serializeAndRestore = true)
  12127. {
  12128. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12129. return $instance->serializeAndRestore($serializeAndRestore);
  12130. }
  12131. /**
  12132. * Get the connection name for the queue.
  12133. *
  12134. * @return string
  12135. * @static
  12136. */
  12137. public static function getConnectionName()
  12138. {
  12139. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12140. return $instance->getConnectionName();
  12141. }
  12142. /**
  12143. * Set the connection name for the queue.
  12144. *
  12145. * @param string $name
  12146. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  12147. * @static
  12148. */
  12149. public static function setConnectionName($name)
  12150. {
  12151. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12152. return $instance->setConnectionName($name);
  12153. }
  12154. /**
  12155. * Migrate the delayed jobs that are ready to the regular queue.
  12156. *
  12157. * @param string $from
  12158. * @param string $to
  12159. * @return array
  12160. * @static
  12161. */
  12162. public static function migrateExpiredJobs($from, $to)
  12163. {
  12164. /** @var \Illuminate\Queue\RedisQueue $instance */
  12165. return $instance->migrateExpiredJobs($from, $to);
  12166. }
  12167. /**
  12168. * Delete a reserved job from the queue.
  12169. *
  12170. * @param string $queue
  12171. * @param \Illuminate\Queue\Jobs\RedisJob $job
  12172. * @return void
  12173. * @static
  12174. */
  12175. public static function deleteReserved($queue, $job)
  12176. {
  12177. /** @var \Illuminate\Queue\RedisQueue $instance */
  12178. $instance->deleteReserved($queue, $job);
  12179. }
  12180. /**
  12181. * Delete a reserved job from the reserved queue and release it.
  12182. *
  12183. * @param string $queue
  12184. * @param \Illuminate\Queue\Jobs\RedisJob $job
  12185. * @param int $delay
  12186. * @return void
  12187. * @static
  12188. */
  12189. public static function deleteAndRelease($queue, $job, $delay)
  12190. {
  12191. /** @var \Illuminate\Queue\RedisQueue $instance */
  12192. $instance->deleteAndRelease($queue, $job, $delay);
  12193. }
  12194. /**
  12195. * Delete all of the jobs from the queue.
  12196. *
  12197. * @param string $queue
  12198. * @return int
  12199. * @static
  12200. */
  12201. public static function clear($queue)
  12202. {
  12203. /** @var \Illuminate\Queue\RedisQueue $instance */
  12204. return $instance->clear($queue);
  12205. }
  12206. /**
  12207. * Get the queue or return the default.
  12208. *
  12209. * @param string|null $queue
  12210. * @return string
  12211. * @static
  12212. */
  12213. public static function getQueue($queue)
  12214. {
  12215. /** @var \Illuminate\Queue\RedisQueue $instance */
  12216. return $instance->getQueue($queue);
  12217. }
  12218. /**
  12219. * Get the connection for the queue.
  12220. *
  12221. * @return \Illuminate\Redis\Connections\Connection
  12222. * @static
  12223. */
  12224. public static function getConnection()
  12225. {
  12226. /** @var \Illuminate\Queue\RedisQueue $instance */
  12227. return $instance->getConnection();
  12228. }
  12229. /**
  12230. * Get the underlying Redis instance.
  12231. *
  12232. * @return \Illuminate\Contracts\Redis\Factory
  12233. * @static
  12234. */
  12235. public static function getRedis()
  12236. {
  12237. /** @var \Illuminate\Queue\RedisQueue $instance */
  12238. return $instance->getRedis();
  12239. }
  12240. /**
  12241. * Get the maximum number of attempts for an object-based queue handler.
  12242. *
  12243. * @param mixed $job
  12244. * @return mixed
  12245. * @static
  12246. */
  12247. public static function getJobTries($job)
  12248. {
  12249. //Method inherited from \Illuminate\Queue\Queue
  12250. /** @var \Illuminate\Queue\RedisQueue $instance */
  12251. return $instance->getJobTries($job);
  12252. }
  12253. /**
  12254. * Get the backoff for an object-based queue handler.
  12255. *
  12256. * @param mixed $job
  12257. * @return mixed
  12258. * @static
  12259. */
  12260. public static function getJobBackoff($job)
  12261. {
  12262. //Method inherited from \Illuminate\Queue\Queue
  12263. /** @var \Illuminate\Queue\RedisQueue $instance */
  12264. return $instance->getJobBackoff($job);
  12265. }
  12266. /**
  12267. * Get the expiration timestamp for an object-based queue handler.
  12268. *
  12269. * @param mixed $job
  12270. * @return mixed
  12271. * @static
  12272. */
  12273. public static function getJobExpiration($job)
  12274. {
  12275. //Method inherited from \Illuminate\Queue\Queue
  12276. /** @var \Illuminate\Queue\RedisQueue $instance */
  12277. return $instance->getJobExpiration($job);
  12278. }
  12279. /**
  12280. * Register a callback to be executed when creating job payloads.
  12281. *
  12282. * @param callable|null $callback
  12283. * @return void
  12284. * @static
  12285. */
  12286. public static function createPayloadUsing($callback)
  12287. {
  12288. //Method inherited from \Illuminate\Queue\Queue
  12289. \Illuminate\Queue\RedisQueue::createPayloadUsing($callback);
  12290. }
  12291. /**
  12292. * Get the container instance being used by the connection.
  12293. *
  12294. * @return \Illuminate\Container\Container
  12295. * @static
  12296. */
  12297. public static function getContainer()
  12298. {
  12299. //Method inherited from \Illuminate\Queue\Queue
  12300. /** @var \Illuminate\Queue\RedisQueue $instance */
  12301. return $instance->getContainer();
  12302. }
  12303. /**
  12304. * Set the IoC container instance.
  12305. *
  12306. * @param \Illuminate\Container\Container $container
  12307. * @return void
  12308. * @static
  12309. */
  12310. public static function setContainer($container)
  12311. {
  12312. //Method inherited from \Illuminate\Queue\Queue
  12313. /** @var \Illuminate\Queue\RedisQueue $instance */
  12314. $instance->setContainer($container);
  12315. }
  12316. }
  12317. /**
  12318. * @see \Illuminate\Cache\RateLimiter
  12319. */
  12320. class RateLimiter {
  12321. /**
  12322. * Register a named limiter configuration.
  12323. *
  12324. * @param \BackedEnum|\UnitEnum|string $name
  12325. * @param \Closure $callback
  12326. * @return \Illuminate\Cache\RateLimiter
  12327. * @static
  12328. */
  12329. public static function for($name, $callback)
  12330. {
  12331. /** @var \Illuminate\Cache\RateLimiter $instance */
  12332. return $instance->for($name, $callback);
  12333. }
  12334. /**
  12335. * Get the given named rate limiter.
  12336. *
  12337. * @param \BackedEnum|\UnitEnum|string $name
  12338. * @return \Closure|null
  12339. * @static
  12340. */
  12341. public static function limiter($name)
  12342. {
  12343. /** @var \Illuminate\Cache\RateLimiter $instance */
  12344. return $instance->limiter($name);
  12345. }
  12346. /**
  12347. * Attempts to execute a callback if it's not limited.
  12348. *
  12349. * @param string $key
  12350. * @param int $maxAttempts
  12351. * @param \Closure $callback
  12352. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12353. * @return mixed
  12354. * @static
  12355. */
  12356. public static function attempt($key, $maxAttempts, $callback, $decaySeconds = 60)
  12357. {
  12358. /** @var \Illuminate\Cache\RateLimiter $instance */
  12359. return $instance->attempt($key, $maxAttempts, $callback, $decaySeconds);
  12360. }
  12361. /**
  12362. * Determine if the given key has been "accessed" too many times.
  12363. *
  12364. * @param string $key
  12365. * @param int $maxAttempts
  12366. * @return bool
  12367. * @static
  12368. */
  12369. public static function tooManyAttempts($key, $maxAttempts)
  12370. {
  12371. /** @var \Illuminate\Cache\RateLimiter $instance */
  12372. return $instance->tooManyAttempts($key, $maxAttempts);
  12373. }
  12374. /**
  12375. * Increment (by 1) the counter for a given key for a given decay time.
  12376. *
  12377. * @param string $key
  12378. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12379. * @return int
  12380. * @static
  12381. */
  12382. public static function hit($key, $decaySeconds = 60)
  12383. {
  12384. /** @var \Illuminate\Cache\RateLimiter $instance */
  12385. return $instance->hit($key, $decaySeconds);
  12386. }
  12387. /**
  12388. * Increment the counter for a given key for a given decay time by a given amount.
  12389. *
  12390. * @param string $key
  12391. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12392. * @param int $amount
  12393. * @return int
  12394. * @static
  12395. */
  12396. public static function increment($key, $decaySeconds = 60, $amount = 1)
  12397. {
  12398. /** @var \Illuminate\Cache\RateLimiter $instance */
  12399. return $instance->increment($key, $decaySeconds, $amount);
  12400. }
  12401. /**
  12402. * Decrement the counter for a given key for a given decay time by a given amount.
  12403. *
  12404. * @param string $key
  12405. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12406. * @param int $amount
  12407. * @return int
  12408. * @static
  12409. */
  12410. public static function decrement($key, $decaySeconds = 60, $amount = 1)
  12411. {
  12412. /** @var \Illuminate\Cache\RateLimiter $instance */
  12413. return $instance->decrement($key, $decaySeconds, $amount);
  12414. }
  12415. /**
  12416. * Get the number of attempts for the given key.
  12417. *
  12418. * @param string $key
  12419. * @return mixed
  12420. * @static
  12421. */
  12422. public static function attempts($key)
  12423. {
  12424. /** @var \Illuminate\Cache\RateLimiter $instance */
  12425. return $instance->attempts($key);
  12426. }
  12427. /**
  12428. * Reset the number of attempts for the given key.
  12429. *
  12430. * @param string $key
  12431. * @return mixed
  12432. * @static
  12433. */
  12434. public static function resetAttempts($key)
  12435. {
  12436. /** @var \Illuminate\Cache\RateLimiter $instance */
  12437. return $instance->resetAttempts($key);
  12438. }
  12439. /**
  12440. * Get the number of retries left for the given key.
  12441. *
  12442. * @param string $key
  12443. * @param int $maxAttempts
  12444. * @return int
  12445. * @static
  12446. */
  12447. public static function remaining($key, $maxAttempts)
  12448. {
  12449. /** @var \Illuminate\Cache\RateLimiter $instance */
  12450. return $instance->remaining($key, $maxAttempts);
  12451. }
  12452. /**
  12453. * Get the number of retries left for the given key.
  12454. *
  12455. * @param string $key
  12456. * @param int $maxAttempts
  12457. * @return int
  12458. * @static
  12459. */
  12460. public static function retriesLeft($key, $maxAttempts)
  12461. {
  12462. /** @var \Illuminate\Cache\RateLimiter $instance */
  12463. return $instance->retriesLeft($key, $maxAttempts);
  12464. }
  12465. /**
  12466. * Clear the hits and lockout timer for the given key.
  12467. *
  12468. * @param string $key
  12469. * @return void
  12470. * @static
  12471. */
  12472. public static function clear($key)
  12473. {
  12474. /** @var \Illuminate\Cache\RateLimiter $instance */
  12475. $instance->clear($key);
  12476. }
  12477. /**
  12478. * Get the number of seconds until the "key" is accessible again.
  12479. *
  12480. * @param string $key
  12481. * @return int
  12482. * @static
  12483. */
  12484. public static function availableIn($key)
  12485. {
  12486. /** @var \Illuminate\Cache\RateLimiter $instance */
  12487. return $instance->availableIn($key);
  12488. }
  12489. /**
  12490. * Clean the rate limiter key from unicode characters.
  12491. *
  12492. * @param string $key
  12493. * @return string
  12494. * @static
  12495. */
  12496. public static function cleanRateLimiterKey($key)
  12497. {
  12498. /** @var \Illuminate\Cache\RateLimiter $instance */
  12499. return $instance->cleanRateLimiterKey($key);
  12500. }
  12501. }
  12502. /**
  12503. * @see \Illuminate\Routing\Redirector
  12504. */
  12505. class Redirect {
  12506. /**
  12507. * Create a new redirect response to the previous location.
  12508. *
  12509. * @param int $status
  12510. * @param array $headers
  12511. * @param mixed $fallback
  12512. * @return \Illuminate\Http\RedirectResponse
  12513. * @static
  12514. */
  12515. public static function back($status = 302, $headers = [], $fallback = false)
  12516. {
  12517. /** @var \Illuminate\Routing\Redirector $instance */
  12518. return $instance->back($status, $headers, $fallback);
  12519. }
  12520. /**
  12521. * Create a new redirect response to the current URI.
  12522. *
  12523. * @param int $status
  12524. * @param array $headers
  12525. * @return \Illuminate\Http\RedirectResponse
  12526. * @static
  12527. */
  12528. public static function refresh($status = 302, $headers = [])
  12529. {
  12530. /** @var \Illuminate\Routing\Redirector $instance */
  12531. return $instance->refresh($status, $headers);
  12532. }
  12533. /**
  12534. * Create a new redirect response, while putting the current URL in the session.
  12535. *
  12536. * @param string $path
  12537. * @param int $status
  12538. * @param array $headers
  12539. * @param bool|null $secure
  12540. * @return \Illuminate\Http\RedirectResponse
  12541. * @static
  12542. */
  12543. public static function guest($path, $status = 302, $headers = [], $secure = null)
  12544. {
  12545. /** @var \Illuminate\Routing\Redirector $instance */
  12546. return $instance->guest($path, $status, $headers, $secure);
  12547. }
  12548. /**
  12549. * Create a new redirect response to the previously intended location.
  12550. *
  12551. * @param mixed $default
  12552. * @param int $status
  12553. * @param array $headers
  12554. * @param bool|null $secure
  12555. * @return \Illuminate\Http\RedirectResponse
  12556. * @static
  12557. */
  12558. public static function intended($default = '/', $status = 302, $headers = [], $secure = null)
  12559. {
  12560. /** @var \Illuminate\Routing\Redirector $instance */
  12561. return $instance->intended($default, $status, $headers, $secure);
  12562. }
  12563. /**
  12564. * Create a new redirect response to the given path.
  12565. *
  12566. * @param string $path
  12567. * @param int $status
  12568. * @param array $headers
  12569. * @param bool|null $secure
  12570. * @return \Illuminate\Http\RedirectResponse
  12571. * @static
  12572. */
  12573. public static function to($path, $status = 302, $headers = [], $secure = null)
  12574. {
  12575. /** @var \Illuminate\Routing\Redirector $instance */
  12576. return $instance->to($path, $status, $headers, $secure);
  12577. }
  12578. /**
  12579. * Create a new redirect response to an external URL (no validation).
  12580. *
  12581. * @param string $path
  12582. * @param int $status
  12583. * @param array $headers
  12584. * @return \Illuminate\Http\RedirectResponse
  12585. * @static
  12586. */
  12587. public static function away($path, $status = 302, $headers = [])
  12588. {
  12589. /** @var \Illuminate\Routing\Redirector $instance */
  12590. return $instance->away($path, $status, $headers);
  12591. }
  12592. /**
  12593. * Create a new redirect response to the given HTTPS path.
  12594. *
  12595. * @param string $path
  12596. * @param int $status
  12597. * @param array $headers
  12598. * @return \Illuminate\Http\RedirectResponse
  12599. * @static
  12600. */
  12601. public static function secure($path, $status = 302, $headers = [])
  12602. {
  12603. /** @var \Illuminate\Routing\Redirector $instance */
  12604. return $instance->secure($path, $status, $headers);
  12605. }
  12606. /**
  12607. * Create a new redirect response to a named route.
  12608. *
  12609. * @param \BackedEnum|string $route
  12610. * @param mixed $parameters
  12611. * @param int $status
  12612. * @param array $headers
  12613. * @return \Illuminate\Http\RedirectResponse
  12614. * @static
  12615. */
  12616. public static function route($route, $parameters = [], $status = 302, $headers = [])
  12617. {
  12618. /** @var \Illuminate\Routing\Redirector $instance */
  12619. return $instance->route($route, $parameters, $status, $headers);
  12620. }
  12621. /**
  12622. * Create a new redirect response to a signed named route.
  12623. *
  12624. * @param \BackedEnum|string $route
  12625. * @param mixed $parameters
  12626. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  12627. * @param int $status
  12628. * @param array $headers
  12629. * @return \Illuminate\Http\RedirectResponse
  12630. * @static
  12631. */
  12632. public static function signedRoute($route, $parameters = [], $expiration = null, $status = 302, $headers = [])
  12633. {
  12634. /** @var \Illuminate\Routing\Redirector $instance */
  12635. return $instance->signedRoute($route, $parameters, $expiration, $status, $headers);
  12636. }
  12637. /**
  12638. * Create a new redirect response to a signed named route.
  12639. *
  12640. * @param \BackedEnum|string $route
  12641. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  12642. * @param mixed $parameters
  12643. * @param int $status
  12644. * @param array $headers
  12645. * @return \Illuminate\Http\RedirectResponse
  12646. * @static
  12647. */
  12648. public static function temporarySignedRoute($route, $expiration, $parameters = [], $status = 302, $headers = [])
  12649. {
  12650. /** @var \Illuminate\Routing\Redirector $instance */
  12651. return $instance->temporarySignedRoute($route, $expiration, $parameters, $status, $headers);
  12652. }
  12653. /**
  12654. * Create a new redirect response to a controller action.
  12655. *
  12656. * @param string|array $action
  12657. * @param mixed $parameters
  12658. * @param int $status
  12659. * @param array $headers
  12660. * @return \Illuminate\Http\RedirectResponse
  12661. * @static
  12662. */
  12663. public static function action($action, $parameters = [], $status = 302, $headers = [])
  12664. {
  12665. /** @var \Illuminate\Routing\Redirector $instance */
  12666. return $instance->action($action, $parameters, $status, $headers);
  12667. }
  12668. /**
  12669. * Get the URL generator instance.
  12670. *
  12671. * @return \Illuminate\Routing\UrlGenerator
  12672. * @static
  12673. */
  12674. public static function getUrlGenerator()
  12675. {
  12676. /** @var \Illuminate\Routing\Redirector $instance */
  12677. return $instance->getUrlGenerator();
  12678. }
  12679. /**
  12680. * Set the active session store.
  12681. *
  12682. * @param \Illuminate\Session\Store $session
  12683. * @return void
  12684. * @static
  12685. */
  12686. public static function setSession($session)
  12687. {
  12688. /** @var \Illuminate\Routing\Redirector $instance */
  12689. $instance->setSession($session);
  12690. }
  12691. /**
  12692. * Get the "intended" URL from the session.
  12693. *
  12694. * @return string|null
  12695. * @static
  12696. */
  12697. public static function getIntendedUrl()
  12698. {
  12699. /** @var \Illuminate\Routing\Redirector $instance */
  12700. return $instance->getIntendedUrl();
  12701. }
  12702. /**
  12703. * Set the "intended" URL in the session.
  12704. *
  12705. * @param string $url
  12706. * @return \Illuminate\Routing\Redirector
  12707. * @static
  12708. */
  12709. public static function setIntendedUrl($url)
  12710. {
  12711. /** @var \Illuminate\Routing\Redirector $instance */
  12712. return $instance->setIntendedUrl($url);
  12713. }
  12714. /**
  12715. * Register a custom macro.
  12716. *
  12717. * @param string $name
  12718. * @param object|callable $macro
  12719. * @param-closure-this static $macro
  12720. * @return void
  12721. * @static
  12722. */
  12723. public static function macro($name, $macro)
  12724. {
  12725. \Illuminate\Routing\Redirector::macro($name, $macro);
  12726. }
  12727. /**
  12728. * Mix another object into the class.
  12729. *
  12730. * @param object $mixin
  12731. * @param bool $replace
  12732. * @return void
  12733. * @throws \ReflectionException
  12734. * @static
  12735. */
  12736. public static function mixin($mixin, $replace = true)
  12737. {
  12738. \Illuminate\Routing\Redirector::mixin($mixin, $replace);
  12739. }
  12740. /**
  12741. * Checks if macro is registered.
  12742. *
  12743. * @param string $name
  12744. * @return bool
  12745. * @static
  12746. */
  12747. public static function hasMacro($name)
  12748. {
  12749. return \Illuminate\Routing\Redirector::hasMacro($name);
  12750. }
  12751. /**
  12752. * Flush the existing macros.
  12753. *
  12754. * @return void
  12755. * @static
  12756. */
  12757. public static function flushMacros()
  12758. {
  12759. \Illuminate\Routing\Redirector::flushMacros();
  12760. }
  12761. }
  12762. /**
  12763. * @see \Illuminate\Http\Request
  12764. */
  12765. class Request {
  12766. /**
  12767. * Create a new Illuminate HTTP request from server variables.
  12768. *
  12769. * @return static
  12770. * @static
  12771. */
  12772. public static function capture()
  12773. {
  12774. return \Illuminate\Http\Request::capture();
  12775. }
  12776. /**
  12777. * Return the Request instance.
  12778. *
  12779. * @return \Illuminate\Http\Request
  12780. * @static
  12781. */
  12782. public static function instance()
  12783. {
  12784. /** @var \Illuminate\Http\Request $instance */
  12785. return $instance->instance();
  12786. }
  12787. /**
  12788. * Get the request method.
  12789. *
  12790. * @return string
  12791. * @static
  12792. */
  12793. public static function method()
  12794. {
  12795. /** @var \Illuminate\Http\Request $instance */
  12796. return $instance->method();
  12797. }
  12798. /**
  12799. * Get a URI instance for the request.
  12800. *
  12801. * @return \Illuminate\Support\Uri
  12802. * @static
  12803. */
  12804. public static function uri()
  12805. {
  12806. /** @var \Illuminate\Http\Request $instance */
  12807. return $instance->uri();
  12808. }
  12809. /**
  12810. * Get the root URL for the application.
  12811. *
  12812. * @return string
  12813. * @static
  12814. */
  12815. public static function root()
  12816. {
  12817. /** @var \Illuminate\Http\Request $instance */
  12818. return $instance->root();
  12819. }
  12820. /**
  12821. * Get the URL (no query string) for the request.
  12822. *
  12823. * @return string
  12824. * @static
  12825. */
  12826. public static function url()
  12827. {
  12828. /** @var \Illuminate\Http\Request $instance */
  12829. return $instance->url();
  12830. }
  12831. /**
  12832. * Get the full URL for the request.
  12833. *
  12834. * @return string
  12835. * @static
  12836. */
  12837. public static function fullUrl()
  12838. {
  12839. /** @var \Illuminate\Http\Request $instance */
  12840. return $instance->fullUrl();
  12841. }
  12842. /**
  12843. * Get the full URL for the request with the added query string parameters.
  12844. *
  12845. * @param array $query
  12846. * @return string
  12847. * @static
  12848. */
  12849. public static function fullUrlWithQuery($query)
  12850. {
  12851. /** @var \Illuminate\Http\Request $instance */
  12852. return $instance->fullUrlWithQuery($query);
  12853. }
  12854. /**
  12855. * Get the full URL for the request without the given query string parameters.
  12856. *
  12857. * @param array|string $keys
  12858. * @return string
  12859. * @static
  12860. */
  12861. public static function fullUrlWithoutQuery($keys)
  12862. {
  12863. /** @var \Illuminate\Http\Request $instance */
  12864. return $instance->fullUrlWithoutQuery($keys);
  12865. }
  12866. /**
  12867. * Get the current path info for the request.
  12868. *
  12869. * @return string
  12870. * @static
  12871. */
  12872. public static function path()
  12873. {
  12874. /** @var \Illuminate\Http\Request $instance */
  12875. return $instance->path();
  12876. }
  12877. /**
  12878. * Get the current decoded path info for the request.
  12879. *
  12880. * @return string
  12881. * @static
  12882. */
  12883. public static function decodedPath()
  12884. {
  12885. /** @var \Illuminate\Http\Request $instance */
  12886. return $instance->decodedPath();
  12887. }
  12888. /**
  12889. * Get a segment from the URI (1 based index).
  12890. *
  12891. * @param int $index
  12892. * @param string|null $default
  12893. * @return string|null
  12894. * @static
  12895. */
  12896. public static function segment($index, $default = null)
  12897. {
  12898. /** @var \Illuminate\Http\Request $instance */
  12899. return $instance->segment($index, $default);
  12900. }
  12901. /**
  12902. * Get all of the segments for the request path.
  12903. *
  12904. * @return array
  12905. * @static
  12906. */
  12907. public static function segments()
  12908. {
  12909. /** @var \Illuminate\Http\Request $instance */
  12910. return $instance->segments();
  12911. }
  12912. /**
  12913. * Determine if the current request URI matches a pattern.
  12914. *
  12915. * @param mixed $patterns
  12916. * @return bool
  12917. * @static
  12918. */
  12919. public static function is(...$patterns)
  12920. {
  12921. /** @var \Illuminate\Http\Request $instance */
  12922. return $instance->is(...$patterns);
  12923. }
  12924. /**
  12925. * Determine if the route name matches a given pattern.
  12926. *
  12927. * @param mixed $patterns
  12928. * @return bool
  12929. * @static
  12930. */
  12931. public static function routeIs(...$patterns)
  12932. {
  12933. /** @var \Illuminate\Http\Request $instance */
  12934. return $instance->routeIs(...$patterns);
  12935. }
  12936. /**
  12937. * Determine if the current request URL and query string match a pattern.
  12938. *
  12939. * @param mixed $patterns
  12940. * @return bool
  12941. * @static
  12942. */
  12943. public static function fullUrlIs(...$patterns)
  12944. {
  12945. /** @var \Illuminate\Http\Request $instance */
  12946. return $instance->fullUrlIs(...$patterns);
  12947. }
  12948. /**
  12949. * Get the host name.
  12950. *
  12951. * @return string
  12952. * @static
  12953. */
  12954. public static function host()
  12955. {
  12956. /** @var \Illuminate\Http\Request $instance */
  12957. return $instance->host();
  12958. }
  12959. /**
  12960. * Get the HTTP host being requested.
  12961. *
  12962. * @return string
  12963. * @static
  12964. */
  12965. public static function httpHost()
  12966. {
  12967. /** @var \Illuminate\Http\Request $instance */
  12968. return $instance->httpHost();
  12969. }
  12970. /**
  12971. * Get the scheme and HTTP host.
  12972. *
  12973. * @return string
  12974. * @static
  12975. */
  12976. public static function schemeAndHttpHost()
  12977. {
  12978. /** @var \Illuminate\Http\Request $instance */
  12979. return $instance->schemeAndHttpHost();
  12980. }
  12981. /**
  12982. * Determine if the request is the result of an AJAX call.
  12983. *
  12984. * @return bool
  12985. * @static
  12986. */
  12987. public static function ajax()
  12988. {
  12989. /** @var \Illuminate\Http\Request $instance */
  12990. return $instance->ajax();
  12991. }
  12992. /**
  12993. * Determine if the request is the result of a PJAX call.
  12994. *
  12995. * @return bool
  12996. * @static
  12997. */
  12998. public static function pjax()
  12999. {
  13000. /** @var \Illuminate\Http\Request $instance */
  13001. return $instance->pjax();
  13002. }
  13003. /**
  13004. * Determine if the request is the result of a prefetch call.
  13005. *
  13006. * @return bool
  13007. * @static
  13008. */
  13009. public static function prefetch()
  13010. {
  13011. /** @var \Illuminate\Http\Request $instance */
  13012. return $instance->prefetch();
  13013. }
  13014. /**
  13015. * Determine if the request is over HTTPS.
  13016. *
  13017. * @return bool
  13018. * @static
  13019. */
  13020. public static function secure()
  13021. {
  13022. /** @var \Illuminate\Http\Request $instance */
  13023. return $instance->secure();
  13024. }
  13025. /**
  13026. * Get the client IP address.
  13027. *
  13028. * @return string|null
  13029. * @static
  13030. */
  13031. public static function ip()
  13032. {
  13033. /** @var \Illuminate\Http\Request $instance */
  13034. return $instance->ip();
  13035. }
  13036. /**
  13037. * Get the client IP addresses.
  13038. *
  13039. * @return array
  13040. * @static
  13041. */
  13042. public static function ips()
  13043. {
  13044. /** @var \Illuminate\Http\Request $instance */
  13045. return $instance->ips();
  13046. }
  13047. /**
  13048. * Get the client user agent.
  13049. *
  13050. * @return string|null
  13051. * @static
  13052. */
  13053. public static function userAgent()
  13054. {
  13055. /** @var \Illuminate\Http\Request $instance */
  13056. return $instance->userAgent();
  13057. }
  13058. /**
  13059. * Merge new input into the current request's input array.
  13060. *
  13061. * @param array $input
  13062. * @return \Illuminate\Http\Request
  13063. * @static
  13064. */
  13065. public static function merge($input)
  13066. {
  13067. /** @var \Illuminate\Http\Request $instance */
  13068. return $instance->merge($input);
  13069. }
  13070. /**
  13071. * Merge new input into the request's input, but only when that key is missing from the request.
  13072. *
  13073. * @param array $input
  13074. * @return \Illuminate\Http\Request
  13075. * @static
  13076. */
  13077. public static function mergeIfMissing($input)
  13078. {
  13079. /** @var \Illuminate\Http\Request $instance */
  13080. return $instance->mergeIfMissing($input);
  13081. }
  13082. /**
  13083. * Replace the input values for the current request.
  13084. *
  13085. * @param array $input
  13086. * @return \Illuminate\Http\Request
  13087. * @static
  13088. */
  13089. public static function replace($input)
  13090. {
  13091. /** @var \Illuminate\Http\Request $instance */
  13092. return $instance->replace($input);
  13093. }
  13094. /**
  13095. * This method belongs to Symfony HttpFoundation and is not usually needed when using Laravel.
  13096. *
  13097. * Instead, you may use the "input" method.
  13098. *
  13099. * @param string $key
  13100. * @param mixed $default
  13101. * @return mixed
  13102. * @static
  13103. */
  13104. public static function get($key, $default = null)
  13105. {
  13106. /** @var \Illuminate\Http\Request $instance */
  13107. return $instance->get($key, $default);
  13108. }
  13109. /**
  13110. * Get the JSON payload for the request.
  13111. *
  13112. * @param string|null $key
  13113. * @param mixed $default
  13114. * @return ($key is null ? \Symfony\Component\HttpFoundation\InputBag : mixed)
  13115. * @static
  13116. */
  13117. public static function json($key = null, $default = null)
  13118. {
  13119. /** @var \Illuminate\Http\Request $instance */
  13120. return $instance->json($key, $default);
  13121. }
  13122. /**
  13123. * Create a new request instance from the given Laravel request.
  13124. *
  13125. * @param \Illuminate\Http\Request $from
  13126. * @param \Illuminate\Http\Request|null $to
  13127. * @return static
  13128. * @static
  13129. */
  13130. public static function createFrom($from, $to = null)
  13131. {
  13132. return \Illuminate\Http\Request::createFrom($from, $to);
  13133. }
  13134. /**
  13135. * Create an Illuminate request from a Symfony instance.
  13136. *
  13137. * @param \Symfony\Component\HttpFoundation\Request $request
  13138. * @return static
  13139. * @static
  13140. */
  13141. public static function createFromBase($request)
  13142. {
  13143. return \Illuminate\Http\Request::createFromBase($request);
  13144. }
  13145. /**
  13146. * Clones a request and overrides some of its parameters.
  13147. *
  13148. * @return static
  13149. * @param array|null $query The GET parameters
  13150. * @param array|null $request The POST parameters
  13151. * @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  13152. * @param array|null $cookies The COOKIE parameters
  13153. * @param array|null $files The FILES parameters
  13154. * @param array|null $server The SERVER parameters
  13155. * @static
  13156. */
  13157. public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null)
  13158. {
  13159. /** @var \Illuminate\Http\Request $instance */
  13160. return $instance->duplicate($query, $request, $attributes, $cookies, $files, $server);
  13161. }
  13162. /**
  13163. * Whether the request contains a Session object.
  13164. *
  13165. * This method does not give any information about the state of the session object,
  13166. * like whether the session is started or not. It is just a way to check if this Request
  13167. * is associated with a Session instance.
  13168. *
  13169. * @param bool $skipIfUninitialized When true, ignores factories injected by `setSessionFactory`
  13170. * @static
  13171. */
  13172. public static function hasSession($skipIfUninitialized = false)
  13173. {
  13174. /** @var \Illuminate\Http\Request $instance */
  13175. return $instance->hasSession($skipIfUninitialized);
  13176. }
  13177. /**
  13178. * Gets the Session.
  13179. *
  13180. * @throws SessionNotFoundException When session is not set properly
  13181. * @static
  13182. */
  13183. public static function getSession()
  13184. {
  13185. /** @var \Illuminate\Http\Request $instance */
  13186. return $instance->getSession();
  13187. }
  13188. /**
  13189. * Get the session associated with the request.
  13190. *
  13191. * @return \Illuminate\Contracts\Session\Session
  13192. * @throws \RuntimeException
  13193. * @static
  13194. */
  13195. public static function session()
  13196. {
  13197. /** @var \Illuminate\Http\Request $instance */
  13198. return $instance->session();
  13199. }
  13200. /**
  13201. * Set the session instance on the request.
  13202. *
  13203. * @param \Illuminate\Contracts\Session\Session $session
  13204. * @return void
  13205. * @static
  13206. */
  13207. public static function setLaravelSession($session)
  13208. {
  13209. /** @var \Illuminate\Http\Request $instance */
  13210. $instance->setLaravelSession($session);
  13211. }
  13212. /**
  13213. * Set the locale for the request instance.
  13214. *
  13215. * @param string $locale
  13216. * @return void
  13217. * @static
  13218. */
  13219. public static function setRequestLocale($locale)
  13220. {
  13221. /** @var \Illuminate\Http\Request $instance */
  13222. $instance->setRequestLocale($locale);
  13223. }
  13224. /**
  13225. * Set the default locale for the request instance.
  13226. *
  13227. * @param string $locale
  13228. * @return void
  13229. * @static
  13230. */
  13231. public static function setDefaultRequestLocale($locale)
  13232. {
  13233. /** @var \Illuminate\Http\Request $instance */
  13234. $instance->setDefaultRequestLocale($locale);
  13235. }
  13236. /**
  13237. * Get the user making the request.
  13238. *
  13239. * @param string|null $guard
  13240. * @return mixed
  13241. * @static
  13242. */
  13243. public static function user($guard = null)
  13244. {
  13245. /** @var \Illuminate\Http\Request $instance */
  13246. return $instance->user($guard);
  13247. }
  13248. /**
  13249. * Get the route handling the request.
  13250. *
  13251. * @param string|null $param
  13252. * @param mixed $default
  13253. * @return ($param is null ? \Illuminate\Routing\Route : object|string|null)
  13254. * @static
  13255. */
  13256. public static function route($param = null, $default = null)
  13257. {
  13258. /** @var \Illuminate\Http\Request $instance */
  13259. return $instance->route($param, $default);
  13260. }
  13261. /**
  13262. * Get a unique fingerprint for the request / route / IP address.
  13263. *
  13264. * @return string
  13265. * @throws \RuntimeException
  13266. * @static
  13267. */
  13268. public static function fingerprint()
  13269. {
  13270. /** @var \Illuminate\Http\Request $instance */
  13271. return $instance->fingerprint();
  13272. }
  13273. /**
  13274. * Set the JSON payload for the request.
  13275. *
  13276. * @param \Symfony\Component\HttpFoundation\InputBag $json
  13277. * @return \Illuminate\Http\Request
  13278. * @static
  13279. */
  13280. public static function setJson($json)
  13281. {
  13282. /** @var \Illuminate\Http\Request $instance */
  13283. return $instance->setJson($json);
  13284. }
  13285. /**
  13286. * Get the user resolver callback.
  13287. *
  13288. * @return \Closure
  13289. * @static
  13290. */
  13291. public static function getUserResolver()
  13292. {
  13293. /** @var \Illuminate\Http\Request $instance */
  13294. return $instance->getUserResolver();
  13295. }
  13296. /**
  13297. * Set the user resolver callback.
  13298. *
  13299. * @param \Closure $callback
  13300. * @return \Illuminate\Http\Request
  13301. * @static
  13302. */
  13303. public static function setUserResolver($callback)
  13304. {
  13305. /** @var \Illuminate\Http\Request $instance */
  13306. return $instance->setUserResolver($callback);
  13307. }
  13308. /**
  13309. * Get the route resolver callback.
  13310. *
  13311. * @return \Closure
  13312. * @static
  13313. */
  13314. public static function getRouteResolver()
  13315. {
  13316. /** @var \Illuminate\Http\Request $instance */
  13317. return $instance->getRouteResolver();
  13318. }
  13319. /**
  13320. * Set the route resolver callback.
  13321. *
  13322. * @param \Closure $callback
  13323. * @return \Illuminate\Http\Request
  13324. * @static
  13325. */
  13326. public static function setRouteResolver($callback)
  13327. {
  13328. /** @var \Illuminate\Http\Request $instance */
  13329. return $instance->setRouteResolver($callback);
  13330. }
  13331. /**
  13332. * Get all of the input and files for the request.
  13333. *
  13334. * @return array
  13335. * @static
  13336. */
  13337. public static function toArray()
  13338. {
  13339. /** @var \Illuminate\Http\Request $instance */
  13340. return $instance->toArray();
  13341. }
  13342. /**
  13343. * Determine if the given offset exists.
  13344. *
  13345. * @param string $offset
  13346. * @return bool
  13347. * @static
  13348. */
  13349. public static function offsetExists($offset)
  13350. {
  13351. /** @var \Illuminate\Http\Request $instance */
  13352. return $instance->offsetExists($offset);
  13353. }
  13354. /**
  13355. * Get the value at the given offset.
  13356. *
  13357. * @param string $offset
  13358. * @return mixed
  13359. * @static
  13360. */
  13361. public static function offsetGet($offset)
  13362. {
  13363. /** @var \Illuminate\Http\Request $instance */
  13364. return $instance->offsetGet($offset);
  13365. }
  13366. /**
  13367. * Set the value at the given offset.
  13368. *
  13369. * @param string $offset
  13370. * @param mixed $value
  13371. * @return void
  13372. * @static
  13373. */
  13374. public static function offsetSet($offset, $value)
  13375. {
  13376. /** @var \Illuminate\Http\Request $instance */
  13377. $instance->offsetSet($offset, $value);
  13378. }
  13379. /**
  13380. * Remove the value at the given offset.
  13381. *
  13382. * @param string $offset
  13383. * @return void
  13384. * @static
  13385. */
  13386. public static function offsetUnset($offset)
  13387. {
  13388. /** @var \Illuminate\Http\Request $instance */
  13389. $instance->offsetUnset($offset);
  13390. }
  13391. /**
  13392. * Sets the parameters for this request.
  13393. *
  13394. * This method also re-initializes all properties.
  13395. *
  13396. * @param array $query The GET parameters
  13397. * @param array $request The POST parameters
  13398. * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  13399. * @param array $cookies The COOKIE parameters
  13400. * @param array $files The FILES parameters
  13401. * @param array $server The SERVER parameters
  13402. * @param string|resource|null $content The raw body data
  13403. * @static
  13404. */
  13405. public static function initialize($query = [], $request = [], $attributes = [], $cookies = [], $files = [], $server = [], $content = null)
  13406. {
  13407. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13408. /** @var \Illuminate\Http\Request $instance */
  13409. return $instance->initialize($query, $request, $attributes, $cookies, $files, $server, $content);
  13410. }
  13411. /**
  13412. * Creates a new request with values from PHP's super globals.
  13413. *
  13414. * @static
  13415. */
  13416. public static function createFromGlobals()
  13417. {
  13418. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13419. return \Illuminate\Http\Request::createFromGlobals();
  13420. }
  13421. /**
  13422. * Creates a Request based on a given URI and configuration.
  13423. *
  13424. * The information contained in the URI always take precedence
  13425. * over the other information (server and parameters).
  13426. *
  13427. * @param string $uri The URI
  13428. * @param string $method The HTTP method
  13429. * @param array $parameters The query (GET) or request (POST) parameters
  13430. * @param array $cookies The request cookies ($_COOKIE)
  13431. * @param array $files The request files ($_FILES)
  13432. * @param array $server The server parameters ($_SERVER)
  13433. * @param string|resource|null $content The raw body data
  13434. * @throws BadRequestException When the URI is invalid
  13435. * @static
  13436. */
  13437. public static function create($uri, $method = 'GET', $parameters = [], $cookies = [], $files = [], $server = [], $content = null)
  13438. {
  13439. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13440. return \Illuminate\Http\Request::create($uri, $method, $parameters, $cookies, $files, $server, $content);
  13441. }
  13442. /**
  13443. * Sets a callable able to create a Request instance.
  13444. *
  13445. * This is mainly useful when you need to override the Request class
  13446. * to keep BC with an existing system. It should not be used for any
  13447. * other purpose.
  13448. *
  13449. * @static
  13450. */
  13451. public static function setFactory($callable)
  13452. {
  13453. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13454. return \Illuminate\Http\Request::setFactory($callable);
  13455. }
  13456. /**
  13457. * Overrides the PHP global variables according to this request instance.
  13458. *
  13459. * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE.
  13460. * $_FILES is never overridden, see rfc1867
  13461. *
  13462. * @static
  13463. */
  13464. public static function overrideGlobals()
  13465. {
  13466. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13467. /** @var \Illuminate\Http\Request $instance */
  13468. return $instance->overrideGlobals();
  13469. }
  13470. /**
  13471. * Sets a list of trusted proxies.
  13472. *
  13473. * You should only list the reverse proxies that you manage directly.
  13474. *
  13475. * @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
  13476. * @param int-mask-of<Request::HEADER_*> $trustedHeaderSet A bit field to set which headers to trust from your proxies
  13477. * @static
  13478. */
  13479. public static function setTrustedProxies($proxies, $trustedHeaderSet)
  13480. {
  13481. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13482. return \Illuminate\Http\Request::setTrustedProxies($proxies, $trustedHeaderSet);
  13483. }
  13484. /**
  13485. * Gets the list of trusted proxies.
  13486. *
  13487. * @return string[]
  13488. * @static
  13489. */
  13490. public static function getTrustedProxies()
  13491. {
  13492. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13493. return \Illuminate\Http\Request::getTrustedProxies();
  13494. }
  13495. /**
  13496. * Gets the set of trusted headers from trusted proxies.
  13497. *
  13498. * @return int A bit field of Request::HEADER_* that defines which headers are trusted from your proxies
  13499. * @static
  13500. */
  13501. public static function getTrustedHeaderSet()
  13502. {
  13503. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13504. return \Illuminate\Http\Request::getTrustedHeaderSet();
  13505. }
  13506. /**
  13507. * Sets a list of trusted host patterns.
  13508. *
  13509. * You should only list the hosts you manage using regexs.
  13510. *
  13511. * @param array $hostPatterns A list of trusted host patterns
  13512. * @static
  13513. */
  13514. public static function setTrustedHosts($hostPatterns)
  13515. {
  13516. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13517. return \Illuminate\Http\Request::setTrustedHosts($hostPatterns);
  13518. }
  13519. /**
  13520. * Gets the list of trusted host patterns.
  13521. *
  13522. * @return string[]
  13523. * @static
  13524. */
  13525. public static function getTrustedHosts()
  13526. {
  13527. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13528. return \Illuminate\Http\Request::getTrustedHosts();
  13529. }
  13530. /**
  13531. * Normalizes a query string.
  13532. *
  13533. * It builds a normalized query string, where keys/value pairs are alphabetized,
  13534. * have consistent escaping and unneeded delimiters are removed.
  13535. *
  13536. * @static
  13537. */
  13538. public static function normalizeQueryString($qs)
  13539. {
  13540. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13541. return \Illuminate\Http\Request::normalizeQueryString($qs);
  13542. }
  13543. /**
  13544. * Enables support for the _method request parameter to determine the intended HTTP method.
  13545. *
  13546. * Be warned that enabling this feature might lead to CSRF issues in your code.
  13547. * Check that you are using CSRF tokens when required.
  13548. * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered
  13549. * and used to send a "PUT" or "DELETE" request via the _method request parameter.
  13550. * If these methods are not protected against CSRF, this presents a possible vulnerability.
  13551. *
  13552. * The HTTP method can only be overridden when the real HTTP method is POST.
  13553. *
  13554. * @static
  13555. */
  13556. public static function enableHttpMethodParameterOverride()
  13557. {
  13558. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13559. return \Illuminate\Http\Request::enableHttpMethodParameterOverride();
  13560. }
  13561. /**
  13562. * Checks whether support for the _method request parameter is enabled.
  13563. *
  13564. * @static
  13565. */
  13566. public static function getHttpMethodParameterOverride()
  13567. {
  13568. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13569. return \Illuminate\Http\Request::getHttpMethodParameterOverride();
  13570. }
  13571. /**
  13572. * Whether the request contains a Session which was started in one of the
  13573. * previous requests.
  13574. *
  13575. * @static
  13576. */
  13577. public static function hasPreviousSession()
  13578. {
  13579. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13580. /** @var \Illuminate\Http\Request $instance */
  13581. return $instance->hasPreviousSession();
  13582. }
  13583. /**
  13584. * @static
  13585. */
  13586. public static function setSession($session)
  13587. {
  13588. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13589. /** @var \Illuminate\Http\Request $instance */
  13590. return $instance->setSession($session);
  13591. }
  13592. /**
  13593. * @internal
  13594. * @param callable(): SessionInterface $factory
  13595. * @static
  13596. */
  13597. public static function setSessionFactory($factory)
  13598. {
  13599. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13600. /** @var \Illuminate\Http\Request $instance */
  13601. return $instance->setSessionFactory($factory);
  13602. }
  13603. /**
  13604. * Returns the client IP addresses.
  13605. *
  13606. * In the returned array the most trusted IP address is first, and the
  13607. * least trusted one last. The "real" client IP address is the last one,
  13608. * but this is also the least trusted one. Trusted proxies are stripped.
  13609. *
  13610. * Use this method carefully; you should use getClientIp() instead.
  13611. *
  13612. * @see getClientIp()
  13613. * @static
  13614. */
  13615. public static function getClientIps()
  13616. {
  13617. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13618. /** @var \Illuminate\Http\Request $instance */
  13619. return $instance->getClientIps();
  13620. }
  13621. /**
  13622. * Returns the client IP address.
  13623. *
  13624. * This method can read the client IP address from the "X-Forwarded-For" header
  13625. * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For"
  13626. * header value is a comma+space separated list of IP addresses, the left-most
  13627. * being the original client, and each successive proxy that passed the request
  13628. * adding the IP address where it received the request from.
  13629. *
  13630. * If your reverse proxy uses a different header name than "X-Forwarded-For",
  13631. * ("Client-Ip" for instance), configure it via the $trustedHeaderSet
  13632. * argument of the Request::setTrustedProxies() method instead.
  13633. *
  13634. * @see getClientIps()
  13635. * @see https://wikipedia.org/wiki/X-Forwarded-For
  13636. * @static
  13637. */
  13638. public static function getClientIp()
  13639. {
  13640. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13641. /** @var \Illuminate\Http\Request $instance */
  13642. return $instance->getClientIp();
  13643. }
  13644. /**
  13645. * Returns current script name.
  13646. *
  13647. * @static
  13648. */
  13649. public static function getScriptName()
  13650. {
  13651. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13652. /** @var \Illuminate\Http\Request $instance */
  13653. return $instance->getScriptName();
  13654. }
  13655. /**
  13656. * Returns the path being requested relative to the executed script.
  13657. *
  13658. * The path info always starts with a /.
  13659. *
  13660. * Suppose this request is instantiated from /mysite on localhost:
  13661. *
  13662. * * http://localhost/mysite returns an empty string
  13663. * * http://localhost/mysite/about returns '/about'
  13664. * * http://localhost/mysite/enco%20ded returns '/enco%20ded'
  13665. * * http://localhost/mysite/about?var=1 returns '/about'
  13666. *
  13667. * @return string The raw path (i.e. not urldecoded)
  13668. * @static
  13669. */
  13670. public static function getPathInfo()
  13671. {
  13672. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13673. /** @var \Illuminate\Http\Request $instance */
  13674. return $instance->getPathInfo();
  13675. }
  13676. /**
  13677. * Returns the root path from which this request is executed.
  13678. *
  13679. * Suppose that an index.php file instantiates this request object:
  13680. *
  13681. * * http://localhost/index.php returns an empty string
  13682. * * http://localhost/index.php/page returns an empty string
  13683. * * http://localhost/web/index.php returns '/web'
  13684. * * http://localhost/we%20b/index.php returns '/we%20b'
  13685. *
  13686. * @return string The raw path (i.e. not urldecoded)
  13687. * @static
  13688. */
  13689. public static function getBasePath()
  13690. {
  13691. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13692. /** @var \Illuminate\Http\Request $instance */
  13693. return $instance->getBasePath();
  13694. }
  13695. /**
  13696. * Returns the root URL from which this request is executed.
  13697. *
  13698. * The base URL never ends with a /.
  13699. *
  13700. * This is similar to getBasePath(), except that it also includes the
  13701. * script filename (e.g. index.php) if one exists.
  13702. *
  13703. * @return string The raw URL (i.e. not urldecoded)
  13704. * @static
  13705. */
  13706. public static function getBaseUrl()
  13707. {
  13708. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13709. /** @var \Illuminate\Http\Request $instance */
  13710. return $instance->getBaseUrl();
  13711. }
  13712. /**
  13713. * Gets the request's scheme.
  13714. *
  13715. * @static
  13716. */
  13717. public static function getScheme()
  13718. {
  13719. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13720. /** @var \Illuminate\Http\Request $instance */
  13721. return $instance->getScheme();
  13722. }
  13723. /**
  13724. * Returns the port on which the request is made.
  13725. *
  13726. * This method can read the client port from the "X-Forwarded-Port" header
  13727. * when trusted proxies were set via "setTrustedProxies()".
  13728. *
  13729. * The "X-Forwarded-Port" header must contain the client port.
  13730. *
  13731. * @return int|string|null Can be a string if fetched from the server bag
  13732. * @static
  13733. */
  13734. public static function getPort()
  13735. {
  13736. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13737. /** @var \Illuminate\Http\Request $instance */
  13738. return $instance->getPort();
  13739. }
  13740. /**
  13741. * Returns the user.
  13742. *
  13743. * @static
  13744. */
  13745. public static function getUser()
  13746. {
  13747. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13748. /** @var \Illuminate\Http\Request $instance */
  13749. return $instance->getUser();
  13750. }
  13751. /**
  13752. * Returns the password.
  13753. *
  13754. * @static
  13755. */
  13756. public static function getPassword()
  13757. {
  13758. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13759. /** @var \Illuminate\Http\Request $instance */
  13760. return $instance->getPassword();
  13761. }
  13762. /**
  13763. * Gets the user info.
  13764. *
  13765. * @return string|null A user name if any and, optionally, scheme-specific information about how to gain authorization to access the server
  13766. * @static
  13767. */
  13768. public static function getUserInfo()
  13769. {
  13770. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13771. /** @var \Illuminate\Http\Request $instance */
  13772. return $instance->getUserInfo();
  13773. }
  13774. /**
  13775. * Returns the HTTP host being requested.
  13776. *
  13777. * The port name will be appended to the host if it's non-standard.
  13778. *
  13779. * @static
  13780. */
  13781. public static function getHttpHost()
  13782. {
  13783. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13784. /** @var \Illuminate\Http\Request $instance */
  13785. return $instance->getHttpHost();
  13786. }
  13787. /**
  13788. * Returns the requested URI (path and query string).
  13789. *
  13790. * @return string The raw URI (i.e. not URI decoded)
  13791. * @static
  13792. */
  13793. public static function getRequestUri()
  13794. {
  13795. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13796. /** @var \Illuminate\Http\Request $instance */
  13797. return $instance->getRequestUri();
  13798. }
  13799. /**
  13800. * Gets the scheme and HTTP host.
  13801. *
  13802. * If the URL was called with basic authentication, the user
  13803. * and the password are not added to the generated string.
  13804. *
  13805. * @static
  13806. */
  13807. public static function getSchemeAndHttpHost()
  13808. {
  13809. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13810. /** @var \Illuminate\Http\Request $instance */
  13811. return $instance->getSchemeAndHttpHost();
  13812. }
  13813. /**
  13814. * Generates a normalized URI (URL) for the Request.
  13815. *
  13816. * @see getQueryString()
  13817. * @static
  13818. */
  13819. public static function getUri()
  13820. {
  13821. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13822. /** @var \Illuminate\Http\Request $instance */
  13823. return $instance->getUri();
  13824. }
  13825. /**
  13826. * Generates a normalized URI for the given path.
  13827. *
  13828. * @param string $path A path to use instead of the current one
  13829. * @static
  13830. */
  13831. public static function getUriForPath($path)
  13832. {
  13833. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13834. /** @var \Illuminate\Http\Request $instance */
  13835. return $instance->getUriForPath($path);
  13836. }
  13837. /**
  13838. * Returns the path as relative reference from the current Request path.
  13839. *
  13840. * Only the URIs path component (no schema, host etc.) is relevant and must be given.
  13841. * Both paths must be absolute and not contain relative parts.
  13842. * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives.
  13843. * Furthermore, they can be used to reduce the link size in documents.
  13844. *
  13845. * Example target paths, given a base path of "/a/b/c/d":
  13846. * - "/a/b/c/d" -> ""
  13847. * - "/a/b/c/" -> "./"
  13848. * - "/a/b/" -> "../"
  13849. * - "/a/b/c/other" -> "other"
  13850. * - "/a/x/y" -> "../../x/y"
  13851. *
  13852. * @static
  13853. */
  13854. public static function getRelativeUriForPath($path)
  13855. {
  13856. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13857. /** @var \Illuminate\Http\Request $instance */
  13858. return $instance->getRelativeUriForPath($path);
  13859. }
  13860. /**
  13861. * Generates the normalized query string for the Request.
  13862. *
  13863. * It builds a normalized query string, where keys/value pairs are alphabetized
  13864. * and have consistent escaping.
  13865. *
  13866. * @static
  13867. */
  13868. public static function getQueryString()
  13869. {
  13870. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13871. /** @var \Illuminate\Http\Request $instance */
  13872. return $instance->getQueryString();
  13873. }
  13874. /**
  13875. * Checks whether the request is secure or not.
  13876. *
  13877. * This method can read the client protocol from the "X-Forwarded-Proto" header
  13878. * when trusted proxies were set via "setTrustedProxies()".
  13879. *
  13880. * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".
  13881. *
  13882. * @static
  13883. */
  13884. public static function isSecure()
  13885. {
  13886. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13887. /** @var \Illuminate\Http\Request $instance */
  13888. return $instance->isSecure();
  13889. }
  13890. /**
  13891. * Returns the host name.
  13892. *
  13893. * This method can read the client host name from the "X-Forwarded-Host" header
  13894. * when trusted proxies were set via "setTrustedProxies()".
  13895. *
  13896. * The "X-Forwarded-Host" header must contain the client host name.
  13897. *
  13898. * @throws SuspiciousOperationException when the host name is invalid or not trusted
  13899. * @static
  13900. */
  13901. public static function getHost()
  13902. {
  13903. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13904. /** @var \Illuminate\Http\Request $instance */
  13905. return $instance->getHost();
  13906. }
  13907. /**
  13908. * Sets the request method.
  13909. *
  13910. * @static
  13911. */
  13912. public static function setMethod($method)
  13913. {
  13914. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13915. /** @var \Illuminate\Http\Request $instance */
  13916. return $instance->setMethod($method);
  13917. }
  13918. /**
  13919. * Gets the request "intended" method.
  13920. *
  13921. * If the X-HTTP-Method-Override header is set, and if the method is a POST,
  13922. * then it is used to determine the "real" intended HTTP method.
  13923. *
  13924. * The _method request parameter can also be used to determine the HTTP method,
  13925. * but only if enableHttpMethodParameterOverride() has been called.
  13926. *
  13927. * The method is always an uppercased string.
  13928. *
  13929. * @see getRealMethod()
  13930. * @static
  13931. */
  13932. public static function getMethod()
  13933. {
  13934. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13935. /** @var \Illuminate\Http\Request $instance */
  13936. return $instance->getMethod();
  13937. }
  13938. /**
  13939. * Gets the "real" request method.
  13940. *
  13941. * @see getMethod()
  13942. * @static
  13943. */
  13944. public static function getRealMethod()
  13945. {
  13946. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13947. /** @var \Illuminate\Http\Request $instance */
  13948. return $instance->getRealMethod();
  13949. }
  13950. /**
  13951. * Gets the mime type associated with the format.
  13952. *
  13953. * @static
  13954. */
  13955. public static function getMimeType($format)
  13956. {
  13957. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13958. /** @var \Illuminate\Http\Request $instance */
  13959. return $instance->getMimeType($format);
  13960. }
  13961. /**
  13962. * Gets the mime types associated with the format.
  13963. *
  13964. * @return string[]
  13965. * @static
  13966. */
  13967. public static function getMimeTypes($format)
  13968. {
  13969. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13970. return \Illuminate\Http\Request::getMimeTypes($format);
  13971. }
  13972. /**
  13973. * Gets the format associated with the mime type.
  13974. *
  13975. * @static
  13976. */
  13977. public static function getFormat($mimeType)
  13978. {
  13979. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13980. /** @var \Illuminate\Http\Request $instance */
  13981. return $instance->getFormat($mimeType);
  13982. }
  13983. /**
  13984. * Associates a format with mime types.
  13985. *
  13986. * @param string|string[] $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
  13987. * @static
  13988. */
  13989. public static function setFormat($format, $mimeTypes)
  13990. {
  13991. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13992. /** @var \Illuminate\Http\Request $instance */
  13993. return $instance->setFormat($format, $mimeTypes);
  13994. }
  13995. /**
  13996. * Gets the request format.
  13997. *
  13998. * Here is the process to determine the format:
  13999. *
  14000. * * format defined by the user (with setRequestFormat())
  14001. * * _format request attribute
  14002. * * $default
  14003. *
  14004. * @see getPreferredFormat
  14005. * @static
  14006. */
  14007. public static function getRequestFormat($default = 'html')
  14008. {
  14009. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14010. /** @var \Illuminate\Http\Request $instance */
  14011. return $instance->getRequestFormat($default);
  14012. }
  14013. /**
  14014. * Sets the request format.
  14015. *
  14016. * @static
  14017. */
  14018. public static function setRequestFormat($format)
  14019. {
  14020. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14021. /** @var \Illuminate\Http\Request $instance */
  14022. return $instance->setRequestFormat($format);
  14023. }
  14024. /**
  14025. * Gets the usual name of the format associated with the request's media type (provided in the Content-Type header).
  14026. *
  14027. * @see Request::$formats
  14028. * @static
  14029. */
  14030. public static function getContentTypeFormat()
  14031. {
  14032. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14033. /** @var \Illuminate\Http\Request $instance */
  14034. return $instance->getContentTypeFormat();
  14035. }
  14036. /**
  14037. * Sets the default locale.
  14038. *
  14039. * @static
  14040. */
  14041. public static function setDefaultLocale($locale)
  14042. {
  14043. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14044. /** @var \Illuminate\Http\Request $instance */
  14045. return $instance->setDefaultLocale($locale);
  14046. }
  14047. /**
  14048. * Get the default locale.
  14049. *
  14050. * @static
  14051. */
  14052. public static function getDefaultLocale()
  14053. {
  14054. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14055. /** @var \Illuminate\Http\Request $instance */
  14056. return $instance->getDefaultLocale();
  14057. }
  14058. /**
  14059. * Sets the locale.
  14060. *
  14061. * @static
  14062. */
  14063. public static function setLocale($locale)
  14064. {
  14065. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14066. /** @var \Illuminate\Http\Request $instance */
  14067. return $instance->setLocale($locale);
  14068. }
  14069. /**
  14070. * Get the locale.
  14071. *
  14072. * @static
  14073. */
  14074. public static function getLocale()
  14075. {
  14076. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14077. /** @var \Illuminate\Http\Request $instance */
  14078. return $instance->getLocale();
  14079. }
  14080. /**
  14081. * Checks if the request method is of specified type.
  14082. *
  14083. * @param string $method Uppercase request method (GET, POST etc)
  14084. * @static
  14085. */
  14086. public static function isMethod($method)
  14087. {
  14088. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14089. /** @var \Illuminate\Http\Request $instance */
  14090. return $instance->isMethod($method);
  14091. }
  14092. /**
  14093. * Checks whether or not the method is safe.
  14094. *
  14095. * @see https://tools.ietf.org/html/rfc7231#section-4.2.1
  14096. * @static
  14097. */
  14098. public static function isMethodSafe()
  14099. {
  14100. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14101. /** @var \Illuminate\Http\Request $instance */
  14102. return $instance->isMethodSafe();
  14103. }
  14104. /**
  14105. * Checks whether or not the method is idempotent.
  14106. *
  14107. * @static
  14108. */
  14109. public static function isMethodIdempotent()
  14110. {
  14111. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14112. /** @var \Illuminate\Http\Request $instance */
  14113. return $instance->isMethodIdempotent();
  14114. }
  14115. /**
  14116. * Checks whether the method is cacheable or not.
  14117. *
  14118. * @see https://tools.ietf.org/html/rfc7231#section-4.2.3
  14119. * @static
  14120. */
  14121. public static function isMethodCacheable()
  14122. {
  14123. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14124. /** @var \Illuminate\Http\Request $instance */
  14125. return $instance->isMethodCacheable();
  14126. }
  14127. /**
  14128. * Returns the protocol version.
  14129. *
  14130. * If the application is behind a proxy, the protocol version used in the
  14131. * requests between the client and the proxy and between the proxy and the
  14132. * server might be different. This returns the former (from the "Via" header)
  14133. * if the proxy is trusted (see "setTrustedProxies()"), otherwise it returns
  14134. * the latter (from the "SERVER_PROTOCOL" server parameter).
  14135. *
  14136. * @static
  14137. */
  14138. public static function getProtocolVersion()
  14139. {
  14140. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14141. /** @var \Illuminate\Http\Request $instance */
  14142. return $instance->getProtocolVersion();
  14143. }
  14144. /**
  14145. * Returns the request body content.
  14146. *
  14147. * @param bool $asResource If true, a resource will be returned
  14148. * @return string|resource
  14149. * @psalm-return ($asResource is true ? resource : string)
  14150. * @static
  14151. */
  14152. public static function getContent($asResource = false)
  14153. {
  14154. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14155. /** @var \Illuminate\Http\Request $instance */
  14156. return $instance->getContent($asResource);
  14157. }
  14158. /**
  14159. * Gets the decoded form or json request body.
  14160. *
  14161. * @throws JsonException When the body cannot be decoded to an array
  14162. * @static
  14163. */
  14164. public static function getPayload()
  14165. {
  14166. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14167. /** @var \Illuminate\Http\Request $instance */
  14168. return $instance->getPayload();
  14169. }
  14170. /**
  14171. * Gets the Etags.
  14172. *
  14173. * @static
  14174. */
  14175. public static function getETags()
  14176. {
  14177. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14178. /** @var \Illuminate\Http\Request $instance */
  14179. return $instance->getETags();
  14180. }
  14181. /**
  14182. * @static
  14183. */
  14184. public static function isNoCache()
  14185. {
  14186. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14187. /** @var \Illuminate\Http\Request $instance */
  14188. return $instance->isNoCache();
  14189. }
  14190. /**
  14191. * Gets the preferred format for the response by inspecting, in the following order:
  14192. * * the request format set using setRequestFormat;
  14193. * * the values of the Accept HTTP header.
  14194. *
  14195. * Note that if you use this method, you should send the "Vary: Accept" header
  14196. * in the response to prevent any issues with intermediary HTTP caches.
  14197. *
  14198. * @static
  14199. */
  14200. public static function getPreferredFormat($default = 'html')
  14201. {
  14202. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14203. /** @var \Illuminate\Http\Request $instance */
  14204. return $instance->getPreferredFormat($default);
  14205. }
  14206. /**
  14207. * Returns the preferred language.
  14208. *
  14209. * @param string[] $locales An array of ordered available locales
  14210. * @static
  14211. */
  14212. public static function getPreferredLanguage($locales = null)
  14213. {
  14214. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14215. /** @var \Illuminate\Http\Request $instance */
  14216. return $instance->getPreferredLanguage($locales);
  14217. }
  14218. /**
  14219. * Gets a list of languages acceptable by the client browser ordered in the user browser preferences.
  14220. *
  14221. * @return string[]
  14222. * @static
  14223. */
  14224. public static function getLanguages()
  14225. {
  14226. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14227. /** @var \Illuminate\Http\Request $instance */
  14228. return $instance->getLanguages();
  14229. }
  14230. /**
  14231. * Gets a list of charsets acceptable by the client browser in preferable order.
  14232. *
  14233. * @return string[]
  14234. * @static
  14235. */
  14236. public static function getCharsets()
  14237. {
  14238. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14239. /** @var \Illuminate\Http\Request $instance */
  14240. return $instance->getCharsets();
  14241. }
  14242. /**
  14243. * Gets a list of encodings acceptable by the client browser in preferable order.
  14244. *
  14245. * @return string[]
  14246. * @static
  14247. */
  14248. public static function getEncodings()
  14249. {
  14250. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14251. /** @var \Illuminate\Http\Request $instance */
  14252. return $instance->getEncodings();
  14253. }
  14254. /**
  14255. * Gets a list of content types acceptable by the client browser in preferable order.
  14256. *
  14257. * @return string[]
  14258. * @static
  14259. */
  14260. public static function getAcceptableContentTypes()
  14261. {
  14262. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14263. /** @var \Illuminate\Http\Request $instance */
  14264. return $instance->getAcceptableContentTypes();
  14265. }
  14266. /**
  14267. * Returns true if the request is an XMLHttpRequest.
  14268. *
  14269. * It works if your JavaScript library sets an X-Requested-With HTTP header.
  14270. * It is known to work with common JavaScript frameworks:
  14271. *
  14272. * @see https://wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
  14273. * @static
  14274. */
  14275. public static function isXmlHttpRequest()
  14276. {
  14277. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14278. /** @var \Illuminate\Http\Request $instance */
  14279. return $instance->isXmlHttpRequest();
  14280. }
  14281. /**
  14282. * Checks whether the client browser prefers safe content or not according to RFC8674.
  14283. *
  14284. * @see https://tools.ietf.org/html/rfc8674
  14285. * @static
  14286. */
  14287. public static function preferSafeContent()
  14288. {
  14289. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14290. /** @var \Illuminate\Http\Request $instance */
  14291. return $instance->preferSafeContent();
  14292. }
  14293. /**
  14294. * Indicates whether this request originated from a trusted proxy.
  14295. *
  14296. * This can be useful to determine whether or not to trust the
  14297. * contents of a proxy-specific header.
  14298. *
  14299. * @static
  14300. */
  14301. public static function isFromTrustedProxy()
  14302. {
  14303. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14304. /** @var \Illuminate\Http\Request $instance */
  14305. return $instance->isFromTrustedProxy();
  14306. }
  14307. /**
  14308. * Filter the given array of rules into an array of rules that are included in precognitive headers.
  14309. *
  14310. * @param array $rules
  14311. * @return array
  14312. * @static
  14313. */
  14314. public static function filterPrecognitiveRules($rules)
  14315. {
  14316. /** @var \Illuminate\Http\Request $instance */
  14317. return $instance->filterPrecognitiveRules($rules);
  14318. }
  14319. /**
  14320. * Determine if the request is attempting to be precognitive.
  14321. *
  14322. * @return bool
  14323. * @static
  14324. */
  14325. public static function isAttemptingPrecognition()
  14326. {
  14327. /** @var \Illuminate\Http\Request $instance */
  14328. return $instance->isAttemptingPrecognition();
  14329. }
  14330. /**
  14331. * Determine if the request is precognitive.
  14332. *
  14333. * @return bool
  14334. * @static
  14335. */
  14336. public static function isPrecognitive()
  14337. {
  14338. /** @var \Illuminate\Http\Request $instance */
  14339. return $instance->isPrecognitive();
  14340. }
  14341. /**
  14342. * Determine if the request is sending JSON.
  14343. *
  14344. * @return bool
  14345. * @static
  14346. */
  14347. public static function isJson()
  14348. {
  14349. /** @var \Illuminate\Http\Request $instance */
  14350. return $instance->isJson();
  14351. }
  14352. /**
  14353. * Determine if the current request probably expects a JSON response.
  14354. *
  14355. * @return bool
  14356. * @static
  14357. */
  14358. public static function expectsJson()
  14359. {
  14360. /** @var \Illuminate\Http\Request $instance */
  14361. return $instance->expectsJson();
  14362. }
  14363. /**
  14364. * Determine if the current request is asking for JSON.
  14365. *
  14366. * @return bool
  14367. * @static
  14368. */
  14369. public static function wantsJson()
  14370. {
  14371. /** @var \Illuminate\Http\Request $instance */
  14372. return $instance->wantsJson();
  14373. }
  14374. /**
  14375. * Determines whether the current requests accepts a given content type.
  14376. *
  14377. * @param string|array $contentTypes
  14378. * @return bool
  14379. * @static
  14380. */
  14381. public static function accepts($contentTypes)
  14382. {
  14383. /** @var \Illuminate\Http\Request $instance */
  14384. return $instance->accepts($contentTypes);
  14385. }
  14386. /**
  14387. * Return the most suitable content type from the given array based on content negotiation.
  14388. *
  14389. * @param string|array $contentTypes
  14390. * @return string|null
  14391. * @static
  14392. */
  14393. public static function prefers($contentTypes)
  14394. {
  14395. /** @var \Illuminate\Http\Request $instance */
  14396. return $instance->prefers($contentTypes);
  14397. }
  14398. /**
  14399. * Determine if the current request accepts any content type.
  14400. *
  14401. * @return bool
  14402. * @static
  14403. */
  14404. public static function acceptsAnyContentType()
  14405. {
  14406. /** @var \Illuminate\Http\Request $instance */
  14407. return $instance->acceptsAnyContentType();
  14408. }
  14409. /**
  14410. * Determines whether a request accepts JSON.
  14411. *
  14412. * @return bool
  14413. * @static
  14414. */
  14415. public static function acceptsJson()
  14416. {
  14417. /** @var \Illuminate\Http\Request $instance */
  14418. return $instance->acceptsJson();
  14419. }
  14420. /**
  14421. * Determines whether a request accepts HTML.
  14422. *
  14423. * @return bool
  14424. * @static
  14425. */
  14426. public static function acceptsHtml()
  14427. {
  14428. /** @var \Illuminate\Http\Request $instance */
  14429. return $instance->acceptsHtml();
  14430. }
  14431. /**
  14432. * Determine if the given content types match.
  14433. *
  14434. * @param string $actual
  14435. * @param string $type
  14436. * @return bool
  14437. * @static
  14438. */
  14439. public static function matchesType($actual, $type)
  14440. {
  14441. return \Illuminate\Http\Request::matchesType($actual, $type);
  14442. }
  14443. /**
  14444. * Get the data format expected in the response.
  14445. *
  14446. * @param string $default
  14447. * @return string
  14448. * @static
  14449. */
  14450. public static function format($default = 'html')
  14451. {
  14452. /** @var \Illuminate\Http\Request $instance */
  14453. return $instance->format($default);
  14454. }
  14455. /**
  14456. * Retrieve an old input item.
  14457. *
  14458. * @param string|null $key
  14459. * @param \Illuminate\Database\Eloquent\Model|string|array|null $default
  14460. * @return string|array|null
  14461. * @static
  14462. */
  14463. public static function old($key = null, $default = null)
  14464. {
  14465. /** @var \Illuminate\Http\Request $instance */
  14466. return $instance->old($key, $default);
  14467. }
  14468. /**
  14469. * Flash the input for the current request to the session.
  14470. *
  14471. * @return void
  14472. * @static
  14473. */
  14474. public static function flash()
  14475. {
  14476. /** @var \Illuminate\Http\Request $instance */
  14477. $instance->flash();
  14478. }
  14479. /**
  14480. * Flash only some of the input to the session.
  14481. *
  14482. * @param array|mixed $keys
  14483. * @return void
  14484. * @static
  14485. */
  14486. public static function flashOnly($keys)
  14487. {
  14488. /** @var \Illuminate\Http\Request $instance */
  14489. $instance->flashOnly($keys);
  14490. }
  14491. /**
  14492. * Flash only some of the input to the session.
  14493. *
  14494. * @param array|mixed $keys
  14495. * @return void
  14496. * @static
  14497. */
  14498. public static function flashExcept($keys)
  14499. {
  14500. /** @var \Illuminate\Http\Request $instance */
  14501. $instance->flashExcept($keys);
  14502. }
  14503. /**
  14504. * Flush all of the old input from the session.
  14505. *
  14506. * @return void
  14507. * @static
  14508. */
  14509. public static function flush()
  14510. {
  14511. /** @var \Illuminate\Http\Request $instance */
  14512. $instance->flush();
  14513. }
  14514. /**
  14515. * Retrieve a server variable from the request.
  14516. *
  14517. * @param string|null $key
  14518. * @param string|array|null $default
  14519. * @return string|array|null
  14520. * @static
  14521. */
  14522. public static function server($key = null, $default = null)
  14523. {
  14524. /** @var \Illuminate\Http\Request $instance */
  14525. return $instance->server($key, $default);
  14526. }
  14527. /**
  14528. * Determine if a header is set on the request.
  14529. *
  14530. * @param string $key
  14531. * @return bool
  14532. * @static
  14533. */
  14534. public static function hasHeader($key)
  14535. {
  14536. /** @var \Illuminate\Http\Request $instance */
  14537. return $instance->hasHeader($key);
  14538. }
  14539. /**
  14540. * Retrieve a header from the request.
  14541. *
  14542. * @param string|null $key
  14543. * @param string|array|null $default
  14544. * @return string|array|null
  14545. * @static
  14546. */
  14547. public static function header($key = null, $default = null)
  14548. {
  14549. /** @var \Illuminate\Http\Request $instance */
  14550. return $instance->header($key, $default);
  14551. }
  14552. /**
  14553. * Get the bearer token from the request headers.
  14554. *
  14555. * @return string|null
  14556. * @static
  14557. */
  14558. public static function bearerToken()
  14559. {
  14560. /** @var \Illuminate\Http\Request $instance */
  14561. return $instance->bearerToken();
  14562. }
  14563. /**
  14564. * Get the keys for all of the input and files.
  14565. *
  14566. * @return array
  14567. * @static
  14568. */
  14569. public static function keys()
  14570. {
  14571. /** @var \Illuminate\Http\Request $instance */
  14572. return $instance->keys();
  14573. }
  14574. /**
  14575. * Get all of the input and files for the request.
  14576. *
  14577. * @param array|mixed|null $keys
  14578. * @return array
  14579. * @static
  14580. */
  14581. public static function all($keys = null)
  14582. {
  14583. /** @var \Illuminate\Http\Request $instance */
  14584. return $instance->all($keys);
  14585. }
  14586. /**
  14587. * Retrieve an input item from the request.
  14588. *
  14589. * @param string|null $key
  14590. * @param mixed $default
  14591. * @return mixed
  14592. * @static
  14593. */
  14594. public static function input($key = null, $default = null)
  14595. {
  14596. /** @var \Illuminate\Http\Request $instance */
  14597. return $instance->input($key, $default);
  14598. }
  14599. /**
  14600. * Retrieve input from the request as a Fluent object instance.
  14601. *
  14602. * @param array|string|null $key
  14603. * @return \Illuminate\Support\Fluent
  14604. * @static
  14605. */
  14606. public static function fluent($key = null)
  14607. {
  14608. /** @var \Illuminate\Http\Request $instance */
  14609. return $instance->fluent($key);
  14610. }
  14611. /**
  14612. * Retrieve a query string item from the request.
  14613. *
  14614. * @param string|null $key
  14615. * @param string|array|null $default
  14616. * @return string|array|null
  14617. * @static
  14618. */
  14619. public static function query($key = null, $default = null)
  14620. {
  14621. /** @var \Illuminate\Http\Request $instance */
  14622. return $instance->query($key, $default);
  14623. }
  14624. /**
  14625. * Retrieve a request payload item from the request.
  14626. *
  14627. * @param string|null $key
  14628. * @param string|array|null $default
  14629. * @return string|array|null
  14630. * @static
  14631. */
  14632. public static function post($key = null, $default = null)
  14633. {
  14634. /** @var \Illuminate\Http\Request $instance */
  14635. return $instance->post($key, $default);
  14636. }
  14637. /**
  14638. * Determine if a cookie is set on the request.
  14639. *
  14640. * @param string $key
  14641. * @return bool
  14642. * @static
  14643. */
  14644. public static function hasCookie($key)
  14645. {
  14646. /** @var \Illuminate\Http\Request $instance */
  14647. return $instance->hasCookie($key);
  14648. }
  14649. /**
  14650. * Retrieve a cookie from the request.
  14651. *
  14652. * @param string|null $key
  14653. * @param string|array|null $default
  14654. * @return string|array|null
  14655. * @static
  14656. */
  14657. public static function cookie($key = null, $default = null)
  14658. {
  14659. /** @var \Illuminate\Http\Request $instance */
  14660. return $instance->cookie($key, $default);
  14661. }
  14662. /**
  14663. * Get an array of all of the files on the request.
  14664. *
  14665. * @return array<string, \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]>
  14666. * @static
  14667. */
  14668. public static function allFiles()
  14669. {
  14670. /** @var \Illuminate\Http\Request $instance */
  14671. return $instance->allFiles();
  14672. }
  14673. /**
  14674. * Determine if the uploaded data contains a file.
  14675. *
  14676. * @param string $key
  14677. * @return bool
  14678. * @static
  14679. */
  14680. public static function hasFile($key)
  14681. {
  14682. /** @var \Illuminate\Http\Request $instance */
  14683. return $instance->hasFile($key);
  14684. }
  14685. /**
  14686. * Retrieve a file from the request.
  14687. *
  14688. * @param string|null $key
  14689. * @param mixed $default
  14690. * @return ($key is null ? array<string, \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]> : \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]|null)
  14691. * @static
  14692. */
  14693. public static function file($key = null, $default = null)
  14694. {
  14695. /** @var \Illuminate\Http\Request $instance */
  14696. return $instance->file($key, $default);
  14697. }
  14698. /**
  14699. * Dump the items.
  14700. *
  14701. * @param mixed $keys
  14702. * @return \Illuminate\Http\Request
  14703. * @static
  14704. */
  14705. public static function dump($keys = [])
  14706. {
  14707. /** @var \Illuminate\Http\Request $instance */
  14708. return $instance->dump($keys);
  14709. }
  14710. /**
  14711. * Dump the given arguments and terminate execution.
  14712. *
  14713. * @param mixed $args
  14714. * @return never
  14715. * @static
  14716. */
  14717. public static function dd(...$args)
  14718. {
  14719. /** @var \Illuminate\Http\Request $instance */
  14720. return $instance->dd(...$args);
  14721. }
  14722. /**
  14723. * Determine if the data contains a given key.
  14724. *
  14725. * @param string|array $key
  14726. * @return bool
  14727. * @static
  14728. */
  14729. public static function exists($key)
  14730. {
  14731. /** @var \Illuminate\Http\Request $instance */
  14732. return $instance->exists($key);
  14733. }
  14734. /**
  14735. * Determine if the data contains a given key.
  14736. *
  14737. * @param string|array $key
  14738. * @return bool
  14739. * @static
  14740. */
  14741. public static function has($key)
  14742. {
  14743. /** @var \Illuminate\Http\Request $instance */
  14744. return $instance->has($key);
  14745. }
  14746. /**
  14747. * Determine if the instance contains any of the given keys.
  14748. *
  14749. * @param string|array $keys
  14750. * @return bool
  14751. * @static
  14752. */
  14753. public static function hasAny($keys)
  14754. {
  14755. /** @var \Illuminate\Http\Request $instance */
  14756. return $instance->hasAny($keys);
  14757. }
  14758. /**
  14759. * Apply the callback if the instance contains the given key.
  14760. *
  14761. * @param string $key
  14762. * @param callable $callback
  14763. * @param callable|null $default
  14764. * @return $this|mixed
  14765. * @static
  14766. */
  14767. public static function whenHas($key, $callback, $default = null)
  14768. {
  14769. /** @var \Illuminate\Http\Request $instance */
  14770. return $instance->whenHas($key, $callback, $default);
  14771. }
  14772. /**
  14773. * Determine if the instance contains a non-empty value for the given key.
  14774. *
  14775. * @param string|array $key
  14776. * @return bool
  14777. * @static
  14778. */
  14779. public static function filled($key)
  14780. {
  14781. /** @var \Illuminate\Http\Request $instance */
  14782. return $instance->filled($key);
  14783. }
  14784. /**
  14785. * Determine if the instance contains an empty value for the given key.
  14786. *
  14787. * @param string|array $key
  14788. * @return bool
  14789. * @static
  14790. */
  14791. public static function isNotFilled($key)
  14792. {
  14793. /** @var \Illuminate\Http\Request $instance */
  14794. return $instance->isNotFilled($key);
  14795. }
  14796. /**
  14797. * Determine if the instance contains a non-empty value for any of the given keys.
  14798. *
  14799. * @param string|array $keys
  14800. * @return bool
  14801. * @static
  14802. */
  14803. public static function anyFilled($keys)
  14804. {
  14805. /** @var \Illuminate\Http\Request $instance */
  14806. return $instance->anyFilled($keys);
  14807. }
  14808. /**
  14809. * Apply the callback if the instance contains a non-empty value for the given key.
  14810. *
  14811. * @param string $key
  14812. * @param callable $callback
  14813. * @param callable|null $default
  14814. * @return $this|mixed
  14815. * @static
  14816. */
  14817. public static function whenFilled($key, $callback, $default = null)
  14818. {
  14819. /** @var \Illuminate\Http\Request $instance */
  14820. return $instance->whenFilled($key, $callback, $default);
  14821. }
  14822. /**
  14823. * Determine if the instance is missing a given key.
  14824. *
  14825. * @param string|array $key
  14826. * @return bool
  14827. * @static
  14828. */
  14829. public static function missing($key)
  14830. {
  14831. /** @var \Illuminate\Http\Request $instance */
  14832. return $instance->missing($key);
  14833. }
  14834. /**
  14835. * Apply the callback if the instance is missing the given key.
  14836. *
  14837. * @param string $key
  14838. * @param callable $callback
  14839. * @param callable|null $default
  14840. * @return $this|mixed
  14841. * @static
  14842. */
  14843. public static function whenMissing($key, $callback, $default = null)
  14844. {
  14845. /** @var \Illuminate\Http\Request $instance */
  14846. return $instance->whenMissing($key, $callback, $default);
  14847. }
  14848. /**
  14849. * Retrieve data from the instance as a Stringable instance.
  14850. *
  14851. * @param string $key
  14852. * @param mixed $default
  14853. * @return \Illuminate\Support\Stringable
  14854. * @static
  14855. */
  14856. public static function str($key, $default = null)
  14857. {
  14858. /** @var \Illuminate\Http\Request $instance */
  14859. return $instance->str($key, $default);
  14860. }
  14861. /**
  14862. * Retrieve data from the instance as a Stringable instance.
  14863. *
  14864. * @param string $key
  14865. * @param mixed $default
  14866. * @return \Illuminate\Support\Stringable
  14867. * @static
  14868. */
  14869. public static function string($key, $default = null)
  14870. {
  14871. /** @var \Illuminate\Http\Request $instance */
  14872. return $instance->string($key, $default);
  14873. }
  14874. /**
  14875. * Retrieve data as a boolean value.
  14876. *
  14877. * Returns true when value is "1", "true", "on", and "yes". Otherwise, returns false.
  14878. *
  14879. * @param string|null $key
  14880. * @param bool $default
  14881. * @return bool
  14882. * @static
  14883. */
  14884. public static function boolean($key = null, $default = false)
  14885. {
  14886. /** @var \Illuminate\Http\Request $instance */
  14887. return $instance->boolean($key, $default);
  14888. }
  14889. /**
  14890. * Retrieve data as an integer value.
  14891. *
  14892. * @param string $key
  14893. * @param int $default
  14894. * @return int
  14895. * @static
  14896. */
  14897. public static function integer($key, $default = 0)
  14898. {
  14899. /** @var \Illuminate\Http\Request $instance */
  14900. return $instance->integer($key, $default);
  14901. }
  14902. /**
  14903. * Retrieve data as a float value.
  14904. *
  14905. * @param string $key
  14906. * @param float $default
  14907. * @return float
  14908. * @static
  14909. */
  14910. public static function float($key, $default = 0.0)
  14911. {
  14912. /** @var \Illuminate\Http\Request $instance */
  14913. return $instance->float($key, $default);
  14914. }
  14915. /**
  14916. * Retrieve data from the instance as a Carbon instance.
  14917. *
  14918. * @param string $key
  14919. * @param string|null $format
  14920. * @param string|null $tz
  14921. * @return \Illuminate\Support\Carbon|null
  14922. * @throws \Carbon\Exceptions\InvalidFormatException
  14923. * @static
  14924. */
  14925. public static function date($key, $format = null, $tz = null)
  14926. {
  14927. /** @var \Illuminate\Http\Request $instance */
  14928. return $instance->date($key, $format, $tz);
  14929. }
  14930. /**
  14931. * Retrieve data from the instance as an enum.
  14932. *
  14933. * @template TEnum of \BackedEnum
  14934. * @param string $key
  14935. * @param class-string<TEnum> $enumClass
  14936. * @param TEnum|null $default
  14937. * @return TEnum|null
  14938. * @static
  14939. */
  14940. public static function enum($key, $enumClass, $default = null)
  14941. {
  14942. /** @var \Illuminate\Http\Request $instance */
  14943. return $instance->enum($key, $enumClass, $default);
  14944. }
  14945. /**
  14946. * Retrieve data from the instance as an array of enums.
  14947. *
  14948. * @template TEnum of \BackedEnum
  14949. * @param string $key
  14950. * @param class-string<TEnum> $enumClass
  14951. * @return TEnum[]
  14952. * @static
  14953. */
  14954. public static function enums($key, $enumClass)
  14955. {
  14956. /** @var \Illuminate\Http\Request $instance */
  14957. return $instance->enums($key, $enumClass);
  14958. }
  14959. /**
  14960. * Retrieve data from the instance as an array.
  14961. *
  14962. * @param array|string|null $key
  14963. * @return array
  14964. * @static
  14965. */
  14966. public static function array($key = null)
  14967. {
  14968. /** @var \Illuminate\Http\Request $instance */
  14969. return $instance->array($key);
  14970. }
  14971. /**
  14972. * Retrieve data from the instance as a collection.
  14973. *
  14974. * @param array|string|null $key
  14975. * @return \Illuminate\Support\Collection
  14976. * @static
  14977. */
  14978. public static function collect($key = null)
  14979. {
  14980. /** @var \Illuminate\Http\Request $instance */
  14981. return $instance->collect($key);
  14982. }
  14983. /**
  14984. * Get a subset containing the provided keys with values from the instance data.
  14985. *
  14986. * @param array|mixed $keys
  14987. * @return array
  14988. * @static
  14989. */
  14990. public static function only($keys)
  14991. {
  14992. /** @var \Illuminate\Http\Request $instance */
  14993. return $instance->only($keys);
  14994. }
  14995. /**
  14996. * Get all of the data except for a specified array of items.
  14997. *
  14998. * @param array|mixed $keys
  14999. * @return array
  15000. * @static
  15001. */
  15002. public static function except($keys)
  15003. {
  15004. /** @var \Illuminate\Http\Request $instance */
  15005. return $instance->except($keys);
  15006. }
  15007. /**
  15008. * Apply the callback if the given "value" is (or resolves to) truthy.
  15009. *
  15010. * @template TWhenParameter
  15011. * @template TWhenReturnType
  15012. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  15013. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  15014. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  15015. * @return $this|TWhenReturnType
  15016. * @static
  15017. */
  15018. public static function when($value = null, $callback = null, $default = null)
  15019. {
  15020. /** @var \Illuminate\Http\Request $instance */
  15021. return $instance->when($value, $callback, $default);
  15022. }
  15023. /**
  15024. * Apply the callback if the given "value" is (or resolves to) falsy.
  15025. *
  15026. * @template TUnlessParameter
  15027. * @template TUnlessReturnType
  15028. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  15029. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  15030. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  15031. * @return $this|TUnlessReturnType
  15032. * @static
  15033. */
  15034. public static function unless($value = null, $callback = null, $default = null)
  15035. {
  15036. /** @var \Illuminate\Http\Request $instance */
  15037. return $instance->unless($value, $callback, $default);
  15038. }
  15039. /**
  15040. * Register a custom macro.
  15041. *
  15042. * @param string $name
  15043. * @param object|callable $macro
  15044. * @param-closure-this static $macro
  15045. * @return void
  15046. * @static
  15047. */
  15048. public static function macro($name, $macro)
  15049. {
  15050. \Illuminate\Http\Request::macro($name, $macro);
  15051. }
  15052. /**
  15053. * Mix another object into the class.
  15054. *
  15055. * @param object $mixin
  15056. * @param bool $replace
  15057. * @return void
  15058. * @throws \ReflectionException
  15059. * @static
  15060. */
  15061. public static function mixin($mixin, $replace = true)
  15062. {
  15063. \Illuminate\Http\Request::mixin($mixin, $replace);
  15064. }
  15065. /**
  15066. * Checks if macro is registered.
  15067. *
  15068. * @param string $name
  15069. * @return bool
  15070. * @static
  15071. */
  15072. public static function hasMacro($name)
  15073. {
  15074. return \Illuminate\Http\Request::hasMacro($name);
  15075. }
  15076. /**
  15077. * Flush the existing macros.
  15078. *
  15079. * @return void
  15080. * @static
  15081. */
  15082. public static function flushMacros()
  15083. {
  15084. \Illuminate\Http\Request::flushMacros();
  15085. }
  15086. /**
  15087. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  15088. * @param array $rules
  15089. * @param mixed $params
  15090. * @static
  15091. */
  15092. public static function validate($rules, ...$params)
  15093. {
  15094. return \Illuminate\Http\Request::validate($rules, ...$params);
  15095. }
  15096. /**
  15097. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  15098. * @param string $errorBag
  15099. * @param array $rules
  15100. * @param mixed $params
  15101. * @static
  15102. */
  15103. public static function validateWithBag($errorBag, $rules, ...$params)
  15104. {
  15105. return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params);
  15106. }
  15107. /**
  15108. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15109. * @param mixed $absolute
  15110. * @static
  15111. */
  15112. public static function hasValidSignature($absolute = true)
  15113. {
  15114. return \Illuminate\Http\Request::hasValidSignature($absolute);
  15115. }
  15116. /**
  15117. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15118. * @static
  15119. */
  15120. public static function hasValidRelativeSignature()
  15121. {
  15122. return \Illuminate\Http\Request::hasValidRelativeSignature();
  15123. }
  15124. /**
  15125. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15126. * @param mixed $ignoreQuery
  15127. * @param mixed $absolute
  15128. * @static
  15129. */
  15130. public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)
  15131. {
  15132. return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute);
  15133. }
  15134. /**
  15135. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15136. * @param mixed $ignoreQuery
  15137. * @static
  15138. */
  15139. public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])
  15140. {
  15141. return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery);
  15142. }
  15143. }
  15144. /**
  15145. * @see \Illuminate\Routing\ResponseFactory
  15146. */
  15147. class Response {
  15148. /**
  15149. * Create a new response instance.
  15150. *
  15151. * @param mixed $content
  15152. * @param int $status
  15153. * @param array $headers
  15154. * @return \Illuminate\Http\Response
  15155. * @static
  15156. */
  15157. public static function make($content = '', $status = 200, $headers = [])
  15158. {
  15159. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15160. return $instance->make($content, $status, $headers);
  15161. }
  15162. /**
  15163. * Create a new "no content" response.
  15164. *
  15165. * @param int $status
  15166. * @param array $headers
  15167. * @return \Illuminate\Http\Response
  15168. * @static
  15169. */
  15170. public static function noContent($status = 204, $headers = [])
  15171. {
  15172. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15173. return $instance->noContent($status, $headers);
  15174. }
  15175. /**
  15176. * Create a new response for a given view.
  15177. *
  15178. * @param string|array $view
  15179. * @param array $data
  15180. * @param int $status
  15181. * @param array $headers
  15182. * @return \Illuminate\Http\Response
  15183. * @static
  15184. */
  15185. public static function view($view, $data = [], $status = 200, $headers = [])
  15186. {
  15187. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15188. return $instance->view($view, $data, $status, $headers);
  15189. }
  15190. /**
  15191. * Create a new JSON response instance.
  15192. *
  15193. * @param mixed $data
  15194. * @param int $status
  15195. * @param array $headers
  15196. * @param int $options
  15197. * @return \Illuminate\Http\JsonResponse
  15198. * @static
  15199. */
  15200. public static function json($data = [], $status = 200, $headers = [], $options = 0)
  15201. {
  15202. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15203. return $instance->json($data, $status, $headers, $options);
  15204. }
  15205. /**
  15206. * Create a new JSONP response instance.
  15207. *
  15208. * @param string $callback
  15209. * @param mixed $data
  15210. * @param int $status
  15211. * @param array $headers
  15212. * @param int $options
  15213. * @return \Illuminate\Http\JsonResponse
  15214. * @static
  15215. */
  15216. public static function jsonp($callback, $data = [], $status = 200, $headers = [], $options = 0)
  15217. {
  15218. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15219. return $instance->jsonp($callback, $data, $status, $headers, $options);
  15220. }
  15221. /**
  15222. * Create a new event stream response.
  15223. *
  15224. * @param \Closure $callback
  15225. * @param array $headers
  15226. * @param \Illuminate\Http\StreamedEvent|string|null $endStreamWith
  15227. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15228. * @static
  15229. */
  15230. public static function eventStream($callback, $headers = [], $endStreamWith = '</stream>')
  15231. {
  15232. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15233. return $instance->eventStream($callback, $headers, $endStreamWith);
  15234. }
  15235. /**
  15236. * Create a new streamed response instance.
  15237. *
  15238. * @param callable|null $callback
  15239. * @param int $status
  15240. * @param array $headers
  15241. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15242. * @static
  15243. */
  15244. public static function stream($callback, $status = 200, $headers = [])
  15245. {
  15246. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15247. return $instance->stream($callback, $status, $headers);
  15248. }
  15249. /**
  15250. * Create a new streamed JSON response instance.
  15251. *
  15252. * @param array $data
  15253. * @param int $status
  15254. * @param array $headers
  15255. * @param int $encodingOptions
  15256. * @return \Symfony\Component\HttpFoundation\StreamedJsonResponse
  15257. * @static
  15258. */
  15259. public static function streamJson($data, $status = 200, $headers = [], $encodingOptions = 15)
  15260. {
  15261. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15262. return $instance->streamJson($data, $status, $headers, $encodingOptions);
  15263. }
  15264. /**
  15265. * Create a new streamed response instance as a file download.
  15266. *
  15267. * @param callable $callback
  15268. * @param string|null $name
  15269. * @param array $headers
  15270. * @param string|null $disposition
  15271. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15272. * @throws \Illuminate\Routing\Exceptions\StreamedResponseException
  15273. * @static
  15274. */
  15275. public static function streamDownload($callback, $name = null, $headers = [], $disposition = 'attachment')
  15276. {
  15277. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15278. return $instance->streamDownload($callback, $name, $headers, $disposition);
  15279. }
  15280. /**
  15281. * Create a new file download response.
  15282. *
  15283. * @param \SplFileInfo|string $file
  15284. * @param string|null $name
  15285. * @param array $headers
  15286. * @param string|null $disposition
  15287. * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
  15288. * @static
  15289. */
  15290. public static function download($file, $name = null, $headers = [], $disposition = 'attachment')
  15291. {
  15292. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15293. return $instance->download($file, $name, $headers, $disposition);
  15294. }
  15295. /**
  15296. * Return the raw contents of a binary file.
  15297. *
  15298. * @param \SplFileInfo|string $file
  15299. * @param array $headers
  15300. * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
  15301. * @static
  15302. */
  15303. public static function file($file, $headers = [])
  15304. {
  15305. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15306. return $instance->file($file, $headers);
  15307. }
  15308. /**
  15309. * Create a new redirect response to the given path.
  15310. *
  15311. * @param string $path
  15312. * @param int $status
  15313. * @param array $headers
  15314. * @param bool|null $secure
  15315. * @return \Illuminate\Http\RedirectResponse
  15316. * @static
  15317. */
  15318. public static function redirectTo($path, $status = 302, $headers = [], $secure = null)
  15319. {
  15320. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15321. return $instance->redirectTo($path, $status, $headers, $secure);
  15322. }
  15323. /**
  15324. * Create a new redirect response to a named route.
  15325. *
  15326. * @param \BackedEnum|string $route
  15327. * @param mixed $parameters
  15328. * @param int $status
  15329. * @param array $headers
  15330. * @return \Illuminate\Http\RedirectResponse
  15331. * @static
  15332. */
  15333. public static function redirectToRoute($route, $parameters = [], $status = 302, $headers = [])
  15334. {
  15335. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15336. return $instance->redirectToRoute($route, $parameters, $status, $headers);
  15337. }
  15338. /**
  15339. * Create a new redirect response to a controller action.
  15340. *
  15341. * @param array|string $action
  15342. * @param mixed $parameters
  15343. * @param int $status
  15344. * @param array $headers
  15345. * @return \Illuminate\Http\RedirectResponse
  15346. * @static
  15347. */
  15348. public static function redirectToAction($action, $parameters = [], $status = 302, $headers = [])
  15349. {
  15350. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15351. return $instance->redirectToAction($action, $parameters, $status, $headers);
  15352. }
  15353. /**
  15354. * Create a new redirect response, while putting the current URL in the session.
  15355. *
  15356. * @param string $path
  15357. * @param int $status
  15358. * @param array $headers
  15359. * @param bool|null $secure
  15360. * @return \Illuminate\Http\RedirectResponse
  15361. * @static
  15362. */
  15363. public static function redirectGuest($path, $status = 302, $headers = [], $secure = null)
  15364. {
  15365. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15366. return $instance->redirectGuest($path, $status, $headers, $secure);
  15367. }
  15368. /**
  15369. * Create a new redirect response to the previously intended location.
  15370. *
  15371. * @param string $default
  15372. * @param int $status
  15373. * @param array $headers
  15374. * @param bool|null $secure
  15375. * @return \Illuminate\Http\RedirectResponse
  15376. * @static
  15377. */
  15378. public static function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null)
  15379. {
  15380. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15381. return $instance->redirectToIntended($default, $status, $headers, $secure);
  15382. }
  15383. /**
  15384. * Register a custom macro.
  15385. *
  15386. * @param string $name
  15387. * @param object|callable $macro
  15388. * @param-closure-this static $macro
  15389. * @return void
  15390. * @static
  15391. */
  15392. public static function macro($name, $macro)
  15393. {
  15394. \Illuminate\Routing\ResponseFactory::macro($name, $macro);
  15395. }
  15396. /**
  15397. * Mix another object into the class.
  15398. *
  15399. * @param object $mixin
  15400. * @param bool $replace
  15401. * @return void
  15402. * @throws \ReflectionException
  15403. * @static
  15404. */
  15405. public static function mixin($mixin, $replace = true)
  15406. {
  15407. \Illuminate\Routing\ResponseFactory::mixin($mixin, $replace);
  15408. }
  15409. /**
  15410. * Checks if macro is registered.
  15411. *
  15412. * @param string $name
  15413. * @return bool
  15414. * @static
  15415. */
  15416. public static function hasMacro($name)
  15417. {
  15418. return \Illuminate\Routing\ResponseFactory::hasMacro($name);
  15419. }
  15420. /**
  15421. * Flush the existing macros.
  15422. *
  15423. * @return void
  15424. * @static
  15425. */
  15426. public static function flushMacros()
  15427. {
  15428. \Illuminate\Routing\ResponseFactory::flushMacros();
  15429. }
  15430. }
  15431. /**
  15432. * @method static \Illuminate\Routing\RouteRegistrar attribute(string $key, mixed $value)
  15433. * @method static \Illuminate\Routing\RouteRegistrar whereAlpha(array|string $parameters)
  15434. * @method static \Illuminate\Routing\RouteRegistrar whereAlphaNumeric(array|string $parameters)
  15435. * @method static \Illuminate\Routing\RouteRegistrar whereNumber(array|string $parameters)
  15436. * @method static \Illuminate\Routing\RouteRegistrar whereUlid(array|string $parameters)
  15437. * @method static \Illuminate\Routing\RouteRegistrar whereUuid(array|string $parameters)
  15438. * @method static \Illuminate\Routing\RouteRegistrar whereIn(array|string $parameters, array $values)
  15439. * @method static \Illuminate\Routing\RouteRegistrar as(string $value)
  15440. * @method static \Illuminate\Routing\RouteRegistrar can(\UnitEnum|string $ability, array|string $models = [])
  15441. * @method static \Illuminate\Routing\RouteRegistrar controller(string $controller)
  15442. * @method static \Illuminate\Routing\RouteRegistrar domain(\BackedEnum|string $value)
  15443. * @method static \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware)
  15444. * @method static \Illuminate\Routing\RouteRegistrar missing(\Closure $missing)
  15445. * @method static \Illuminate\Routing\RouteRegistrar name(\BackedEnum|string $value)
  15446. * @method static \Illuminate\Routing\RouteRegistrar namespace(string|null $value)
  15447. * @method static \Illuminate\Routing\RouteRegistrar prefix(string $prefix)
  15448. * @method static \Illuminate\Routing\RouteRegistrar scopeBindings()
  15449. * @method static \Illuminate\Routing\RouteRegistrar where(array $where)
  15450. * @method static \Illuminate\Routing\RouteRegistrar withoutMiddleware(array|string $middleware)
  15451. * @method static \Illuminate\Routing\RouteRegistrar withoutScopedBindings()
  15452. * @see \Illuminate\Routing\Router
  15453. */
  15454. class Route {
  15455. /**
  15456. * Register a new GET route with the router.
  15457. *
  15458. * @param string $uri
  15459. * @param array|string|callable|null $action
  15460. * @return \Illuminate\Routing\Route
  15461. * @static
  15462. */
  15463. public static function get($uri, $action = null)
  15464. {
  15465. /** @var \Illuminate\Routing\Router $instance */
  15466. return $instance->get($uri, $action);
  15467. }
  15468. /**
  15469. * Register a new POST route with the router.
  15470. *
  15471. * @param string $uri
  15472. * @param array|string|callable|null $action
  15473. * @return \Illuminate\Routing\Route
  15474. * @static
  15475. */
  15476. public static function post($uri, $action = null)
  15477. {
  15478. /** @var \Illuminate\Routing\Router $instance */
  15479. return $instance->post($uri, $action);
  15480. }
  15481. /**
  15482. * Register a new PUT route with the router.
  15483. *
  15484. * @param string $uri
  15485. * @param array|string|callable|null $action
  15486. * @return \Illuminate\Routing\Route
  15487. * @static
  15488. */
  15489. public static function put($uri, $action = null)
  15490. {
  15491. /** @var \Illuminate\Routing\Router $instance */
  15492. return $instance->put($uri, $action);
  15493. }
  15494. /**
  15495. * Register a new PATCH route with the router.
  15496. *
  15497. * @param string $uri
  15498. * @param array|string|callable|null $action
  15499. * @return \Illuminate\Routing\Route
  15500. * @static
  15501. */
  15502. public static function patch($uri, $action = null)
  15503. {
  15504. /** @var \Illuminate\Routing\Router $instance */
  15505. return $instance->patch($uri, $action);
  15506. }
  15507. /**
  15508. * Register a new DELETE route with the router.
  15509. *
  15510. * @param string $uri
  15511. * @param array|string|callable|null $action
  15512. * @return \Illuminate\Routing\Route
  15513. * @static
  15514. */
  15515. public static function delete($uri, $action = null)
  15516. {
  15517. /** @var \Illuminate\Routing\Router $instance */
  15518. return $instance->delete($uri, $action);
  15519. }
  15520. /**
  15521. * Register a new OPTIONS route with the router.
  15522. *
  15523. * @param string $uri
  15524. * @param array|string|callable|null $action
  15525. * @return \Illuminate\Routing\Route
  15526. * @static
  15527. */
  15528. public static function options($uri, $action = null)
  15529. {
  15530. /** @var \Illuminate\Routing\Router $instance */
  15531. return $instance->options($uri, $action);
  15532. }
  15533. /**
  15534. * Register a new route responding to all verbs.
  15535. *
  15536. * @param string $uri
  15537. * @param array|string|callable|null $action
  15538. * @return \Illuminate\Routing\Route
  15539. * @static
  15540. */
  15541. public static function any($uri, $action = null)
  15542. {
  15543. /** @var \Illuminate\Routing\Router $instance */
  15544. return $instance->any($uri, $action);
  15545. }
  15546. /**
  15547. * Register a new fallback route with the router.
  15548. *
  15549. * @param array|string|callable|null $action
  15550. * @return \Illuminate\Routing\Route
  15551. * @static
  15552. */
  15553. public static function fallback($action)
  15554. {
  15555. /** @var \Illuminate\Routing\Router $instance */
  15556. return $instance->fallback($action);
  15557. }
  15558. /**
  15559. * Create a redirect from one URI to another.
  15560. *
  15561. * @param string $uri
  15562. * @param string $destination
  15563. * @param int $status
  15564. * @return \Illuminate\Routing\Route
  15565. * @static
  15566. */
  15567. public static function redirect($uri, $destination, $status = 302)
  15568. {
  15569. /** @var \Illuminate\Routing\Router $instance */
  15570. return $instance->redirect($uri, $destination, $status);
  15571. }
  15572. /**
  15573. * Create a permanent redirect from one URI to another.
  15574. *
  15575. * @param string $uri
  15576. * @param string $destination
  15577. * @return \Illuminate\Routing\Route
  15578. * @static
  15579. */
  15580. public static function permanentRedirect($uri, $destination)
  15581. {
  15582. /** @var \Illuminate\Routing\Router $instance */
  15583. return $instance->permanentRedirect($uri, $destination);
  15584. }
  15585. /**
  15586. * Register a new route that returns a view.
  15587. *
  15588. * @param string $uri
  15589. * @param string $view
  15590. * @param array $data
  15591. * @param int|array $status
  15592. * @param array $headers
  15593. * @return \Illuminate\Routing\Route
  15594. * @static
  15595. */
  15596. public static function view($uri, $view, $data = [], $status = 200, $headers = [])
  15597. {
  15598. /** @var \Illuminate\Routing\Router $instance */
  15599. return $instance->view($uri, $view, $data, $status, $headers);
  15600. }
  15601. /**
  15602. * Register a new route with the given verbs.
  15603. *
  15604. * @param array|string $methods
  15605. * @param string $uri
  15606. * @param array|string|callable|null $action
  15607. * @return \Illuminate\Routing\Route
  15608. * @static
  15609. */
  15610. public static function match($methods, $uri, $action = null)
  15611. {
  15612. /** @var \Illuminate\Routing\Router $instance */
  15613. return $instance->match($methods, $uri, $action);
  15614. }
  15615. /**
  15616. * Register an array of resource controllers.
  15617. *
  15618. * @param array $resources
  15619. * @param array $options
  15620. * @return void
  15621. * @static
  15622. */
  15623. public static function resources($resources, $options = [])
  15624. {
  15625. /** @var \Illuminate\Routing\Router $instance */
  15626. $instance->resources($resources, $options);
  15627. }
  15628. /**
  15629. * Route a resource to a controller.
  15630. *
  15631. * @param string $name
  15632. * @param string $controller
  15633. * @param array $options
  15634. * @return \Illuminate\Routing\PendingResourceRegistration
  15635. * @static
  15636. */
  15637. public static function resource($name, $controller, $options = [])
  15638. {
  15639. /** @var \Illuminate\Routing\Router $instance */
  15640. return $instance->resource($name, $controller, $options);
  15641. }
  15642. /**
  15643. * Register an array of API resource controllers.
  15644. *
  15645. * @param array $resources
  15646. * @param array $options
  15647. * @return void
  15648. * @static
  15649. */
  15650. public static function apiResources($resources, $options = [])
  15651. {
  15652. /** @var \Illuminate\Routing\Router $instance */
  15653. $instance->apiResources($resources, $options);
  15654. }
  15655. /**
  15656. * Route an API resource to a controller.
  15657. *
  15658. * @param string $name
  15659. * @param string $controller
  15660. * @param array $options
  15661. * @return \Illuminate\Routing\PendingResourceRegistration
  15662. * @static
  15663. */
  15664. public static function apiResource($name, $controller, $options = [])
  15665. {
  15666. /** @var \Illuminate\Routing\Router $instance */
  15667. return $instance->apiResource($name, $controller, $options);
  15668. }
  15669. /**
  15670. * Register an array of singleton resource controllers.
  15671. *
  15672. * @param array $singletons
  15673. * @param array $options
  15674. * @return void
  15675. * @static
  15676. */
  15677. public static function singletons($singletons, $options = [])
  15678. {
  15679. /** @var \Illuminate\Routing\Router $instance */
  15680. $instance->singletons($singletons, $options);
  15681. }
  15682. /**
  15683. * Route a singleton resource to a controller.
  15684. *
  15685. * @param string $name
  15686. * @param string $controller
  15687. * @param array $options
  15688. * @return \Illuminate\Routing\PendingSingletonResourceRegistration
  15689. * @static
  15690. */
  15691. public static function singleton($name, $controller, $options = [])
  15692. {
  15693. /** @var \Illuminate\Routing\Router $instance */
  15694. return $instance->singleton($name, $controller, $options);
  15695. }
  15696. /**
  15697. * Register an array of API singleton resource controllers.
  15698. *
  15699. * @param array $singletons
  15700. * @param array $options
  15701. * @return void
  15702. * @static
  15703. */
  15704. public static function apiSingletons($singletons, $options = [])
  15705. {
  15706. /** @var \Illuminate\Routing\Router $instance */
  15707. $instance->apiSingletons($singletons, $options);
  15708. }
  15709. /**
  15710. * Route an API singleton resource to a controller.
  15711. *
  15712. * @param string $name
  15713. * @param string $controller
  15714. * @param array $options
  15715. * @return \Illuminate\Routing\PendingSingletonResourceRegistration
  15716. * @static
  15717. */
  15718. public static function apiSingleton($name, $controller, $options = [])
  15719. {
  15720. /** @var \Illuminate\Routing\Router $instance */
  15721. return $instance->apiSingleton($name, $controller, $options);
  15722. }
  15723. /**
  15724. * Create a route group with shared attributes.
  15725. *
  15726. * @param array $attributes
  15727. * @param \Closure|array|string $routes
  15728. * @return \Illuminate\Routing\Router
  15729. * @static
  15730. */
  15731. public static function group($attributes, $routes)
  15732. {
  15733. /** @var \Illuminate\Routing\Router $instance */
  15734. return $instance->group($attributes, $routes);
  15735. }
  15736. /**
  15737. * Merge the given array with the last group stack.
  15738. *
  15739. * @param array $new
  15740. * @param bool $prependExistingPrefix
  15741. * @return array
  15742. * @static
  15743. */
  15744. public static function mergeWithLastGroup($new, $prependExistingPrefix = true)
  15745. {
  15746. /** @var \Illuminate\Routing\Router $instance */
  15747. return $instance->mergeWithLastGroup($new, $prependExistingPrefix);
  15748. }
  15749. /**
  15750. * Get the prefix from the last group on the stack.
  15751. *
  15752. * @return string
  15753. * @static
  15754. */
  15755. public static function getLastGroupPrefix()
  15756. {
  15757. /** @var \Illuminate\Routing\Router $instance */
  15758. return $instance->getLastGroupPrefix();
  15759. }
  15760. /**
  15761. * Add a route to the underlying route collection.
  15762. *
  15763. * @param array|string $methods
  15764. * @param string $uri
  15765. * @param array|string|callable|null $action
  15766. * @return \Illuminate\Routing\Route
  15767. * @static
  15768. */
  15769. public static function addRoute($methods, $uri, $action)
  15770. {
  15771. /** @var \Illuminate\Routing\Router $instance */
  15772. return $instance->addRoute($methods, $uri, $action);
  15773. }
  15774. /**
  15775. * Create a new Route object.
  15776. *
  15777. * @param array|string $methods
  15778. * @param string $uri
  15779. * @param mixed $action
  15780. * @return \Illuminate\Routing\Route
  15781. * @static
  15782. */
  15783. public static function newRoute($methods, $uri, $action)
  15784. {
  15785. /** @var \Illuminate\Routing\Router $instance */
  15786. return $instance->newRoute($methods, $uri, $action);
  15787. }
  15788. /**
  15789. * Return the response returned by the given route.
  15790. *
  15791. * @param string $name
  15792. * @return \Symfony\Component\HttpFoundation\Response
  15793. * @static
  15794. */
  15795. public static function respondWithRoute($name)
  15796. {
  15797. /** @var \Illuminate\Routing\Router $instance */
  15798. return $instance->respondWithRoute($name);
  15799. }
  15800. /**
  15801. * Dispatch the request to the application.
  15802. *
  15803. * @param \Illuminate\Http\Request $request
  15804. * @return \Symfony\Component\HttpFoundation\Response
  15805. * @static
  15806. */
  15807. public static function dispatch($request)
  15808. {
  15809. /** @var \Illuminate\Routing\Router $instance */
  15810. return $instance->dispatch($request);
  15811. }
  15812. /**
  15813. * Dispatch the request to a route and return the response.
  15814. *
  15815. * @param \Illuminate\Http\Request $request
  15816. * @return \Symfony\Component\HttpFoundation\Response
  15817. * @static
  15818. */
  15819. public static function dispatchToRoute($request)
  15820. {
  15821. /** @var \Illuminate\Routing\Router $instance */
  15822. return $instance->dispatchToRoute($request);
  15823. }
  15824. /**
  15825. * Gather the middleware for the given route with resolved class names.
  15826. *
  15827. * @param \Illuminate\Routing\Route $route
  15828. * @return array
  15829. * @static
  15830. */
  15831. public static function gatherRouteMiddleware($route)
  15832. {
  15833. /** @var \Illuminate\Routing\Router $instance */
  15834. return $instance->gatherRouteMiddleware($route);
  15835. }
  15836. /**
  15837. * Resolve a flat array of middleware classes from the provided array.
  15838. *
  15839. * @param array $middleware
  15840. * @param array $excluded
  15841. * @return array
  15842. * @static
  15843. */
  15844. public static function resolveMiddleware($middleware, $excluded = [])
  15845. {
  15846. /** @var \Illuminate\Routing\Router $instance */
  15847. return $instance->resolveMiddleware($middleware, $excluded);
  15848. }
  15849. /**
  15850. * Create a response instance from the given value.
  15851. *
  15852. * @param \Symfony\Component\HttpFoundation\Request $request
  15853. * @param mixed $response
  15854. * @return \Symfony\Component\HttpFoundation\Response
  15855. * @static
  15856. */
  15857. public static function prepareResponse($request, $response)
  15858. {
  15859. /** @var \Illuminate\Routing\Router $instance */
  15860. return $instance->prepareResponse($request, $response);
  15861. }
  15862. /**
  15863. * Static version of prepareResponse.
  15864. *
  15865. * @param \Symfony\Component\HttpFoundation\Request $request
  15866. * @param mixed $response
  15867. * @return \Symfony\Component\HttpFoundation\Response
  15868. * @static
  15869. */
  15870. public static function toResponse($request, $response)
  15871. {
  15872. return \Illuminate\Routing\Router::toResponse($request, $response);
  15873. }
  15874. /**
  15875. * Substitute the route bindings onto the route.
  15876. *
  15877. * @param \Illuminate\Routing\Route $route
  15878. * @return \Illuminate\Routing\Route
  15879. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model>
  15880. * @throws \Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
  15881. * @static
  15882. */
  15883. public static function substituteBindings($route)
  15884. {
  15885. /** @var \Illuminate\Routing\Router $instance */
  15886. return $instance->substituteBindings($route);
  15887. }
  15888. /**
  15889. * Substitute the implicit route bindings for the given route.
  15890. *
  15891. * @param \Illuminate\Routing\Route $route
  15892. * @return void
  15893. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model>
  15894. * @throws \Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
  15895. * @static
  15896. */
  15897. public static function substituteImplicitBindings($route)
  15898. {
  15899. /** @var \Illuminate\Routing\Router $instance */
  15900. $instance->substituteImplicitBindings($route);
  15901. }
  15902. /**
  15903. * Register a callback to run after implicit bindings are substituted.
  15904. *
  15905. * @param callable $callback
  15906. * @return \Illuminate\Routing\Router
  15907. * @static
  15908. */
  15909. public static function substituteImplicitBindingsUsing($callback)
  15910. {
  15911. /** @var \Illuminate\Routing\Router $instance */
  15912. return $instance->substituteImplicitBindingsUsing($callback);
  15913. }
  15914. /**
  15915. * Register a route matched event listener.
  15916. *
  15917. * @param string|callable $callback
  15918. * @return void
  15919. * @static
  15920. */
  15921. public static function matched($callback)
  15922. {
  15923. /** @var \Illuminate\Routing\Router $instance */
  15924. $instance->matched($callback);
  15925. }
  15926. /**
  15927. * Get all of the defined middleware short-hand names.
  15928. *
  15929. * @return array
  15930. * @static
  15931. */
  15932. public static function getMiddleware()
  15933. {
  15934. /** @var \Illuminate\Routing\Router $instance */
  15935. return $instance->getMiddleware();
  15936. }
  15937. /**
  15938. * Register a short-hand name for a middleware.
  15939. *
  15940. * @param string $name
  15941. * @param string $class
  15942. * @return \Illuminate\Routing\Router
  15943. * @static
  15944. */
  15945. public static function aliasMiddleware($name, $class)
  15946. {
  15947. /** @var \Illuminate\Routing\Router $instance */
  15948. return $instance->aliasMiddleware($name, $class);
  15949. }
  15950. /**
  15951. * Check if a middlewareGroup with the given name exists.
  15952. *
  15953. * @param string $name
  15954. * @return bool
  15955. * @static
  15956. */
  15957. public static function hasMiddlewareGroup($name)
  15958. {
  15959. /** @var \Illuminate\Routing\Router $instance */
  15960. return $instance->hasMiddlewareGroup($name);
  15961. }
  15962. /**
  15963. * Get all of the defined middleware groups.
  15964. *
  15965. * @return array
  15966. * @static
  15967. */
  15968. public static function getMiddlewareGroups()
  15969. {
  15970. /** @var \Illuminate\Routing\Router $instance */
  15971. return $instance->getMiddlewareGroups();
  15972. }
  15973. /**
  15974. * Register a group of middleware.
  15975. *
  15976. * @param string $name
  15977. * @param array $middleware
  15978. * @return \Illuminate\Routing\Router
  15979. * @static
  15980. */
  15981. public static function middlewareGroup($name, $middleware)
  15982. {
  15983. /** @var \Illuminate\Routing\Router $instance */
  15984. return $instance->middlewareGroup($name, $middleware);
  15985. }
  15986. /**
  15987. * Add a middleware to the beginning of a middleware group.
  15988. *
  15989. * If the middleware is already in the group, it will not be added again.
  15990. *
  15991. * @param string $group
  15992. * @param string $middleware
  15993. * @return \Illuminate\Routing\Router
  15994. * @static
  15995. */
  15996. public static function prependMiddlewareToGroup($group, $middleware)
  15997. {
  15998. /** @var \Illuminate\Routing\Router $instance */
  15999. return $instance->prependMiddlewareToGroup($group, $middleware);
  16000. }
  16001. /**
  16002. * Add a middleware to the end of a middleware group.
  16003. *
  16004. * If the middleware is already in the group, it will not be added again.
  16005. *
  16006. * @param string $group
  16007. * @param string $middleware
  16008. * @return \Illuminate\Routing\Router
  16009. * @static
  16010. */
  16011. public static function pushMiddlewareToGroup($group, $middleware)
  16012. {
  16013. /** @var \Illuminate\Routing\Router $instance */
  16014. return $instance->pushMiddlewareToGroup($group, $middleware);
  16015. }
  16016. /**
  16017. * Remove the given middleware from the specified group.
  16018. *
  16019. * @param string $group
  16020. * @param string $middleware
  16021. * @return \Illuminate\Routing\Router
  16022. * @static
  16023. */
  16024. public static function removeMiddlewareFromGroup($group, $middleware)
  16025. {
  16026. /** @var \Illuminate\Routing\Router $instance */
  16027. return $instance->removeMiddlewareFromGroup($group, $middleware);
  16028. }
  16029. /**
  16030. * Flush the router's middleware groups.
  16031. *
  16032. * @return \Illuminate\Routing\Router
  16033. * @static
  16034. */
  16035. public static function flushMiddlewareGroups()
  16036. {
  16037. /** @var \Illuminate\Routing\Router $instance */
  16038. return $instance->flushMiddlewareGroups();
  16039. }
  16040. /**
  16041. * Add a new route parameter binder.
  16042. *
  16043. * @param string $key
  16044. * @param string|callable $binder
  16045. * @return void
  16046. * @static
  16047. */
  16048. public static function bind($key, $binder)
  16049. {
  16050. /** @var \Illuminate\Routing\Router $instance */
  16051. $instance->bind($key, $binder);
  16052. }
  16053. /**
  16054. * Register a model binder for a wildcard.
  16055. *
  16056. * @param string $key
  16057. * @param string $class
  16058. * @param \Closure|null $callback
  16059. * @return void
  16060. * @static
  16061. */
  16062. public static function model($key, $class, $callback = null)
  16063. {
  16064. /** @var \Illuminate\Routing\Router $instance */
  16065. $instance->model($key, $class, $callback);
  16066. }
  16067. /**
  16068. * Get the binding callback for a given binding.
  16069. *
  16070. * @param string $key
  16071. * @return \Closure|null
  16072. * @static
  16073. */
  16074. public static function getBindingCallback($key)
  16075. {
  16076. /** @var \Illuminate\Routing\Router $instance */
  16077. return $instance->getBindingCallback($key);
  16078. }
  16079. /**
  16080. * Get the global "where" patterns.
  16081. *
  16082. * @return array
  16083. * @static
  16084. */
  16085. public static function getPatterns()
  16086. {
  16087. /** @var \Illuminate\Routing\Router $instance */
  16088. return $instance->getPatterns();
  16089. }
  16090. /**
  16091. * Set a global where pattern on all routes.
  16092. *
  16093. * @param string $key
  16094. * @param string $pattern
  16095. * @return void
  16096. * @static
  16097. */
  16098. public static function pattern($key, $pattern)
  16099. {
  16100. /** @var \Illuminate\Routing\Router $instance */
  16101. $instance->pattern($key, $pattern);
  16102. }
  16103. /**
  16104. * Set a group of global where patterns on all routes.
  16105. *
  16106. * @param array $patterns
  16107. * @return void
  16108. * @static
  16109. */
  16110. public static function patterns($patterns)
  16111. {
  16112. /** @var \Illuminate\Routing\Router $instance */
  16113. $instance->patterns($patterns);
  16114. }
  16115. /**
  16116. * Determine if the router currently has a group stack.
  16117. *
  16118. * @return bool
  16119. * @static
  16120. */
  16121. public static function hasGroupStack()
  16122. {
  16123. /** @var \Illuminate\Routing\Router $instance */
  16124. return $instance->hasGroupStack();
  16125. }
  16126. /**
  16127. * Get the current group stack for the router.
  16128. *
  16129. * @return array
  16130. * @static
  16131. */
  16132. public static function getGroupStack()
  16133. {
  16134. /** @var \Illuminate\Routing\Router $instance */
  16135. return $instance->getGroupStack();
  16136. }
  16137. /**
  16138. * Get a route parameter for the current route.
  16139. *
  16140. * @param string $key
  16141. * @param string|null $default
  16142. * @return mixed
  16143. * @static
  16144. */
  16145. public static function input($key, $default = null)
  16146. {
  16147. /** @var \Illuminate\Routing\Router $instance */
  16148. return $instance->input($key, $default);
  16149. }
  16150. /**
  16151. * Get the request currently being dispatched.
  16152. *
  16153. * @return \Illuminate\Http\Request
  16154. * @static
  16155. */
  16156. public static function getCurrentRequest()
  16157. {
  16158. /** @var \Illuminate\Routing\Router $instance */
  16159. return $instance->getCurrentRequest();
  16160. }
  16161. /**
  16162. * Get the currently dispatched route instance.
  16163. *
  16164. * @return \Illuminate\Routing\Route|null
  16165. * @static
  16166. */
  16167. public static function getCurrentRoute()
  16168. {
  16169. /** @var \Illuminate\Routing\Router $instance */
  16170. return $instance->getCurrentRoute();
  16171. }
  16172. /**
  16173. * Get the currently dispatched route instance.
  16174. *
  16175. * @return \Illuminate\Routing\Route|null
  16176. * @static
  16177. */
  16178. public static function current()
  16179. {
  16180. /** @var \Illuminate\Routing\Router $instance */
  16181. return $instance->current();
  16182. }
  16183. /**
  16184. * Check if a route with the given name exists.
  16185. *
  16186. * @param string|array $name
  16187. * @return bool
  16188. * @static
  16189. */
  16190. public static function has($name)
  16191. {
  16192. /** @var \Illuminate\Routing\Router $instance */
  16193. return $instance->has($name);
  16194. }
  16195. /**
  16196. * Get the current route name.
  16197. *
  16198. * @return string|null
  16199. * @static
  16200. */
  16201. public static function currentRouteName()
  16202. {
  16203. /** @var \Illuminate\Routing\Router $instance */
  16204. return $instance->currentRouteName();
  16205. }
  16206. /**
  16207. * Alias for the "currentRouteNamed" method.
  16208. *
  16209. * @param mixed $patterns
  16210. * @return bool
  16211. * @static
  16212. */
  16213. public static function is(...$patterns)
  16214. {
  16215. /** @var \Illuminate\Routing\Router $instance */
  16216. return $instance->is(...$patterns);
  16217. }
  16218. /**
  16219. * Determine if the current route matches a pattern.
  16220. *
  16221. * @param mixed $patterns
  16222. * @return bool
  16223. * @static
  16224. */
  16225. public static function currentRouteNamed(...$patterns)
  16226. {
  16227. /** @var \Illuminate\Routing\Router $instance */
  16228. return $instance->currentRouteNamed(...$patterns);
  16229. }
  16230. /**
  16231. * Get the current route action.
  16232. *
  16233. * @return string|null
  16234. * @static
  16235. */
  16236. public static function currentRouteAction()
  16237. {
  16238. /** @var \Illuminate\Routing\Router $instance */
  16239. return $instance->currentRouteAction();
  16240. }
  16241. /**
  16242. * Alias for the "currentRouteUses" method.
  16243. *
  16244. * @param array|string $patterns
  16245. * @return bool
  16246. * @static
  16247. */
  16248. public static function uses(...$patterns)
  16249. {
  16250. /** @var \Illuminate\Routing\Router $instance */
  16251. return $instance->uses(...$patterns);
  16252. }
  16253. /**
  16254. * Determine if the current route action matches a given action.
  16255. *
  16256. * @param string $action
  16257. * @return bool
  16258. * @static
  16259. */
  16260. public static function currentRouteUses($action)
  16261. {
  16262. /** @var \Illuminate\Routing\Router $instance */
  16263. return $instance->currentRouteUses($action);
  16264. }
  16265. /**
  16266. * Set the unmapped global resource parameters to singular.
  16267. *
  16268. * @param bool $singular
  16269. * @return void
  16270. * @static
  16271. */
  16272. public static function singularResourceParameters($singular = true)
  16273. {
  16274. /** @var \Illuminate\Routing\Router $instance */
  16275. $instance->singularResourceParameters($singular);
  16276. }
  16277. /**
  16278. * Set the global resource parameter mapping.
  16279. *
  16280. * @param array $parameters
  16281. * @return void
  16282. * @static
  16283. */
  16284. public static function resourceParameters($parameters = [])
  16285. {
  16286. /** @var \Illuminate\Routing\Router $instance */
  16287. $instance->resourceParameters($parameters);
  16288. }
  16289. /**
  16290. * Get or set the verbs used in the resource URIs.
  16291. *
  16292. * @param array $verbs
  16293. * @return array|null
  16294. * @static
  16295. */
  16296. public static function resourceVerbs($verbs = [])
  16297. {
  16298. /** @var \Illuminate\Routing\Router $instance */
  16299. return $instance->resourceVerbs($verbs);
  16300. }
  16301. /**
  16302. * Get the underlying route collection.
  16303. *
  16304. * @return \Illuminate\Routing\RouteCollectionInterface
  16305. * @static
  16306. */
  16307. public static function getRoutes()
  16308. {
  16309. /** @var \Illuminate\Routing\Router $instance */
  16310. return $instance->getRoutes();
  16311. }
  16312. /**
  16313. * Set the route collection instance.
  16314. *
  16315. * @param \Illuminate\Routing\RouteCollection $routes
  16316. * @return void
  16317. * @static
  16318. */
  16319. public static function setRoutes($routes)
  16320. {
  16321. /** @var \Illuminate\Routing\Router $instance */
  16322. $instance->setRoutes($routes);
  16323. }
  16324. /**
  16325. * Set the compiled route collection instance.
  16326. *
  16327. * @param array $routes
  16328. * @return void
  16329. * @static
  16330. */
  16331. public static function setCompiledRoutes($routes)
  16332. {
  16333. /** @var \Illuminate\Routing\Router $instance */
  16334. $instance->setCompiledRoutes($routes);
  16335. }
  16336. /**
  16337. * Remove any duplicate middleware from the given array.
  16338. *
  16339. * @param array $middleware
  16340. * @return array
  16341. * @static
  16342. */
  16343. public static function uniqueMiddleware($middleware)
  16344. {
  16345. return \Illuminate\Routing\Router::uniqueMiddleware($middleware);
  16346. }
  16347. /**
  16348. * Set the container instance used by the router.
  16349. *
  16350. * @param \Illuminate\Container\Container $container
  16351. * @return \Illuminate\Routing\Router
  16352. * @static
  16353. */
  16354. public static function setContainer($container)
  16355. {
  16356. /** @var \Illuminate\Routing\Router $instance */
  16357. return $instance->setContainer($container);
  16358. }
  16359. /**
  16360. * Register a custom macro.
  16361. *
  16362. * @param string $name
  16363. * @param object|callable $macro
  16364. * @param-closure-this static $macro
  16365. * @return void
  16366. * @static
  16367. */
  16368. public static function macro($name, $macro)
  16369. {
  16370. \Illuminate\Routing\Router::macro($name, $macro);
  16371. }
  16372. /**
  16373. * Mix another object into the class.
  16374. *
  16375. * @param object $mixin
  16376. * @param bool $replace
  16377. * @return void
  16378. * @throws \ReflectionException
  16379. * @static
  16380. */
  16381. public static function mixin($mixin, $replace = true)
  16382. {
  16383. \Illuminate\Routing\Router::mixin($mixin, $replace);
  16384. }
  16385. /**
  16386. * Checks if macro is registered.
  16387. *
  16388. * @param string $name
  16389. * @return bool
  16390. * @static
  16391. */
  16392. public static function hasMacro($name)
  16393. {
  16394. return \Illuminate\Routing\Router::hasMacro($name);
  16395. }
  16396. /**
  16397. * Flush the existing macros.
  16398. *
  16399. * @return void
  16400. * @static
  16401. */
  16402. public static function flushMacros()
  16403. {
  16404. \Illuminate\Routing\Router::flushMacros();
  16405. }
  16406. /**
  16407. * Dynamically handle calls to the class.
  16408. *
  16409. * @param string $method
  16410. * @param array $parameters
  16411. * @return mixed
  16412. * @throws \BadMethodCallException
  16413. * @static
  16414. */
  16415. public static function macroCall($method, $parameters)
  16416. {
  16417. /** @var \Illuminate\Routing\Router $instance */
  16418. return $instance->macroCall($method, $parameters);
  16419. }
  16420. /**
  16421. * Call the given Closure with this instance then return the instance.
  16422. *
  16423. * @param (callable($this): mixed)|null $callback
  16424. * @return ($callback is null ? \Illuminate\Support\HigherOrderTapProxy : $this)
  16425. * @static
  16426. */
  16427. public static function tap($callback = null)
  16428. {
  16429. /** @var \Illuminate\Routing\Router $instance */
  16430. return $instance->tap($callback);
  16431. }
  16432. }
  16433. /**
  16434. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes withoutOverlapping(int $expiresAt = 1440)
  16435. * @method static void mergeAttributes(\Illuminate\Console\Scheduling\Event $event)
  16436. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes user(string $user)
  16437. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes environments(array|mixed $environments)
  16438. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes evenInMaintenanceMode()
  16439. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes onOneServer()
  16440. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes runInBackground()
  16441. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes when(\Closure|bool $callback)
  16442. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes skip(\Closure|bool $callback)
  16443. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes name(string $description)
  16444. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes description(string $description)
  16445. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes cron(string $expression)
  16446. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes between(string $startTime, string $endTime)
  16447. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes unlessBetween(string $startTime, string $endTime)
  16448. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everySecond()
  16449. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoSeconds()
  16450. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFiveSeconds()
  16451. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTenSeconds()
  16452. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFifteenSeconds()
  16453. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwentySeconds()
  16454. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThirtySeconds()
  16455. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyMinute()
  16456. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoMinutes()
  16457. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThreeMinutes()
  16458. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFourMinutes()
  16459. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFiveMinutes()
  16460. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTenMinutes()
  16461. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFifteenMinutes()
  16462. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThirtyMinutes()
  16463. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes hourly()
  16464. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes hourlyAt(array|string|int|int[] $offset)
  16465. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyOddHour(array|string|int $offset = 0)
  16466. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoHours(array|string|int $offset = 0)
  16467. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThreeHours(array|string|int $offset = 0)
  16468. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFourHours(array|string|int $offset = 0)
  16469. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everySixHours(array|string|int $offset = 0)
  16470. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes daily()
  16471. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes at(string $time)
  16472. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes dailyAt(string $time)
  16473. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceDaily(int $first = 1, int $second = 13)
  16474. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceDailyAt(int $first = 1, int $second = 13, int $offset = 0)
  16475. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekdays()
  16476. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekends()
  16477. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes mondays()
  16478. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes tuesdays()
  16479. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes wednesdays()
  16480. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes thursdays()
  16481. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes fridays()
  16482. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes saturdays()
  16483. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes sundays()
  16484. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekly()
  16485. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weeklyOn(array|mixed $dayOfWeek, string $time = '0:0')
  16486. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes monthly()
  16487. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes monthlyOn(int $dayOfMonth = 1, string $time = '0:0')
  16488. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceMonthly(int $first = 1, int $second = 16, string $time = '0:0')
  16489. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes lastDayOfMonth(string $time = '0:0')
  16490. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterly()
  16491. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterlyOn(int $dayOfQuarter = 1, string $time = '0:0')
  16492. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes yearly()
  16493. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes yearlyOn(int $month = 1, int|string $dayOfMonth = 1, string $time = '0:0')
  16494. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes days(array|mixed $days)
  16495. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes timezone(\DateTimeZone|string $timezone)
  16496. * @see \Illuminate\Console\Scheduling\Schedule
  16497. */
  16498. class Schedule {
  16499. /**
  16500. * Add a new callback event to the schedule.
  16501. *
  16502. * @param string|callable $callback
  16503. * @param array $parameters
  16504. * @return \Illuminate\Console\Scheduling\CallbackEvent
  16505. * @static
  16506. */
  16507. public static function call($callback, $parameters = [])
  16508. {
  16509. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16510. return $instance->call($callback, $parameters);
  16511. }
  16512. /**
  16513. * Add a new Artisan command event to the schedule.
  16514. *
  16515. * @param string $command
  16516. * @param array $parameters
  16517. * @return \Illuminate\Console\Scheduling\Event
  16518. * @static
  16519. */
  16520. public static function command($command, $parameters = [])
  16521. {
  16522. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16523. return $instance->command($command, $parameters);
  16524. }
  16525. /**
  16526. * Add a new job callback event to the schedule.
  16527. *
  16528. * @param object|string $job
  16529. * @param string|null $queue
  16530. * @param string|null $connection
  16531. * @return \Illuminate\Console\Scheduling\CallbackEvent
  16532. * @static
  16533. */
  16534. public static function job($job, $queue = null, $connection = null)
  16535. {
  16536. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16537. return $instance->job($job, $queue, $connection);
  16538. }
  16539. /**
  16540. * Add a new command event to the schedule.
  16541. *
  16542. * @param string $command
  16543. * @param array $parameters
  16544. * @return \Illuminate\Console\Scheduling\Event
  16545. * @static
  16546. */
  16547. public static function exec($command, $parameters = [])
  16548. {
  16549. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16550. return $instance->exec($command, $parameters);
  16551. }
  16552. /**
  16553. * Create new schedule group.
  16554. *
  16555. * @param \Illuminate\Console\Scheduling\Event $event
  16556. * @return void
  16557. * @throws \RuntimeException
  16558. * @static
  16559. */
  16560. public static function group($events)
  16561. {
  16562. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16563. $instance->group($events);
  16564. }
  16565. /**
  16566. * Compile array input for a command.
  16567. *
  16568. * @param string|int $key
  16569. * @param array $value
  16570. * @return string
  16571. * @static
  16572. */
  16573. public static function compileArrayInput($key, $value)
  16574. {
  16575. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16576. return $instance->compileArrayInput($key, $value);
  16577. }
  16578. /**
  16579. * Determine if the server is allowed to run this event.
  16580. *
  16581. * @param \Illuminate\Console\Scheduling\Event $event
  16582. * @param \DateTimeInterface $time
  16583. * @return bool
  16584. * @static
  16585. */
  16586. public static function serverShouldRun($event, $time)
  16587. {
  16588. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16589. return $instance->serverShouldRun($event, $time);
  16590. }
  16591. /**
  16592. * Get all of the events on the schedule that are due.
  16593. *
  16594. * @param \Illuminate\Contracts\Foundation\Application $app
  16595. * @return \Illuminate\Support\Collection
  16596. * @static
  16597. */
  16598. public static function dueEvents($app)
  16599. {
  16600. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16601. return $instance->dueEvents($app);
  16602. }
  16603. /**
  16604. * Get all of the events on the schedule.
  16605. *
  16606. * @return \Illuminate\Console\Scheduling\Event[]
  16607. * @static
  16608. */
  16609. public static function events()
  16610. {
  16611. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16612. return $instance->events();
  16613. }
  16614. /**
  16615. * Specify the cache store that should be used to store mutexes.
  16616. *
  16617. * @param string $store
  16618. * @return \Illuminate\Console\Scheduling\Schedule
  16619. * @static
  16620. */
  16621. public static function useCache($store)
  16622. {
  16623. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16624. return $instance->useCache($store);
  16625. }
  16626. /**
  16627. * Register a custom macro.
  16628. *
  16629. * @param string $name
  16630. * @param object|callable $macro
  16631. * @param-closure-this static $macro
  16632. * @return void
  16633. * @static
  16634. */
  16635. public static function macro($name, $macro)
  16636. {
  16637. \Illuminate\Console\Scheduling\Schedule::macro($name, $macro);
  16638. }
  16639. /**
  16640. * Mix another object into the class.
  16641. *
  16642. * @param object $mixin
  16643. * @param bool $replace
  16644. * @return void
  16645. * @throws \ReflectionException
  16646. * @static
  16647. */
  16648. public static function mixin($mixin, $replace = true)
  16649. {
  16650. \Illuminate\Console\Scheduling\Schedule::mixin($mixin, $replace);
  16651. }
  16652. /**
  16653. * Checks if macro is registered.
  16654. *
  16655. * @param string $name
  16656. * @return bool
  16657. * @static
  16658. */
  16659. public static function hasMacro($name)
  16660. {
  16661. return \Illuminate\Console\Scheduling\Schedule::hasMacro($name);
  16662. }
  16663. /**
  16664. * Flush the existing macros.
  16665. *
  16666. * @return void
  16667. * @static
  16668. */
  16669. public static function flushMacros()
  16670. {
  16671. \Illuminate\Console\Scheduling\Schedule::flushMacros();
  16672. }
  16673. /**
  16674. * Dynamically handle calls to the class.
  16675. *
  16676. * @param string $method
  16677. * @param array $parameters
  16678. * @return mixed
  16679. * @throws \BadMethodCallException
  16680. * @static
  16681. */
  16682. public static function macroCall($method, $parameters)
  16683. {
  16684. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16685. return $instance->macroCall($method, $parameters);
  16686. }
  16687. }
  16688. /**
  16689. * @see \Illuminate\Database\Schema\Builder
  16690. */
  16691. class Schema {
  16692. /**
  16693. * Drop all tables from the database.
  16694. *
  16695. * @return void
  16696. * @static
  16697. */
  16698. public static function dropAllTables()
  16699. {
  16700. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16701. $instance->dropAllTables();
  16702. }
  16703. /**
  16704. * Drop all views from the database.
  16705. *
  16706. * @return void
  16707. * @static
  16708. */
  16709. public static function dropAllViews()
  16710. {
  16711. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16712. $instance->dropAllViews();
  16713. }
  16714. /**
  16715. * Drop all types from the database.
  16716. *
  16717. * @return void
  16718. * @static
  16719. */
  16720. public static function dropAllTypes()
  16721. {
  16722. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16723. $instance->dropAllTypes();
  16724. }
  16725. /**
  16726. * Get the current schemas for the connection.
  16727. *
  16728. * @return string[]
  16729. * @static
  16730. */
  16731. public static function getCurrentSchemaListing()
  16732. {
  16733. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16734. return $instance->getCurrentSchemaListing();
  16735. }
  16736. /**
  16737. * Set the default string length for migrations.
  16738. *
  16739. * @param int $length
  16740. * @return void
  16741. * @static
  16742. */
  16743. public static function defaultStringLength($length)
  16744. {
  16745. //Method inherited from \Illuminate\Database\Schema\Builder
  16746. \Illuminate\Database\Schema\PostgresBuilder::defaultStringLength($length);
  16747. }
  16748. /**
  16749. * Set the default time precision for migrations.
  16750. *
  16751. * @static
  16752. */
  16753. public static function defaultTimePrecision($precision)
  16754. {
  16755. //Method inherited from \Illuminate\Database\Schema\Builder
  16756. return \Illuminate\Database\Schema\PostgresBuilder::defaultTimePrecision($precision);
  16757. }
  16758. /**
  16759. * Set the default morph key type for migrations.
  16760. *
  16761. * @param string $type
  16762. * @return void
  16763. * @throws \InvalidArgumentException
  16764. * @static
  16765. */
  16766. public static function defaultMorphKeyType($type)
  16767. {
  16768. //Method inherited from \Illuminate\Database\Schema\Builder
  16769. \Illuminate\Database\Schema\PostgresBuilder::defaultMorphKeyType($type);
  16770. }
  16771. /**
  16772. * Set the default morph key type for migrations to UUIDs.
  16773. *
  16774. * @return void
  16775. * @static
  16776. */
  16777. public static function morphUsingUuids()
  16778. {
  16779. //Method inherited from \Illuminate\Database\Schema\Builder
  16780. \Illuminate\Database\Schema\PostgresBuilder::morphUsingUuids();
  16781. }
  16782. /**
  16783. * Set the default morph key type for migrations to ULIDs.
  16784. *
  16785. * @return void
  16786. * @static
  16787. */
  16788. public static function morphUsingUlids()
  16789. {
  16790. //Method inherited from \Illuminate\Database\Schema\Builder
  16791. \Illuminate\Database\Schema\PostgresBuilder::morphUsingUlids();
  16792. }
  16793. /**
  16794. * Create a database in the schema.
  16795. *
  16796. * @param string $name
  16797. * @return bool
  16798. * @static
  16799. */
  16800. public static function createDatabase($name)
  16801. {
  16802. //Method inherited from \Illuminate\Database\Schema\Builder
  16803. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16804. return $instance->createDatabase($name);
  16805. }
  16806. /**
  16807. * Drop a database from the schema if the database exists.
  16808. *
  16809. * @param string $name
  16810. * @return bool
  16811. * @static
  16812. */
  16813. public static function dropDatabaseIfExists($name)
  16814. {
  16815. //Method inherited from \Illuminate\Database\Schema\Builder
  16816. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16817. return $instance->dropDatabaseIfExists($name);
  16818. }
  16819. /**
  16820. * Get the schemas that belong to the connection.
  16821. *
  16822. * @return \Illuminate\Database\Schema\list<array{name: string, path: string|null, default: bool}>
  16823. * @static
  16824. */
  16825. public static function getSchemas()
  16826. {
  16827. //Method inherited from \Illuminate\Database\Schema\Builder
  16828. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16829. return $instance->getSchemas();
  16830. }
  16831. /**
  16832. * Determine if the given table exists.
  16833. *
  16834. * @param string $table
  16835. * @return bool
  16836. * @static
  16837. */
  16838. public static function hasTable($table)
  16839. {
  16840. //Method inherited from \Illuminate\Database\Schema\Builder
  16841. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16842. return $instance->hasTable($table);
  16843. }
  16844. /**
  16845. * Determine if the given view exists.
  16846. *
  16847. * @param string $view
  16848. * @return bool
  16849. * @static
  16850. */
  16851. public static function hasView($view)
  16852. {
  16853. //Method inherited from \Illuminate\Database\Schema\Builder
  16854. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16855. return $instance->hasView($view);
  16856. }
  16857. /**
  16858. * Get the tables that belong to the connection.
  16859. *
  16860. * @param string|string[]|null $schema
  16861. * @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}>
  16862. * @static
  16863. */
  16864. public static function getTables($schema = null)
  16865. {
  16866. //Method inherited from \Illuminate\Database\Schema\Builder
  16867. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16868. return $instance->getTables($schema);
  16869. }
  16870. /**
  16871. * Get the names of the tables that belong to the connection.
  16872. *
  16873. * @param string|string[]|null $schema
  16874. * @param bool $schemaQualified
  16875. * @return list<string>
  16876. * @static
  16877. */
  16878. public static function getTableListing($schema = null, $schemaQualified = true)
  16879. {
  16880. //Method inherited from \Illuminate\Database\Schema\Builder
  16881. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16882. return $instance->getTableListing($schema, $schemaQualified);
  16883. }
  16884. /**
  16885. * Get the views that belong to the connection.
  16886. *
  16887. * @param string|string[]|null $schema
  16888. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string|null, schema_qualified_name: string, definition: string}>
  16889. * @static
  16890. */
  16891. public static function getViews($schema = null)
  16892. {
  16893. //Method inherited from \Illuminate\Database\Schema\Builder
  16894. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16895. return $instance->getViews($schema);
  16896. }
  16897. /**
  16898. * Get the user-defined types that belong to the connection.
  16899. *
  16900. * @param string|string[]|null $schema
  16901. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string, type: string, type: string, category: string, implicit: bool}>
  16902. * @static
  16903. */
  16904. public static function getTypes($schema = null)
  16905. {
  16906. //Method inherited from \Illuminate\Database\Schema\Builder
  16907. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16908. return $instance->getTypes($schema);
  16909. }
  16910. /**
  16911. * Determine if the given table has a given column.
  16912. *
  16913. * @param string $table
  16914. * @param string $column
  16915. * @return bool
  16916. * @static
  16917. */
  16918. public static function hasColumn($table, $column)
  16919. {
  16920. //Method inherited from \Illuminate\Database\Schema\Builder
  16921. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16922. return $instance->hasColumn($table, $column);
  16923. }
  16924. /**
  16925. * Determine if the given table has given columns.
  16926. *
  16927. * @param string $table
  16928. * @param array<string> $columns
  16929. * @return bool
  16930. * @static
  16931. */
  16932. public static function hasColumns($table, $columns)
  16933. {
  16934. //Method inherited from \Illuminate\Database\Schema\Builder
  16935. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16936. return $instance->hasColumns($table, $columns);
  16937. }
  16938. /**
  16939. * Execute a table builder callback if the given table has a given column.
  16940. *
  16941. * @param string $table
  16942. * @param string $column
  16943. * @param \Closure $callback
  16944. * @return void
  16945. * @static
  16946. */
  16947. public static function whenTableHasColumn($table, $column, $callback)
  16948. {
  16949. //Method inherited from \Illuminate\Database\Schema\Builder
  16950. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16951. $instance->whenTableHasColumn($table, $column, $callback);
  16952. }
  16953. /**
  16954. * Execute a table builder callback if the given table doesn't have a given column.
  16955. *
  16956. * @param string $table
  16957. * @param string $column
  16958. * @param \Closure $callback
  16959. * @return void
  16960. * @static
  16961. */
  16962. public static function whenTableDoesntHaveColumn($table, $column, $callback)
  16963. {
  16964. //Method inherited from \Illuminate\Database\Schema\Builder
  16965. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16966. $instance->whenTableDoesntHaveColumn($table, $column, $callback);
  16967. }
  16968. /**
  16969. * Get the data type for the given column name.
  16970. *
  16971. * @param string $table
  16972. * @param string $column
  16973. * @param bool $fullDefinition
  16974. * @return string
  16975. * @static
  16976. */
  16977. public static function getColumnType($table, $column, $fullDefinition = false)
  16978. {
  16979. //Method inherited from \Illuminate\Database\Schema\Builder
  16980. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16981. return $instance->getColumnType($table, $column, $fullDefinition);
  16982. }
  16983. /**
  16984. * Get the column listing for a given table.
  16985. *
  16986. * @param string $table
  16987. * @return list<string>
  16988. * @static
  16989. */
  16990. public static function getColumnListing($table)
  16991. {
  16992. //Method inherited from \Illuminate\Database\Schema\Builder
  16993. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16994. return $instance->getColumnListing($table);
  16995. }
  16996. /**
  16997. * Get the columns for a given table.
  16998. *
  16999. * @param string $table
  17000. * @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}>
  17001. * @static
  17002. */
  17003. public static function getColumns($table)
  17004. {
  17005. //Method inherited from \Illuminate\Database\Schema\Builder
  17006. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17007. return $instance->getColumns($table);
  17008. }
  17009. /**
  17010. * Get the indexes for a given table.
  17011. *
  17012. * @param string $table
  17013. * @return \Illuminate\Database\Schema\list<array{name: string, columns: list<string>, type: string, unique: bool, primary: bool}>
  17014. * @static
  17015. */
  17016. public static function getIndexes($table)
  17017. {
  17018. //Method inherited from \Illuminate\Database\Schema\Builder
  17019. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17020. return $instance->getIndexes($table);
  17021. }
  17022. /**
  17023. * Get the names of the indexes for a given table.
  17024. *
  17025. * @param string $table
  17026. * @return list<string>
  17027. * @static
  17028. */
  17029. public static function getIndexListing($table)
  17030. {
  17031. //Method inherited from \Illuminate\Database\Schema\Builder
  17032. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17033. return $instance->getIndexListing($table);
  17034. }
  17035. /**
  17036. * Determine if the given table has a given index.
  17037. *
  17038. * @param string $table
  17039. * @param string|array $index
  17040. * @param string|null $type
  17041. * @return bool
  17042. * @static
  17043. */
  17044. public static function hasIndex($table, $index, $type = null)
  17045. {
  17046. //Method inherited from \Illuminate\Database\Schema\Builder
  17047. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17048. return $instance->hasIndex($table, $index, $type);
  17049. }
  17050. /**
  17051. * Get the foreign keys for a given table.
  17052. *
  17053. * @param string $table
  17054. * @return array
  17055. * @static
  17056. */
  17057. public static function getForeignKeys($table)
  17058. {
  17059. //Method inherited from \Illuminate\Database\Schema\Builder
  17060. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17061. return $instance->getForeignKeys($table);
  17062. }
  17063. /**
  17064. * Modify a table on the schema.
  17065. *
  17066. * @param string $table
  17067. * @param \Closure $callback
  17068. * @return void
  17069. * @static
  17070. */
  17071. public static function table($table, $callback)
  17072. {
  17073. //Method inherited from \Illuminate\Database\Schema\Builder
  17074. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17075. $instance->table($table, $callback);
  17076. }
  17077. /**
  17078. * Create a new table on the schema.
  17079. *
  17080. * @param string $table
  17081. * @param \Closure $callback
  17082. * @return void
  17083. * @static
  17084. */
  17085. public static function create($table, $callback)
  17086. {
  17087. //Method inherited from \Illuminate\Database\Schema\Builder
  17088. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17089. $instance->create($table, $callback);
  17090. }
  17091. /**
  17092. * Drop a table from the schema.
  17093. *
  17094. * @param string $table
  17095. * @return void
  17096. * @static
  17097. */
  17098. public static function drop($table)
  17099. {
  17100. //Method inherited from \Illuminate\Database\Schema\Builder
  17101. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17102. $instance->drop($table);
  17103. }
  17104. /**
  17105. * Drop a table from the schema if it exists.
  17106. *
  17107. * @param string $table
  17108. * @return void
  17109. * @static
  17110. */
  17111. public static function dropIfExists($table)
  17112. {
  17113. //Method inherited from \Illuminate\Database\Schema\Builder
  17114. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17115. $instance->dropIfExists($table);
  17116. }
  17117. /**
  17118. * Drop columns from a table schema.
  17119. *
  17120. * @param string $table
  17121. * @param string|array<string> $columns
  17122. * @return void
  17123. * @static
  17124. */
  17125. public static function dropColumns($table, $columns)
  17126. {
  17127. //Method inherited from \Illuminate\Database\Schema\Builder
  17128. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17129. $instance->dropColumns($table, $columns);
  17130. }
  17131. /**
  17132. * Rename a table on the schema.
  17133. *
  17134. * @param string $from
  17135. * @param string $to
  17136. * @return void
  17137. * @static
  17138. */
  17139. public static function rename($from, $to)
  17140. {
  17141. //Method inherited from \Illuminate\Database\Schema\Builder
  17142. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17143. $instance->rename($from, $to);
  17144. }
  17145. /**
  17146. * Enable foreign key constraints.
  17147. *
  17148. * @return bool
  17149. * @static
  17150. */
  17151. public static function enableForeignKeyConstraints()
  17152. {
  17153. //Method inherited from \Illuminate\Database\Schema\Builder
  17154. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17155. return $instance->enableForeignKeyConstraints();
  17156. }
  17157. /**
  17158. * Disable foreign key constraints.
  17159. *
  17160. * @return bool
  17161. * @static
  17162. */
  17163. public static function disableForeignKeyConstraints()
  17164. {
  17165. //Method inherited from \Illuminate\Database\Schema\Builder
  17166. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17167. return $instance->disableForeignKeyConstraints();
  17168. }
  17169. /**
  17170. * Disable foreign key constraints during the execution of a callback.
  17171. *
  17172. * @param \Closure $callback
  17173. * @return mixed
  17174. * @static
  17175. */
  17176. public static function withoutForeignKeyConstraints($callback)
  17177. {
  17178. //Method inherited from \Illuminate\Database\Schema\Builder
  17179. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17180. return $instance->withoutForeignKeyConstraints($callback);
  17181. }
  17182. /**
  17183. * Get the default schema name for the connection.
  17184. *
  17185. * @return string|null
  17186. * @static
  17187. */
  17188. public static function getCurrentSchemaName()
  17189. {
  17190. //Method inherited from \Illuminate\Database\Schema\Builder
  17191. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17192. return $instance->getCurrentSchemaName();
  17193. }
  17194. /**
  17195. * Parse the given database object reference and extract the schema and table.
  17196. *
  17197. * @param string $reference
  17198. * @param string|bool|null $withDefaultSchema
  17199. * @return array
  17200. * @static
  17201. */
  17202. public static function parseSchemaAndTable($reference, $withDefaultSchema = null)
  17203. {
  17204. //Method inherited from \Illuminate\Database\Schema\Builder
  17205. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17206. return $instance->parseSchemaAndTable($reference, $withDefaultSchema);
  17207. }
  17208. /**
  17209. * Get the database connection instance.
  17210. *
  17211. * @return \Illuminate\Database\Connection
  17212. * @static
  17213. */
  17214. public static function getConnection()
  17215. {
  17216. //Method inherited from \Illuminate\Database\Schema\Builder
  17217. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17218. return $instance->getConnection();
  17219. }
  17220. /**
  17221. * Set the Schema Blueprint resolver callback.
  17222. *
  17223. * @param \Closure(string, \Closure, string): \Illuminate\Database\Schema\Blueprint|null $resolver
  17224. * @return void
  17225. * @static
  17226. */
  17227. public static function blueprintResolver($resolver)
  17228. {
  17229. //Method inherited from \Illuminate\Database\Schema\Builder
  17230. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17231. $instance->blueprintResolver($resolver);
  17232. }
  17233. /**
  17234. * Register a custom macro.
  17235. *
  17236. * @param string $name
  17237. * @param object|callable $macro
  17238. * @param-closure-this static $macro
  17239. * @return void
  17240. * @static
  17241. */
  17242. public static function macro($name, $macro)
  17243. {
  17244. //Method inherited from \Illuminate\Database\Schema\Builder
  17245. \Illuminate\Database\Schema\PostgresBuilder::macro($name, $macro);
  17246. }
  17247. /**
  17248. * Mix another object into the class.
  17249. *
  17250. * @param object $mixin
  17251. * @param bool $replace
  17252. * @return void
  17253. * @throws \ReflectionException
  17254. * @static
  17255. */
  17256. public static function mixin($mixin, $replace = true)
  17257. {
  17258. //Method inherited from \Illuminate\Database\Schema\Builder
  17259. \Illuminate\Database\Schema\PostgresBuilder::mixin($mixin, $replace);
  17260. }
  17261. /**
  17262. * Checks if macro is registered.
  17263. *
  17264. * @param string $name
  17265. * @return bool
  17266. * @static
  17267. */
  17268. public static function hasMacro($name)
  17269. {
  17270. //Method inherited from \Illuminate\Database\Schema\Builder
  17271. return \Illuminate\Database\Schema\PostgresBuilder::hasMacro($name);
  17272. }
  17273. /**
  17274. * Flush the existing macros.
  17275. *
  17276. * @return void
  17277. * @static
  17278. */
  17279. public static function flushMacros()
  17280. {
  17281. //Method inherited from \Illuminate\Database\Schema\Builder
  17282. \Illuminate\Database\Schema\PostgresBuilder::flushMacros();
  17283. }
  17284. }
  17285. /**
  17286. * @see \Illuminate\Session\SessionManager
  17287. */
  17288. class Session {
  17289. /**
  17290. * Determine if requests for the same session should wait for each to finish before executing.
  17291. *
  17292. * @return bool
  17293. * @static
  17294. */
  17295. public static function shouldBlock()
  17296. {
  17297. /** @var \Illuminate\Session\SessionManager $instance */
  17298. return $instance->shouldBlock();
  17299. }
  17300. /**
  17301. * Get the name of the cache store / driver that should be used to acquire session locks.
  17302. *
  17303. * @return string|null
  17304. * @static
  17305. */
  17306. public static function blockDriver()
  17307. {
  17308. /** @var \Illuminate\Session\SessionManager $instance */
  17309. return $instance->blockDriver();
  17310. }
  17311. /**
  17312. * Get the maximum number of seconds the session lock should be held for.
  17313. *
  17314. * @return int
  17315. * @static
  17316. */
  17317. public static function defaultRouteBlockLockSeconds()
  17318. {
  17319. /** @var \Illuminate\Session\SessionManager $instance */
  17320. return $instance->defaultRouteBlockLockSeconds();
  17321. }
  17322. /**
  17323. * Get the maximum number of seconds to wait while attempting to acquire a route block session lock.
  17324. *
  17325. * @return int
  17326. * @static
  17327. */
  17328. public static function defaultRouteBlockWaitSeconds()
  17329. {
  17330. /** @var \Illuminate\Session\SessionManager $instance */
  17331. return $instance->defaultRouteBlockWaitSeconds();
  17332. }
  17333. /**
  17334. * Get the session configuration.
  17335. *
  17336. * @return array
  17337. * @static
  17338. */
  17339. public static function getSessionConfig()
  17340. {
  17341. /** @var \Illuminate\Session\SessionManager $instance */
  17342. return $instance->getSessionConfig();
  17343. }
  17344. /**
  17345. * Get the default session driver name.
  17346. *
  17347. * @return string
  17348. * @static
  17349. */
  17350. public static function getDefaultDriver()
  17351. {
  17352. /** @var \Illuminate\Session\SessionManager $instance */
  17353. return $instance->getDefaultDriver();
  17354. }
  17355. /**
  17356. * Set the default session driver name.
  17357. *
  17358. * @param string $name
  17359. * @return void
  17360. * @static
  17361. */
  17362. public static function setDefaultDriver($name)
  17363. {
  17364. /** @var \Illuminate\Session\SessionManager $instance */
  17365. $instance->setDefaultDriver($name);
  17366. }
  17367. /**
  17368. * Get a driver instance.
  17369. *
  17370. * @param string|null $driver
  17371. * @return mixed
  17372. * @throws \InvalidArgumentException
  17373. * @static
  17374. */
  17375. public static function driver($driver = null)
  17376. {
  17377. //Method inherited from \Illuminate\Support\Manager
  17378. /** @var \Illuminate\Session\SessionManager $instance */
  17379. return $instance->driver($driver);
  17380. }
  17381. /**
  17382. * Register a custom driver creator Closure.
  17383. *
  17384. * @param string $driver
  17385. * @param \Closure $callback
  17386. * @return \Illuminate\Session\SessionManager
  17387. * @static
  17388. */
  17389. public static function extend($driver, $callback)
  17390. {
  17391. //Method inherited from \Illuminate\Support\Manager
  17392. /** @var \Illuminate\Session\SessionManager $instance */
  17393. return $instance->extend($driver, $callback);
  17394. }
  17395. /**
  17396. * Get all of the created "drivers".
  17397. *
  17398. * @return array
  17399. * @static
  17400. */
  17401. public static function getDrivers()
  17402. {
  17403. //Method inherited from \Illuminate\Support\Manager
  17404. /** @var \Illuminate\Session\SessionManager $instance */
  17405. return $instance->getDrivers();
  17406. }
  17407. /**
  17408. * Get the container instance used by the manager.
  17409. *
  17410. * @return \Illuminate\Contracts\Container\Container
  17411. * @static
  17412. */
  17413. public static function getContainer()
  17414. {
  17415. //Method inherited from \Illuminate\Support\Manager
  17416. /** @var \Illuminate\Session\SessionManager $instance */
  17417. return $instance->getContainer();
  17418. }
  17419. /**
  17420. * Set the container instance used by the manager.
  17421. *
  17422. * @param \Illuminate\Contracts\Container\Container $container
  17423. * @return \Illuminate\Session\SessionManager
  17424. * @static
  17425. */
  17426. public static function setContainer($container)
  17427. {
  17428. //Method inherited from \Illuminate\Support\Manager
  17429. /** @var \Illuminate\Session\SessionManager $instance */
  17430. return $instance->setContainer($container);
  17431. }
  17432. /**
  17433. * Forget all of the resolved driver instances.
  17434. *
  17435. * @return \Illuminate\Session\SessionManager
  17436. * @static
  17437. */
  17438. public static function forgetDrivers()
  17439. {
  17440. //Method inherited from \Illuminate\Support\Manager
  17441. /** @var \Illuminate\Session\SessionManager $instance */
  17442. return $instance->forgetDrivers();
  17443. }
  17444. /**
  17445. * Start the session, reading the data from a handler.
  17446. *
  17447. * @return bool
  17448. * @static
  17449. */
  17450. public static function start()
  17451. {
  17452. /** @var \Illuminate\Session\Store $instance */
  17453. return $instance->start();
  17454. }
  17455. /**
  17456. * Save the session data to storage.
  17457. *
  17458. * @return void
  17459. * @static
  17460. */
  17461. public static function save()
  17462. {
  17463. /** @var \Illuminate\Session\Store $instance */
  17464. $instance->save();
  17465. }
  17466. /**
  17467. * Age the flash data for the session.
  17468. *
  17469. * @return void
  17470. * @static
  17471. */
  17472. public static function ageFlashData()
  17473. {
  17474. /** @var \Illuminate\Session\Store $instance */
  17475. $instance->ageFlashData();
  17476. }
  17477. /**
  17478. * Get all of the session data.
  17479. *
  17480. * @return array
  17481. * @static
  17482. */
  17483. public static function all()
  17484. {
  17485. /** @var \Illuminate\Session\Store $instance */
  17486. return $instance->all();
  17487. }
  17488. /**
  17489. * Get a subset of the session data.
  17490. *
  17491. * @param array $keys
  17492. * @return array
  17493. * @static
  17494. */
  17495. public static function only($keys)
  17496. {
  17497. /** @var \Illuminate\Session\Store $instance */
  17498. return $instance->only($keys);
  17499. }
  17500. /**
  17501. * Get all the session data except for a specified array of items.
  17502. *
  17503. * @param array $keys
  17504. * @return array
  17505. * @static
  17506. */
  17507. public static function except($keys)
  17508. {
  17509. /** @var \Illuminate\Session\Store $instance */
  17510. return $instance->except($keys);
  17511. }
  17512. /**
  17513. * Checks if a key exists.
  17514. *
  17515. * @param string|array $key
  17516. * @return bool
  17517. * @static
  17518. */
  17519. public static function exists($key)
  17520. {
  17521. /** @var \Illuminate\Session\Store $instance */
  17522. return $instance->exists($key);
  17523. }
  17524. /**
  17525. * Determine if the given key is missing from the session data.
  17526. *
  17527. * @param string|array $key
  17528. * @return bool
  17529. * @static
  17530. */
  17531. public static function missing($key)
  17532. {
  17533. /** @var \Illuminate\Session\Store $instance */
  17534. return $instance->missing($key);
  17535. }
  17536. /**
  17537. * Determine if a key is present and not null.
  17538. *
  17539. * @param string|array $key
  17540. * @return bool
  17541. * @static
  17542. */
  17543. public static function has($key)
  17544. {
  17545. /** @var \Illuminate\Session\Store $instance */
  17546. return $instance->has($key);
  17547. }
  17548. /**
  17549. * Determine if any of the given keys are present and not null.
  17550. *
  17551. * @param string|array $key
  17552. * @return bool
  17553. * @static
  17554. */
  17555. public static function hasAny($key)
  17556. {
  17557. /** @var \Illuminate\Session\Store $instance */
  17558. return $instance->hasAny($key);
  17559. }
  17560. /**
  17561. * Get an item from the session.
  17562. *
  17563. * @param string $key
  17564. * @param mixed $default
  17565. * @return mixed
  17566. * @static
  17567. */
  17568. public static function get($key, $default = null)
  17569. {
  17570. /** @var \Illuminate\Session\Store $instance */
  17571. return $instance->get($key, $default);
  17572. }
  17573. /**
  17574. * Get the value of a given key and then forget it.
  17575. *
  17576. * @param string $key
  17577. * @param mixed $default
  17578. * @return mixed
  17579. * @static
  17580. */
  17581. public static function pull($key, $default = null)
  17582. {
  17583. /** @var \Illuminate\Session\Store $instance */
  17584. return $instance->pull($key, $default);
  17585. }
  17586. /**
  17587. * Determine if the session contains old input.
  17588. *
  17589. * @param string|null $key
  17590. * @return bool
  17591. * @static
  17592. */
  17593. public static function hasOldInput($key = null)
  17594. {
  17595. /** @var \Illuminate\Session\Store $instance */
  17596. return $instance->hasOldInput($key);
  17597. }
  17598. /**
  17599. * Get the requested item from the flashed input array.
  17600. *
  17601. * @param string|null $key
  17602. * @param mixed $default
  17603. * @return mixed
  17604. * @static
  17605. */
  17606. public static function getOldInput($key = null, $default = null)
  17607. {
  17608. /** @var \Illuminate\Session\Store $instance */
  17609. return $instance->getOldInput($key, $default);
  17610. }
  17611. /**
  17612. * Replace the given session attributes entirely.
  17613. *
  17614. * @param array $attributes
  17615. * @return void
  17616. * @static
  17617. */
  17618. public static function replace($attributes)
  17619. {
  17620. /** @var \Illuminate\Session\Store $instance */
  17621. $instance->replace($attributes);
  17622. }
  17623. /**
  17624. * Put a key / value pair or array of key / value pairs in the session.
  17625. *
  17626. * @param string|array $key
  17627. * @param mixed $value
  17628. * @return void
  17629. * @static
  17630. */
  17631. public static function put($key, $value = null)
  17632. {
  17633. /** @var \Illuminate\Session\Store $instance */
  17634. $instance->put($key, $value);
  17635. }
  17636. /**
  17637. * Get an item from the session, or store the default value.
  17638. *
  17639. * @param string $key
  17640. * @param \Closure $callback
  17641. * @return mixed
  17642. * @static
  17643. */
  17644. public static function remember($key, $callback)
  17645. {
  17646. /** @var \Illuminate\Session\Store $instance */
  17647. return $instance->remember($key, $callback);
  17648. }
  17649. /**
  17650. * Push a value onto a session array.
  17651. *
  17652. * @param string $key
  17653. * @param mixed $value
  17654. * @return void
  17655. * @static
  17656. */
  17657. public static function push($key, $value)
  17658. {
  17659. /** @var \Illuminate\Session\Store $instance */
  17660. $instance->push($key, $value);
  17661. }
  17662. /**
  17663. * Increment the value of an item in the session.
  17664. *
  17665. * @param string $key
  17666. * @param int $amount
  17667. * @return mixed
  17668. * @static
  17669. */
  17670. public static function increment($key, $amount = 1)
  17671. {
  17672. /** @var \Illuminate\Session\Store $instance */
  17673. return $instance->increment($key, $amount);
  17674. }
  17675. /**
  17676. * Decrement the value of an item in the session.
  17677. *
  17678. * @param string $key
  17679. * @param int $amount
  17680. * @return int
  17681. * @static
  17682. */
  17683. public static function decrement($key, $amount = 1)
  17684. {
  17685. /** @var \Illuminate\Session\Store $instance */
  17686. return $instance->decrement($key, $amount);
  17687. }
  17688. /**
  17689. * Flash a key / value pair to the session.
  17690. *
  17691. * @param string $key
  17692. * @param mixed $value
  17693. * @return void
  17694. * @static
  17695. */
  17696. public static function flash($key, $value = true)
  17697. {
  17698. /** @var \Illuminate\Session\Store $instance */
  17699. $instance->flash($key, $value);
  17700. }
  17701. /**
  17702. * Flash a key / value pair to the session for immediate use.
  17703. *
  17704. * @param string $key
  17705. * @param mixed $value
  17706. * @return void
  17707. * @static
  17708. */
  17709. public static function now($key, $value)
  17710. {
  17711. /** @var \Illuminate\Session\Store $instance */
  17712. $instance->now($key, $value);
  17713. }
  17714. /**
  17715. * Reflash all of the session flash data.
  17716. *
  17717. * @return void
  17718. * @static
  17719. */
  17720. public static function reflash()
  17721. {
  17722. /** @var \Illuminate\Session\Store $instance */
  17723. $instance->reflash();
  17724. }
  17725. /**
  17726. * Reflash a subset of the current flash data.
  17727. *
  17728. * @param array|mixed $keys
  17729. * @return void
  17730. * @static
  17731. */
  17732. public static function keep($keys = null)
  17733. {
  17734. /** @var \Illuminate\Session\Store $instance */
  17735. $instance->keep($keys);
  17736. }
  17737. /**
  17738. * Flash an input array to the session.
  17739. *
  17740. * @param array $value
  17741. * @return void
  17742. * @static
  17743. */
  17744. public static function flashInput($value)
  17745. {
  17746. /** @var \Illuminate\Session\Store $instance */
  17747. $instance->flashInput($value);
  17748. }
  17749. /**
  17750. * Remove an item from the session, returning its value.
  17751. *
  17752. * @param string $key
  17753. * @return mixed
  17754. * @static
  17755. */
  17756. public static function remove($key)
  17757. {
  17758. /** @var \Illuminate\Session\Store $instance */
  17759. return $instance->remove($key);
  17760. }
  17761. /**
  17762. * Remove one or many items from the session.
  17763. *
  17764. * @param string|array $keys
  17765. * @return void
  17766. * @static
  17767. */
  17768. public static function forget($keys)
  17769. {
  17770. /** @var \Illuminate\Session\Store $instance */
  17771. $instance->forget($keys);
  17772. }
  17773. /**
  17774. * Remove all of the items from the session.
  17775. *
  17776. * @return void
  17777. * @static
  17778. */
  17779. public static function flush()
  17780. {
  17781. /** @var \Illuminate\Session\Store $instance */
  17782. $instance->flush();
  17783. }
  17784. /**
  17785. * Flush the session data and regenerate the ID.
  17786. *
  17787. * @return bool
  17788. * @static
  17789. */
  17790. public static function invalidate()
  17791. {
  17792. /** @var \Illuminate\Session\Store $instance */
  17793. return $instance->invalidate();
  17794. }
  17795. /**
  17796. * Generate a new session identifier.
  17797. *
  17798. * @param bool $destroy
  17799. * @return bool
  17800. * @static
  17801. */
  17802. public static function regenerate($destroy = false)
  17803. {
  17804. /** @var \Illuminate\Session\Store $instance */
  17805. return $instance->regenerate($destroy);
  17806. }
  17807. /**
  17808. * Generate a new session ID for the session.
  17809. *
  17810. * @param bool $destroy
  17811. * @return bool
  17812. * @static
  17813. */
  17814. public static function migrate($destroy = false)
  17815. {
  17816. /** @var \Illuminate\Session\Store $instance */
  17817. return $instance->migrate($destroy);
  17818. }
  17819. /**
  17820. * Determine if the session has been started.
  17821. *
  17822. * @return bool
  17823. * @static
  17824. */
  17825. public static function isStarted()
  17826. {
  17827. /** @var \Illuminate\Session\Store $instance */
  17828. return $instance->isStarted();
  17829. }
  17830. /**
  17831. * Get the name of the session.
  17832. *
  17833. * @return string
  17834. * @static
  17835. */
  17836. public static function getName()
  17837. {
  17838. /** @var \Illuminate\Session\Store $instance */
  17839. return $instance->getName();
  17840. }
  17841. /**
  17842. * Set the name of the session.
  17843. *
  17844. * @param string $name
  17845. * @return void
  17846. * @static
  17847. */
  17848. public static function setName($name)
  17849. {
  17850. /** @var \Illuminate\Session\Store $instance */
  17851. $instance->setName($name);
  17852. }
  17853. /**
  17854. * Get the current session ID.
  17855. *
  17856. * @return string
  17857. * @static
  17858. */
  17859. public static function id()
  17860. {
  17861. /** @var \Illuminate\Session\Store $instance */
  17862. return $instance->id();
  17863. }
  17864. /**
  17865. * Get the current session ID.
  17866. *
  17867. * @return string
  17868. * @static
  17869. */
  17870. public static function getId()
  17871. {
  17872. /** @var \Illuminate\Session\Store $instance */
  17873. return $instance->getId();
  17874. }
  17875. /**
  17876. * Set the session ID.
  17877. *
  17878. * @param string|null $id
  17879. * @return void
  17880. * @static
  17881. */
  17882. public static function setId($id)
  17883. {
  17884. /** @var \Illuminate\Session\Store $instance */
  17885. $instance->setId($id);
  17886. }
  17887. /**
  17888. * Determine if this is a valid session ID.
  17889. *
  17890. * @param string|null $id
  17891. * @return bool
  17892. * @static
  17893. */
  17894. public static function isValidId($id)
  17895. {
  17896. /** @var \Illuminate\Session\Store $instance */
  17897. return $instance->isValidId($id);
  17898. }
  17899. /**
  17900. * Set the existence of the session on the handler if applicable.
  17901. *
  17902. * @param bool $value
  17903. * @return void
  17904. * @static
  17905. */
  17906. public static function setExists($value)
  17907. {
  17908. /** @var \Illuminate\Session\Store $instance */
  17909. $instance->setExists($value);
  17910. }
  17911. /**
  17912. * Get the CSRF token value.
  17913. *
  17914. * @return string
  17915. * @static
  17916. */
  17917. public static function token()
  17918. {
  17919. /** @var \Illuminate\Session\Store $instance */
  17920. return $instance->token();
  17921. }
  17922. /**
  17923. * Regenerate the CSRF token value.
  17924. *
  17925. * @return void
  17926. * @static
  17927. */
  17928. public static function regenerateToken()
  17929. {
  17930. /** @var \Illuminate\Session\Store $instance */
  17931. $instance->regenerateToken();
  17932. }
  17933. /**
  17934. * Determine if the previous URI is available.
  17935. *
  17936. * @return bool
  17937. * @static
  17938. */
  17939. public static function hasPreviousUri()
  17940. {
  17941. /** @var \Illuminate\Session\Store $instance */
  17942. return $instance->hasPreviousUri();
  17943. }
  17944. /**
  17945. * Get the previous URL from the session as a URI instance.
  17946. *
  17947. * @return \Illuminate\Support\Uri
  17948. * @throws \RuntimeException
  17949. * @static
  17950. */
  17951. public static function previousUri()
  17952. {
  17953. /** @var \Illuminate\Session\Store $instance */
  17954. return $instance->previousUri();
  17955. }
  17956. /**
  17957. * Get the previous URL from the session.
  17958. *
  17959. * @return string|null
  17960. * @static
  17961. */
  17962. public static function previousUrl()
  17963. {
  17964. /** @var \Illuminate\Session\Store $instance */
  17965. return $instance->previousUrl();
  17966. }
  17967. /**
  17968. * Set the "previous" URL in the session.
  17969. *
  17970. * @param string $url
  17971. * @return void
  17972. * @static
  17973. */
  17974. public static function setPreviousUrl($url)
  17975. {
  17976. /** @var \Illuminate\Session\Store $instance */
  17977. $instance->setPreviousUrl($url);
  17978. }
  17979. /**
  17980. * Specify that the user has confirmed their password.
  17981. *
  17982. * @return void
  17983. * @static
  17984. */
  17985. public static function passwordConfirmed()
  17986. {
  17987. /** @var \Illuminate\Session\Store $instance */
  17988. $instance->passwordConfirmed();
  17989. }
  17990. /**
  17991. * Get the underlying session handler implementation.
  17992. *
  17993. * @return \SessionHandlerInterface
  17994. * @static
  17995. */
  17996. public static function getHandler()
  17997. {
  17998. /** @var \Illuminate\Session\Store $instance */
  17999. return $instance->getHandler();
  18000. }
  18001. /**
  18002. * Set the underlying session handler implementation.
  18003. *
  18004. * @param \SessionHandlerInterface $handler
  18005. * @return \SessionHandlerInterface
  18006. * @static
  18007. */
  18008. public static function setHandler($handler)
  18009. {
  18010. /** @var \Illuminate\Session\Store $instance */
  18011. return $instance->setHandler($handler);
  18012. }
  18013. /**
  18014. * Determine if the session handler needs a request.
  18015. *
  18016. * @return bool
  18017. * @static
  18018. */
  18019. public static function handlerNeedsRequest()
  18020. {
  18021. /** @var \Illuminate\Session\Store $instance */
  18022. return $instance->handlerNeedsRequest();
  18023. }
  18024. /**
  18025. * Set the request on the handler instance.
  18026. *
  18027. * @param \Illuminate\Http\Request $request
  18028. * @return void
  18029. * @static
  18030. */
  18031. public static function setRequestOnHandler($request)
  18032. {
  18033. /** @var \Illuminate\Session\Store $instance */
  18034. $instance->setRequestOnHandler($request);
  18035. }
  18036. /**
  18037. * Register a custom macro.
  18038. *
  18039. * @param string $name
  18040. * @param object|callable $macro
  18041. * @param-closure-this static $macro
  18042. * @return void
  18043. * @static
  18044. */
  18045. public static function macro($name, $macro)
  18046. {
  18047. \Illuminate\Session\Store::macro($name, $macro);
  18048. }
  18049. /**
  18050. * Mix another object into the class.
  18051. *
  18052. * @param object $mixin
  18053. * @param bool $replace
  18054. * @return void
  18055. * @throws \ReflectionException
  18056. * @static
  18057. */
  18058. public static function mixin($mixin, $replace = true)
  18059. {
  18060. \Illuminate\Session\Store::mixin($mixin, $replace);
  18061. }
  18062. /**
  18063. * Checks if macro is registered.
  18064. *
  18065. * @param string $name
  18066. * @return bool
  18067. * @static
  18068. */
  18069. public static function hasMacro($name)
  18070. {
  18071. return \Illuminate\Session\Store::hasMacro($name);
  18072. }
  18073. /**
  18074. * Flush the existing macros.
  18075. *
  18076. * @return void
  18077. * @static
  18078. */
  18079. public static function flushMacros()
  18080. {
  18081. \Illuminate\Session\Store::flushMacros();
  18082. }
  18083. }
  18084. /**
  18085. * @method static bool has(string $location)
  18086. * @method static string read(string $location)
  18087. * @method static \League\Flysystem\DirectoryListing listContents(string $location, bool $deep = false)
  18088. * @method static int fileSize(string $path)
  18089. * @method static string visibility(string $path)
  18090. * @method static void write(string $location, string $contents, array $config = [])
  18091. * @method static void createDirectory(string $location, array $config = [])
  18092. * @see \Illuminate\Filesystem\FilesystemManager
  18093. */
  18094. class Storage {
  18095. /**
  18096. * Get a filesystem instance.
  18097. *
  18098. * @param string|null $name
  18099. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18100. * @static
  18101. */
  18102. public static function drive($name = null)
  18103. {
  18104. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18105. return $instance->drive($name);
  18106. }
  18107. /**
  18108. * Get a filesystem instance.
  18109. *
  18110. * @param string|null $name
  18111. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18112. * @static
  18113. */
  18114. public static function disk($name = null)
  18115. {
  18116. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18117. return $instance->disk($name);
  18118. }
  18119. /**
  18120. * Get a default cloud filesystem instance.
  18121. *
  18122. * @return \Illuminate\Contracts\Filesystem\Cloud
  18123. * @static
  18124. */
  18125. public static function cloud()
  18126. {
  18127. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18128. return $instance->cloud();
  18129. }
  18130. /**
  18131. * Build an on-demand disk.
  18132. *
  18133. * @param string|array $config
  18134. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18135. * @static
  18136. */
  18137. public static function build($config)
  18138. {
  18139. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18140. return $instance->build($config);
  18141. }
  18142. /**
  18143. * Create an instance of the local driver.
  18144. *
  18145. * @param array $config
  18146. * @param string $name
  18147. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18148. * @static
  18149. */
  18150. public static function createLocalDriver($config, $name = 'local')
  18151. {
  18152. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18153. return $instance->createLocalDriver($config, $name);
  18154. }
  18155. /**
  18156. * Create an instance of the ftp driver.
  18157. *
  18158. * @param array $config
  18159. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18160. * @static
  18161. */
  18162. public static function createFtpDriver($config)
  18163. {
  18164. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18165. return $instance->createFtpDriver($config);
  18166. }
  18167. /**
  18168. * Create an instance of the sftp driver.
  18169. *
  18170. * @param array $config
  18171. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18172. * @static
  18173. */
  18174. public static function createSftpDriver($config)
  18175. {
  18176. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18177. return $instance->createSftpDriver($config);
  18178. }
  18179. /**
  18180. * Create an instance of the Amazon S3 driver.
  18181. *
  18182. * @param array $config
  18183. * @return \Illuminate\Contracts\Filesystem\Cloud
  18184. * @static
  18185. */
  18186. public static function createS3Driver($config)
  18187. {
  18188. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18189. return $instance->createS3Driver($config);
  18190. }
  18191. /**
  18192. * Create a scoped driver.
  18193. *
  18194. * @param array $config
  18195. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18196. * @static
  18197. */
  18198. public static function createScopedDriver($config)
  18199. {
  18200. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18201. return $instance->createScopedDriver($config);
  18202. }
  18203. /**
  18204. * Set the given disk instance.
  18205. *
  18206. * @param string $name
  18207. * @param mixed $disk
  18208. * @return \Illuminate\Filesystem\FilesystemManager
  18209. * @static
  18210. */
  18211. public static function set($name, $disk)
  18212. {
  18213. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18214. return $instance->set($name, $disk);
  18215. }
  18216. /**
  18217. * Get the default driver name.
  18218. *
  18219. * @return string
  18220. * @static
  18221. */
  18222. public static function getDefaultDriver()
  18223. {
  18224. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18225. return $instance->getDefaultDriver();
  18226. }
  18227. /**
  18228. * Get the default cloud driver name.
  18229. *
  18230. * @return string
  18231. * @static
  18232. */
  18233. public static function getDefaultCloudDriver()
  18234. {
  18235. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18236. return $instance->getDefaultCloudDriver();
  18237. }
  18238. /**
  18239. * Unset the given disk instances.
  18240. *
  18241. * @param array|string $disk
  18242. * @return \Illuminate\Filesystem\FilesystemManager
  18243. * @static
  18244. */
  18245. public static function forgetDisk($disk)
  18246. {
  18247. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18248. return $instance->forgetDisk($disk);
  18249. }
  18250. /**
  18251. * Disconnect the given disk and remove from local cache.
  18252. *
  18253. * @param string|null $name
  18254. * @return void
  18255. * @static
  18256. */
  18257. public static function purge($name = null)
  18258. {
  18259. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18260. $instance->purge($name);
  18261. }
  18262. /**
  18263. * Register a custom driver creator Closure.
  18264. *
  18265. * @param string $driver
  18266. * @param \Closure $callback
  18267. * @return \Illuminate\Filesystem\FilesystemManager
  18268. * @static
  18269. */
  18270. public static function extend($driver, $callback)
  18271. {
  18272. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18273. return $instance->extend($driver, $callback);
  18274. }
  18275. /**
  18276. * Set the application instance used by the manager.
  18277. *
  18278. * @param \Illuminate\Contracts\Foundation\Application $app
  18279. * @return \Illuminate\Filesystem\FilesystemManager
  18280. * @static
  18281. */
  18282. public static function setApplication($app)
  18283. {
  18284. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18285. return $instance->setApplication($app);
  18286. }
  18287. /**
  18288. * Determine if temporary URLs can be generated.
  18289. *
  18290. * @return bool
  18291. * @static
  18292. */
  18293. public static function providesTemporaryUrls()
  18294. {
  18295. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18296. return $instance->providesTemporaryUrls();
  18297. }
  18298. /**
  18299. * Get a temporary URL for the file at the given path.
  18300. *
  18301. * @param string $path
  18302. * @param \DateTimeInterface $expiration
  18303. * @param array $options
  18304. * @return string
  18305. * @static
  18306. */
  18307. public static function temporaryUrl($path, $expiration, $options = [])
  18308. {
  18309. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18310. return $instance->temporaryUrl($path, $expiration, $options);
  18311. }
  18312. /**
  18313. * Specify the name of the disk the adapter is managing.
  18314. *
  18315. * @param string $disk
  18316. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18317. * @static
  18318. */
  18319. public static function diskName($disk)
  18320. {
  18321. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18322. return $instance->diskName($disk);
  18323. }
  18324. /**
  18325. * Indicate that signed URLs should serve the corresponding files.
  18326. *
  18327. * @param bool $serve
  18328. * @param \Closure|null $urlGeneratorResolver
  18329. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18330. * @static
  18331. */
  18332. public static function shouldServeSignedUrls($serve = true, $urlGeneratorResolver = null)
  18333. {
  18334. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18335. return $instance->shouldServeSignedUrls($serve, $urlGeneratorResolver);
  18336. }
  18337. /**
  18338. * Assert that the given file or directory exists.
  18339. *
  18340. * @param string|array $path
  18341. * @param string|null $content
  18342. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18343. * @static
  18344. */
  18345. public static function assertExists($path, $content = null)
  18346. {
  18347. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18348. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18349. return $instance->assertExists($path, $content);
  18350. }
  18351. /**
  18352. * Assert that the number of files in path equals the expected count.
  18353. *
  18354. * @param string $path
  18355. * @param int $count
  18356. * @param bool $recursive
  18357. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18358. * @static
  18359. */
  18360. public static function assertCount($path, $count, $recursive = false)
  18361. {
  18362. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18363. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18364. return $instance->assertCount($path, $count, $recursive);
  18365. }
  18366. /**
  18367. * Assert that the given file or directory does not exist.
  18368. *
  18369. * @param string|array $path
  18370. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18371. * @static
  18372. */
  18373. public static function assertMissing($path)
  18374. {
  18375. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18376. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18377. return $instance->assertMissing($path);
  18378. }
  18379. /**
  18380. * Assert that the given directory is empty.
  18381. *
  18382. * @param string $path
  18383. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18384. * @static
  18385. */
  18386. public static function assertDirectoryEmpty($path)
  18387. {
  18388. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18389. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18390. return $instance->assertDirectoryEmpty($path);
  18391. }
  18392. /**
  18393. * Determine if a file or directory exists.
  18394. *
  18395. * @param string $path
  18396. * @return bool
  18397. * @static
  18398. */
  18399. public static function exists($path)
  18400. {
  18401. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18402. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18403. return $instance->exists($path);
  18404. }
  18405. /**
  18406. * Determine if a file or directory is missing.
  18407. *
  18408. * @param string $path
  18409. * @return bool
  18410. * @static
  18411. */
  18412. public static function missing($path)
  18413. {
  18414. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18415. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18416. return $instance->missing($path);
  18417. }
  18418. /**
  18419. * Determine if a file exists.
  18420. *
  18421. * @param string $path
  18422. * @return bool
  18423. * @static
  18424. */
  18425. public static function fileExists($path)
  18426. {
  18427. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18428. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18429. return $instance->fileExists($path);
  18430. }
  18431. /**
  18432. * Determine if a file is missing.
  18433. *
  18434. * @param string $path
  18435. * @return bool
  18436. * @static
  18437. */
  18438. public static function fileMissing($path)
  18439. {
  18440. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18441. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18442. return $instance->fileMissing($path);
  18443. }
  18444. /**
  18445. * Determine if a directory exists.
  18446. *
  18447. * @param string $path
  18448. * @return bool
  18449. * @static
  18450. */
  18451. public static function directoryExists($path)
  18452. {
  18453. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18454. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18455. return $instance->directoryExists($path);
  18456. }
  18457. /**
  18458. * Determine if a directory is missing.
  18459. *
  18460. * @param string $path
  18461. * @return bool
  18462. * @static
  18463. */
  18464. public static function directoryMissing($path)
  18465. {
  18466. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18467. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18468. return $instance->directoryMissing($path);
  18469. }
  18470. /**
  18471. * Get the full path to the file that exists at the given relative path.
  18472. *
  18473. * @param string $path
  18474. * @return string
  18475. * @static
  18476. */
  18477. public static function path($path)
  18478. {
  18479. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18480. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18481. return $instance->path($path);
  18482. }
  18483. /**
  18484. * Get the contents of a file.
  18485. *
  18486. * @param string $path
  18487. * @return string|null
  18488. * @static
  18489. */
  18490. public static function get($path)
  18491. {
  18492. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18493. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18494. return $instance->get($path);
  18495. }
  18496. /**
  18497. * Get the contents of a file as decoded JSON.
  18498. *
  18499. * @param string $path
  18500. * @param int $flags
  18501. * @return array|null
  18502. * @static
  18503. */
  18504. public static function json($path, $flags = 0)
  18505. {
  18506. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18507. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18508. return $instance->json($path, $flags);
  18509. }
  18510. /**
  18511. * Create a streamed response for a given file.
  18512. *
  18513. * @param string $path
  18514. * @param string|null $name
  18515. * @param array $headers
  18516. * @param string|null $disposition
  18517. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18518. * @static
  18519. */
  18520. public static function response($path, $name = null, $headers = [], $disposition = 'inline')
  18521. {
  18522. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18523. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18524. return $instance->response($path, $name, $headers, $disposition);
  18525. }
  18526. /**
  18527. * Create a streamed download response for a given file.
  18528. *
  18529. * @param \Illuminate\Http\Request $request
  18530. * @param string $path
  18531. * @param string|null $name
  18532. * @param array $headers
  18533. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18534. * @static
  18535. */
  18536. public static function serve($request, $path, $name = null, $headers = [])
  18537. {
  18538. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18539. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18540. return $instance->serve($request, $path, $name, $headers);
  18541. }
  18542. /**
  18543. * Create a streamed download response for a given file.
  18544. *
  18545. * @param string $path
  18546. * @param string|null $name
  18547. * @param array $headers
  18548. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18549. * @static
  18550. */
  18551. public static function download($path, $name = null, $headers = [])
  18552. {
  18553. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18554. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18555. return $instance->download($path, $name, $headers);
  18556. }
  18557. /**
  18558. * Write the contents of a file.
  18559. *
  18560. * @param string $path
  18561. * @param \Psr\Http\Message\StreamInterface|\Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|resource $contents
  18562. * @param mixed $options
  18563. * @return string|bool
  18564. * @static
  18565. */
  18566. public static function put($path, $contents, $options = [])
  18567. {
  18568. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18569. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18570. return $instance->put($path, $contents, $options);
  18571. }
  18572. /**
  18573. * Store the uploaded file on the disk.
  18574. *
  18575. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18576. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18577. * @param mixed $options
  18578. * @return string|false
  18579. * @static
  18580. */
  18581. public static function putFile($path, $file = null, $options = [])
  18582. {
  18583. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18584. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18585. return $instance->putFile($path, $file, $options);
  18586. }
  18587. /**
  18588. * Store the uploaded file on the disk with a given name.
  18589. *
  18590. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18591. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18592. * @param string|array|null $name
  18593. * @param mixed $options
  18594. * @return string|false
  18595. * @static
  18596. */
  18597. public static function putFileAs($path, $file, $name = null, $options = [])
  18598. {
  18599. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18600. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18601. return $instance->putFileAs($path, $file, $name, $options);
  18602. }
  18603. /**
  18604. * Get the visibility for the given path.
  18605. *
  18606. * @param string $path
  18607. * @return string
  18608. * @static
  18609. */
  18610. public static function getVisibility($path)
  18611. {
  18612. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18613. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18614. return $instance->getVisibility($path);
  18615. }
  18616. /**
  18617. * Set the visibility for the given path.
  18618. *
  18619. * @param string $path
  18620. * @param string $visibility
  18621. * @return bool
  18622. * @static
  18623. */
  18624. public static function setVisibility($path, $visibility)
  18625. {
  18626. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18627. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18628. return $instance->setVisibility($path, $visibility);
  18629. }
  18630. /**
  18631. * Prepend to a file.
  18632. *
  18633. * @param string $path
  18634. * @param string $data
  18635. * @param string $separator
  18636. * @return bool
  18637. * @static
  18638. */
  18639. public static function prepend($path, $data, $separator = '
  18640. ')
  18641. {
  18642. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18643. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18644. return $instance->prepend($path, $data, $separator);
  18645. }
  18646. /**
  18647. * Append to a file.
  18648. *
  18649. * @param string $path
  18650. * @param string $data
  18651. * @param string $separator
  18652. * @return bool
  18653. * @static
  18654. */
  18655. public static function append($path, $data, $separator = '
  18656. ')
  18657. {
  18658. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18659. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18660. return $instance->append($path, $data, $separator);
  18661. }
  18662. /**
  18663. * Delete the file at a given path.
  18664. *
  18665. * @param string|array $paths
  18666. * @return bool
  18667. * @static
  18668. */
  18669. public static function delete($paths)
  18670. {
  18671. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18672. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18673. return $instance->delete($paths);
  18674. }
  18675. /**
  18676. * Copy a file to a new location.
  18677. *
  18678. * @param string $from
  18679. * @param string $to
  18680. * @return bool
  18681. * @static
  18682. */
  18683. public static function copy($from, $to)
  18684. {
  18685. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18686. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18687. return $instance->copy($from, $to);
  18688. }
  18689. /**
  18690. * Move a file to a new location.
  18691. *
  18692. * @param string $from
  18693. * @param string $to
  18694. * @return bool
  18695. * @static
  18696. */
  18697. public static function move($from, $to)
  18698. {
  18699. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18700. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18701. return $instance->move($from, $to);
  18702. }
  18703. /**
  18704. * Get the file size of a given file.
  18705. *
  18706. * @param string $path
  18707. * @return int
  18708. * @static
  18709. */
  18710. public static function size($path)
  18711. {
  18712. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18713. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18714. return $instance->size($path);
  18715. }
  18716. /**
  18717. * Get the checksum for a file.
  18718. *
  18719. * @return string|false
  18720. * @throws UnableToProvideChecksum
  18721. * @static
  18722. */
  18723. public static function checksum($path, $options = [])
  18724. {
  18725. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18726. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18727. return $instance->checksum($path, $options);
  18728. }
  18729. /**
  18730. * Get the mime-type of a given file.
  18731. *
  18732. * @param string $path
  18733. * @return string|false
  18734. * @static
  18735. */
  18736. public static function mimeType($path)
  18737. {
  18738. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18739. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18740. return $instance->mimeType($path);
  18741. }
  18742. /**
  18743. * Get the file's last modification time.
  18744. *
  18745. * @param string $path
  18746. * @return int
  18747. * @static
  18748. */
  18749. public static function lastModified($path)
  18750. {
  18751. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18752. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18753. return $instance->lastModified($path);
  18754. }
  18755. /**
  18756. * Get a resource to read the file.
  18757. *
  18758. * @param string $path
  18759. * @return resource|null The path resource or null on failure.
  18760. * @static
  18761. */
  18762. public static function readStream($path)
  18763. {
  18764. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18765. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18766. return $instance->readStream($path);
  18767. }
  18768. /**
  18769. * Write a new file using a stream.
  18770. *
  18771. * @param string $path
  18772. * @param resource $resource
  18773. * @param array $options
  18774. * @return bool
  18775. * @static
  18776. */
  18777. public static function writeStream($path, $resource, $options = [])
  18778. {
  18779. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18780. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18781. return $instance->writeStream($path, $resource, $options);
  18782. }
  18783. /**
  18784. * Get the URL for the file at the given path.
  18785. *
  18786. * @param string $path
  18787. * @return string
  18788. * @throws \RuntimeException
  18789. * @static
  18790. */
  18791. public static function url($path)
  18792. {
  18793. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18794. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18795. return $instance->url($path);
  18796. }
  18797. /**
  18798. * Get a temporary upload URL for the file at the given path.
  18799. *
  18800. * @param string $path
  18801. * @param \DateTimeInterface $expiration
  18802. * @param array $options
  18803. * @return array
  18804. * @throws \RuntimeException
  18805. * @static
  18806. */
  18807. public static function temporaryUploadUrl($path, $expiration, $options = [])
  18808. {
  18809. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18810. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18811. return $instance->temporaryUploadUrl($path, $expiration, $options);
  18812. }
  18813. /**
  18814. * Get an array of all files in a directory.
  18815. *
  18816. * @param string|null $directory
  18817. * @param bool $recursive
  18818. * @return array
  18819. * @static
  18820. */
  18821. public static function files($directory = null, $recursive = false)
  18822. {
  18823. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18824. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18825. return $instance->files($directory, $recursive);
  18826. }
  18827. /**
  18828. * Get all of the files from the given directory (recursive).
  18829. *
  18830. * @param string|null $directory
  18831. * @return array
  18832. * @static
  18833. */
  18834. public static function allFiles($directory = null)
  18835. {
  18836. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18837. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18838. return $instance->allFiles($directory);
  18839. }
  18840. /**
  18841. * Get all of the directories within a given directory.
  18842. *
  18843. * @param string|null $directory
  18844. * @param bool $recursive
  18845. * @return array
  18846. * @static
  18847. */
  18848. public static function directories($directory = null, $recursive = false)
  18849. {
  18850. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18851. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18852. return $instance->directories($directory, $recursive);
  18853. }
  18854. /**
  18855. * Get all the directories within a given directory (recursive).
  18856. *
  18857. * @param string|null $directory
  18858. * @return array
  18859. * @static
  18860. */
  18861. public static function allDirectories($directory = null)
  18862. {
  18863. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18864. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18865. return $instance->allDirectories($directory);
  18866. }
  18867. /**
  18868. * Create a directory.
  18869. *
  18870. * @param string $path
  18871. * @return bool
  18872. * @static
  18873. */
  18874. public static function makeDirectory($path)
  18875. {
  18876. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18877. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18878. return $instance->makeDirectory($path);
  18879. }
  18880. /**
  18881. * Recursively delete a directory.
  18882. *
  18883. * @param string $directory
  18884. * @return bool
  18885. * @static
  18886. */
  18887. public static function deleteDirectory($directory)
  18888. {
  18889. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18890. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18891. return $instance->deleteDirectory($directory);
  18892. }
  18893. /**
  18894. * Get the Flysystem driver.
  18895. *
  18896. * @return \League\Flysystem\FilesystemOperator
  18897. * @static
  18898. */
  18899. public static function getDriver()
  18900. {
  18901. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18902. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18903. return $instance->getDriver();
  18904. }
  18905. /**
  18906. * Get the Flysystem adapter.
  18907. *
  18908. * @return \League\Flysystem\FilesystemAdapter
  18909. * @static
  18910. */
  18911. public static function getAdapter()
  18912. {
  18913. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18914. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18915. return $instance->getAdapter();
  18916. }
  18917. /**
  18918. * Get the configuration values.
  18919. *
  18920. * @return array
  18921. * @static
  18922. */
  18923. public static function getConfig()
  18924. {
  18925. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18926. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18927. return $instance->getConfig();
  18928. }
  18929. /**
  18930. * Define a custom callback that generates file download responses.
  18931. *
  18932. * @param \Closure $callback
  18933. * @return void
  18934. * @static
  18935. */
  18936. public static function serveUsing($callback)
  18937. {
  18938. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18939. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18940. $instance->serveUsing($callback);
  18941. }
  18942. /**
  18943. * Define a custom temporary URL builder callback.
  18944. *
  18945. * @param \Closure $callback
  18946. * @return void
  18947. * @static
  18948. */
  18949. public static function buildTemporaryUrlsUsing($callback)
  18950. {
  18951. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18952. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18953. $instance->buildTemporaryUrlsUsing($callback);
  18954. }
  18955. /**
  18956. * Apply the callback if the given "value" is (or resolves to) truthy.
  18957. *
  18958. * @template TWhenParameter
  18959. * @template TWhenReturnType
  18960. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  18961. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  18962. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  18963. * @return $this|TWhenReturnType
  18964. * @static
  18965. */
  18966. public static function when($value = null, $callback = null, $default = null)
  18967. {
  18968. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18969. return $instance->when($value, $callback, $default);
  18970. }
  18971. /**
  18972. * Apply the callback if the given "value" is (or resolves to) falsy.
  18973. *
  18974. * @template TUnlessParameter
  18975. * @template TUnlessReturnType
  18976. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  18977. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  18978. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  18979. * @return $this|TUnlessReturnType
  18980. * @static
  18981. */
  18982. public static function unless($value = null, $callback = null, $default = null)
  18983. {
  18984. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18985. return $instance->unless($value, $callback, $default);
  18986. }
  18987. /**
  18988. * Register a custom macro.
  18989. *
  18990. * @param string $name
  18991. * @param object|callable $macro
  18992. * @param-closure-this static $macro
  18993. * @return void
  18994. * @static
  18995. */
  18996. public static function macro($name, $macro)
  18997. {
  18998. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18999. \Illuminate\Filesystem\LocalFilesystemAdapter::macro($name, $macro);
  19000. }
  19001. /**
  19002. * Mix another object into the class.
  19003. *
  19004. * @param object $mixin
  19005. * @param bool $replace
  19006. * @return void
  19007. * @throws \ReflectionException
  19008. * @static
  19009. */
  19010. public static function mixin($mixin, $replace = true)
  19011. {
  19012. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19013. \Illuminate\Filesystem\LocalFilesystemAdapter::mixin($mixin, $replace);
  19014. }
  19015. /**
  19016. * Checks if macro is registered.
  19017. *
  19018. * @param string $name
  19019. * @return bool
  19020. * @static
  19021. */
  19022. public static function hasMacro($name)
  19023. {
  19024. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19025. return \Illuminate\Filesystem\LocalFilesystemAdapter::hasMacro($name);
  19026. }
  19027. /**
  19028. * Flush the existing macros.
  19029. *
  19030. * @return void
  19031. * @static
  19032. */
  19033. public static function flushMacros()
  19034. {
  19035. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19036. \Illuminate\Filesystem\LocalFilesystemAdapter::flushMacros();
  19037. }
  19038. /**
  19039. * Dynamically handle calls to the class.
  19040. *
  19041. * @param string $method
  19042. * @param array $parameters
  19043. * @return mixed
  19044. * @throws \BadMethodCallException
  19045. * @static
  19046. */
  19047. public static function macroCall($method, $parameters)
  19048. {
  19049. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19050. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  19051. return $instance->macroCall($method, $parameters);
  19052. }
  19053. }
  19054. /**
  19055. * @see \Illuminate\Routing\UrlGenerator
  19056. */
  19057. class URL {
  19058. /**
  19059. * Get the full URL for the current request.
  19060. *
  19061. * @return string
  19062. * @static
  19063. */
  19064. public static function full()
  19065. {
  19066. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19067. return $instance->full();
  19068. }
  19069. /**
  19070. * Get the current URL for the request.
  19071. *
  19072. * @return string
  19073. * @static
  19074. */
  19075. public static function current()
  19076. {
  19077. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19078. return $instance->current();
  19079. }
  19080. /**
  19081. * Get the URL for the previous request.
  19082. *
  19083. * @param mixed $fallback
  19084. * @return string
  19085. * @static
  19086. */
  19087. public static function previous($fallback = false)
  19088. {
  19089. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19090. return $instance->previous($fallback);
  19091. }
  19092. /**
  19093. * Get the previous path info for the request.
  19094. *
  19095. * @param mixed $fallback
  19096. * @return string
  19097. * @static
  19098. */
  19099. public static function previousPath($fallback = false)
  19100. {
  19101. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19102. return $instance->previousPath($fallback);
  19103. }
  19104. /**
  19105. * Generate an absolute URL to the given path.
  19106. *
  19107. * @param string $path
  19108. * @param mixed $extra
  19109. * @param bool|null $secure
  19110. * @return string
  19111. * @static
  19112. */
  19113. public static function to($path, $extra = [], $secure = null)
  19114. {
  19115. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19116. return $instance->to($path, $extra, $secure);
  19117. }
  19118. /**
  19119. * Generate an absolute URL with the given query parameters.
  19120. *
  19121. * @param string $path
  19122. * @param array $query
  19123. * @param mixed $extra
  19124. * @param bool|null $secure
  19125. * @return string
  19126. * @static
  19127. */
  19128. public static function query($path, $query = [], $extra = [], $secure = null)
  19129. {
  19130. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19131. return $instance->query($path, $query, $extra, $secure);
  19132. }
  19133. /**
  19134. * Generate a secure, absolute URL to the given path.
  19135. *
  19136. * @param string $path
  19137. * @param array $parameters
  19138. * @return string
  19139. * @static
  19140. */
  19141. public static function secure($path, $parameters = [])
  19142. {
  19143. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19144. return $instance->secure($path, $parameters);
  19145. }
  19146. /**
  19147. * Generate the URL to an application asset.
  19148. *
  19149. * @param string $path
  19150. * @param bool|null $secure
  19151. * @return string
  19152. * @static
  19153. */
  19154. public static function asset($path, $secure = null)
  19155. {
  19156. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19157. return $instance->asset($path, $secure);
  19158. }
  19159. /**
  19160. * Generate the URL to a secure asset.
  19161. *
  19162. * @param string $path
  19163. * @return string
  19164. * @static
  19165. */
  19166. public static function secureAsset($path)
  19167. {
  19168. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19169. return $instance->secureAsset($path);
  19170. }
  19171. /**
  19172. * Generate the URL to an asset from a custom root domain such as CDN, etc.
  19173. *
  19174. * @param string $root
  19175. * @param string $path
  19176. * @param bool|null $secure
  19177. * @return string
  19178. * @static
  19179. */
  19180. public static function assetFrom($root, $path, $secure = null)
  19181. {
  19182. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19183. return $instance->assetFrom($root, $path, $secure);
  19184. }
  19185. /**
  19186. * Get the default scheme for a raw URL.
  19187. *
  19188. * @param bool|null $secure
  19189. * @return string
  19190. * @static
  19191. */
  19192. public static function formatScheme($secure = null)
  19193. {
  19194. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19195. return $instance->formatScheme($secure);
  19196. }
  19197. /**
  19198. * Create a signed route URL for a named route.
  19199. *
  19200. * @param \BackedEnum|string $name
  19201. * @param mixed $parameters
  19202. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  19203. * @param bool $absolute
  19204. * @return string
  19205. * @throws \InvalidArgumentException
  19206. * @static
  19207. */
  19208. public static function signedRoute($name, $parameters = [], $expiration = null, $absolute = true)
  19209. {
  19210. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19211. return $instance->signedRoute($name, $parameters, $expiration, $absolute);
  19212. }
  19213. /**
  19214. * Create a temporary signed route URL for a named route.
  19215. *
  19216. * @param \BackedEnum|string $name
  19217. * @param \DateTimeInterface|\DateInterval|int $expiration
  19218. * @param array $parameters
  19219. * @param bool $absolute
  19220. * @return string
  19221. * @static
  19222. */
  19223. public static function temporarySignedRoute($name, $expiration, $parameters = [], $absolute = true)
  19224. {
  19225. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19226. return $instance->temporarySignedRoute($name, $expiration, $parameters, $absolute);
  19227. }
  19228. /**
  19229. * Determine if the given request has a valid signature.
  19230. *
  19231. * @param \Illuminate\Http\Request $request
  19232. * @param bool $absolute
  19233. * @param \Closure|array $ignoreQuery
  19234. * @return bool
  19235. * @static
  19236. */
  19237. public static function hasValidSignature($request, $absolute = true, $ignoreQuery = [])
  19238. {
  19239. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19240. return $instance->hasValidSignature($request, $absolute, $ignoreQuery);
  19241. }
  19242. /**
  19243. * Determine if the given request has a valid signature for a relative URL.
  19244. *
  19245. * @param \Illuminate\Http\Request $request
  19246. * @param \Closure|array $ignoreQuery
  19247. * @return bool
  19248. * @static
  19249. */
  19250. public static function hasValidRelativeSignature($request, $ignoreQuery = [])
  19251. {
  19252. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19253. return $instance->hasValidRelativeSignature($request, $ignoreQuery);
  19254. }
  19255. /**
  19256. * Determine if the signature from the given request matches the URL.
  19257. *
  19258. * @param \Illuminate\Http\Request $request
  19259. * @param bool $absolute
  19260. * @param \Closure|array $ignoreQuery
  19261. * @return bool
  19262. * @static
  19263. */
  19264. public static function hasCorrectSignature($request, $absolute = true, $ignoreQuery = [])
  19265. {
  19266. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19267. return $instance->hasCorrectSignature($request, $absolute, $ignoreQuery);
  19268. }
  19269. /**
  19270. * Determine if the expires timestamp from the given request is not from the past.
  19271. *
  19272. * @param \Illuminate\Http\Request $request
  19273. * @return bool
  19274. * @static
  19275. */
  19276. public static function signatureHasNotExpired($request)
  19277. {
  19278. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19279. return $instance->signatureHasNotExpired($request);
  19280. }
  19281. /**
  19282. * Get the URL to a named route.
  19283. *
  19284. * @param \BackedEnum|string $name
  19285. * @param mixed $parameters
  19286. * @param bool $absolute
  19287. * @return string
  19288. * @throws \Symfony\Component\Routing\Exception\RouteNotFoundException|\InvalidArgumentException
  19289. * @static
  19290. */
  19291. public static function route($name, $parameters = [], $absolute = true)
  19292. {
  19293. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19294. return $instance->route($name, $parameters, $absolute);
  19295. }
  19296. /**
  19297. * Get the URL for a given route instance.
  19298. *
  19299. * @param \Illuminate\Routing\Route $route
  19300. * @param mixed $parameters
  19301. * @param bool $absolute
  19302. * @return string
  19303. * @throws \Illuminate\Routing\Exceptions\UrlGenerationException
  19304. * @static
  19305. */
  19306. public static function toRoute($route, $parameters, $absolute)
  19307. {
  19308. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19309. return $instance->toRoute($route, $parameters, $absolute);
  19310. }
  19311. /**
  19312. * Get the URL to a controller action.
  19313. *
  19314. * @param string|array $action
  19315. * @param mixed $parameters
  19316. * @param bool $absolute
  19317. * @return string
  19318. * @throws \InvalidArgumentException
  19319. * @static
  19320. */
  19321. public static function action($action, $parameters = [], $absolute = true)
  19322. {
  19323. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19324. return $instance->action($action, $parameters, $absolute);
  19325. }
  19326. /**
  19327. * Format the array of URL parameters.
  19328. *
  19329. * @param mixed $parameters
  19330. * @return array
  19331. * @static
  19332. */
  19333. public static function formatParameters($parameters)
  19334. {
  19335. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19336. return $instance->formatParameters($parameters);
  19337. }
  19338. /**
  19339. * Get the base URL for the request.
  19340. *
  19341. * @param string $scheme
  19342. * @param string|null $root
  19343. * @return string
  19344. * @static
  19345. */
  19346. public static function formatRoot($scheme, $root = null)
  19347. {
  19348. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19349. return $instance->formatRoot($scheme, $root);
  19350. }
  19351. /**
  19352. * Format the given URL segments into a single URL.
  19353. *
  19354. * @param string $root
  19355. * @param string $path
  19356. * @param \Illuminate\Routing\Route|null $route
  19357. * @return string
  19358. * @static
  19359. */
  19360. public static function format($root, $path, $route = null)
  19361. {
  19362. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19363. return $instance->format($root, $path, $route);
  19364. }
  19365. /**
  19366. * Determine if the given path is a valid URL.
  19367. *
  19368. * @param string $path
  19369. * @return bool
  19370. * @static
  19371. */
  19372. public static function isValidUrl($path)
  19373. {
  19374. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19375. return $instance->isValidUrl($path);
  19376. }
  19377. /**
  19378. * Set the default named parameters used by the URL generator.
  19379. *
  19380. * @param array $defaults
  19381. * @return void
  19382. * @static
  19383. */
  19384. public static function defaults($defaults)
  19385. {
  19386. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19387. $instance->defaults($defaults);
  19388. }
  19389. /**
  19390. * Get the default named parameters used by the URL generator.
  19391. *
  19392. * @return array
  19393. * @static
  19394. */
  19395. public static function getDefaultParameters()
  19396. {
  19397. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19398. return $instance->getDefaultParameters();
  19399. }
  19400. /**
  19401. * Force the scheme for URLs.
  19402. *
  19403. * @param string|null $scheme
  19404. * @return void
  19405. * @static
  19406. */
  19407. public static function forceScheme($scheme)
  19408. {
  19409. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19410. $instance->forceScheme($scheme);
  19411. }
  19412. /**
  19413. * Force the use of the HTTPS scheme for all generated URLs.
  19414. *
  19415. * @param bool $force
  19416. * @return void
  19417. * @static
  19418. */
  19419. public static function forceHttps($force = true)
  19420. {
  19421. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19422. $instance->forceHttps($force);
  19423. }
  19424. /**
  19425. * Set the URL origin for all generated URLs.
  19426. *
  19427. * @param string|null $root
  19428. * @return void
  19429. * @static
  19430. */
  19431. public static function useOrigin($root)
  19432. {
  19433. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19434. $instance->useOrigin($root);
  19435. }
  19436. /**
  19437. * Set the forced root URL.
  19438. *
  19439. * @param string|null $root
  19440. * @return void
  19441. * @deprecated Use useOrigin
  19442. * @static
  19443. */
  19444. public static function forceRootUrl($root)
  19445. {
  19446. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19447. $instance->forceRootUrl($root);
  19448. }
  19449. /**
  19450. * Set the URL origin for all generated asset URLs.
  19451. *
  19452. * @param string|null $root
  19453. * @return void
  19454. * @static
  19455. */
  19456. public static function useAssetOrigin($root)
  19457. {
  19458. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19459. $instance->useAssetOrigin($root);
  19460. }
  19461. /**
  19462. * Set a callback to be used to format the host of generated URLs.
  19463. *
  19464. * @param \Closure $callback
  19465. * @return \Illuminate\Routing\UrlGenerator
  19466. * @static
  19467. */
  19468. public static function formatHostUsing($callback)
  19469. {
  19470. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19471. return $instance->formatHostUsing($callback);
  19472. }
  19473. /**
  19474. * Set a callback to be used to format the path of generated URLs.
  19475. *
  19476. * @param \Closure $callback
  19477. * @return \Illuminate\Routing\UrlGenerator
  19478. * @static
  19479. */
  19480. public static function formatPathUsing($callback)
  19481. {
  19482. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19483. return $instance->formatPathUsing($callback);
  19484. }
  19485. /**
  19486. * Get the path formatter being used by the URL generator.
  19487. *
  19488. * @return \Closure
  19489. * @static
  19490. */
  19491. public static function pathFormatter()
  19492. {
  19493. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19494. return $instance->pathFormatter();
  19495. }
  19496. /**
  19497. * Get the request instance.
  19498. *
  19499. * @return \Illuminate\Http\Request
  19500. * @static
  19501. */
  19502. public static function getRequest()
  19503. {
  19504. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19505. return $instance->getRequest();
  19506. }
  19507. /**
  19508. * Set the current request instance.
  19509. *
  19510. * @param \Illuminate\Http\Request $request
  19511. * @return void
  19512. * @static
  19513. */
  19514. public static function setRequest($request)
  19515. {
  19516. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19517. $instance->setRequest($request);
  19518. }
  19519. /**
  19520. * Set the route collection.
  19521. *
  19522. * @param \Illuminate\Routing\RouteCollectionInterface $routes
  19523. * @return \Illuminate\Routing\UrlGenerator
  19524. * @static
  19525. */
  19526. public static function setRoutes($routes)
  19527. {
  19528. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19529. return $instance->setRoutes($routes);
  19530. }
  19531. /**
  19532. * Set the session resolver for the generator.
  19533. *
  19534. * @param callable $sessionResolver
  19535. * @return \Illuminate\Routing\UrlGenerator
  19536. * @static
  19537. */
  19538. public static function setSessionResolver($sessionResolver)
  19539. {
  19540. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19541. return $instance->setSessionResolver($sessionResolver);
  19542. }
  19543. /**
  19544. * Set the encryption key resolver.
  19545. *
  19546. * @param callable $keyResolver
  19547. * @return \Illuminate\Routing\UrlGenerator
  19548. * @static
  19549. */
  19550. public static function setKeyResolver($keyResolver)
  19551. {
  19552. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19553. return $instance->setKeyResolver($keyResolver);
  19554. }
  19555. /**
  19556. * Clone a new instance of the URL generator with a different encryption key resolver.
  19557. *
  19558. * @param callable $keyResolver
  19559. * @return \Illuminate\Routing\UrlGenerator
  19560. * @static
  19561. */
  19562. public static function withKeyResolver($keyResolver)
  19563. {
  19564. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19565. return $instance->withKeyResolver($keyResolver);
  19566. }
  19567. /**
  19568. * Set the callback that should be used to attempt to resolve missing named routes.
  19569. *
  19570. * @param callable $missingNamedRouteResolver
  19571. * @return \Illuminate\Routing\UrlGenerator
  19572. * @static
  19573. */
  19574. public static function resolveMissingNamedRoutesUsing($missingNamedRouteResolver)
  19575. {
  19576. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19577. return $instance->resolveMissingNamedRoutesUsing($missingNamedRouteResolver);
  19578. }
  19579. /**
  19580. * Get the root controller namespace.
  19581. *
  19582. * @return string
  19583. * @static
  19584. */
  19585. public static function getRootControllerNamespace()
  19586. {
  19587. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19588. return $instance->getRootControllerNamespace();
  19589. }
  19590. /**
  19591. * Set the root controller namespace.
  19592. *
  19593. * @param string $rootNamespace
  19594. * @return \Illuminate\Routing\UrlGenerator
  19595. * @static
  19596. */
  19597. public static function setRootControllerNamespace($rootNamespace)
  19598. {
  19599. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19600. return $instance->setRootControllerNamespace($rootNamespace);
  19601. }
  19602. /**
  19603. * Register a custom macro.
  19604. *
  19605. * @param string $name
  19606. * @param object|callable $macro
  19607. * @param-closure-this static $macro
  19608. * @return void
  19609. * @static
  19610. */
  19611. public static function macro($name, $macro)
  19612. {
  19613. \Illuminate\Routing\UrlGenerator::macro($name, $macro);
  19614. }
  19615. /**
  19616. * Mix another object into the class.
  19617. *
  19618. * @param object $mixin
  19619. * @param bool $replace
  19620. * @return void
  19621. * @throws \ReflectionException
  19622. * @static
  19623. */
  19624. public static function mixin($mixin, $replace = true)
  19625. {
  19626. \Illuminate\Routing\UrlGenerator::mixin($mixin, $replace);
  19627. }
  19628. /**
  19629. * Checks if macro is registered.
  19630. *
  19631. * @param string $name
  19632. * @return bool
  19633. * @static
  19634. */
  19635. public static function hasMacro($name)
  19636. {
  19637. return \Illuminate\Routing\UrlGenerator::hasMacro($name);
  19638. }
  19639. /**
  19640. * Flush the existing macros.
  19641. *
  19642. * @return void
  19643. * @static
  19644. */
  19645. public static function flushMacros()
  19646. {
  19647. \Illuminate\Routing\UrlGenerator::flushMacros();
  19648. }
  19649. }
  19650. /**
  19651. * @see \Illuminate\Validation\Factory
  19652. */
  19653. class Validator {
  19654. /**
  19655. * Create a new Validator instance.
  19656. *
  19657. * @param array $data
  19658. * @param array $rules
  19659. * @param array $messages
  19660. * @param array $attributes
  19661. * @return \Illuminate\Validation\Validator
  19662. * @static
  19663. */
  19664. public static function make($data, $rules, $messages = [], $attributes = [])
  19665. {
  19666. /** @var \Illuminate\Validation\Factory $instance */
  19667. return $instance->make($data, $rules, $messages, $attributes);
  19668. }
  19669. /**
  19670. * Validate the given data against the provided rules.
  19671. *
  19672. * @param array $data
  19673. * @param array $rules
  19674. * @param array $messages
  19675. * @param array $attributes
  19676. * @return array
  19677. * @throws \Illuminate\Validation\ValidationException
  19678. * @static
  19679. */
  19680. public static function validate($data, $rules, $messages = [], $attributes = [])
  19681. {
  19682. /** @var \Illuminate\Validation\Factory $instance */
  19683. return $instance->validate($data, $rules, $messages, $attributes);
  19684. }
  19685. /**
  19686. * Register a custom validator extension.
  19687. *
  19688. * @param string $rule
  19689. * @param \Closure|string $extension
  19690. * @param string|null $message
  19691. * @return void
  19692. * @static
  19693. */
  19694. public static function extend($rule, $extension, $message = null)
  19695. {
  19696. /** @var \Illuminate\Validation\Factory $instance */
  19697. $instance->extend($rule, $extension, $message);
  19698. }
  19699. /**
  19700. * Register a custom implicit validator extension.
  19701. *
  19702. * @param string $rule
  19703. * @param \Closure|string $extension
  19704. * @param string|null $message
  19705. * @return void
  19706. * @static
  19707. */
  19708. public static function extendImplicit($rule, $extension, $message = null)
  19709. {
  19710. /** @var \Illuminate\Validation\Factory $instance */
  19711. $instance->extendImplicit($rule, $extension, $message);
  19712. }
  19713. /**
  19714. * Register a custom dependent validator extension.
  19715. *
  19716. * @param string $rule
  19717. * @param \Closure|string $extension
  19718. * @param string|null $message
  19719. * @return void
  19720. * @static
  19721. */
  19722. public static function extendDependent($rule, $extension, $message = null)
  19723. {
  19724. /** @var \Illuminate\Validation\Factory $instance */
  19725. $instance->extendDependent($rule, $extension, $message);
  19726. }
  19727. /**
  19728. * Register a custom validator message replacer.
  19729. *
  19730. * @param string $rule
  19731. * @param \Closure|string $replacer
  19732. * @return void
  19733. * @static
  19734. */
  19735. public static function replacer($rule, $replacer)
  19736. {
  19737. /** @var \Illuminate\Validation\Factory $instance */
  19738. $instance->replacer($rule, $replacer);
  19739. }
  19740. /**
  19741. * Indicate that unvalidated array keys should be included in validated data when the parent array is validated.
  19742. *
  19743. * @return void
  19744. * @static
  19745. */
  19746. public static function includeUnvalidatedArrayKeys()
  19747. {
  19748. /** @var \Illuminate\Validation\Factory $instance */
  19749. $instance->includeUnvalidatedArrayKeys();
  19750. }
  19751. /**
  19752. * Indicate that unvalidated array keys should be excluded from the validated data, even if the parent array was validated.
  19753. *
  19754. * @return void
  19755. * @static
  19756. */
  19757. public static function excludeUnvalidatedArrayKeys()
  19758. {
  19759. /** @var \Illuminate\Validation\Factory $instance */
  19760. $instance->excludeUnvalidatedArrayKeys();
  19761. }
  19762. /**
  19763. * Set the Validator instance resolver.
  19764. *
  19765. * @param \Closure $resolver
  19766. * @return void
  19767. * @static
  19768. */
  19769. public static function resolver($resolver)
  19770. {
  19771. /** @var \Illuminate\Validation\Factory $instance */
  19772. $instance->resolver($resolver);
  19773. }
  19774. /**
  19775. * Get the Translator implementation.
  19776. *
  19777. * @return \Illuminate\Contracts\Translation\Translator
  19778. * @static
  19779. */
  19780. public static function getTranslator()
  19781. {
  19782. /** @var \Illuminate\Validation\Factory $instance */
  19783. return $instance->getTranslator();
  19784. }
  19785. /**
  19786. * Get the Presence Verifier implementation.
  19787. *
  19788. * @return \Illuminate\Validation\PresenceVerifierInterface
  19789. * @static
  19790. */
  19791. public static function getPresenceVerifier()
  19792. {
  19793. /** @var \Illuminate\Validation\Factory $instance */
  19794. return $instance->getPresenceVerifier();
  19795. }
  19796. /**
  19797. * Set the Presence Verifier implementation.
  19798. *
  19799. * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier
  19800. * @return void
  19801. * @static
  19802. */
  19803. public static function setPresenceVerifier($presenceVerifier)
  19804. {
  19805. /** @var \Illuminate\Validation\Factory $instance */
  19806. $instance->setPresenceVerifier($presenceVerifier);
  19807. }
  19808. /**
  19809. * Get the container instance used by the validation factory.
  19810. *
  19811. * @return \Illuminate\Contracts\Container\Container|null
  19812. * @static
  19813. */
  19814. public static function getContainer()
  19815. {
  19816. /** @var \Illuminate\Validation\Factory $instance */
  19817. return $instance->getContainer();
  19818. }
  19819. /**
  19820. * Set the container instance used by the validation factory.
  19821. *
  19822. * @param \Illuminate\Contracts\Container\Container $container
  19823. * @return \Illuminate\Validation\Factory
  19824. * @static
  19825. */
  19826. public static function setContainer($container)
  19827. {
  19828. /** @var \Illuminate\Validation\Factory $instance */
  19829. return $instance->setContainer($container);
  19830. }
  19831. }
  19832. /**
  19833. * @see \Illuminate\View\Factory
  19834. */
  19835. class View {
  19836. /**
  19837. * Get the evaluated view contents for the given view.
  19838. *
  19839. * @param string $path
  19840. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19841. * @param array $mergeData
  19842. * @return \Illuminate\Contracts\View\View
  19843. * @static
  19844. */
  19845. public static function file($path, $data = [], $mergeData = [])
  19846. {
  19847. /** @var \Illuminate\View\Factory $instance */
  19848. return $instance->file($path, $data, $mergeData);
  19849. }
  19850. /**
  19851. * Get the evaluated view contents for the given view.
  19852. *
  19853. * @param string $view
  19854. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19855. * @param array $mergeData
  19856. * @return \Illuminate\Contracts\View\View
  19857. * @static
  19858. */
  19859. public static function make($view, $data = [], $mergeData = [])
  19860. {
  19861. /** @var \Illuminate\View\Factory $instance */
  19862. return $instance->make($view, $data, $mergeData);
  19863. }
  19864. /**
  19865. * Get the first view that actually exists from the given list.
  19866. *
  19867. * @param array $views
  19868. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19869. * @param array $mergeData
  19870. * @return \Illuminate\Contracts\View\View
  19871. * @throws \InvalidArgumentException
  19872. * @static
  19873. */
  19874. public static function first($views, $data = [], $mergeData = [])
  19875. {
  19876. /** @var \Illuminate\View\Factory $instance */
  19877. return $instance->first($views, $data, $mergeData);
  19878. }
  19879. /**
  19880. * Get the rendered content of the view based on a given condition.
  19881. *
  19882. * @param bool $condition
  19883. * @param string $view
  19884. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19885. * @param array $mergeData
  19886. * @return string
  19887. * @static
  19888. */
  19889. public static function renderWhen($condition, $view, $data = [], $mergeData = [])
  19890. {
  19891. /** @var \Illuminate\View\Factory $instance */
  19892. return $instance->renderWhen($condition, $view, $data, $mergeData);
  19893. }
  19894. /**
  19895. * Get the rendered content of the view based on the negation of a given condition.
  19896. *
  19897. * @param bool $condition
  19898. * @param string $view
  19899. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19900. * @param array $mergeData
  19901. * @return string
  19902. * @static
  19903. */
  19904. public static function renderUnless($condition, $view, $data = [], $mergeData = [])
  19905. {
  19906. /** @var \Illuminate\View\Factory $instance */
  19907. return $instance->renderUnless($condition, $view, $data, $mergeData);
  19908. }
  19909. /**
  19910. * Get the rendered contents of a partial from a loop.
  19911. *
  19912. * @param string $view
  19913. * @param array $data
  19914. * @param string $iterator
  19915. * @param string $empty
  19916. * @return string
  19917. * @static
  19918. */
  19919. public static function renderEach($view, $data, $iterator, $empty = 'raw|')
  19920. {
  19921. /** @var \Illuminate\View\Factory $instance */
  19922. return $instance->renderEach($view, $data, $iterator, $empty);
  19923. }
  19924. /**
  19925. * Determine if a given view exists.
  19926. *
  19927. * @param string $view
  19928. * @return bool
  19929. * @static
  19930. */
  19931. public static function exists($view)
  19932. {
  19933. /** @var \Illuminate\View\Factory $instance */
  19934. return $instance->exists($view);
  19935. }
  19936. /**
  19937. * Get the appropriate view engine for the given path.
  19938. *
  19939. * @param string $path
  19940. * @return \Illuminate\Contracts\View\Engine
  19941. * @throws \InvalidArgumentException
  19942. * @static
  19943. */
  19944. public static function getEngineFromPath($path)
  19945. {
  19946. /** @var \Illuminate\View\Factory $instance */
  19947. return $instance->getEngineFromPath($path);
  19948. }
  19949. /**
  19950. * Add a piece of shared data to the environment.
  19951. *
  19952. * @param array|string $key
  19953. * @param mixed|null $value
  19954. * @return mixed
  19955. * @static
  19956. */
  19957. public static function share($key, $value = null)
  19958. {
  19959. /** @var \Illuminate\View\Factory $instance */
  19960. return $instance->share($key, $value);
  19961. }
  19962. /**
  19963. * Increment the rendering counter.
  19964. *
  19965. * @return void
  19966. * @static
  19967. */
  19968. public static function incrementRender()
  19969. {
  19970. /** @var \Illuminate\View\Factory $instance */
  19971. $instance->incrementRender();
  19972. }
  19973. /**
  19974. * Decrement the rendering counter.
  19975. *
  19976. * @return void
  19977. * @static
  19978. */
  19979. public static function decrementRender()
  19980. {
  19981. /** @var \Illuminate\View\Factory $instance */
  19982. $instance->decrementRender();
  19983. }
  19984. /**
  19985. * Check if there are no active render operations.
  19986. *
  19987. * @return bool
  19988. * @static
  19989. */
  19990. public static function doneRendering()
  19991. {
  19992. /** @var \Illuminate\View\Factory $instance */
  19993. return $instance->doneRendering();
  19994. }
  19995. /**
  19996. * Determine if the given once token has been rendered.
  19997. *
  19998. * @param string $id
  19999. * @return bool
  20000. * @static
  20001. */
  20002. public static function hasRenderedOnce($id)
  20003. {
  20004. /** @var \Illuminate\View\Factory $instance */
  20005. return $instance->hasRenderedOnce($id);
  20006. }
  20007. /**
  20008. * Mark the given once token as having been rendered.
  20009. *
  20010. * @param string $id
  20011. * @return void
  20012. * @static
  20013. */
  20014. public static function markAsRenderedOnce($id)
  20015. {
  20016. /** @var \Illuminate\View\Factory $instance */
  20017. $instance->markAsRenderedOnce($id);
  20018. }
  20019. /**
  20020. * Add a location to the array of view locations.
  20021. *
  20022. * @param string $location
  20023. * @return void
  20024. * @static
  20025. */
  20026. public static function addLocation($location)
  20027. {
  20028. /** @var \Illuminate\View\Factory $instance */
  20029. $instance->addLocation($location);
  20030. }
  20031. /**
  20032. * Prepend a location to the array of view locations.
  20033. *
  20034. * @param string $location
  20035. * @return void
  20036. * @static
  20037. */
  20038. public static function prependLocation($location)
  20039. {
  20040. /** @var \Illuminate\View\Factory $instance */
  20041. $instance->prependLocation($location);
  20042. }
  20043. /**
  20044. * Add a new namespace to the loader.
  20045. *
  20046. * @param string $namespace
  20047. * @param string|array $hints
  20048. * @return \Illuminate\View\Factory
  20049. * @static
  20050. */
  20051. public static function addNamespace($namespace, $hints)
  20052. {
  20053. /** @var \Illuminate\View\Factory $instance */
  20054. return $instance->addNamespace($namespace, $hints);
  20055. }
  20056. /**
  20057. * Prepend a new namespace to the loader.
  20058. *
  20059. * @param string $namespace
  20060. * @param string|array $hints
  20061. * @return \Illuminate\View\Factory
  20062. * @static
  20063. */
  20064. public static function prependNamespace($namespace, $hints)
  20065. {
  20066. /** @var \Illuminate\View\Factory $instance */
  20067. return $instance->prependNamespace($namespace, $hints);
  20068. }
  20069. /**
  20070. * Replace the namespace hints for the given namespace.
  20071. *
  20072. * @param string $namespace
  20073. * @param string|array $hints
  20074. * @return \Illuminate\View\Factory
  20075. * @static
  20076. */
  20077. public static function replaceNamespace($namespace, $hints)
  20078. {
  20079. /** @var \Illuminate\View\Factory $instance */
  20080. return $instance->replaceNamespace($namespace, $hints);
  20081. }
  20082. /**
  20083. * Register a valid view extension and its engine.
  20084. *
  20085. * @param string $extension
  20086. * @param string $engine
  20087. * @param \Closure|null $resolver
  20088. * @return void
  20089. * @static
  20090. */
  20091. public static function addExtension($extension, $engine, $resolver = null)
  20092. {
  20093. /** @var \Illuminate\View\Factory $instance */
  20094. $instance->addExtension($extension, $engine, $resolver);
  20095. }
  20096. /**
  20097. * Flush all of the factory state like sections and stacks.
  20098. *
  20099. * @return void
  20100. * @static
  20101. */
  20102. public static function flushState()
  20103. {
  20104. /** @var \Illuminate\View\Factory $instance */
  20105. $instance->flushState();
  20106. }
  20107. /**
  20108. * Flush all of the section contents if done rendering.
  20109. *
  20110. * @return void
  20111. * @static
  20112. */
  20113. public static function flushStateIfDoneRendering()
  20114. {
  20115. /** @var \Illuminate\View\Factory $instance */
  20116. $instance->flushStateIfDoneRendering();
  20117. }
  20118. /**
  20119. * Get the extension to engine bindings.
  20120. *
  20121. * @return array
  20122. * @static
  20123. */
  20124. public static function getExtensions()
  20125. {
  20126. /** @var \Illuminate\View\Factory $instance */
  20127. return $instance->getExtensions();
  20128. }
  20129. /**
  20130. * Get the engine resolver instance.
  20131. *
  20132. * @return \Illuminate\View\Engines\EngineResolver
  20133. * @static
  20134. */
  20135. public static function getEngineResolver()
  20136. {
  20137. /** @var \Illuminate\View\Factory $instance */
  20138. return $instance->getEngineResolver();
  20139. }
  20140. /**
  20141. * Get the view finder instance.
  20142. *
  20143. * @return \Illuminate\View\ViewFinderInterface
  20144. * @static
  20145. */
  20146. public static function getFinder()
  20147. {
  20148. /** @var \Illuminate\View\Factory $instance */
  20149. return $instance->getFinder();
  20150. }
  20151. /**
  20152. * Set the view finder instance.
  20153. *
  20154. * @param \Illuminate\View\ViewFinderInterface $finder
  20155. * @return void
  20156. * @static
  20157. */
  20158. public static function setFinder($finder)
  20159. {
  20160. /** @var \Illuminate\View\Factory $instance */
  20161. $instance->setFinder($finder);
  20162. }
  20163. /**
  20164. * Flush the cache of views located by the finder.
  20165. *
  20166. * @return void
  20167. * @static
  20168. */
  20169. public static function flushFinderCache()
  20170. {
  20171. /** @var \Illuminate\View\Factory $instance */
  20172. $instance->flushFinderCache();
  20173. }
  20174. /**
  20175. * Get the event dispatcher instance.
  20176. *
  20177. * @return \Illuminate\Contracts\Events\Dispatcher
  20178. * @static
  20179. */
  20180. public static function getDispatcher()
  20181. {
  20182. /** @var \Illuminate\View\Factory $instance */
  20183. return $instance->getDispatcher();
  20184. }
  20185. /**
  20186. * Set the event dispatcher instance.
  20187. *
  20188. * @param \Illuminate\Contracts\Events\Dispatcher $events
  20189. * @return void
  20190. * @static
  20191. */
  20192. public static function setDispatcher($events)
  20193. {
  20194. /** @var \Illuminate\View\Factory $instance */
  20195. $instance->setDispatcher($events);
  20196. }
  20197. /**
  20198. * Get the IoC container instance.
  20199. *
  20200. * @return \Illuminate\Contracts\Container\Container
  20201. * @static
  20202. */
  20203. public static function getContainer()
  20204. {
  20205. /** @var \Illuminate\View\Factory $instance */
  20206. return $instance->getContainer();
  20207. }
  20208. /**
  20209. * Set the IoC container instance.
  20210. *
  20211. * @param \Illuminate\Contracts\Container\Container $container
  20212. * @return void
  20213. * @static
  20214. */
  20215. public static function setContainer($container)
  20216. {
  20217. /** @var \Illuminate\View\Factory $instance */
  20218. $instance->setContainer($container);
  20219. }
  20220. /**
  20221. * Get an item from the shared data.
  20222. *
  20223. * @param string $key
  20224. * @param mixed $default
  20225. * @return mixed
  20226. * @static
  20227. */
  20228. public static function shared($key, $default = null)
  20229. {
  20230. /** @var \Illuminate\View\Factory $instance */
  20231. return $instance->shared($key, $default);
  20232. }
  20233. /**
  20234. * Get all of the shared data for the environment.
  20235. *
  20236. * @return array
  20237. * @static
  20238. */
  20239. public static function getShared()
  20240. {
  20241. /** @var \Illuminate\View\Factory $instance */
  20242. return $instance->getShared();
  20243. }
  20244. /**
  20245. * Register a custom macro.
  20246. *
  20247. * @param string $name
  20248. * @param object|callable $macro
  20249. * @param-closure-this static $macro
  20250. * @return void
  20251. * @static
  20252. */
  20253. public static function macro($name, $macro)
  20254. {
  20255. \Illuminate\View\Factory::macro($name, $macro);
  20256. }
  20257. /**
  20258. * Mix another object into the class.
  20259. *
  20260. * @param object $mixin
  20261. * @param bool $replace
  20262. * @return void
  20263. * @throws \ReflectionException
  20264. * @static
  20265. */
  20266. public static function mixin($mixin, $replace = true)
  20267. {
  20268. \Illuminate\View\Factory::mixin($mixin, $replace);
  20269. }
  20270. /**
  20271. * Checks if macro is registered.
  20272. *
  20273. * @param string $name
  20274. * @return bool
  20275. * @static
  20276. */
  20277. public static function hasMacro($name)
  20278. {
  20279. return \Illuminate\View\Factory::hasMacro($name);
  20280. }
  20281. /**
  20282. * Flush the existing macros.
  20283. *
  20284. * @return void
  20285. * @static
  20286. */
  20287. public static function flushMacros()
  20288. {
  20289. \Illuminate\View\Factory::flushMacros();
  20290. }
  20291. /**
  20292. * Start a component rendering process.
  20293. *
  20294. * @param \Illuminate\Contracts\View\View|\Illuminate\Contracts\Support\Htmlable|\Closure|string $view
  20295. * @param array $data
  20296. * @return void
  20297. * @static
  20298. */
  20299. public static function startComponent($view, $data = [])
  20300. {
  20301. /** @var \Illuminate\View\Factory $instance */
  20302. $instance->startComponent($view, $data);
  20303. }
  20304. /**
  20305. * Get the first view that actually exists from the given list, and start a component.
  20306. *
  20307. * @param array $names
  20308. * @param array $data
  20309. * @return void
  20310. * @static
  20311. */
  20312. public static function startComponentFirst($names, $data = [])
  20313. {
  20314. /** @var \Illuminate\View\Factory $instance */
  20315. $instance->startComponentFirst($names, $data);
  20316. }
  20317. /**
  20318. * Render the current component.
  20319. *
  20320. * @return string
  20321. * @static
  20322. */
  20323. public static function renderComponent()
  20324. {
  20325. /** @var \Illuminate\View\Factory $instance */
  20326. return $instance->renderComponent();
  20327. }
  20328. /**
  20329. * Get an item from the component data that exists above the current component.
  20330. *
  20331. * @param string $key
  20332. * @param mixed $default
  20333. * @return mixed|null
  20334. * @static
  20335. */
  20336. public static function getConsumableComponentData($key, $default = null)
  20337. {
  20338. /** @var \Illuminate\View\Factory $instance */
  20339. return $instance->getConsumableComponentData($key, $default);
  20340. }
  20341. /**
  20342. * Start the slot rendering process.
  20343. *
  20344. * @param string $name
  20345. * @param string|null $content
  20346. * @param array $attributes
  20347. * @return void
  20348. * @static
  20349. */
  20350. public static function slot($name, $content = null, $attributes = [])
  20351. {
  20352. /** @var \Illuminate\View\Factory $instance */
  20353. $instance->slot($name, $content, $attributes);
  20354. }
  20355. /**
  20356. * Save the slot content for rendering.
  20357. *
  20358. * @return void
  20359. * @static
  20360. */
  20361. public static function endSlot()
  20362. {
  20363. /** @var \Illuminate\View\Factory $instance */
  20364. $instance->endSlot();
  20365. }
  20366. /**
  20367. * Register a view creator event.
  20368. *
  20369. * @param array|string $views
  20370. * @param \Closure|string $callback
  20371. * @return array
  20372. * @static
  20373. */
  20374. public static function creator($views, $callback)
  20375. {
  20376. /** @var \Illuminate\View\Factory $instance */
  20377. return $instance->creator($views, $callback);
  20378. }
  20379. /**
  20380. * Register multiple view composers via an array.
  20381. *
  20382. * @param array $composers
  20383. * @return array
  20384. * @static
  20385. */
  20386. public static function composers($composers)
  20387. {
  20388. /** @var \Illuminate\View\Factory $instance */
  20389. return $instance->composers($composers);
  20390. }
  20391. /**
  20392. * Register a view composer event.
  20393. *
  20394. * @param array|string $views
  20395. * @param \Closure|string $callback
  20396. * @return array
  20397. * @static
  20398. */
  20399. public static function composer($views, $callback)
  20400. {
  20401. /** @var \Illuminate\View\Factory $instance */
  20402. return $instance->composer($views, $callback);
  20403. }
  20404. /**
  20405. * Call the composer for a given view.
  20406. *
  20407. * @param \Illuminate\Contracts\View\View $view
  20408. * @return void
  20409. * @static
  20410. */
  20411. public static function callComposer($view)
  20412. {
  20413. /** @var \Illuminate\View\Factory $instance */
  20414. $instance->callComposer($view);
  20415. }
  20416. /**
  20417. * Call the creator for a given view.
  20418. *
  20419. * @param \Illuminate\Contracts\View\View $view
  20420. * @return void
  20421. * @static
  20422. */
  20423. public static function callCreator($view)
  20424. {
  20425. /** @var \Illuminate\View\Factory $instance */
  20426. $instance->callCreator($view);
  20427. }
  20428. /**
  20429. * Start injecting content into a fragment.
  20430. *
  20431. * @param string $fragment
  20432. * @return void
  20433. * @static
  20434. */
  20435. public static function startFragment($fragment)
  20436. {
  20437. /** @var \Illuminate\View\Factory $instance */
  20438. $instance->startFragment($fragment);
  20439. }
  20440. /**
  20441. * Stop injecting content into a fragment.
  20442. *
  20443. * @return string
  20444. * @throws \InvalidArgumentException
  20445. * @static
  20446. */
  20447. public static function stopFragment()
  20448. {
  20449. /** @var \Illuminate\View\Factory $instance */
  20450. return $instance->stopFragment();
  20451. }
  20452. /**
  20453. * Get the contents of a fragment.
  20454. *
  20455. * @param string $name
  20456. * @param string|null $default
  20457. * @return mixed
  20458. * @static
  20459. */
  20460. public static function getFragment($name, $default = null)
  20461. {
  20462. /** @var \Illuminate\View\Factory $instance */
  20463. return $instance->getFragment($name, $default);
  20464. }
  20465. /**
  20466. * Get the entire array of rendered fragments.
  20467. *
  20468. * @return array
  20469. * @static
  20470. */
  20471. public static function getFragments()
  20472. {
  20473. /** @var \Illuminate\View\Factory $instance */
  20474. return $instance->getFragments();
  20475. }
  20476. /**
  20477. * Flush all of the fragments.
  20478. *
  20479. * @return void
  20480. * @static
  20481. */
  20482. public static function flushFragments()
  20483. {
  20484. /** @var \Illuminate\View\Factory $instance */
  20485. $instance->flushFragments();
  20486. }
  20487. /**
  20488. * Start injecting content into a section.
  20489. *
  20490. * @param string $section
  20491. * @param string|null $content
  20492. * @return void
  20493. * @static
  20494. */
  20495. public static function startSection($section, $content = null)
  20496. {
  20497. /** @var \Illuminate\View\Factory $instance */
  20498. $instance->startSection($section, $content);
  20499. }
  20500. /**
  20501. * Inject inline content into a section.
  20502. *
  20503. * @param string $section
  20504. * @param string $content
  20505. * @return void
  20506. * @static
  20507. */
  20508. public static function inject($section, $content)
  20509. {
  20510. /** @var \Illuminate\View\Factory $instance */
  20511. $instance->inject($section, $content);
  20512. }
  20513. /**
  20514. * Stop injecting content into a section and return its contents.
  20515. *
  20516. * @return string
  20517. * @static
  20518. */
  20519. public static function yieldSection()
  20520. {
  20521. /** @var \Illuminate\View\Factory $instance */
  20522. return $instance->yieldSection();
  20523. }
  20524. /**
  20525. * Stop injecting content into a section.
  20526. *
  20527. * @param bool $overwrite
  20528. * @return string
  20529. * @throws \InvalidArgumentException
  20530. * @static
  20531. */
  20532. public static function stopSection($overwrite = false)
  20533. {
  20534. /** @var \Illuminate\View\Factory $instance */
  20535. return $instance->stopSection($overwrite);
  20536. }
  20537. /**
  20538. * Stop injecting content into a section and append it.
  20539. *
  20540. * @return string
  20541. * @throws \InvalidArgumentException
  20542. * @static
  20543. */
  20544. public static function appendSection()
  20545. {
  20546. /** @var \Illuminate\View\Factory $instance */
  20547. return $instance->appendSection();
  20548. }
  20549. /**
  20550. * Get the string contents of a section.
  20551. *
  20552. * @param string $section
  20553. * @param string $default
  20554. * @return string
  20555. * @static
  20556. */
  20557. public static function yieldContent($section, $default = '')
  20558. {
  20559. /** @var \Illuminate\View\Factory $instance */
  20560. return $instance->yieldContent($section, $default);
  20561. }
  20562. /**
  20563. * Get the parent placeholder for the current request.
  20564. *
  20565. * @param string $section
  20566. * @return string
  20567. * @static
  20568. */
  20569. public static function parentPlaceholder($section = '')
  20570. {
  20571. return \Illuminate\View\Factory::parentPlaceholder($section);
  20572. }
  20573. /**
  20574. * Check if section exists.
  20575. *
  20576. * @param string $name
  20577. * @return bool
  20578. * @static
  20579. */
  20580. public static function hasSection($name)
  20581. {
  20582. /** @var \Illuminate\View\Factory $instance */
  20583. return $instance->hasSection($name);
  20584. }
  20585. /**
  20586. * Check if section does not exist.
  20587. *
  20588. * @param string $name
  20589. * @return bool
  20590. * @static
  20591. */
  20592. public static function sectionMissing($name)
  20593. {
  20594. /** @var \Illuminate\View\Factory $instance */
  20595. return $instance->sectionMissing($name);
  20596. }
  20597. /**
  20598. * Get the contents of a section.
  20599. *
  20600. * @param string $name
  20601. * @param string|null $default
  20602. * @return mixed
  20603. * @static
  20604. */
  20605. public static function getSection($name, $default = null)
  20606. {
  20607. /** @var \Illuminate\View\Factory $instance */
  20608. return $instance->getSection($name, $default);
  20609. }
  20610. /**
  20611. * Get the entire array of sections.
  20612. *
  20613. * @return array
  20614. * @static
  20615. */
  20616. public static function getSections()
  20617. {
  20618. /** @var \Illuminate\View\Factory $instance */
  20619. return $instance->getSections();
  20620. }
  20621. /**
  20622. * Flush all of the sections.
  20623. *
  20624. * @return void
  20625. * @static
  20626. */
  20627. public static function flushSections()
  20628. {
  20629. /** @var \Illuminate\View\Factory $instance */
  20630. $instance->flushSections();
  20631. }
  20632. /**
  20633. * Add new loop to the stack.
  20634. *
  20635. * @param \Countable|array $data
  20636. * @return void
  20637. * @static
  20638. */
  20639. public static function addLoop($data)
  20640. {
  20641. /** @var \Illuminate\View\Factory $instance */
  20642. $instance->addLoop($data);
  20643. }
  20644. /**
  20645. * Increment the top loop's indices.
  20646. *
  20647. * @return void
  20648. * @static
  20649. */
  20650. public static function incrementLoopIndices()
  20651. {
  20652. /** @var \Illuminate\View\Factory $instance */
  20653. $instance->incrementLoopIndices();
  20654. }
  20655. /**
  20656. * Pop a loop from the top of the loop stack.
  20657. *
  20658. * @return void
  20659. * @static
  20660. */
  20661. public static function popLoop()
  20662. {
  20663. /** @var \Illuminate\View\Factory $instance */
  20664. $instance->popLoop();
  20665. }
  20666. /**
  20667. * Get an instance of the last loop in the stack.
  20668. *
  20669. * @return \stdClass|null
  20670. * @static
  20671. */
  20672. public static function getLastLoop()
  20673. {
  20674. /** @var \Illuminate\View\Factory $instance */
  20675. return $instance->getLastLoop();
  20676. }
  20677. /**
  20678. * Get the entire loop stack.
  20679. *
  20680. * @return array
  20681. * @static
  20682. */
  20683. public static function getLoopStack()
  20684. {
  20685. /** @var \Illuminate\View\Factory $instance */
  20686. return $instance->getLoopStack();
  20687. }
  20688. /**
  20689. * Start injecting content into a push section.
  20690. *
  20691. * @param string $section
  20692. * @param string $content
  20693. * @return void
  20694. * @static
  20695. */
  20696. public static function startPush($section, $content = '')
  20697. {
  20698. /** @var \Illuminate\View\Factory $instance */
  20699. $instance->startPush($section, $content);
  20700. }
  20701. /**
  20702. * Stop injecting content into a push section.
  20703. *
  20704. * @return string
  20705. * @throws \InvalidArgumentException
  20706. * @static
  20707. */
  20708. public static function stopPush()
  20709. {
  20710. /** @var \Illuminate\View\Factory $instance */
  20711. return $instance->stopPush();
  20712. }
  20713. /**
  20714. * Start prepending content into a push section.
  20715. *
  20716. * @param string $section
  20717. * @param string $content
  20718. * @return void
  20719. * @static
  20720. */
  20721. public static function startPrepend($section, $content = '')
  20722. {
  20723. /** @var \Illuminate\View\Factory $instance */
  20724. $instance->startPrepend($section, $content);
  20725. }
  20726. /**
  20727. * Stop prepending content into a push section.
  20728. *
  20729. * @return string
  20730. * @throws \InvalidArgumentException
  20731. * @static
  20732. */
  20733. public static function stopPrepend()
  20734. {
  20735. /** @var \Illuminate\View\Factory $instance */
  20736. return $instance->stopPrepend();
  20737. }
  20738. /**
  20739. * Get the string contents of a push section.
  20740. *
  20741. * @param string $section
  20742. * @param string $default
  20743. * @return string
  20744. * @static
  20745. */
  20746. public static function yieldPushContent($section, $default = '')
  20747. {
  20748. /** @var \Illuminate\View\Factory $instance */
  20749. return $instance->yieldPushContent($section, $default);
  20750. }
  20751. /**
  20752. * Flush all of the stacks.
  20753. *
  20754. * @return void
  20755. * @static
  20756. */
  20757. public static function flushStacks()
  20758. {
  20759. /** @var \Illuminate\View\Factory $instance */
  20760. $instance->flushStacks();
  20761. }
  20762. /**
  20763. * Start a translation block.
  20764. *
  20765. * @param array $replacements
  20766. * @return void
  20767. * @static
  20768. */
  20769. public static function startTranslation($replacements = [])
  20770. {
  20771. /** @var \Illuminate\View\Factory $instance */
  20772. $instance->startTranslation($replacements);
  20773. }
  20774. /**
  20775. * Render the current translation.
  20776. *
  20777. * @return string
  20778. * @static
  20779. */
  20780. public static function renderTranslation()
  20781. {
  20782. /** @var \Illuminate\View\Factory $instance */
  20783. return $instance->renderTranslation();
  20784. }
  20785. }
  20786. /**
  20787. * @see \Illuminate\Foundation\Vite
  20788. */
  20789. class Vite {
  20790. /**
  20791. * Get the preloaded assets.
  20792. *
  20793. * @return array
  20794. * @static
  20795. */
  20796. public static function preloadedAssets()
  20797. {
  20798. /** @var \Illuminate\Foundation\Vite $instance */
  20799. return $instance->preloadedAssets();
  20800. }
  20801. /**
  20802. * Get the Content Security Policy nonce applied to all generated tags.
  20803. *
  20804. * @return string|null
  20805. * @static
  20806. */
  20807. public static function cspNonce()
  20808. {
  20809. /** @var \Illuminate\Foundation\Vite $instance */
  20810. return $instance->cspNonce();
  20811. }
  20812. /**
  20813. * Generate or set a Content Security Policy nonce to apply to all generated tags.
  20814. *
  20815. * @param string|null $nonce
  20816. * @return string
  20817. * @static
  20818. */
  20819. public static function useCspNonce($nonce = null)
  20820. {
  20821. /** @var \Illuminate\Foundation\Vite $instance */
  20822. return $instance->useCspNonce($nonce);
  20823. }
  20824. /**
  20825. * Use the given key to detect integrity hashes in the manifest.
  20826. *
  20827. * @param string|false $key
  20828. * @return \Illuminate\Foundation\Vite
  20829. * @static
  20830. */
  20831. public static function useIntegrityKey($key)
  20832. {
  20833. /** @var \Illuminate\Foundation\Vite $instance */
  20834. return $instance->useIntegrityKey($key);
  20835. }
  20836. /**
  20837. * Set the Vite entry points.
  20838. *
  20839. * @param array $entryPoints
  20840. * @return \Illuminate\Foundation\Vite
  20841. * @static
  20842. */
  20843. public static function withEntryPoints($entryPoints)
  20844. {
  20845. /** @var \Illuminate\Foundation\Vite $instance */
  20846. return $instance->withEntryPoints($entryPoints);
  20847. }
  20848. /**
  20849. * Merge additional Vite entry points with the current set.
  20850. *
  20851. * @param array $entryPoints
  20852. * @return \Illuminate\Foundation\Vite
  20853. * @static
  20854. */
  20855. public static function mergeEntryPoints($entryPoints)
  20856. {
  20857. /** @var \Illuminate\Foundation\Vite $instance */
  20858. return $instance->mergeEntryPoints($entryPoints);
  20859. }
  20860. /**
  20861. * Set the filename for the manifest file.
  20862. *
  20863. * @param string $filename
  20864. * @return \Illuminate\Foundation\Vite
  20865. * @static
  20866. */
  20867. public static function useManifestFilename($filename)
  20868. {
  20869. /** @var \Illuminate\Foundation\Vite $instance */
  20870. return $instance->useManifestFilename($filename);
  20871. }
  20872. /**
  20873. * Resolve asset paths using the provided resolver.
  20874. *
  20875. * @param callable|null $resolver
  20876. * @return \Illuminate\Foundation\Vite
  20877. * @static
  20878. */
  20879. public static function createAssetPathsUsing($resolver)
  20880. {
  20881. /** @var \Illuminate\Foundation\Vite $instance */
  20882. return $instance->createAssetPathsUsing($resolver);
  20883. }
  20884. /**
  20885. * Get the Vite "hot" file path.
  20886. *
  20887. * @return string
  20888. * @static
  20889. */
  20890. public static function hotFile()
  20891. {
  20892. /** @var \Illuminate\Foundation\Vite $instance */
  20893. return $instance->hotFile();
  20894. }
  20895. /**
  20896. * Set the Vite "hot" file path.
  20897. *
  20898. * @param string $path
  20899. * @return \Illuminate\Foundation\Vite
  20900. * @static
  20901. */
  20902. public static function useHotFile($path)
  20903. {
  20904. /** @var \Illuminate\Foundation\Vite $instance */
  20905. return $instance->useHotFile($path);
  20906. }
  20907. /**
  20908. * Set the Vite build directory.
  20909. *
  20910. * @param string $path
  20911. * @return \Illuminate\Foundation\Vite
  20912. * @static
  20913. */
  20914. public static function useBuildDirectory($path)
  20915. {
  20916. /** @var \Illuminate\Foundation\Vite $instance */
  20917. return $instance->useBuildDirectory($path);
  20918. }
  20919. /**
  20920. * Use the given callback to resolve attributes for script tags.
  20921. *
  20922. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20923. * @return \Illuminate\Foundation\Vite
  20924. * @static
  20925. */
  20926. public static function useScriptTagAttributes($attributes)
  20927. {
  20928. /** @var \Illuminate\Foundation\Vite $instance */
  20929. return $instance->useScriptTagAttributes($attributes);
  20930. }
  20931. /**
  20932. * Use the given callback to resolve attributes for style tags.
  20933. *
  20934. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20935. * @return \Illuminate\Foundation\Vite
  20936. * @static
  20937. */
  20938. public static function useStyleTagAttributes($attributes)
  20939. {
  20940. /** @var \Illuminate\Foundation\Vite $instance */
  20941. return $instance->useStyleTagAttributes($attributes);
  20942. }
  20943. /**
  20944. * Use the given callback to resolve attributes for preload tags.
  20945. *
  20946. * @param (callable(string, string, ?array, ?array): (array|false))|array|false $attributes
  20947. * @return \Illuminate\Foundation\Vite
  20948. * @static
  20949. */
  20950. public static function usePreloadTagAttributes($attributes)
  20951. {
  20952. /** @var \Illuminate\Foundation\Vite $instance */
  20953. return $instance->usePreloadTagAttributes($attributes);
  20954. }
  20955. /**
  20956. * Eagerly prefetch assets.
  20957. *
  20958. * @param int|null $concurrency
  20959. * @param string $event
  20960. * @return \Illuminate\Foundation\Vite
  20961. * @static
  20962. */
  20963. public static function prefetch($concurrency = null, $event = 'load')
  20964. {
  20965. /** @var \Illuminate\Foundation\Vite $instance */
  20966. return $instance->prefetch($concurrency, $event);
  20967. }
  20968. /**
  20969. * Use the "waterfall" prefetching strategy.
  20970. *
  20971. * @return \Illuminate\Foundation\Vite
  20972. * @static
  20973. */
  20974. public static function useWaterfallPrefetching($concurrency = null)
  20975. {
  20976. /** @var \Illuminate\Foundation\Vite $instance */
  20977. return $instance->useWaterfallPrefetching($concurrency);
  20978. }
  20979. /**
  20980. * Use the "aggressive" prefetching strategy.
  20981. *
  20982. * @return \Illuminate\Foundation\Vite
  20983. * @static
  20984. */
  20985. public static function useAggressivePrefetching()
  20986. {
  20987. /** @var \Illuminate\Foundation\Vite $instance */
  20988. return $instance->useAggressivePrefetching();
  20989. }
  20990. /**
  20991. * Set the prefetching strategy.
  20992. *
  20993. * @param 'waterfall'|'aggressive'|null $strategy
  20994. * @param array $config
  20995. * @return \Illuminate\Foundation\Vite
  20996. * @static
  20997. */
  20998. public static function usePrefetchStrategy($strategy, $config = [])
  20999. {
  21000. /** @var \Illuminate\Foundation\Vite $instance */
  21001. return $instance->usePrefetchStrategy($strategy, $config);
  21002. }
  21003. /**
  21004. * Generate React refresh runtime script.
  21005. *
  21006. * @return \Illuminate\Support\HtmlString|void
  21007. * @static
  21008. */
  21009. public static function reactRefresh()
  21010. {
  21011. /** @var \Illuminate\Foundation\Vite $instance */
  21012. return $instance->reactRefresh();
  21013. }
  21014. /**
  21015. * Get the URL for an asset.
  21016. *
  21017. * @param string $asset
  21018. * @param string|null $buildDirectory
  21019. * @return string
  21020. * @static
  21021. */
  21022. public static function asset($asset, $buildDirectory = null)
  21023. {
  21024. /** @var \Illuminate\Foundation\Vite $instance */
  21025. return $instance->asset($asset, $buildDirectory);
  21026. }
  21027. /**
  21028. * Get the content of a given asset.
  21029. *
  21030. * @param string $asset
  21031. * @param string|null $buildDirectory
  21032. * @return string
  21033. * @throws \Illuminate\Foundation\ViteException
  21034. * @static
  21035. */
  21036. public static function content($asset, $buildDirectory = null)
  21037. {
  21038. /** @var \Illuminate\Foundation\Vite $instance */
  21039. return $instance->content($asset, $buildDirectory);
  21040. }
  21041. /**
  21042. * Get a unique hash representing the current manifest, or null if there is no manifest.
  21043. *
  21044. * @param string|null $buildDirectory
  21045. * @return string|null
  21046. * @static
  21047. */
  21048. public static function manifestHash($buildDirectory = null)
  21049. {
  21050. /** @var \Illuminate\Foundation\Vite $instance */
  21051. return $instance->manifestHash($buildDirectory);
  21052. }
  21053. /**
  21054. * Determine if the HMR server is running.
  21055. *
  21056. * @return bool
  21057. * @static
  21058. */
  21059. public static function isRunningHot()
  21060. {
  21061. /** @var \Illuminate\Foundation\Vite $instance */
  21062. return $instance->isRunningHot();
  21063. }
  21064. /**
  21065. * Get the Vite tag content as a string of HTML.
  21066. *
  21067. * @return string
  21068. * @static
  21069. */
  21070. public static function toHtml()
  21071. {
  21072. /** @var \Illuminate\Foundation\Vite $instance */
  21073. return $instance->toHtml();
  21074. }
  21075. /**
  21076. * Flush state.
  21077. *
  21078. * @return void
  21079. * @static
  21080. */
  21081. public static function flush()
  21082. {
  21083. /** @var \Illuminate\Foundation\Vite $instance */
  21084. $instance->flush();
  21085. }
  21086. /**
  21087. * Register a custom macro.
  21088. *
  21089. * @param string $name
  21090. * @param object|callable $macro
  21091. * @param-closure-this static $macro
  21092. * @return void
  21093. * @static
  21094. */
  21095. public static function macro($name, $macro)
  21096. {
  21097. \Illuminate\Foundation\Vite::macro($name, $macro);
  21098. }
  21099. /**
  21100. * Mix another object into the class.
  21101. *
  21102. * @param object $mixin
  21103. * @param bool $replace
  21104. * @return void
  21105. * @throws \ReflectionException
  21106. * @static
  21107. */
  21108. public static function mixin($mixin, $replace = true)
  21109. {
  21110. \Illuminate\Foundation\Vite::mixin($mixin, $replace);
  21111. }
  21112. /**
  21113. * Checks if macro is registered.
  21114. *
  21115. * @param string $name
  21116. * @return bool
  21117. * @static
  21118. */
  21119. public static function hasMacro($name)
  21120. {
  21121. return \Illuminate\Foundation\Vite::hasMacro($name);
  21122. }
  21123. /**
  21124. * Flush the existing macros.
  21125. *
  21126. * @return void
  21127. * @static
  21128. */
  21129. public static function flushMacros()
  21130. {
  21131. \Illuminate\Foundation\Vite::flushMacros();
  21132. }
  21133. }
  21134. }
  21135. namespace Illuminate\Http {
  21136. /**
  21137. */
  21138. class Request extends \Symfony\Component\HttpFoundation\Request {
  21139. /**
  21140. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21141. * @param array $rules
  21142. * @param mixed $params
  21143. * @static
  21144. */
  21145. public static function validate($rules, ...$params)
  21146. {
  21147. return \Illuminate\Http\Request::validate($rules, ...$params);
  21148. }
  21149. /**
  21150. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21151. * @param string $errorBag
  21152. * @param array $rules
  21153. * @param mixed $params
  21154. * @static
  21155. */
  21156. public static function validateWithBag($errorBag, $rules, ...$params)
  21157. {
  21158. return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params);
  21159. }
  21160. /**
  21161. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21162. * @param mixed $absolute
  21163. * @static
  21164. */
  21165. public static function hasValidSignature($absolute = true)
  21166. {
  21167. return \Illuminate\Http\Request::hasValidSignature($absolute);
  21168. }
  21169. /**
  21170. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21171. * @static
  21172. */
  21173. public static function hasValidRelativeSignature()
  21174. {
  21175. return \Illuminate\Http\Request::hasValidRelativeSignature();
  21176. }
  21177. /**
  21178. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21179. * @param mixed $ignoreQuery
  21180. * @param mixed $absolute
  21181. * @static
  21182. */
  21183. public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)
  21184. {
  21185. return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute);
  21186. }
  21187. /**
  21188. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21189. * @param mixed $ignoreQuery
  21190. * @static
  21191. */
  21192. public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])
  21193. {
  21194. return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery);
  21195. }
  21196. }
  21197. }
  21198. namespace Illuminate\Database\Schema {
  21199. /**
  21200. */
  21201. class Blueprint {
  21202. /**
  21203. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21204. * @static
  21205. */
  21206. public static function nestedSet()
  21207. {
  21208. return \Illuminate\Database\Schema\Blueprint::nestedSet();
  21209. }
  21210. /**
  21211. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21212. * @static
  21213. */
  21214. public static function dropNestedSet()
  21215. {
  21216. return \Illuminate\Database\Schema\Blueprint::dropNestedSet();
  21217. }
  21218. }
  21219. }
  21220. namespace {
  21221. class App extends \Illuminate\Support\Facades\App {}
  21222. class Arr extends \Illuminate\Support\Arr {}
  21223. class Artisan extends \Illuminate\Support\Facades\Artisan {}
  21224. class Auth extends \Illuminate\Support\Facades\Auth {}
  21225. class Blade extends \Illuminate\Support\Facades\Blade {}
  21226. class Broadcast extends \Illuminate\Support\Facades\Broadcast {}
  21227. class Bus extends \Illuminate\Support\Facades\Bus {}
  21228. class Cache extends \Illuminate\Support\Facades\Cache {}
  21229. class Concurrency extends \Illuminate\Support\Facades\Concurrency {}
  21230. class Config extends \Illuminate\Support\Facades\Config {}
  21231. class Context extends \Illuminate\Support\Facades\Context {}
  21232. class Cookie extends \Illuminate\Support\Facades\Cookie {}
  21233. class Crypt extends \Illuminate\Support\Facades\Crypt {}
  21234. class Date extends \Illuminate\Support\Facades\Date {}
  21235. class DB extends \Illuminate\Support\Facades\DB {}
  21236. /**
  21237. * @template TCollection of static
  21238. * @template TModel of static
  21239. * @template TValue of static
  21240. * @template TValue of static
  21241. */
  21242. class Eloquent extends \Illuminate\Database\Eloquent\Model { /**
  21243. * Create and return an un-saved model instance.
  21244. *
  21245. * @param array $attributes
  21246. * @return TModel
  21247. * @static
  21248. */
  21249. public static function make($attributes = [])
  21250. {
  21251. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21252. return $instance->make($attributes);
  21253. }
  21254. /**
  21255. * Register a new global scope.
  21256. *
  21257. * @param string $identifier
  21258. * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope
  21259. * @return \Illuminate\Database\Eloquent\Builder<static>
  21260. * @static
  21261. */
  21262. public static function withGlobalScope($identifier, $scope)
  21263. {
  21264. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21265. return $instance->withGlobalScope($identifier, $scope);
  21266. }
  21267. /**
  21268. * Remove a registered global scope.
  21269. *
  21270. * @param \Illuminate\Database\Eloquent\Scope|string $scope
  21271. * @return \Illuminate\Database\Eloquent\Builder<static>
  21272. * @static
  21273. */
  21274. public static function withoutGlobalScope($scope)
  21275. {
  21276. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21277. return $instance->withoutGlobalScope($scope);
  21278. }
  21279. /**
  21280. * Remove all or passed registered global scopes.
  21281. *
  21282. * @param array|null $scopes
  21283. * @return \Illuminate\Database\Eloquent\Builder<static>
  21284. * @static
  21285. */
  21286. public static function withoutGlobalScopes($scopes = null)
  21287. {
  21288. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21289. return $instance->withoutGlobalScopes($scopes);
  21290. }
  21291. /**
  21292. * Get an array of global scopes that were removed from the query.
  21293. *
  21294. * @return array
  21295. * @static
  21296. */
  21297. public static function removedScopes()
  21298. {
  21299. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21300. return $instance->removedScopes();
  21301. }
  21302. /**
  21303. * Add a where clause on the primary key to the query.
  21304. *
  21305. * @param mixed $id
  21306. * @return \Illuminate\Database\Eloquent\Builder<static>
  21307. * @static
  21308. */
  21309. public static function whereKey($id)
  21310. {
  21311. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21312. return $instance->whereKey($id);
  21313. }
  21314. /**
  21315. * Add a where clause on the primary key to the query.
  21316. *
  21317. * @param mixed $id
  21318. * @return \Illuminate\Database\Eloquent\Builder<static>
  21319. * @static
  21320. */
  21321. public static function whereKeyNot($id)
  21322. {
  21323. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21324. return $instance->whereKeyNot($id);
  21325. }
  21326. /**
  21327. * Add a basic where clause to the query.
  21328. *
  21329. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21330. * @param mixed $operator
  21331. * @param mixed $value
  21332. * @param string $boolean
  21333. * @return \Illuminate\Database\Eloquent\Builder<static>
  21334. * @static
  21335. */
  21336. public static function where($column, $operator = null, $value = null, $boolean = 'and')
  21337. {
  21338. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21339. return $instance->where($column, $operator, $value, $boolean);
  21340. }
  21341. /**
  21342. * Add a basic where clause to the query, and return the first result.
  21343. *
  21344. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21345. * @param mixed $operator
  21346. * @param mixed $value
  21347. * @param string $boolean
  21348. * @return TModel|null
  21349. * @static
  21350. */
  21351. public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
  21352. {
  21353. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21354. return $instance->firstWhere($column, $operator, $value, $boolean);
  21355. }
  21356. /**
  21357. * Add an "or where" clause to the query.
  21358. *
  21359. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21360. * @param mixed $operator
  21361. * @param mixed $value
  21362. * @return \Illuminate\Database\Eloquent\Builder<static>
  21363. * @static
  21364. */
  21365. public static function orWhere($column, $operator = null, $value = null)
  21366. {
  21367. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21368. return $instance->orWhere($column, $operator, $value);
  21369. }
  21370. /**
  21371. * Add a basic "where not" clause to the query.
  21372. *
  21373. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21374. * @param mixed $operator
  21375. * @param mixed $value
  21376. * @param string $boolean
  21377. * @return \Illuminate\Database\Eloquent\Builder<static>
  21378. * @static
  21379. */
  21380. public static function whereNot($column, $operator = null, $value = null, $boolean = 'and')
  21381. {
  21382. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21383. return $instance->whereNot($column, $operator, $value, $boolean);
  21384. }
  21385. /**
  21386. * Add an "or where not" clause to the query.
  21387. *
  21388. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21389. * @param mixed $operator
  21390. * @param mixed $value
  21391. * @return \Illuminate\Database\Eloquent\Builder<static>
  21392. * @static
  21393. */
  21394. public static function orWhereNot($column, $operator = null, $value = null)
  21395. {
  21396. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21397. return $instance->orWhereNot($column, $operator, $value);
  21398. }
  21399. /**
  21400. * Add an "order by" clause for a timestamp to the query.
  21401. *
  21402. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21403. * @return \Illuminate\Database\Eloquent\Builder<static>
  21404. * @static
  21405. */
  21406. public static function latest($column = null)
  21407. {
  21408. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21409. return $instance->latest($column);
  21410. }
  21411. /**
  21412. * Add an "order by" clause for a timestamp to the query.
  21413. *
  21414. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21415. * @return \Illuminate\Database\Eloquent\Builder<static>
  21416. * @static
  21417. */
  21418. public static function oldest($column = null)
  21419. {
  21420. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21421. return $instance->oldest($column);
  21422. }
  21423. /**
  21424. * Create a collection of models from plain arrays.
  21425. *
  21426. * @param array $items
  21427. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21428. * @static
  21429. */
  21430. public static function hydrate($items)
  21431. {
  21432. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21433. return $instance->hydrate($items);
  21434. }
  21435. /**
  21436. * Insert into the database after merging the model's default attributes, setting timestamps, and casting values.
  21437. *
  21438. * @param array<int, array<string, mixed>> $values
  21439. * @return bool
  21440. * @static
  21441. */
  21442. public static function fillAndInsert($values)
  21443. {
  21444. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21445. return $instance->fillAndInsert($values);
  21446. }
  21447. /**
  21448. * Insert (ignoring errors) into the database after merging the model's default attributes, setting timestamps, and casting values.
  21449. *
  21450. * @param array<int, array<string, mixed>> $values
  21451. * @return int
  21452. * @static
  21453. */
  21454. public static function fillAndInsertOrIgnore($values)
  21455. {
  21456. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21457. return $instance->fillAndInsertOrIgnore($values);
  21458. }
  21459. /**
  21460. * Insert a record into the database and get its ID after merging the model's default attributes, setting timestamps, and casting values.
  21461. *
  21462. * @param array<string, mixed> $values
  21463. * @return int
  21464. * @static
  21465. */
  21466. public static function fillAndInsertGetId($values)
  21467. {
  21468. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21469. return $instance->fillAndInsertGetId($values);
  21470. }
  21471. /**
  21472. * Enrich the given values by merging in the model's default attributes, adding timestamps, and casting values.
  21473. *
  21474. * @param array<int, array<string, mixed>> $values
  21475. * @return array<int, array<string, mixed>>
  21476. * @static
  21477. */
  21478. public static function fillForInsert($values)
  21479. {
  21480. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21481. return $instance->fillForInsert($values);
  21482. }
  21483. /**
  21484. * Create a collection of models from a raw query.
  21485. *
  21486. * @param string $query
  21487. * @param array $bindings
  21488. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21489. * @static
  21490. */
  21491. public static function fromQuery($query, $bindings = [])
  21492. {
  21493. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21494. return $instance->fromQuery($query, $bindings);
  21495. }
  21496. /**
  21497. * Find a model by its primary key.
  21498. *
  21499. * @param mixed $id
  21500. * @param array|string $columns
  21501. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel|null)
  21502. * @static
  21503. */
  21504. public static function find($id, $columns = [])
  21505. {
  21506. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21507. return $instance->find($id, $columns);
  21508. }
  21509. /**
  21510. * Find a sole model by its primary key.
  21511. *
  21512. * @param mixed $id
  21513. * @param array|string $columns
  21514. * @return TModel
  21515. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21516. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21517. * @static
  21518. */
  21519. public static function findSole($id, $columns = [])
  21520. {
  21521. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21522. return $instance->findSole($id, $columns);
  21523. }
  21524. /**
  21525. * Find multiple models by their primary keys.
  21526. *
  21527. * @param \Illuminate\Contracts\Support\Arrayable|array $ids
  21528. * @param array|string $columns
  21529. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21530. * @static
  21531. */
  21532. public static function findMany($ids, $columns = [])
  21533. {
  21534. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21535. return $instance->findMany($ids, $columns);
  21536. }
  21537. /**
  21538. * Find a model by its primary key or throw an exception.
  21539. *
  21540. * @param mixed $id
  21541. * @param array|string $columns
  21542. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21543. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21544. * @static
  21545. */
  21546. public static function findOrFail($id, $columns = [])
  21547. {
  21548. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21549. return $instance->findOrFail($id, $columns);
  21550. }
  21551. /**
  21552. * Find a model by its primary key or return fresh model instance.
  21553. *
  21554. * @param mixed $id
  21555. * @param array|string $columns
  21556. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21557. * @static
  21558. */
  21559. public static function findOrNew($id, $columns = [])
  21560. {
  21561. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21562. return $instance->findOrNew($id, $columns);
  21563. }
  21564. /**
  21565. * Find a model by its primary key or call a callback.
  21566. *
  21567. * @template TValue
  21568. * @param mixed $id
  21569. * @param (\Closure(): TValue)|list<string>|string $columns
  21570. * @param (\Closure(): TValue)|null $callback
  21571. * @return ( $id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>)
  21572. * ? \Illuminate\Database\Eloquent\Collection<int, TModel>
  21573. * : TModel|TValue
  21574. * )
  21575. * @static
  21576. */
  21577. public static function findOr($id, $columns = [], $callback = null)
  21578. {
  21579. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21580. return $instance->findOr($id, $columns, $callback);
  21581. }
  21582. /**
  21583. * Get the first record matching the attributes or instantiate it.
  21584. *
  21585. * @param array $attributes
  21586. * @param array $values
  21587. * @return TModel
  21588. * @static
  21589. */
  21590. public static function firstOrNew($attributes = [], $values = [])
  21591. {
  21592. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21593. return $instance->firstOrNew($attributes, $values);
  21594. }
  21595. /**
  21596. * Get the first record matching the attributes. If the record is not found, create it.
  21597. *
  21598. * @param array $attributes
  21599. * @param array $values
  21600. * @return TModel
  21601. * @static
  21602. */
  21603. public static function firstOrCreate($attributes = [], $values = [])
  21604. {
  21605. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21606. return $instance->firstOrCreate($attributes, $values);
  21607. }
  21608. /**
  21609. * Attempt to create the record. If a unique constraint violation occurs, attempt to find the matching record.
  21610. *
  21611. * @param array $attributes
  21612. * @param array $values
  21613. * @return TModel
  21614. * @static
  21615. */
  21616. public static function createOrFirst($attributes = [], $values = [])
  21617. {
  21618. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21619. return $instance->createOrFirst($attributes, $values);
  21620. }
  21621. /**
  21622. * Create or update a record matching the attributes, and fill it with values.
  21623. *
  21624. * @param array $attributes
  21625. * @param array $values
  21626. * @return TModel
  21627. * @static
  21628. */
  21629. public static function updateOrCreate($attributes, $values = [])
  21630. {
  21631. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21632. return $instance->updateOrCreate($attributes, $values);
  21633. }
  21634. /**
  21635. * Create a record matching the attributes, or increment the existing record.
  21636. *
  21637. * @param array $attributes
  21638. * @param string $column
  21639. * @param int|float $default
  21640. * @param int|float $step
  21641. * @param array $extra
  21642. * @return TModel
  21643. * @static
  21644. */
  21645. public static function incrementOrCreate($attributes, $column = 'count', $default = 1, $step = 1, $extra = [])
  21646. {
  21647. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21648. return $instance->incrementOrCreate($attributes, $column, $default, $step, $extra);
  21649. }
  21650. /**
  21651. * Execute the query and get the first result or throw an exception.
  21652. *
  21653. * @param array|string $columns
  21654. * @return TModel
  21655. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21656. * @static
  21657. */
  21658. public static function firstOrFail($columns = [])
  21659. {
  21660. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21661. return $instance->firstOrFail($columns);
  21662. }
  21663. /**
  21664. * Execute the query and get the first result or call a callback.
  21665. *
  21666. * @template TValue
  21667. * @param (\Closure(): TValue)|list<string> $columns
  21668. * @param (\Closure(): TValue)|null $callback
  21669. * @return TModel|TValue
  21670. * @static
  21671. */
  21672. public static function firstOr($columns = [], $callback = null)
  21673. {
  21674. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21675. return $instance->firstOr($columns, $callback);
  21676. }
  21677. /**
  21678. * Execute the query and get the first result if it's the sole matching record.
  21679. *
  21680. * @param array|string $columns
  21681. * @return TModel
  21682. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21683. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21684. * @static
  21685. */
  21686. public static function sole($columns = [])
  21687. {
  21688. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21689. return $instance->sole($columns);
  21690. }
  21691. /**
  21692. * Get a single column's value from the first result of a query.
  21693. *
  21694. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21695. * @return mixed
  21696. * @static
  21697. */
  21698. public static function value($column)
  21699. {
  21700. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21701. return $instance->value($column);
  21702. }
  21703. /**
  21704. * Get a single column's value from the first result of a query if it's the sole matching record.
  21705. *
  21706. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21707. * @return mixed
  21708. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21709. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21710. * @static
  21711. */
  21712. public static function soleValue($column)
  21713. {
  21714. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21715. return $instance->soleValue($column);
  21716. }
  21717. /**
  21718. * Get a single column's value from the first result of the query or throw an exception.
  21719. *
  21720. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21721. * @return mixed
  21722. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21723. * @static
  21724. */
  21725. public static function valueOrFail($column)
  21726. {
  21727. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21728. return $instance->valueOrFail($column);
  21729. }
  21730. /**
  21731. * Execute the query as a "select" statement.
  21732. *
  21733. * @param array|string $columns
  21734. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21735. * @static
  21736. */
  21737. public static function get($columns = [])
  21738. {
  21739. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21740. return $instance->get($columns);
  21741. }
  21742. /**
  21743. * Get the hydrated models without eager loading.
  21744. *
  21745. * @param array|string $columns
  21746. * @return array<int, TModel>
  21747. * @static
  21748. */
  21749. public static function getModels($columns = [])
  21750. {
  21751. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21752. return $instance->getModels($columns);
  21753. }
  21754. /**
  21755. * Eager load the relationships for the models.
  21756. *
  21757. * @param array<int, TModel> $models
  21758. * @return array<int, TModel>
  21759. * @static
  21760. */
  21761. public static function eagerLoadRelations($models)
  21762. {
  21763. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21764. return $instance->eagerLoadRelations($models);
  21765. }
  21766. /**
  21767. * Register a closure to be invoked after the query is executed.
  21768. *
  21769. * @param \Closure $callback
  21770. * @return \Illuminate\Database\Eloquent\Builder<static>
  21771. * @static
  21772. */
  21773. public static function afterQuery($callback)
  21774. {
  21775. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21776. return $instance->afterQuery($callback);
  21777. }
  21778. /**
  21779. * Invoke the "after query" modification callbacks.
  21780. *
  21781. * @param mixed $result
  21782. * @return mixed
  21783. * @static
  21784. */
  21785. public static function applyAfterQueryCallbacks($result)
  21786. {
  21787. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21788. return $instance->applyAfterQueryCallbacks($result);
  21789. }
  21790. /**
  21791. * Get a lazy collection for the given query.
  21792. *
  21793. * @return \Illuminate\Support\LazyCollection<int, TModel>
  21794. * @static
  21795. */
  21796. public static function cursor()
  21797. {
  21798. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21799. return $instance->cursor();
  21800. }
  21801. /**
  21802. * Get a collection with the values of a given column.
  21803. *
  21804. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21805. * @param string|null $key
  21806. * @return \Illuminate\Support\Collection<array-key, mixed>
  21807. * @static
  21808. */
  21809. public static function pluck($column, $key = null)
  21810. {
  21811. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21812. return $instance->pluck($column, $key);
  21813. }
  21814. /**
  21815. * Paginate the given query.
  21816. *
  21817. * @param int|null|\Closure $perPage
  21818. * @param array|string $columns
  21819. * @param string $pageName
  21820. * @param int|null $page
  21821. * @param \Closure|int|null $total
  21822. * @return \Illuminate\Pagination\LengthAwarePaginator
  21823. * @throws \InvalidArgumentException
  21824. * @static
  21825. */
  21826. public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null, $total = null)
  21827. {
  21828. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21829. return $instance->paginate($perPage, $columns, $pageName, $page, $total);
  21830. }
  21831. /**
  21832. * Paginate the given query into a simple paginator.
  21833. *
  21834. * @param int|null $perPage
  21835. * @param array|string $columns
  21836. * @param string $pageName
  21837. * @param int|null $page
  21838. * @return \Illuminate\Contracts\Pagination\Paginator
  21839. * @static
  21840. */
  21841. public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null)
  21842. {
  21843. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21844. return $instance->simplePaginate($perPage, $columns, $pageName, $page);
  21845. }
  21846. /**
  21847. * Paginate the given query into a cursor paginator.
  21848. *
  21849. * @param int|null $perPage
  21850. * @param array|string $columns
  21851. * @param string $cursorName
  21852. * @param \Illuminate\Pagination\Cursor|string|null $cursor
  21853. * @return \Illuminate\Contracts\Pagination\CursorPaginator
  21854. * @static
  21855. */
  21856. public static function cursorPaginate($perPage = null, $columns = [], $cursorName = 'cursor', $cursor = null)
  21857. {
  21858. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21859. return $instance->cursorPaginate($perPage, $columns, $cursorName, $cursor);
  21860. }
  21861. /**
  21862. * Save a new model and return the instance.
  21863. *
  21864. * @param array $attributes
  21865. * @return TModel
  21866. * @static
  21867. */
  21868. public static function create($attributes = [])
  21869. {
  21870. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21871. return $instance->create($attributes);
  21872. }
  21873. /**
  21874. * Save a new model and return the instance without raising model events.
  21875. *
  21876. * @param array $attributes
  21877. * @return TModel
  21878. * @static
  21879. */
  21880. public static function createQuietly($attributes = [])
  21881. {
  21882. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21883. return $instance->createQuietly($attributes);
  21884. }
  21885. /**
  21886. * Save a new model and return the instance. Allow mass-assignment.
  21887. *
  21888. * @param array $attributes
  21889. * @return TModel
  21890. * @static
  21891. */
  21892. public static function forceCreate($attributes)
  21893. {
  21894. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21895. return $instance->forceCreate($attributes);
  21896. }
  21897. /**
  21898. * Save a new model instance with mass assignment without raising model events.
  21899. *
  21900. * @param array $attributes
  21901. * @return TModel
  21902. * @static
  21903. */
  21904. public static function forceCreateQuietly($attributes = [])
  21905. {
  21906. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21907. return $instance->forceCreateQuietly($attributes);
  21908. }
  21909. /**
  21910. * Insert new records or update the existing ones.
  21911. *
  21912. * @param array $values
  21913. * @param array|string $uniqueBy
  21914. * @param array|null $update
  21915. * @return int
  21916. * @static
  21917. */
  21918. public static function upsert($values, $uniqueBy, $update = null)
  21919. {
  21920. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21921. return $instance->upsert($values, $uniqueBy, $update);
  21922. }
  21923. /**
  21924. * Register a replacement for the default delete function.
  21925. *
  21926. * @param \Closure $callback
  21927. * @return void
  21928. * @static
  21929. */
  21930. public static function onDelete($callback)
  21931. {
  21932. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21933. $instance->onDelete($callback);
  21934. }
  21935. /**
  21936. * Call the given local model scopes.
  21937. *
  21938. * @param array|string $scopes
  21939. * @return static|mixed
  21940. * @static
  21941. */
  21942. public static function scopes($scopes)
  21943. {
  21944. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21945. return $instance->scopes($scopes);
  21946. }
  21947. /**
  21948. * Apply the scopes to the Eloquent builder instance and return it.
  21949. *
  21950. * @return static
  21951. * @static
  21952. */
  21953. public static function applyScopes()
  21954. {
  21955. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21956. return $instance->applyScopes();
  21957. }
  21958. /**
  21959. * Prevent the specified relations from being eager loaded.
  21960. *
  21961. * @param mixed $relations
  21962. * @return \Illuminate\Database\Eloquent\Builder<static>
  21963. * @static
  21964. */
  21965. public static function without($relations)
  21966. {
  21967. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21968. return $instance->without($relations);
  21969. }
  21970. /**
  21971. * Set the relationships that should be eager loaded while removing any previously added eager loading specifications.
  21972. *
  21973. * @param array<array-key, array|(\Closure(\Illuminate\Database\Eloquent\Relations\Relation<*,*,*>): mixed)|string>|string $relations
  21974. * @return \Illuminate\Database\Eloquent\Builder<static>
  21975. * @static
  21976. */
  21977. public static function withOnly($relations)
  21978. {
  21979. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21980. return $instance->withOnly($relations);
  21981. }
  21982. /**
  21983. * Create a new instance of the model being queried.
  21984. *
  21985. * @param array $attributes
  21986. * @return TModel
  21987. * @static
  21988. */
  21989. public static function newModelInstance($attributes = [])
  21990. {
  21991. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21992. return $instance->newModelInstance($attributes);
  21993. }
  21994. /**
  21995. * Specify attributes that should be added to any new models created by this builder.
  21996. *
  21997. * The given key / value pairs will also be added as where conditions to the query.
  21998. *
  21999. * @param \Illuminate\Contracts\Database\Query\Expression|array|string $attributes
  22000. * @param mixed $value
  22001. * @param bool $asConditions
  22002. * @return \Illuminate\Database\Eloquent\Builder<static>
  22003. * @static
  22004. */
  22005. public static function withAttributes($attributes, $value = null, $asConditions = true)
  22006. {
  22007. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22008. return $instance->withAttributes($attributes, $value, $asConditions);
  22009. }
  22010. /**
  22011. * Apply query-time casts to the model instance.
  22012. *
  22013. * @param array $casts
  22014. * @return \Illuminate\Database\Eloquent\Builder<static>
  22015. * @static
  22016. */
  22017. public static function withCasts($casts)
  22018. {
  22019. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22020. return $instance->withCasts($casts);
  22021. }
  22022. /**
  22023. * Execute the given Closure within a transaction savepoint if needed.
  22024. *
  22025. * @template TModelValue
  22026. * @param \Closure(): TModelValue $scope
  22027. * @return TModelValue
  22028. * @static
  22029. */
  22030. public static function withSavepointIfNeeded($scope)
  22031. {
  22032. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22033. return $instance->withSavepointIfNeeded($scope);
  22034. }
  22035. /**
  22036. * Get the underlying query builder instance.
  22037. *
  22038. * @return \Illuminate\Database\Query\Builder
  22039. * @static
  22040. */
  22041. public static function getQuery()
  22042. {
  22043. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22044. return $instance->getQuery();
  22045. }
  22046. /**
  22047. * Set the underlying query builder instance.
  22048. *
  22049. * @param \Illuminate\Database\Query\Builder $query
  22050. * @return \Illuminate\Database\Eloquent\Builder<static>
  22051. * @static
  22052. */
  22053. public static function setQuery($query)
  22054. {
  22055. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22056. return $instance->setQuery($query);
  22057. }
  22058. /**
  22059. * Get a base query builder instance.
  22060. *
  22061. * @return \Illuminate\Database\Query\Builder
  22062. * @static
  22063. */
  22064. public static function toBase()
  22065. {
  22066. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22067. return $instance->toBase();
  22068. }
  22069. /**
  22070. * Get the relationships being eagerly loaded.
  22071. *
  22072. * @return array
  22073. * @static
  22074. */
  22075. public static function getEagerLoads()
  22076. {
  22077. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22078. return $instance->getEagerLoads();
  22079. }
  22080. /**
  22081. * Set the relationships being eagerly loaded.
  22082. *
  22083. * @param array $eagerLoad
  22084. * @return \Illuminate\Database\Eloquent\Builder<static>
  22085. * @static
  22086. */
  22087. public static function setEagerLoads($eagerLoad)
  22088. {
  22089. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22090. return $instance->setEagerLoads($eagerLoad);
  22091. }
  22092. /**
  22093. * Indicate that the given relationships should not be eagerly loaded.
  22094. *
  22095. * @param array $relations
  22096. * @return \Illuminate\Database\Eloquent\Builder<static>
  22097. * @static
  22098. */
  22099. public static function withoutEagerLoad($relations)
  22100. {
  22101. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22102. return $instance->withoutEagerLoad($relations);
  22103. }
  22104. /**
  22105. * Flush the relationships being eagerly loaded.
  22106. *
  22107. * @return \Illuminate\Database\Eloquent\Builder<static>
  22108. * @static
  22109. */
  22110. public static function withoutEagerLoads()
  22111. {
  22112. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22113. return $instance->withoutEagerLoads();
  22114. }
  22115. /**
  22116. * Get the "limit" value from the query or null if it's not set.
  22117. *
  22118. * @return mixed
  22119. * @static
  22120. */
  22121. public static function getLimit()
  22122. {
  22123. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22124. return $instance->getLimit();
  22125. }
  22126. /**
  22127. * Get the "offset" value from the query or null if it's not set.
  22128. *
  22129. * @return mixed
  22130. * @static
  22131. */
  22132. public static function getOffset()
  22133. {
  22134. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22135. return $instance->getOffset();
  22136. }
  22137. /**
  22138. * Get the model instance being queried.
  22139. *
  22140. * @return TModel
  22141. * @static
  22142. */
  22143. public static function getModel()
  22144. {
  22145. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22146. return $instance->getModel();
  22147. }
  22148. /**
  22149. * Set a model instance for the model being queried.
  22150. *
  22151. * @template TModelNew of \Illuminate\Database\Eloquent\Model
  22152. * @param TModelNew $model
  22153. * @return static<TModelNew>
  22154. * @static
  22155. */
  22156. public static function setModel($model)
  22157. {
  22158. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22159. return $instance->setModel($model);
  22160. }
  22161. /**
  22162. * Get the given macro by name.
  22163. *
  22164. * @param string $name
  22165. * @return \Closure
  22166. * @static
  22167. */
  22168. public static function getMacro($name)
  22169. {
  22170. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22171. return $instance->getMacro($name);
  22172. }
  22173. /**
  22174. * Checks if a macro is registered.
  22175. *
  22176. * @param string $name
  22177. * @return bool
  22178. * @static
  22179. */
  22180. public static function hasMacro($name)
  22181. {
  22182. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22183. return $instance->hasMacro($name);
  22184. }
  22185. /**
  22186. * Get the given global macro by name.
  22187. *
  22188. * @param string $name
  22189. * @return \Closure
  22190. * @static
  22191. */
  22192. public static function getGlobalMacro($name)
  22193. {
  22194. return \Illuminate\Database\Eloquent\Builder::getGlobalMacro($name);
  22195. }
  22196. /**
  22197. * Checks if a global macro is registered.
  22198. *
  22199. * @param string $name
  22200. * @return bool
  22201. * @static
  22202. */
  22203. public static function hasGlobalMacro($name)
  22204. {
  22205. return \Illuminate\Database\Eloquent\Builder::hasGlobalMacro($name);
  22206. }
  22207. /**
  22208. * Clone the Eloquent query builder.
  22209. *
  22210. * @return static
  22211. * @static
  22212. */
  22213. public static function clone()
  22214. {
  22215. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22216. return $instance->clone();
  22217. }
  22218. /**
  22219. * Register a closure to be invoked on a clone.
  22220. *
  22221. * @param \Closure $callback
  22222. * @return \Illuminate\Database\Eloquent\Builder<static>
  22223. * @static
  22224. */
  22225. public static function onClone($callback)
  22226. {
  22227. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22228. return $instance->onClone($callback);
  22229. }
  22230. /**
  22231. * Chunk the results of the query.
  22232. *
  22233. * @param int $count
  22234. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22235. * @return bool
  22236. * @static
  22237. */
  22238. public static function chunk($count, $callback)
  22239. {
  22240. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22241. return $instance->chunk($count, $callback);
  22242. }
  22243. /**
  22244. * Run a map over each item while chunking.
  22245. *
  22246. * @template TReturn
  22247. * @param callable(TValue): TReturn $callback
  22248. * @param int $count
  22249. * @return \Illuminate\Support\Collection<int, TReturn>
  22250. * @static
  22251. */
  22252. public static function chunkMap($callback, $count = 1000)
  22253. {
  22254. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22255. return $instance->chunkMap($callback, $count);
  22256. }
  22257. /**
  22258. * Execute a callback over each item while chunking.
  22259. *
  22260. * @param callable(TValue, int): mixed $callback
  22261. * @param int $count
  22262. * @return bool
  22263. * @throws \RuntimeException
  22264. * @static
  22265. */
  22266. public static function each($callback, $count = 1000)
  22267. {
  22268. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22269. return $instance->each($callback, $count);
  22270. }
  22271. /**
  22272. * Chunk the results of a query by comparing IDs.
  22273. *
  22274. * @param int $count
  22275. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22276. * @param string|null $column
  22277. * @param string|null $alias
  22278. * @return bool
  22279. * @static
  22280. */
  22281. public static function chunkById($count, $callback, $column = null, $alias = null)
  22282. {
  22283. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22284. return $instance->chunkById($count, $callback, $column, $alias);
  22285. }
  22286. /**
  22287. * Chunk the results of a query by comparing IDs in descending order.
  22288. *
  22289. * @param int $count
  22290. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22291. * @param string|null $column
  22292. * @param string|null $alias
  22293. * @return bool
  22294. * @static
  22295. */
  22296. public static function chunkByIdDesc($count, $callback, $column = null, $alias = null)
  22297. {
  22298. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22299. return $instance->chunkByIdDesc($count, $callback, $column, $alias);
  22300. }
  22301. /**
  22302. * Chunk the results of a query by comparing IDs in a given order.
  22303. *
  22304. * @param int $count
  22305. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22306. * @param string|null $column
  22307. * @param string|null $alias
  22308. * @param bool $descending
  22309. * @return bool
  22310. * @throws \RuntimeException
  22311. * @static
  22312. */
  22313. public static function orderedChunkById($count, $callback, $column = null, $alias = null, $descending = false)
  22314. {
  22315. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22316. return $instance->orderedChunkById($count, $callback, $column, $alias, $descending);
  22317. }
  22318. /**
  22319. * Execute a callback over each item while chunking by ID.
  22320. *
  22321. * @param callable(TValue, int): mixed $callback
  22322. * @param int $count
  22323. * @param string|null $column
  22324. * @param string|null $alias
  22325. * @return bool
  22326. * @static
  22327. */
  22328. public static function eachById($callback, $count = 1000, $column = null, $alias = null)
  22329. {
  22330. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22331. return $instance->eachById($callback, $count, $column, $alias);
  22332. }
  22333. /**
  22334. * Query lazily, by chunks of the given size.
  22335. *
  22336. * @param int $chunkSize
  22337. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22338. * @throws \InvalidArgumentException
  22339. * @static
  22340. */
  22341. public static function lazy($chunkSize = 1000)
  22342. {
  22343. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22344. return $instance->lazy($chunkSize);
  22345. }
  22346. /**
  22347. * Query lazily, by chunking the results of a query by comparing IDs.
  22348. *
  22349. * @param int $chunkSize
  22350. * @param string|null $column
  22351. * @param string|null $alias
  22352. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22353. * @throws \InvalidArgumentException
  22354. * @static
  22355. */
  22356. public static function lazyById($chunkSize = 1000, $column = null, $alias = null)
  22357. {
  22358. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22359. return $instance->lazyById($chunkSize, $column, $alias);
  22360. }
  22361. /**
  22362. * Query lazily, by chunking the results of a query by comparing IDs in descending order.
  22363. *
  22364. * @param int $chunkSize
  22365. * @param string|null $column
  22366. * @param string|null $alias
  22367. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22368. * @throws \InvalidArgumentException
  22369. * @static
  22370. */
  22371. public static function lazyByIdDesc($chunkSize = 1000, $column = null, $alias = null)
  22372. {
  22373. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22374. return $instance->lazyByIdDesc($chunkSize, $column, $alias);
  22375. }
  22376. /**
  22377. * Execute the query and get the first result.
  22378. *
  22379. * @param array|string $columns
  22380. * @return TValue|null
  22381. * @static
  22382. */
  22383. public static function first($columns = [])
  22384. {
  22385. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22386. return $instance->first($columns);
  22387. }
  22388. /**
  22389. * Execute the query and get the first result if it's the sole matching record.
  22390. *
  22391. * @param array|string $columns
  22392. * @return TValue
  22393. * @throws \Illuminate\Database\RecordsNotFoundException
  22394. * @throws \Illuminate\Database\MultipleRecordsFoundException
  22395. * @static
  22396. */
  22397. public static function baseSole($columns = [])
  22398. {
  22399. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22400. return $instance->baseSole($columns);
  22401. }
  22402. /**
  22403. * Pass the query to a given callback and then return it.
  22404. *
  22405. * @param callable($this): mixed $callback
  22406. * @return \Illuminate\Database\Eloquent\Builder<static>
  22407. * @static
  22408. */
  22409. public static function tap($callback)
  22410. {
  22411. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22412. return $instance->tap($callback);
  22413. }
  22414. /**
  22415. * Pass the query to a given callback and return the result.
  22416. *
  22417. * @template TReturn
  22418. * @param (callable($this): TReturn) $callback
  22419. * @return (TReturn is null|void ? $this : TReturn)
  22420. * @static
  22421. */
  22422. public static function pipe($callback)
  22423. {
  22424. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22425. return $instance->pipe($callback);
  22426. }
  22427. /**
  22428. * Apply the callback if the given "value" is (or resolves to) truthy.
  22429. *
  22430. * @template TWhenParameter
  22431. * @template TWhenReturnType
  22432. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  22433. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  22434. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  22435. * @return $this|TWhenReturnType
  22436. * @static
  22437. */
  22438. public static function when($value = null, $callback = null, $default = null)
  22439. {
  22440. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22441. return $instance->when($value, $callback, $default);
  22442. }
  22443. /**
  22444. * Apply the callback if the given "value" is (or resolves to) falsy.
  22445. *
  22446. * @template TUnlessParameter
  22447. * @template TUnlessReturnType
  22448. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  22449. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  22450. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  22451. * @return $this|TUnlessReturnType
  22452. * @static
  22453. */
  22454. public static function unless($value = null, $callback = null, $default = null)
  22455. {
  22456. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22457. return $instance->unless($value, $callback, $default);
  22458. }
  22459. /**
  22460. * Add a relationship count / exists condition to the query.
  22461. *
  22462. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22463. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22464. * @param string $operator
  22465. * @param int $count
  22466. * @param string $boolean
  22467. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22468. * @return \Illuminate\Database\Eloquent\Builder<static>
  22469. * @throws \RuntimeException
  22470. * @static
  22471. */
  22472. public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22473. {
  22474. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22475. return $instance->has($relation, $operator, $count, $boolean, $callback);
  22476. }
  22477. /**
  22478. * Add a relationship count / exists condition to the query with an "or".
  22479. *
  22480. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22481. * @param string $operator
  22482. * @param int $count
  22483. * @return \Illuminate\Database\Eloquent\Builder<static>
  22484. * @static
  22485. */
  22486. public static function orHas($relation, $operator = '>=', $count = 1)
  22487. {
  22488. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22489. return $instance->orHas($relation, $operator, $count);
  22490. }
  22491. /**
  22492. * Add a relationship count / exists condition to the query.
  22493. *
  22494. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22495. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22496. * @param string $boolean
  22497. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22498. * @return \Illuminate\Database\Eloquent\Builder<static>
  22499. * @static
  22500. */
  22501. public static function doesntHave($relation, $boolean = 'and', $callback = null)
  22502. {
  22503. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22504. return $instance->doesntHave($relation, $boolean, $callback);
  22505. }
  22506. /**
  22507. * Add a relationship count / exists condition to the query with an "or".
  22508. *
  22509. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22510. * @return \Illuminate\Database\Eloquent\Builder<static>
  22511. * @static
  22512. */
  22513. public static function orDoesntHave($relation)
  22514. {
  22515. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22516. return $instance->orDoesntHave($relation);
  22517. }
  22518. /**
  22519. * Add a relationship count / exists condition to the query with where clauses.
  22520. *
  22521. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22522. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22523. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22524. * @param string $operator
  22525. * @param int $count
  22526. * @return \Illuminate\Database\Eloquent\Builder<static>
  22527. * @static
  22528. */
  22529. public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22530. {
  22531. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22532. return $instance->whereHas($relation, $callback, $operator, $count);
  22533. }
  22534. /**
  22535. * Add a relationship count / exists condition to the query with where clauses.
  22536. *
  22537. * Also load the relationship with the same condition.
  22538. *
  22539. * @param string $relation
  22540. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Database\Eloquent\Relations\Relation<*, *, *>): mixed)|null $callback
  22541. * @param string $operator
  22542. * @param int $count
  22543. * @return \Illuminate\Database\Eloquent\Builder<static>
  22544. * @static
  22545. */
  22546. public static function withWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22547. {
  22548. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22549. return $instance->withWhereHas($relation, $callback, $operator, $count);
  22550. }
  22551. /**
  22552. * Add a relationship count / exists condition to the query with where clauses and an "or".
  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 orWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22563. {
  22564. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22565. return $instance->orWhereHas($relation, $callback, $operator, $count);
  22566. }
  22567. /**
  22568. * Add a relationship count / exists condition to the query with where clauses.
  22569. *
  22570. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22571. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22572. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22573. * @return \Illuminate\Database\Eloquent\Builder<static>
  22574. * @static
  22575. */
  22576. public static function whereDoesntHave($relation, $callback = null)
  22577. {
  22578. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22579. return $instance->whereDoesntHave($relation, $callback);
  22580. }
  22581. /**
  22582. * Add a relationship count / exists condition to the query with where clauses and an "or".
  22583. *
  22584. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22585. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22586. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22587. * @return \Illuminate\Database\Eloquent\Builder<static>
  22588. * @static
  22589. */
  22590. public static function orWhereDoesntHave($relation, $callback = null)
  22591. {
  22592. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22593. return $instance->orWhereDoesntHave($relation, $callback);
  22594. }
  22595. /**
  22596. * Add a polymorphic relationship count / exists condition to the query.
  22597. *
  22598. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22599. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22600. * @param string|array<int, string> $types
  22601. * @param string $operator
  22602. * @param int $count
  22603. * @param string $boolean
  22604. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22605. * @return \Illuminate\Database\Eloquent\Builder<static>
  22606. * @static
  22607. */
  22608. public static function hasMorph($relation, $types, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22609. {
  22610. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22611. return $instance->hasMorph($relation, $types, $operator, $count, $boolean, $callback);
  22612. }
  22613. /**
  22614. * Add a polymorphic relationship count / exists condition to the query with an "or".
  22615. *
  22616. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22617. * @param string|array<int, string> $types
  22618. * @param string $operator
  22619. * @param int $count
  22620. * @return \Illuminate\Database\Eloquent\Builder<static>
  22621. * @static
  22622. */
  22623. public static function orHasMorph($relation, $types, $operator = '>=', $count = 1)
  22624. {
  22625. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22626. return $instance->orHasMorph($relation, $types, $operator, $count);
  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 $boolean
  22635. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22636. * @return \Illuminate\Database\Eloquent\Builder<static>
  22637. * @static
  22638. */
  22639. public static function doesntHaveMorph($relation, $types, $boolean = 'and', $callback = null)
  22640. {
  22641. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22642. return $instance->doesntHaveMorph($relation, $types, $boolean, $callback);
  22643. }
  22644. /**
  22645. * Add a polymorphic relationship count / exists condition to the query with an "or".
  22646. *
  22647. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22648. * @param string|array<int, string> $types
  22649. * @return \Illuminate\Database\Eloquent\Builder<static>
  22650. * @static
  22651. */
  22652. public static function orDoesntHaveMorph($relation, $types)
  22653. {
  22654. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22655. return $instance->orDoesntHaveMorph($relation, $types);
  22656. }
  22657. /**
  22658. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  22659. *
  22660. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22661. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22662. * @param string|array<int, string> $types
  22663. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22664. * @param string $operator
  22665. * @param int $count
  22666. * @return \Illuminate\Database\Eloquent\Builder<static>
  22667. * @static
  22668. */
  22669. public static function whereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  22670. {
  22671. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22672. return $instance->whereHasMorph($relation, $types, $callback, $operator, $count);
  22673. }
  22674. /**
  22675. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  22676. *
  22677. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22678. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22679. * @param string|array<int, string> $types
  22680. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22681. * @param string $operator
  22682. * @param int $count
  22683. * @return \Illuminate\Database\Eloquent\Builder<static>
  22684. * @static
  22685. */
  22686. public static function orWhereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  22687. {
  22688. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22689. return $instance->orWhereHasMorph($relation, $types, $callback, $operator, $count);
  22690. }
  22691. /**
  22692. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  22693. *
  22694. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22695. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22696. * @param string|array<int, string> $types
  22697. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22698. * @return \Illuminate\Database\Eloquent\Builder<static>
  22699. * @static
  22700. */
  22701. public static function whereDoesntHaveMorph($relation, $types, $callback = null)
  22702. {
  22703. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22704. return $instance->whereDoesntHaveMorph($relation, $types, $callback);
  22705. }
  22706. /**
  22707. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  22708. *
  22709. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22710. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22711. * @param string|array<int, string> $types
  22712. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22713. * @return \Illuminate\Database\Eloquent\Builder<static>
  22714. * @static
  22715. */
  22716. public static function orWhereDoesntHaveMorph($relation, $types, $callback = null)
  22717. {
  22718. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22719. return $instance->orWhereDoesntHaveMorph($relation, $types, $callback);
  22720. }
  22721. /**
  22722. * Add a basic where clause to a relationship query.
  22723. *
  22724. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22725. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22726. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22727. * @param mixed $operator
  22728. * @param mixed $value
  22729. * @return \Illuminate\Database\Eloquent\Builder<static>
  22730. * @static
  22731. */
  22732. public static function whereRelation($relation, $column, $operator = null, $value = null)
  22733. {
  22734. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22735. return $instance->whereRelation($relation, $column, $operator, $value);
  22736. }
  22737. /**
  22738. * Add a basic where clause to a relationship query and eager-load the relationship with the same conditions.
  22739. *
  22740. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22741. * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22742. * @param mixed $operator
  22743. * @param mixed $value
  22744. * @return \Illuminate\Database\Eloquent\Builder<static>
  22745. * @static
  22746. */
  22747. public static function withWhereRelation($relation, $column, $operator = null, $value = null)
  22748. {
  22749. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22750. return $instance->withWhereRelation($relation, $column, $operator, $value);
  22751. }
  22752. /**
  22753. * Add an "or where" clause to a relationship query.
  22754. *
  22755. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22756. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22757. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22758. * @param mixed $operator
  22759. * @param mixed $value
  22760. * @return \Illuminate\Database\Eloquent\Builder<static>
  22761. * @static
  22762. */
  22763. public static function orWhereRelation($relation, $column, $operator = null, $value = null)
  22764. {
  22765. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22766. return $instance->orWhereRelation($relation, $column, $operator, $value);
  22767. }
  22768. /**
  22769. * Add a basic count / exists condition to a relationship query.
  22770. *
  22771. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22772. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22773. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22774. * @param mixed $operator
  22775. * @param mixed $value
  22776. * @return \Illuminate\Database\Eloquent\Builder<static>
  22777. * @static
  22778. */
  22779. public static function whereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  22780. {
  22781. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22782. return $instance->whereDoesntHaveRelation($relation, $column, $operator, $value);
  22783. }
  22784. /**
  22785. * Add an "or where" clause to a relationship query.
  22786. *
  22787. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22788. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22789. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22790. * @param mixed $operator
  22791. * @param mixed $value
  22792. * @return \Illuminate\Database\Eloquent\Builder<static>
  22793. * @static
  22794. */
  22795. public static function orWhereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  22796. {
  22797. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22798. return $instance->orWhereDoesntHaveRelation($relation, $column, $operator, $value);
  22799. }
  22800. /**
  22801. * Add a polymorphic relationship condition to the query with a where clause.
  22802. *
  22803. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22804. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22805. * @param string|array<int, string> $types
  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 whereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  22813. {
  22814. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22815. return $instance->whereMorphRelation($relation, $types, $column, $operator, $value);
  22816. }
  22817. /**
  22818. * Add a polymorphic relationship condition to the query with an "or where" clause.
  22819. *
  22820. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22821. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22822. * @param string|array<int, string> $types
  22823. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22824. * @param mixed $operator
  22825. * @param mixed $value
  22826. * @return \Illuminate\Database\Eloquent\Builder<static>
  22827. * @static
  22828. */
  22829. public static function orWhereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  22830. {
  22831. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22832. return $instance->orWhereMorphRelation($relation, $types, $column, $operator, $value);
  22833. }
  22834. /**
  22835. * Add a polymorphic relationship condition to the query with a doesn't have clause.
  22836. *
  22837. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22838. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22839. * @param string|array<int, string> $types
  22840. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22841. * @param mixed $operator
  22842. * @param mixed $value
  22843. * @return \Illuminate\Database\Eloquent\Builder<static>
  22844. * @static
  22845. */
  22846. public static function whereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  22847. {
  22848. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22849. return $instance->whereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  22850. }
  22851. /**
  22852. * Add a polymorphic relationship condition to the query with an "or doesn't have" clause.
  22853. *
  22854. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22855. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22856. * @param string|array<int, string> $types
  22857. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22858. * @param mixed $operator
  22859. * @param mixed $value
  22860. * @return \Illuminate\Database\Eloquent\Builder<static>
  22861. * @static
  22862. */
  22863. public static function orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  22864. {
  22865. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22866. return $instance->orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  22867. }
  22868. /**
  22869. * Add a morph-to relationship condition to the query.
  22870. *
  22871. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22872. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  22873. * @return \Illuminate\Database\Eloquent\Builder<static>
  22874. * @static
  22875. */
  22876. public static function whereMorphedTo($relation, $model, $boolean = 'and')
  22877. {
  22878. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22879. return $instance->whereMorphedTo($relation, $model, $boolean);
  22880. }
  22881. /**
  22882. * Add a not morph-to relationship condition to the query.
  22883. *
  22884. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22885. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  22886. * @return \Illuminate\Database\Eloquent\Builder<static>
  22887. * @static
  22888. */
  22889. public static function whereNotMorphedTo($relation, $model, $boolean = 'and')
  22890. {
  22891. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22892. return $instance->whereNotMorphedTo($relation, $model, $boolean);
  22893. }
  22894. /**
  22895. * Add a morph-to relationship condition to the query with an "or where" clause.
  22896. *
  22897. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22898. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  22899. * @return \Illuminate\Database\Eloquent\Builder<static>
  22900. * @static
  22901. */
  22902. public static function orWhereMorphedTo($relation, $model)
  22903. {
  22904. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22905. return $instance->orWhereMorphedTo($relation, $model);
  22906. }
  22907. /**
  22908. * Add a not morph-to relationship condition to the query with an "or where" clause.
  22909. *
  22910. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22911. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  22912. * @return \Illuminate\Database\Eloquent\Builder<static>
  22913. * @static
  22914. */
  22915. public static function orWhereNotMorphedTo($relation, $model)
  22916. {
  22917. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22918. return $instance->orWhereNotMorphedTo($relation, $model);
  22919. }
  22920. /**
  22921. * Add a "belongs to" relationship where clause to the query.
  22922. *
  22923. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  22924. * @param string|null $relationshipName
  22925. * @param string $boolean
  22926. * @return \Illuminate\Database\Eloquent\Builder<static>
  22927. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  22928. * @static
  22929. */
  22930. public static function whereBelongsTo($related, $relationshipName = null, $boolean = 'and')
  22931. {
  22932. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22933. return $instance->whereBelongsTo($related, $relationshipName, $boolean);
  22934. }
  22935. /**
  22936. * Add a "BelongsTo" relationship with an "or where" clause to the query.
  22937. *
  22938. * @param \Illuminate\Database\Eloquent\Model $related
  22939. * @param string|null $relationshipName
  22940. * @return \Illuminate\Database\Eloquent\Builder<static>
  22941. * @throws \RuntimeException
  22942. * @static
  22943. */
  22944. public static function orWhereBelongsTo($related, $relationshipName = null)
  22945. {
  22946. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22947. return $instance->orWhereBelongsTo($related, $relationshipName);
  22948. }
  22949. /**
  22950. * Add a "belongs to many" relationship where clause to the query.
  22951. *
  22952. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  22953. * @param string|null $relationshipName
  22954. * @param string $boolean
  22955. * @return \Illuminate\Database\Eloquent\Builder<static>
  22956. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  22957. * @static
  22958. */
  22959. public static function whereAttachedTo($related, $relationshipName = null, $boolean = 'and')
  22960. {
  22961. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22962. return $instance->whereAttachedTo($related, $relationshipName, $boolean);
  22963. }
  22964. /**
  22965. * Add a "belongs to many" relationship with an "or where" clause to the query.
  22966. *
  22967. * @param \Illuminate\Database\Eloquent\Model $related
  22968. * @param string|null $relationshipName
  22969. * @return \Illuminate\Database\Eloquent\Builder<static>
  22970. * @throws \RuntimeException
  22971. * @static
  22972. */
  22973. public static function orWhereAttachedTo($related, $relationshipName = null)
  22974. {
  22975. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22976. return $instance->orWhereAttachedTo($related, $relationshipName);
  22977. }
  22978. /**
  22979. * Add subselect queries to include an aggregate value for a relationship.
  22980. *
  22981. * @param mixed $relations
  22982. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  22983. * @param string $function
  22984. * @return \Illuminate\Database\Eloquent\Builder<static>
  22985. * @static
  22986. */
  22987. public static function withAggregate($relations, $column, $function = null)
  22988. {
  22989. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22990. return $instance->withAggregate($relations, $column, $function);
  22991. }
  22992. /**
  22993. * Add subselect queries to count the relations.
  22994. *
  22995. * @param mixed $relations
  22996. * @return \Illuminate\Database\Eloquent\Builder<static>
  22997. * @static
  22998. */
  22999. public static function withCount($relations)
  23000. {
  23001. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23002. return $instance->withCount($relations);
  23003. }
  23004. /**
  23005. * Add subselect queries to include the max of the relation's column.
  23006. *
  23007. * @param string|array $relation
  23008. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23009. * @return \Illuminate\Database\Eloquent\Builder<static>
  23010. * @static
  23011. */
  23012. public static function withMax($relation, $column)
  23013. {
  23014. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23015. return $instance->withMax($relation, $column);
  23016. }
  23017. /**
  23018. * Add subselect queries to include the min of the relation's column.
  23019. *
  23020. * @param string|array $relation
  23021. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23022. * @return \Illuminate\Database\Eloquent\Builder<static>
  23023. * @static
  23024. */
  23025. public static function withMin($relation, $column)
  23026. {
  23027. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23028. return $instance->withMin($relation, $column);
  23029. }
  23030. /**
  23031. * Add subselect queries to include the sum of the relation's column.
  23032. *
  23033. * @param string|array $relation
  23034. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23035. * @return \Illuminate\Database\Eloquent\Builder<static>
  23036. * @static
  23037. */
  23038. public static function withSum($relation, $column)
  23039. {
  23040. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23041. return $instance->withSum($relation, $column);
  23042. }
  23043. /**
  23044. * Add subselect queries to include the average of the relation's column.
  23045. *
  23046. * @param string|array $relation
  23047. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23048. * @return \Illuminate\Database\Eloquent\Builder<static>
  23049. * @static
  23050. */
  23051. public static function withAvg($relation, $column)
  23052. {
  23053. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23054. return $instance->withAvg($relation, $column);
  23055. }
  23056. /**
  23057. * Add subselect queries to include the existence of related models.
  23058. *
  23059. * @param string|array $relation
  23060. * @return \Illuminate\Database\Eloquent\Builder<static>
  23061. * @static
  23062. */
  23063. public static function withExists($relation)
  23064. {
  23065. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23066. return $instance->withExists($relation);
  23067. }
  23068. /**
  23069. * Merge the where constraints from another query to the current query.
  23070. *
  23071. * @param \Illuminate\Database\Eloquent\Builder<*> $from
  23072. * @return \Illuminate\Database\Eloquent\Builder<static>
  23073. * @static
  23074. */
  23075. public static function mergeConstraintsFrom($from)
  23076. {
  23077. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23078. return $instance->mergeConstraintsFrom($from);
  23079. }
  23080. /**
  23081. * Set the columns to be selected.
  23082. *
  23083. * @param mixed $columns
  23084. * @return \Illuminate\Database\Eloquent\Builder<static>
  23085. * @static
  23086. */
  23087. public static function select($columns = [])
  23088. {
  23089. /** @var \Illuminate\Database\Query\Builder $instance */
  23090. return $instance->select($columns);
  23091. }
  23092. /**
  23093. * Add a subselect expression to the query.
  23094. *
  23095. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23096. * @param string $as
  23097. * @return \Illuminate\Database\Eloquent\Builder<static>
  23098. * @throws \InvalidArgumentException
  23099. * @static
  23100. */
  23101. public static function selectSub($query, $as)
  23102. {
  23103. /** @var \Illuminate\Database\Query\Builder $instance */
  23104. return $instance->selectSub($query, $as);
  23105. }
  23106. /**
  23107. * Add a new "raw" select expression to the query.
  23108. *
  23109. * @param string $expression
  23110. * @return \Illuminate\Database\Eloquent\Builder<static>
  23111. * @static
  23112. */
  23113. public static function selectRaw($expression, $bindings = [])
  23114. {
  23115. /** @var \Illuminate\Database\Query\Builder $instance */
  23116. return $instance->selectRaw($expression, $bindings);
  23117. }
  23118. /**
  23119. * Makes "from" fetch from a subquery.
  23120. *
  23121. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23122. * @param string $as
  23123. * @return \Illuminate\Database\Eloquent\Builder<static>
  23124. * @throws \InvalidArgumentException
  23125. * @static
  23126. */
  23127. public static function fromSub($query, $as)
  23128. {
  23129. /** @var \Illuminate\Database\Query\Builder $instance */
  23130. return $instance->fromSub($query, $as);
  23131. }
  23132. /**
  23133. * Add a raw from clause to the query.
  23134. *
  23135. * @param string $expression
  23136. * @param mixed $bindings
  23137. * @return \Illuminate\Database\Eloquent\Builder<static>
  23138. * @static
  23139. */
  23140. public static function fromRaw($expression, $bindings = [])
  23141. {
  23142. /** @var \Illuminate\Database\Query\Builder $instance */
  23143. return $instance->fromRaw($expression, $bindings);
  23144. }
  23145. /**
  23146. * Add a new select column to the query.
  23147. *
  23148. * @param mixed $column
  23149. * @return \Illuminate\Database\Eloquent\Builder<static>
  23150. * @static
  23151. */
  23152. public static function addSelect($column)
  23153. {
  23154. /** @var \Illuminate\Database\Query\Builder $instance */
  23155. return $instance->addSelect($column);
  23156. }
  23157. /**
  23158. * Force the query to only return distinct results.
  23159. *
  23160. * @return \Illuminate\Database\Eloquent\Builder<static>
  23161. * @static
  23162. */
  23163. public static function distinct()
  23164. {
  23165. /** @var \Illuminate\Database\Query\Builder $instance */
  23166. return $instance->distinct();
  23167. }
  23168. /**
  23169. * Set the table which the query is targeting.
  23170. *
  23171. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $table
  23172. * @param string|null $as
  23173. * @return \Illuminate\Database\Eloquent\Builder<static>
  23174. * @static
  23175. */
  23176. public static function from($table, $as = null)
  23177. {
  23178. /** @var \Illuminate\Database\Query\Builder $instance */
  23179. return $instance->from($table, $as);
  23180. }
  23181. /**
  23182. * Add an index hint to suggest a query index.
  23183. *
  23184. * @param string $index
  23185. * @return \Illuminate\Database\Eloquent\Builder<static>
  23186. * @static
  23187. */
  23188. public static function useIndex($index)
  23189. {
  23190. /** @var \Illuminate\Database\Query\Builder $instance */
  23191. return $instance->useIndex($index);
  23192. }
  23193. /**
  23194. * Add an index hint to force a query index.
  23195. *
  23196. * @param string $index
  23197. * @return \Illuminate\Database\Eloquent\Builder<static>
  23198. * @static
  23199. */
  23200. public static function forceIndex($index)
  23201. {
  23202. /** @var \Illuminate\Database\Query\Builder $instance */
  23203. return $instance->forceIndex($index);
  23204. }
  23205. /**
  23206. * Add an index hint to ignore a query index.
  23207. *
  23208. * @param string $index
  23209. * @return \Illuminate\Database\Eloquent\Builder<static>
  23210. * @static
  23211. */
  23212. public static function ignoreIndex($index)
  23213. {
  23214. /** @var \Illuminate\Database\Query\Builder $instance */
  23215. return $instance->ignoreIndex($index);
  23216. }
  23217. /**
  23218. * Add a join clause to the query.
  23219. *
  23220. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23221. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23222. * @param string|null $operator
  23223. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23224. * @param string $type
  23225. * @param bool $where
  23226. * @return \Illuminate\Database\Eloquent\Builder<static>
  23227. * @static
  23228. */
  23229. public static function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23230. {
  23231. /** @var \Illuminate\Database\Query\Builder $instance */
  23232. return $instance->join($table, $first, $operator, $second, $type, $where);
  23233. }
  23234. /**
  23235. * Add a "join where" clause to the query.
  23236. *
  23237. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23238. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23239. * @param string $operator
  23240. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23241. * @param string $type
  23242. * @return \Illuminate\Database\Eloquent\Builder<static>
  23243. * @static
  23244. */
  23245. public static function joinWhere($table, $first, $operator, $second, $type = 'inner')
  23246. {
  23247. /** @var \Illuminate\Database\Query\Builder $instance */
  23248. return $instance->joinWhere($table, $first, $operator, $second, $type);
  23249. }
  23250. /**
  23251. * Add a subquery join clause to the query.
  23252. *
  23253. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23254. * @param string $as
  23255. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23256. * @param string|null $operator
  23257. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23258. * @param string $type
  23259. * @param bool $where
  23260. * @return \Illuminate\Database\Eloquent\Builder<static>
  23261. * @throws \InvalidArgumentException
  23262. * @static
  23263. */
  23264. public static function joinSub($query, $as, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23265. {
  23266. /** @var \Illuminate\Database\Query\Builder $instance */
  23267. return $instance->joinSub($query, $as, $first, $operator, $second, $type, $where);
  23268. }
  23269. /**
  23270. * Add a lateral join clause to the query.
  23271. *
  23272. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23273. * @return \Illuminate\Database\Eloquent\Builder<static>
  23274. * @static
  23275. */
  23276. public static function joinLateral($query, $as, $type = 'inner')
  23277. {
  23278. /** @var \Illuminate\Database\Query\Builder $instance */
  23279. return $instance->joinLateral($query, $as, $type);
  23280. }
  23281. /**
  23282. * Add a lateral left join to the query.
  23283. *
  23284. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23285. * @return \Illuminate\Database\Eloquent\Builder<static>
  23286. * @static
  23287. */
  23288. public static function leftJoinLateral($query, $as)
  23289. {
  23290. /** @var \Illuminate\Database\Query\Builder $instance */
  23291. return $instance->leftJoinLateral($query, $as);
  23292. }
  23293. /**
  23294. * Add a left join to the query.
  23295. *
  23296. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23297. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23298. * @param string|null $operator
  23299. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23300. * @return \Illuminate\Database\Eloquent\Builder<static>
  23301. * @static
  23302. */
  23303. public static function leftJoin($table, $first, $operator = null, $second = null)
  23304. {
  23305. /** @var \Illuminate\Database\Query\Builder $instance */
  23306. return $instance->leftJoin($table, $first, $operator, $second);
  23307. }
  23308. /**
  23309. * Add a "join where" clause to the query.
  23310. *
  23311. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23312. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23313. * @param string $operator
  23314. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23315. * @return \Illuminate\Database\Eloquent\Builder<static>
  23316. * @static
  23317. */
  23318. public static function leftJoinWhere($table, $first, $operator, $second)
  23319. {
  23320. /** @var \Illuminate\Database\Query\Builder $instance */
  23321. return $instance->leftJoinWhere($table, $first, $operator, $second);
  23322. }
  23323. /**
  23324. * Add a subquery left join to the query.
  23325. *
  23326. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23327. * @param string $as
  23328. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23329. * @param string|null $operator
  23330. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23331. * @return \Illuminate\Database\Eloquent\Builder<static>
  23332. * @static
  23333. */
  23334. public static function leftJoinSub($query, $as, $first, $operator = null, $second = null)
  23335. {
  23336. /** @var \Illuminate\Database\Query\Builder $instance */
  23337. return $instance->leftJoinSub($query, $as, $first, $operator, $second);
  23338. }
  23339. /**
  23340. * Add a right join to the query.
  23341. *
  23342. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23343. * @param \Closure|string $first
  23344. * @param string|null $operator
  23345. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23346. * @return \Illuminate\Database\Eloquent\Builder<static>
  23347. * @static
  23348. */
  23349. public static function rightJoin($table, $first, $operator = null, $second = null)
  23350. {
  23351. /** @var \Illuminate\Database\Query\Builder $instance */
  23352. return $instance->rightJoin($table, $first, $operator, $second);
  23353. }
  23354. /**
  23355. * Add a "right join where" clause to the query.
  23356. *
  23357. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23358. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23359. * @param string $operator
  23360. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23361. * @return \Illuminate\Database\Eloquent\Builder<static>
  23362. * @static
  23363. */
  23364. public static function rightJoinWhere($table, $first, $operator, $second)
  23365. {
  23366. /** @var \Illuminate\Database\Query\Builder $instance */
  23367. return $instance->rightJoinWhere($table, $first, $operator, $second);
  23368. }
  23369. /**
  23370. * Add a subquery right join to the query.
  23371. *
  23372. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23373. * @param string $as
  23374. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23375. * @param string|null $operator
  23376. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23377. * @return \Illuminate\Database\Eloquent\Builder<static>
  23378. * @static
  23379. */
  23380. public static function rightJoinSub($query, $as, $first, $operator = null, $second = null)
  23381. {
  23382. /** @var \Illuminate\Database\Query\Builder $instance */
  23383. return $instance->rightJoinSub($query, $as, $first, $operator, $second);
  23384. }
  23385. /**
  23386. * Add a "cross join" clause to the query.
  23387. *
  23388. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23389. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string|null $first
  23390. * @param string|null $operator
  23391. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23392. * @return \Illuminate\Database\Eloquent\Builder<static>
  23393. * @static
  23394. */
  23395. public static function crossJoin($table, $first = null, $operator = null, $second = null)
  23396. {
  23397. /** @var \Illuminate\Database\Query\Builder $instance */
  23398. return $instance->crossJoin($table, $first, $operator, $second);
  23399. }
  23400. /**
  23401. * Add a subquery cross join to the query.
  23402. *
  23403. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23404. * @param string $as
  23405. * @return \Illuminate\Database\Eloquent\Builder<static>
  23406. * @static
  23407. */
  23408. public static function crossJoinSub($query, $as)
  23409. {
  23410. /** @var \Illuminate\Database\Query\Builder $instance */
  23411. return $instance->crossJoinSub($query, $as);
  23412. }
  23413. /**
  23414. * Merge an array of where clauses and bindings.
  23415. *
  23416. * @param array $wheres
  23417. * @param array $bindings
  23418. * @return \Illuminate\Database\Eloquent\Builder<static>
  23419. * @static
  23420. */
  23421. public static function mergeWheres($wheres, $bindings)
  23422. {
  23423. /** @var \Illuminate\Database\Query\Builder $instance */
  23424. return $instance->mergeWheres($wheres, $bindings);
  23425. }
  23426. /**
  23427. * Prepare the value and operator for a where clause.
  23428. *
  23429. * @param string $value
  23430. * @param string $operator
  23431. * @param bool $useDefault
  23432. * @return array
  23433. * @throws \InvalidArgumentException
  23434. * @static
  23435. */
  23436. public static function prepareValueAndOperator($value, $operator, $useDefault = false)
  23437. {
  23438. /** @var \Illuminate\Database\Query\Builder $instance */
  23439. return $instance->prepareValueAndOperator($value, $operator, $useDefault);
  23440. }
  23441. /**
  23442. * Add a "where" clause comparing two columns to the query.
  23443. *
  23444. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23445. * @param string|null $operator
  23446. * @param string|null $second
  23447. * @param string|null $boolean
  23448. * @return \Illuminate\Database\Eloquent\Builder<static>
  23449. * @static
  23450. */
  23451. public static function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
  23452. {
  23453. /** @var \Illuminate\Database\Query\Builder $instance */
  23454. return $instance->whereColumn($first, $operator, $second, $boolean);
  23455. }
  23456. /**
  23457. * Add an "or where" clause comparing two columns to the query.
  23458. *
  23459. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23460. * @param string|null $operator
  23461. * @param string|null $second
  23462. * @return \Illuminate\Database\Eloquent\Builder<static>
  23463. * @static
  23464. */
  23465. public static function orWhereColumn($first, $operator = null, $second = null)
  23466. {
  23467. /** @var \Illuminate\Database\Query\Builder $instance */
  23468. return $instance->orWhereColumn($first, $operator, $second);
  23469. }
  23470. /**
  23471. * Add a raw where clause to the query.
  23472. *
  23473. * @param \Illuminate\Contracts\Database\Query\Expression|string $sql
  23474. * @param mixed $bindings
  23475. * @param string $boolean
  23476. * @return \Illuminate\Database\Eloquent\Builder<static>
  23477. * @static
  23478. */
  23479. public static function whereRaw($sql, $bindings = [], $boolean = 'and')
  23480. {
  23481. /** @var \Illuminate\Database\Query\Builder $instance */
  23482. return $instance->whereRaw($sql, $bindings, $boolean);
  23483. }
  23484. /**
  23485. * Add a raw or where clause to the query.
  23486. *
  23487. * @param string $sql
  23488. * @param mixed $bindings
  23489. * @return \Illuminate\Database\Eloquent\Builder<static>
  23490. * @static
  23491. */
  23492. public static function orWhereRaw($sql, $bindings = [])
  23493. {
  23494. /** @var \Illuminate\Database\Query\Builder $instance */
  23495. return $instance->orWhereRaw($sql, $bindings);
  23496. }
  23497. /**
  23498. * Add a "where like" clause to the query.
  23499. *
  23500. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23501. * @param string $value
  23502. * @param bool $caseSensitive
  23503. * @param string $boolean
  23504. * @param bool $not
  23505. * @return \Illuminate\Database\Eloquent\Builder<static>
  23506. * @static
  23507. */
  23508. public static function whereLike($column, $value, $caseSensitive = false, $boolean = 'and', $not = false)
  23509. {
  23510. /** @var \Illuminate\Database\Query\Builder $instance */
  23511. return $instance->whereLike($column, $value, $caseSensitive, $boolean, $not);
  23512. }
  23513. /**
  23514. * Add an "or where like" clause to the query.
  23515. *
  23516. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23517. * @param string $value
  23518. * @param bool $caseSensitive
  23519. * @return \Illuminate\Database\Eloquent\Builder<static>
  23520. * @static
  23521. */
  23522. public static function orWhereLike($column, $value, $caseSensitive = false)
  23523. {
  23524. /** @var \Illuminate\Database\Query\Builder $instance */
  23525. return $instance->orWhereLike($column, $value, $caseSensitive);
  23526. }
  23527. /**
  23528. * Add a "where not like" clause to the query.
  23529. *
  23530. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23531. * @param string $value
  23532. * @param bool $caseSensitive
  23533. * @param string $boolean
  23534. * @return \Illuminate\Database\Eloquent\Builder<static>
  23535. * @static
  23536. */
  23537. public static function whereNotLike($column, $value, $caseSensitive = false, $boolean = 'and')
  23538. {
  23539. /** @var \Illuminate\Database\Query\Builder $instance */
  23540. return $instance->whereNotLike($column, $value, $caseSensitive, $boolean);
  23541. }
  23542. /**
  23543. * Add an "or where not like" clause to the query.
  23544. *
  23545. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23546. * @param string $value
  23547. * @param bool $caseSensitive
  23548. * @return \Illuminate\Database\Eloquent\Builder<static>
  23549. * @static
  23550. */
  23551. public static function orWhereNotLike($column, $value, $caseSensitive = false)
  23552. {
  23553. /** @var \Illuminate\Database\Query\Builder $instance */
  23554. return $instance->orWhereNotLike($column, $value, $caseSensitive);
  23555. }
  23556. /**
  23557. * Add a "where in" clause to the query.
  23558. *
  23559. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23560. * @param mixed $values
  23561. * @param string $boolean
  23562. * @param bool $not
  23563. * @return \Illuminate\Database\Eloquent\Builder<static>
  23564. * @static
  23565. */
  23566. public static function whereIn($column, $values, $boolean = 'and', $not = false)
  23567. {
  23568. /** @var \Illuminate\Database\Query\Builder $instance */
  23569. return $instance->whereIn($column, $values, $boolean, $not);
  23570. }
  23571. /**
  23572. * Add an "or where in" clause to the query.
  23573. *
  23574. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23575. * @param mixed $values
  23576. * @return \Illuminate\Database\Eloquent\Builder<static>
  23577. * @static
  23578. */
  23579. public static function orWhereIn($column, $values)
  23580. {
  23581. /** @var \Illuminate\Database\Query\Builder $instance */
  23582. return $instance->orWhereIn($column, $values);
  23583. }
  23584. /**
  23585. * Add a "where not in" clause to the query.
  23586. *
  23587. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23588. * @param mixed $values
  23589. * @param string $boolean
  23590. * @return \Illuminate\Database\Eloquent\Builder<static>
  23591. * @static
  23592. */
  23593. public static function whereNotIn($column, $values, $boolean = 'and')
  23594. {
  23595. /** @var \Illuminate\Database\Query\Builder $instance */
  23596. return $instance->whereNotIn($column, $values, $boolean);
  23597. }
  23598. /**
  23599. * Add an "or where not in" clause to the query.
  23600. *
  23601. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23602. * @param mixed $values
  23603. * @return \Illuminate\Database\Eloquent\Builder<static>
  23604. * @static
  23605. */
  23606. public static function orWhereNotIn($column, $values)
  23607. {
  23608. /** @var \Illuminate\Database\Query\Builder $instance */
  23609. return $instance->orWhereNotIn($column, $values);
  23610. }
  23611. /**
  23612. * Add a "where in raw" clause for integer values to the query.
  23613. *
  23614. * @param string $column
  23615. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23616. * @param string $boolean
  23617. * @param bool $not
  23618. * @return \Illuminate\Database\Eloquent\Builder<static>
  23619. * @static
  23620. */
  23621. public static function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false)
  23622. {
  23623. /** @var \Illuminate\Database\Query\Builder $instance */
  23624. return $instance->whereIntegerInRaw($column, $values, $boolean, $not);
  23625. }
  23626. /**
  23627. * Add an "or where in raw" clause for integer values to the query.
  23628. *
  23629. * @param string $column
  23630. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23631. * @return \Illuminate\Database\Eloquent\Builder<static>
  23632. * @static
  23633. */
  23634. public static function orWhereIntegerInRaw($column, $values)
  23635. {
  23636. /** @var \Illuminate\Database\Query\Builder $instance */
  23637. return $instance->orWhereIntegerInRaw($column, $values);
  23638. }
  23639. /**
  23640. * Add a "where not in raw" clause for integer values to the query.
  23641. *
  23642. * @param string $column
  23643. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23644. * @param string $boolean
  23645. * @return \Illuminate\Database\Eloquent\Builder<static>
  23646. * @static
  23647. */
  23648. public static function whereIntegerNotInRaw($column, $values, $boolean = 'and')
  23649. {
  23650. /** @var \Illuminate\Database\Query\Builder $instance */
  23651. return $instance->whereIntegerNotInRaw($column, $values, $boolean);
  23652. }
  23653. /**
  23654. * Add an "or where not in raw" clause for integer values to the query.
  23655. *
  23656. * @param string $column
  23657. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23658. * @return \Illuminate\Database\Eloquent\Builder<static>
  23659. * @static
  23660. */
  23661. public static function orWhereIntegerNotInRaw($column, $values)
  23662. {
  23663. /** @var \Illuminate\Database\Query\Builder $instance */
  23664. return $instance->orWhereIntegerNotInRaw($column, $values);
  23665. }
  23666. /**
  23667. * Add a "where null" clause to the query.
  23668. *
  23669. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  23670. * @param string $boolean
  23671. * @param bool $not
  23672. * @return \Illuminate\Database\Eloquent\Builder<static>
  23673. * @static
  23674. */
  23675. public static function whereNull($columns, $boolean = 'and', $not = false)
  23676. {
  23677. /** @var \Illuminate\Database\Query\Builder $instance */
  23678. return $instance->whereNull($columns, $boolean, $not);
  23679. }
  23680. /**
  23681. * Add an "or where null" clause to the query.
  23682. *
  23683. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23684. * @return \Illuminate\Database\Eloquent\Builder<static>
  23685. * @static
  23686. */
  23687. public static function orWhereNull($column)
  23688. {
  23689. /** @var \Illuminate\Database\Query\Builder $instance */
  23690. return $instance->orWhereNull($column);
  23691. }
  23692. /**
  23693. * Add a "where not null" clause to the query.
  23694. *
  23695. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  23696. * @param string $boolean
  23697. * @return \Illuminate\Database\Eloquent\Builder<static>
  23698. * @static
  23699. */
  23700. public static function whereNotNull($columns, $boolean = 'and')
  23701. {
  23702. /** @var \Illuminate\Database\Query\Builder $instance */
  23703. return $instance->whereNotNull($columns, $boolean);
  23704. }
  23705. /**
  23706. * Add a where between statement to the query.
  23707. *
  23708. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23709. * @param string $boolean
  23710. * @param bool $not
  23711. * @return \Illuminate\Database\Eloquent\Builder<static>
  23712. * @static
  23713. */
  23714. public static function whereBetween($column, $values, $boolean = 'and', $not = false)
  23715. {
  23716. /** @var \Illuminate\Database\Query\Builder $instance */
  23717. return $instance->whereBetween($column, $values, $boolean, $not);
  23718. }
  23719. /**
  23720. * Add a where between statement using columns to the query.
  23721. *
  23722. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23723. * @param string $boolean
  23724. * @param bool $not
  23725. * @return \Illuminate\Database\Eloquent\Builder<static>
  23726. * @static
  23727. */
  23728. public static function whereBetweenColumns($column, $values, $boolean = 'and', $not = false)
  23729. {
  23730. /** @var \Illuminate\Database\Query\Builder $instance */
  23731. return $instance->whereBetweenColumns($column, $values, $boolean, $not);
  23732. }
  23733. /**
  23734. * Add an or where between statement to the query.
  23735. *
  23736. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23737. * @return \Illuminate\Database\Eloquent\Builder<static>
  23738. * @static
  23739. */
  23740. public static function orWhereBetween($column, $values)
  23741. {
  23742. /** @var \Illuminate\Database\Query\Builder $instance */
  23743. return $instance->orWhereBetween($column, $values);
  23744. }
  23745. /**
  23746. * Add an or where between statement using columns to the query.
  23747. *
  23748. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23749. * @return \Illuminate\Database\Eloquent\Builder<static>
  23750. * @static
  23751. */
  23752. public static function orWhereBetweenColumns($column, $values)
  23753. {
  23754. /** @var \Illuminate\Database\Query\Builder $instance */
  23755. return $instance->orWhereBetweenColumns($column, $values);
  23756. }
  23757. /**
  23758. * Add a where not between statement to the query.
  23759. *
  23760. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23761. * @param string $boolean
  23762. * @return \Illuminate\Database\Eloquent\Builder<static>
  23763. * @static
  23764. */
  23765. public static function whereNotBetween($column, $values, $boolean = 'and')
  23766. {
  23767. /** @var \Illuminate\Database\Query\Builder $instance */
  23768. return $instance->whereNotBetween($column, $values, $boolean);
  23769. }
  23770. /**
  23771. * Add a where not between statement using columns to the query.
  23772. *
  23773. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23774. * @param string $boolean
  23775. * @return \Illuminate\Database\Eloquent\Builder<static>
  23776. * @static
  23777. */
  23778. public static function whereNotBetweenColumns($column, $values, $boolean = 'and')
  23779. {
  23780. /** @var \Illuminate\Database\Query\Builder $instance */
  23781. return $instance->whereNotBetweenColumns($column, $values, $boolean);
  23782. }
  23783. /**
  23784. * Add an or where not between statement to the query.
  23785. *
  23786. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23787. * @return \Illuminate\Database\Eloquent\Builder<static>
  23788. * @static
  23789. */
  23790. public static function orWhereNotBetween($column, $values)
  23791. {
  23792. /** @var \Illuminate\Database\Query\Builder $instance */
  23793. return $instance->orWhereNotBetween($column, $values);
  23794. }
  23795. /**
  23796. * Add an or where not between statement using columns to the query.
  23797. *
  23798. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23799. * @return \Illuminate\Database\Eloquent\Builder<static>
  23800. * @static
  23801. */
  23802. public static function orWhereNotBetweenColumns($column, $values)
  23803. {
  23804. /** @var \Illuminate\Database\Query\Builder $instance */
  23805. return $instance->orWhereNotBetweenColumns($column, $values);
  23806. }
  23807. /**
  23808. * Add an "or where not null" clause to the query.
  23809. *
  23810. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23811. * @return \Illuminate\Database\Eloquent\Builder<static>
  23812. * @static
  23813. */
  23814. public static function orWhereNotNull($column)
  23815. {
  23816. /** @var \Illuminate\Database\Query\Builder $instance */
  23817. return $instance->orWhereNotNull($column);
  23818. }
  23819. /**
  23820. * Add a "where date" statement to the query.
  23821. *
  23822. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23823. * @param \DateTimeInterface|string|null $operator
  23824. * @param \DateTimeInterface|string|null $value
  23825. * @param string $boolean
  23826. * @return \Illuminate\Database\Eloquent\Builder<static>
  23827. * @static
  23828. */
  23829. public static function whereDate($column, $operator, $value = null, $boolean = 'and')
  23830. {
  23831. /** @var \Illuminate\Database\Query\Builder $instance */
  23832. return $instance->whereDate($column, $operator, $value, $boolean);
  23833. }
  23834. /**
  23835. * Add an "or where date" statement to the query.
  23836. *
  23837. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23838. * @param \DateTimeInterface|string|null $operator
  23839. * @param \DateTimeInterface|string|null $value
  23840. * @return \Illuminate\Database\Eloquent\Builder<static>
  23841. * @static
  23842. */
  23843. public static function orWhereDate($column, $operator, $value = null)
  23844. {
  23845. /** @var \Illuminate\Database\Query\Builder $instance */
  23846. return $instance->orWhereDate($column, $operator, $value);
  23847. }
  23848. /**
  23849. * Add a "where time" statement to the query.
  23850. *
  23851. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23852. * @param \DateTimeInterface|string|null $operator
  23853. * @param \DateTimeInterface|string|null $value
  23854. * @param string $boolean
  23855. * @return \Illuminate\Database\Eloquent\Builder<static>
  23856. * @static
  23857. */
  23858. public static function whereTime($column, $operator, $value = null, $boolean = 'and')
  23859. {
  23860. /** @var \Illuminate\Database\Query\Builder $instance */
  23861. return $instance->whereTime($column, $operator, $value, $boolean);
  23862. }
  23863. /**
  23864. * Add an "or where time" statement to the query.
  23865. *
  23866. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23867. * @param \DateTimeInterface|string|null $operator
  23868. * @param \DateTimeInterface|string|null $value
  23869. * @return \Illuminate\Database\Eloquent\Builder<static>
  23870. * @static
  23871. */
  23872. public static function orWhereTime($column, $operator, $value = null)
  23873. {
  23874. /** @var \Illuminate\Database\Query\Builder $instance */
  23875. return $instance->orWhereTime($column, $operator, $value);
  23876. }
  23877. /**
  23878. * Add a "where day" statement to the query.
  23879. *
  23880. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23881. * @param \DateTimeInterface|string|int|null $operator
  23882. * @param \DateTimeInterface|string|int|null $value
  23883. * @param string $boolean
  23884. * @return \Illuminate\Database\Eloquent\Builder<static>
  23885. * @static
  23886. */
  23887. public static function whereDay($column, $operator, $value = null, $boolean = 'and')
  23888. {
  23889. /** @var \Illuminate\Database\Query\Builder $instance */
  23890. return $instance->whereDay($column, $operator, $value, $boolean);
  23891. }
  23892. /**
  23893. * Add an "or where day" statement to the query.
  23894. *
  23895. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23896. * @param \DateTimeInterface|string|int|null $operator
  23897. * @param \DateTimeInterface|string|int|null $value
  23898. * @return \Illuminate\Database\Eloquent\Builder<static>
  23899. * @static
  23900. */
  23901. public static function orWhereDay($column, $operator, $value = null)
  23902. {
  23903. /** @var \Illuminate\Database\Query\Builder $instance */
  23904. return $instance->orWhereDay($column, $operator, $value);
  23905. }
  23906. /**
  23907. * Add a "where month" statement to the query.
  23908. *
  23909. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23910. * @param \DateTimeInterface|string|int|null $operator
  23911. * @param \DateTimeInterface|string|int|null $value
  23912. * @param string $boolean
  23913. * @return \Illuminate\Database\Eloquent\Builder<static>
  23914. * @static
  23915. */
  23916. public static function whereMonth($column, $operator, $value = null, $boolean = 'and')
  23917. {
  23918. /** @var \Illuminate\Database\Query\Builder $instance */
  23919. return $instance->whereMonth($column, $operator, $value, $boolean);
  23920. }
  23921. /**
  23922. * Add an "or where month" statement to the query.
  23923. *
  23924. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23925. * @param \DateTimeInterface|string|int|null $operator
  23926. * @param \DateTimeInterface|string|int|null $value
  23927. * @return \Illuminate\Database\Eloquent\Builder<static>
  23928. * @static
  23929. */
  23930. public static function orWhereMonth($column, $operator, $value = null)
  23931. {
  23932. /** @var \Illuminate\Database\Query\Builder $instance */
  23933. return $instance->orWhereMonth($column, $operator, $value);
  23934. }
  23935. /**
  23936. * Add a "where year" statement to the query.
  23937. *
  23938. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23939. * @param \DateTimeInterface|string|int|null $operator
  23940. * @param \DateTimeInterface|string|int|null $value
  23941. * @param string $boolean
  23942. * @return \Illuminate\Database\Eloquent\Builder<static>
  23943. * @static
  23944. */
  23945. public static function whereYear($column, $operator, $value = null, $boolean = 'and')
  23946. {
  23947. /** @var \Illuminate\Database\Query\Builder $instance */
  23948. return $instance->whereYear($column, $operator, $value, $boolean);
  23949. }
  23950. /**
  23951. * Add an "or where year" statement to the query.
  23952. *
  23953. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23954. * @param \DateTimeInterface|string|int|null $operator
  23955. * @param \DateTimeInterface|string|int|null $value
  23956. * @return \Illuminate\Database\Eloquent\Builder<static>
  23957. * @static
  23958. */
  23959. public static function orWhereYear($column, $operator, $value = null)
  23960. {
  23961. /** @var \Illuminate\Database\Query\Builder $instance */
  23962. return $instance->orWhereYear($column, $operator, $value);
  23963. }
  23964. /**
  23965. * Add a nested where statement to the query.
  23966. *
  23967. * @param string $boolean
  23968. * @return \Illuminate\Database\Eloquent\Builder<static>
  23969. * @static
  23970. */
  23971. public static function whereNested($callback, $boolean = 'and')
  23972. {
  23973. /** @var \Illuminate\Database\Query\Builder $instance */
  23974. return $instance->whereNested($callback, $boolean);
  23975. }
  23976. /**
  23977. * Create a new query instance for nested where condition.
  23978. *
  23979. * @return \Illuminate\Database\Query\Builder
  23980. * @static
  23981. */
  23982. public static function forNestedWhere()
  23983. {
  23984. /** @var \Illuminate\Database\Query\Builder $instance */
  23985. return $instance->forNestedWhere();
  23986. }
  23987. /**
  23988. * Add another query builder as a nested where to the query builder.
  23989. *
  23990. * @param \Illuminate\Database\Query\Builder $query
  23991. * @param string $boolean
  23992. * @return \Illuminate\Database\Eloquent\Builder<static>
  23993. * @static
  23994. */
  23995. public static function addNestedWhereQuery($query, $boolean = 'and')
  23996. {
  23997. /** @var \Illuminate\Database\Query\Builder $instance */
  23998. return $instance->addNestedWhereQuery($query, $boolean);
  23999. }
  24000. /**
  24001. * Add an exists clause to the query.
  24002. *
  24003. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24004. * @param string $boolean
  24005. * @param bool $not
  24006. * @return \Illuminate\Database\Eloquent\Builder<static>
  24007. * @static
  24008. */
  24009. public static function whereExists($callback, $boolean = 'and', $not = false)
  24010. {
  24011. /** @var \Illuminate\Database\Query\Builder $instance */
  24012. return $instance->whereExists($callback, $boolean, $not);
  24013. }
  24014. /**
  24015. * Add an or exists clause to the query.
  24016. *
  24017. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24018. * @param bool $not
  24019. * @return \Illuminate\Database\Eloquent\Builder<static>
  24020. * @static
  24021. */
  24022. public static function orWhereExists($callback, $not = false)
  24023. {
  24024. /** @var \Illuminate\Database\Query\Builder $instance */
  24025. return $instance->orWhereExists($callback, $not);
  24026. }
  24027. /**
  24028. * Add a where not exists clause to the query.
  24029. *
  24030. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24031. * @param string $boolean
  24032. * @return \Illuminate\Database\Eloquent\Builder<static>
  24033. * @static
  24034. */
  24035. public static function whereNotExists($callback, $boolean = 'and')
  24036. {
  24037. /** @var \Illuminate\Database\Query\Builder $instance */
  24038. return $instance->whereNotExists($callback, $boolean);
  24039. }
  24040. /**
  24041. * Add a where not exists clause to the query.
  24042. *
  24043. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24044. * @return \Illuminate\Database\Eloquent\Builder<static>
  24045. * @static
  24046. */
  24047. public static function orWhereNotExists($callback)
  24048. {
  24049. /** @var \Illuminate\Database\Query\Builder $instance */
  24050. return $instance->orWhereNotExists($callback);
  24051. }
  24052. /**
  24053. * Add an exists clause to the query.
  24054. *
  24055. * @param string $boolean
  24056. * @param bool $not
  24057. * @return \Illuminate\Database\Eloquent\Builder<static>
  24058. * @static
  24059. */
  24060. public static function addWhereExistsQuery($query, $boolean = 'and', $not = false)
  24061. {
  24062. /** @var \Illuminate\Database\Query\Builder $instance */
  24063. return $instance->addWhereExistsQuery($query, $boolean, $not);
  24064. }
  24065. /**
  24066. * Adds a where condition using row values.
  24067. *
  24068. * @param array $columns
  24069. * @param string $operator
  24070. * @param array $values
  24071. * @param string $boolean
  24072. * @return \Illuminate\Database\Eloquent\Builder<static>
  24073. * @throws \InvalidArgumentException
  24074. * @static
  24075. */
  24076. public static function whereRowValues($columns, $operator, $values, $boolean = 'and')
  24077. {
  24078. /** @var \Illuminate\Database\Query\Builder $instance */
  24079. return $instance->whereRowValues($columns, $operator, $values, $boolean);
  24080. }
  24081. /**
  24082. * Adds an or where condition using row values.
  24083. *
  24084. * @param array $columns
  24085. * @param string $operator
  24086. * @param array $values
  24087. * @return \Illuminate\Database\Eloquent\Builder<static>
  24088. * @static
  24089. */
  24090. public static function orWhereRowValues($columns, $operator, $values)
  24091. {
  24092. /** @var \Illuminate\Database\Query\Builder $instance */
  24093. return $instance->orWhereRowValues($columns, $operator, $values);
  24094. }
  24095. /**
  24096. * Add a "where JSON contains" clause to the query.
  24097. *
  24098. * @param string $column
  24099. * @param mixed $value
  24100. * @param string $boolean
  24101. * @param bool $not
  24102. * @return \Illuminate\Database\Eloquent\Builder<static>
  24103. * @static
  24104. */
  24105. public static function whereJsonContains($column, $value, $boolean = 'and', $not = false)
  24106. {
  24107. /** @var \Illuminate\Database\Query\Builder $instance */
  24108. return $instance->whereJsonContains($column, $value, $boolean, $not);
  24109. }
  24110. /**
  24111. * Add an "or where JSON contains" clause to the query.
  24112. *
  24113. * @param string $column
  24114. * @param mixed $value
  24115. * @return \Illuminate\Database\Eloquent\Builder<static>
  24116. * @static
  24117. */
  24118. public static function orWhereJsonContains($column, $value)
  24119. {
  24120. /** @var \Illuminate\Database\Query\Builder $instance */
  24121. return $instance->orWhereJsonContains($column, $value);
  24122. }
  24123. /**
  24124. * Add a "where JSON not contains" clause to the query.
  24125. *
  24126. * @param string $column
  24127. * @param mixed $value
  24128. * @param string $boolean
  24129. * @return \Illuminate\Database\Eloquent\Builder<static>
  24130. * @static
  24131. */
  24132. public static function whereJsonDoesntContain($column, $value, $boolean = 'and')
  24133. {
  24134. /** @var \Illuminate\Database\Query\Builder $instance */
  24135. return $instance->whereJsonDoesntContain($column, $value, $boolean);
  24136. }
  24137. /**
  24138. * Add an "or where JSON not contains" clause to the query.
  24139. *
  24140. * @param string $column
  24141. * @param mixed $value
  24142. * @return \Illuminate\Database\Eloquent\Builder<static>
  24143. * @static
  24144. */
  24145. public static function orWhereJsonDoesntContain($column, $value)
  24146. {
  24147. /** @var \Illuminate\Database\Query\Builder $instance */
  24148. return $instance->orWhereJsonDoesntContain($column, $value);
  24149. }
  24150. /**
  24151. * Add a "where JSON overlaps" clause to the query.
  24152. *
  24153. * @param string $column
  24154. * @param mixed $value
  24155. * @param string $boolean
  24156. * @param bool $not
  24157. * @return \Illuminate\Database\Eloquent\Builder<static>
  24158. * @static
  24159. */
  24160. public static function whereJsonOverlaps($column, $value, $boolean = 'and', $not = false)
  24161. {
  24162. /** @var \Illuminate\Database\Query\Builder $instance */
  24163. return $instance->whereJsonOverlaps($column, $value, $boolean, $not);
  24164. }
  24165. /**
  24166. * Add an "or where JSON overlaps" clause to the query.
  24167. *
  24168. * @param string $column
  24169. * @param mixed $value
  24170. * @return \Illuminate\Database\Eloquent\Builder<static>
  24171. * @static
  24172. */
  24173. public static function orWhereJsonOverlaps($column, $value)
  24174. {
  24175. /** @var \Illuminate\Database\Query\Builder $instance */
  24176. return $instance->orWhereJsonOverlaps($column, $value);
  24177. }
  24178. /**
  24179. * Add a "where JSON not overlap" clause to the query.
  24180. *
  24181. * @param string $column
  24182. * @param mixed $value
  24183. * @param string $boolean
  24184. * @return \Illuminate\Database\Eloquent\Builder<static>
  24185. * @static
  24186. */
  24187. public static function whereJsonDoesntOverlap($column, $value, $boolean = 'and')
  24188. {
  24189. /** @var \Illuminate\Database\Query\Builder $instance */
  24190. return $instance->whereJsonDoesntOverlap($column, $value, $boolean);
  24191. }
  24192. /**
  24193. * Add an "or where JSON not overlap" clause to the query.
  24194. *
  24195. * @param string $column
  24196. * @param mixed $value
  24197. * @return \Illuminate\Database\Eloquent\Builder<static>
  24198. * @static
  24199. */
  24200. public static function orWhereJsonDoesntOverlap($column, $value)
  24201. {
  24202. /** @var \Illuminate\Database\Query\Builder $instance */
  24203. return $instance->orWhereJsonDoesntOverlap($column, $value);
  24204. }
  24205. /**
  24206. * Add a clause that determines if a JSON path exists to the query.
  24207. *
  24208. * @param string $column
  24209. * @param string $boolean
  24210. * @param bool $not
  24211. * @return \Illuminate\Database\Eloquent\Builder<static>
  24212. * @static
  24213. */
  24214. public static function whereJsonContainsKey($column, $boolean = 'and', $not = false)
  24215. {
  24216. /** @var \Illuminate\Database\Query\Builder $instance */
  24217. return $instance->whereJsonContainsKey($column, $boolean, $not);
  24218. }
  24219. /**
  24220. * Add an "or" clause that determines if a JSON path exists to the query.
  24221. *
  24222. * @param string $column
  24223. * @return \Illuminate\Database\Eloquent\Builder<static>
  24224. * @static
  24225. */
  24226. public static function orWhereJsonContainsKey($column)
  24227. {
  24228. /** @var \Illuminate\Database\Query\Builder $instance */
  24229. return $instance->orWhereJsonContainsKey($column);
  24230. }
  24231. /**
  24232. * Add a clause that determines if a JSON path does not exist to the query.
  24233. *
  24234. * @param string $column
  24235. * @param string $boolean
  24236. * @return \Illuminate\Database\Eloquent\Builder<static>
  24237. * @static
  24238. */
  24239. public static function whereJsonDoesntContainKey($column, $boolean = 'and')
  24240. {
  24241. /** @var \Illuminate\Database\Query\Builder $instance */
  24242. return $instance->whereJsonDoesntContainKey($column, $boolean);
  24243. }
  24244. /**
  24245. * Add an "or" clause that determines if a JSON path does not exist to the query.
  24246. *
  24247. * @param string $column
  24248. * @return \Illuminate\Database\Eloquent\Builder<static>
  24249. * @static
  24250. */
  24251. public static function orWhereJsonDoesntContainKey($column)
  24252. {
  24253. /** @var \Illuminate\Database\Query\Builder $instance */
  24254. return $instance->orWhereJsonDoesntContainKey($column);
  24255. }
  24256. /**
  24257. * Add a "where JSON length" clause to the query.
  24258. *
  24259. * @param string $column
  24260. * @param mixed $operator
  24261. * @param mixed $value
  24262. * @param string $boolean
  24263. * @return \Illuminate\Database\Eloquent\Builder<static>
  24264. * @static
  24265. */
  24266. public static function whereJsonLength($column, $operator, $value = null, $boolean = 'and')
  24267. {
  24268. /** @var \Illuminate\Database\Query\Builder $instance */
  24269. return $instance->whereJsonLength($column, $operator, $value, $boolean);
  24270. }
  24271. /**
  24272. * Add an "or where JSON length" clause to the query.
  24273. *
  24274. * @param string $column
  24275. * @param mixed $operator
  24276. * @param mixed $value
  24277. * @return \Illuminate\Database\Eloquent\Builder<static>
  24278. * @static
  24279. */
  24280. public static function orWhereJsonLength($column, $operator, $value = null)
  24281. {
  24282. /** @var \Illuminate\Database\Query\Builder $instance */
  24283. return $instance->orWhereJsonLength($column, $operator, $value);
  24284. }
  24285. /**
  24286. * Handles dynamic "where" clauses to the query.
  24287. *
  24288. * @param string $method
  24289. * @param array $parameters
  24290. * @return \Illuminate\Database\Eloquent\Builder<static>
  24291. * @static
  24292. */
  24293. public static function dynamicWhere($method, $parameters)
  24294. {
  24295. /** @var \Illuminate\Database\Query\Builder $instance */
  24296. return $instance->dynamicWhere($method, $parameters);
  24297. }
  24298. /**
  24299. * Add a "where fulltext" clause to the query.
  24300. *
  24301. * @param string|string[] $columns
  24302. * @param string $value
  24303. * @param string $boolean
  24304. * @return \Illuminate\Database\Eloquent\Builder<static>
  24305. * @static
  24306. */
  24307. public static function whereFullText($columns, $value, $options = [], $boolean = 'and')
  24308. {
  24309. /** @var \Illuminate\Database\Query\Builder $instance */
  24310. return $instance->whereFullText($columns, $value, $options, $boolean);
  24311. }
  24312. /**
  24313. * Add a "or where fulltext" clause to the query.
  24314. *
  24315. * @param string|string[] $columns
  24316. * @param string $value
  24317. * @return \Illuminate\Database\Eloquent\Builder<static>
  24318. * @static
  24319. */
  24320. public static function orWhereFullText($columns, $value, $options = [])
  24321. {
  24322. /** @var \Illuminate\Database\Query\Builder $instance */
  24323. return $instance->orWhereFullText($columns, $value, $options);
  24324. }
  24325. /**
  24326. * Add a "where" clause to the query for multiple columns with "and" conditions between them.
  24327. *
  24328. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24329. * @param mixed $operator
  24330. * @param mixed $value
  24331. * @param string $boolean
  24332. * @return \Illuminate\Database\Eloquent\Builder<static>
  24333. * @static
  24334. */
  24335. public static function whereAll($columns, $operator = null, $value = null, $boolean = 'and')
  24336. {
  24337. /** @var \Illuminate\Database\Query\Builder $instance */
  24338. return $instance->whereAll($columns, $operator, $value, $boolean);
  24339. }
  24340. /**
  24341. * Add an "or where" clause to the query for multiple columns with "and" conditions between them.
  24342. *
  24343. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24344. * @param mixed $operator
  24345. * @param mixed $value
  24346. * @return \Illuminate\Database\Eloquent\Builder<static>
  24347. * @static
  24348. */
  24349. public static function orWhereAll($columns, $operator = null, $value = null)
  24350. {
  24351. /** @var \Illuminate\Database\Query\Builder $instance */
  24352. return $instance->orWhereAll($columns, $operator, $value);
  24353. }
  24354. /**
  24355. * Add a "where" clause to the query for multiple columns with "or" conditions between them.
  24356. *
  24357. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24358. * @param mixed $operator
  24359. * @param mixed $value
  24360. * @param string $boolean
  24361. * @return \Illuminate\Database\Eloquent\Builder<static>
  24362. * @static
  24363. */
  24364. public static function whereAny($columns, $operator = null, $value = null, $boolean = 'and')
  24365. {
  24366. /** @var \Illuminate\Database\Query\Builder $instance */
  24367. return $instance->whereAny($columns, $operator, $value, $boolean);
  24368. }
  24369. /**
  24370. * Add an "or where" clause to the query for multiple columns with "or" conditions between them.
  24371. *
  24372. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24373. * @param mixed $operator
  24374. * @param mixed $value
  24375. * @return \Illuminate\Database\Eloquent\Builder<static>
  24376. * @static
  24377. */
  24378. public static function orWhereAny($columns, $operator = null, $value = null)
  24379. {
  24380. /** @var \Illuminate\Database\Query\Builder $instance */
  24381. return $instance->orWhereAny($columns, $operator, $value);
  24382. }
  24383. /**
  24384. * Add a "where not" clause to the query for multiple columns where none of the conditions should be true.
  24385. *
  24386. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24387. * @param mixed $operator
  24388. * @param mixed $value
  24389. * @param string $boolean
  24390. * @return \Illuminate\Database\Eloquent\Builder<static>
  24391. * @static
  24392. */
  24393. public static function whereNone($columns, $operator = null, $value = null, $boolean = 'and')
  24394. {
  24395. /** @var \Illuminate\Database\Query\Builder $instance */
  24396. return $instance->whereNone($columns, $operator, $value, $boolean);
  24397. }
  24398. /**
  24399. * Add an "or where not" clause to the query for multiple columns where none of the conditions should be true.
  24400. *
  24401. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24402. * @param mixed $operator
  24403. * @param mixed $value
  24404. * @return \Illuminate\Database\Eloquent\Builder<static>
  24405. * @static
  24406. */
  24407. public static function orWhereNone($columns, $operator = null, $value = null)
  24408. {
  24409. /** @var \Illuminate\Database\Query\Builder $instance */
  24410. return $instance->orWhereNone($columns, $operator, $value);
  24411. }
  24412. /**
  24413. * Add a "group by" clause to the query.
  24414. *
  24415. * @param array|\Illuminate\Contracts\Database\Query\Expression|string $groups
  24416. * @return \Illuminate\Database\Eloquent\Builder<static>
  24417. * @static
  24418. */
  24419. public static function groupBy(...$groups)
  24420. {
  24421. /** @var \Illuminate\Database\Query\Builder $instance */
  24422. return $instance->groupBy(...$groups);
  24423. }
  24424. /**
  24425. * Add a raw groupBy clause to the query.
  24426. *
  24427. * @param string $sql
  24428. * @return \Illuminate\Database\Eloquent\Builder<static>
  24429. * @static
  24430. */
  24431. public static function groupByRaw($sql, $bindings = [])
  24432. {
  24433. /** @var \Illuminate\Database\Query\Builder $instance */
  24434. return $instance->groupByRaw($sql, $bindings);
  24435. }
  24436. /**
  24437. * Add a "having" clause to the query.
  24438. *
  24439. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24440. * @param \DateTimeInterface|string|int|float|null $operator
  24441. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24442. * @param string $boolean
  24443. * @return \Illuminate\Database\Eloquent\Builder<static>
  24444. * @static
  24445. */
  24446. public static function having($column, $operator = null, $value = null, $boolean = 'and')
  24447. {
  24448. /** @var \Illuminate\Database\Query\Builder $instance */
  24449. return $instance->having($column, $operator, $value, $boolean);
  24450. }
  24451. /**
  24452. * Add an "or having" clause to the query.
  24453. *
  24454. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24455. * @param \DateTimeInterface|string|int|float|null $operator
  24456. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24457. * @return \Illuminate\Database\Eloquent\Builder<static>
  24458. * @static
  24459. */
  24460. public static function orHaving($column, $operator = null, $value = null)
  24461. {
  24462. /** @var \Illuminate\Database\Query\Builder $instance */
  24463. return $instance->orHaving($column, $operator, $value);
  24464. }
  24465. /**
  24466. * Add a nested having statement to the query.
  24467. *
  24468. * @param string $boolean
  24469. * @return \Illuminate\Database\Eloquent\Builder<static>
  24470. * @static
  24471. */
  24472. public static function havingNested($callback, $boolean = 'and')
  24473. {
  24474. /** @var \Illuminate\Database\Query\Builder $instance */
  24475. return $instance->havingNested($callback, $boolean);
  24476. }
  24477. /**
  24478. * Add another query builder as a nested having to the query builder.
  24479. *
  24480. * @param \Illuminate\Database\Query\Builder $query
  24481. * @param string $boolean
  24482. * @return \Illuminate\Database\Eloquent\Builder<static>
  24483. * @static
  24484. */
  24485. public static function addNestedHavingQuery($query, $boolean = 'and')
  24486. {
  24487. /** @var \Illuminate\Database\Query\Builder $instance */
  24488. return $instance->addNestedHavingQuery($query, $boolean);
  24489. }
  24490. /**
  24491. * Add a "having null" clause to the query.
  24492. *
  24493. * @param array|string $columns
  24494. * @param string $boolean
  24495. * @param bool $not
  24496. * @return \Illuminate\Database\Eloquent\Builder<static>
  24497. * @static
  24498. */
  24499. public static function havingNull($columns, $boolean = 'and', $not = false)
  24500. {
  24501. /** @var \Illuminate\Database\Query\Builder $instance */
  24502. return $instance->havingNull($columns, $boolean, $not);
  24503. }
  24504. /**
  24505. * Add an "or having null" clause to the query.
  24506. *
  24507. * @param string $column
  24508. * @return \Illuminate\Database\Eloquent\Builder<static>
  24509. * @static
  24510. */
  24511. public static function orHavingNull($column)
  24512. {
  24513. /** @var \Illuminate\Database\Query\Builder $instance */
  24514. return $instance->orHavingNull($column);
  24515. }
  24516. /**
  24517. * Add a "having not null" clause to the query.
  24518. *
  24519. * @param array|string $columns
  24520. * @param string $boolean
  24521. * @return \Illuminate\Database\Eloquent\Builder<static>
  24522. * @static
  24523. */
  24524. public static function havingNotNull($columns, $boolean = 'and')
  24525. {
  24526. /** @var \Illuminate\Database\Query\Builder $instance */
  24527. return $instance->havingNotNull($columns, $boolean);
  24528. }
  24529. /**
  24530. * Add an "or having not null" clause to the query.
  24531. *
  24532. * @param string $column
  24533. * @return \Illuminate\Database\Eloquent\Builder<static>
  24534. * @static
  24535. */
  24536. public static function orHavingNotNull($column)
  24537. {
  24538. /** @var \Illuminate\Database\Query\Builder $instance */
  24539. return $instance->orHavingNotNull($column);
  24540. }
  24541. /**
  24542. * Add a "having between " clause to the query.
  24543. *
  24544. * @param string $column
  24545. * @param string $boolean
  24546. * @param bool $not
  24547. * @return \Illuminate\Database\Eloquent\Builder<static>
  24548. * @static
  24549. */
  24550. public static function havingBetween($column, $values, $boolean = 'and', $not = false)
  24551. {
  24552. /** @var \Illuminate\Database\Query\Builder $instance */
  24553. return $instance->havingBetween($column, $values, $boolean, $not);
  24554. }
  24555. /**
  24556. * Add a raw having clause to the query.
  24557. *
  24558. * @param string $sql
  24559. * @param string $boolean
  24560. * @return \Illuminate\Database\Eloquent\Builder<static>
  24561. * @static
  24562. */
  24563. public static function havingRaw($sql, $bindings = [], $boolean = 'and')
  24564. {
  24565. /** @var \Illuminate\Database\Query\Builder $instance */
  24566. return $instance->havingRaw($sql, $bindings, $boolean);
  24567. }
  24568. /**
  24569. * Add a raw or having clause to the query.
  24570. *
  24571. * @param string $sql
  24572. * @return \Illuminate\Database\Eloquent\Builder<static>
  24573. * @static
  24574. */
  24575. public static function orHavingRaw($sql, $bindings = [])
  24576. {
  24577. /** @var \Illuminate\Database\Query\Builder $instance */
  24578. return $instance->orHavingRaw($sql, $bindings);
  24579. }
  24580. /**
  24581. * Add an "order by" clause to the query.
  24582. *
  24583. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24584. * @param string $direction
  24585. * @return \Illuminate\Database\Eloquent\Builder<static>
  24586. * @throws \InvalidArgumentException
  24587. * @static
  24588. */
  24589. public static function orderBy($column, $direction = 'asc')
  24590. {
  24591. /** @var \Illuminate\Database\Query\Builder $instance */
  24592. return $instance->orderBy($column, $direction);
  24593. }
  24594. /**
  24595. * Add a descending "order by" clause to the query.
  24596. *
  24597. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24598. * @return \Illuminate\Database\Eloquent\Builder<static>
  24599. * @static
  24600. */
  24601. public static function orderByDesc($column)
  24602. {
  24603. /** @var \Illuminate\Database\Query\Builder $instance */
  24604. return $instance->orderByDesc($column);
  24605. }
  24606. /**
  24607. * Put the query's results in random order.
  24608. *
  24609. * @param string|int $seed
  24610. * @return \Illuminate\Database\Eloquent\Builder<static>
  24611. * @static
  24612. */
  24613. public static function inRandomOrder($seed = '')
  24614. {
  24615. /** @var \Illuminate\Database\Query\Builder $instance */
  24616. return $instance->inRandomOrder($seed);
  24617. }
  24618. /**
  24619. * Add a raw "order by" clause to the query.
  24620. *
  24621. * @param string $sql
  24622. * @param array $bindings
  24623. * @return \Illuminate\Database\Eloquent\Builder<static>
  24624. * @static
  24625. */
  24626. public static function orderByRaw($sql, $bindings = [])
  24627. {
  24628. /** @var \Illuminate\Database\Query\Builder $instance */
  24629. return $instance->orderByRaw($sql, $bindings);
  24630. }
  24631. /**
  24632. * Alias to set the "offset" value of the query.
  24633. *
  24634. * @param int $value
  24635. * @return \Illuminate\Database\Eloquent\Builder<static>
  24636. * @static
  24637. */
  24638. public static function skip($value)
  24639. {
  24640. /** @var \Illuminate\Database\Query\Builder $instance */
  24641. return $instance->skip($value);
  24642. }
  24643. /**
  24644. * Set the "offset" value of the query.
  24645. *
  24646. * @param int $value
  24647. * @return \Illuminate\Database\Eloquent\Builder<static>
  24648. * @static
  24649. */
  24650. public static function offset($value)
  24651. {
  24652. /** @var \Illuminate\Database\Query\Builder $instance */
  24653. return $instance->offset($value);
  24654. }
  24655. /**
  24656. * Alias to set the "limit" value of the query.
  24657. *
  24658. * @param int $value
  24659. * @return \Illuminate\Database\Eloquent\Builder<static>
  24660. * @static
  24661. */
  24662. public static function take($value)
  24663. {
  24664. /** @var \Illuminate\Database\Query\Builder $instance */
  24665. return $instance->take($value);
  24666. }
  24667. /**
  24668. * Set the "limit" value of the query.
  24669. *
  24670. * @param int $value
  24671. * @return \Illuminate\Database\Eloquent\Builder<static>
  24672. * @static
  24673. */
  24674. public static function limit($value)
  24675. {
  24676. /** @var \Illuminate\Database\Query\Builder $instance */
  24677. return $instance->limit($value);
  24678. }
  24679. /**
  24680. * Add a "group limit" clause to the query.
  24681. *
  24682. * @param int $value
  24683. * @param string $column
  24684. * @return \Illuminate\Database\Eloquent\Builder<static>
  24685. * @static
  24686. */
  24687. public static function groupLimit($value, $column)
  24688. {
  24689. /** @var \Illuminate\Database\Query\Builder $instance */
  24690. return $instance->groupLimit($value, $column);
  24691. }
  24692. /**
  24693. * Set the limit and offset for a given page.
  24694. *
  24695. * @param int $page
  24696. * @param int $perPage
  24697. * @return \Illuminate\Database\Eloquent\Builder<static>
  24698. * @static
  24699. */
  24700. public static function forPage($page, $perPage = 15)
  24701. {
  24702. /** @var \Illuminate\Database\Query\Builder $instance */
  24703. return $instance->forPage($page, $perPage);
  24704. }
  24705. /**
  24706. * Constrain the query to the previous "page" of results before a given ID.
  24707. *
  24708. * @param int $perPage
  24709. * @param int|null $lastId
  24710. * @param string $column
  24711. * @return \Illuminate\Database\Eloquent\Builder<static>
  24712. * @static
  24713. */
  24714. public static function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id')
  24715. {
  24716. /** @var \Illuminate\Database\Query\Builder $instance */
  24717. return $instance->forPageBeforeId($perPage, $lastId, $column);
  24718. }
  24719. /**
  24720. * Constrain the query to the next "page" of results after a given ID.
  24721. *
  24722. * @param int $perPage
  24723. * @param int|null $lastId
  24724. * @param string $column
  24725. * @return \Illuminate\Database\Eloquent\Builder<static>
  24726. * @static
  24727. */
  24728. public static function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
  24729. {
  24730. /** @var \Illuminate\Database\Query\Builder $instance */
  24731. return $instance->forPageAfterId($perPage, $lastId, $column);
  24732. }
  24733. /**
  24734. * Remove all existing orders and optionally add a new order.
  24735. *
  24736. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  24737. * @param string $direction
  24738. * @return \Illuminate\Database\Eloquent\Builder<static>
  24739. * @static
  24740. */
  24741. public static function reorder($column = null, $direction = 'asc')
  24742. {
  24743. /** @var \Illuminate\Database\Query\Builder $instance */
  24744. return $instance->reorder($column, $direction);
  24745. }
  24746. /**
  24747. * Add descending "reorder" clause to the query.
  24748. *
  24749. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  24750. * @return \Illuminate\Database\Eloquent\Builder<static>
  24751. * @static
  24752. */
  24753. public static function reorderDesc($column)
  24754. {
  24755. /** @var \Illuminate\Database\Query\Builder $instance */
  24756. return $instance->reorderDesc($column);
  24757. }
  24758. /**
  24759. * Add a union statement to the query.
  24760. *
  24761. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  24762. * @param bool $all
  24763. * @return \Illuminate\Database\Eloquent\Builder<static>
  24764. * @static
  24765. */
  24766. public static function union($query, $all = false)
  24767. {
  24768. /** @var \Illuminate\Database\Query\Builder $instance */
  24769. return $instance->union($query, $all);
  24770. }
  24771. /**
  24772. * Add a union all statement to the query.
  24773. *
  24774. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  24775. * @return \Illuminate\Database\Eloquent\Builder<static>
  24776. * @static
  24777. */
  24778. public static function unionAll($query)
  24779. {
  24780. /** @var \Illuminate\Database\Query\Builder $instance */
  24781. return $instance->unionAll($query);
  24782. }
  24783. /**
  24784. * Lock the selected rows in the table.
  24785. *
  24786. * @param string|bool $value
  24787. * @return \Illuminate\Database\Eloquent\Builder<static>
  24788. * @static
  24789. */
  24790. public static function lock($value = true)
  24791. {
  24792. /** @var \Illuminate\Database\Query\Builder $instance */
  24793. return $instance->lock($value);
  24794. }
  24795. /**
  24796. * Lock the selected rows in the table for updating.
  24797. *
  24798. * @return \Illuminate\Database\Eloquent\Builder<static>
  24799. * @static
  24800. */
  24801. public static function lockForUpdate()
  24802. {
  24803. /** @var \Illuminate\Database\Query\Builder $instance */
  24804. return $instance->lockForUpdate();
  24805. }
  24806. /**
  24807. * Share lock the selected rows in the table.
  24808. *
  24809. * @return \Illuminate\Database\Eloquent\Builder<static>
  24810. * @static
  24811. */
  24812. public static function sharedLock()
  24813. {
  24814. /** @var \Illuminate\Database\Query\Builder $instance */
  24815. return $instance->sharedLock();
  24816. }
  24817. /**
  24818. * Register a closure to be invoked before the query is executed.
  24819. *
  24820. * @return \Illuminate\Database\Eloquent\Builder<static>
  24821. * @static
  24822. */
  24823. public static function beforeQuery($callback)
  24824. {
  24825. /** @var \Illuminate\Database\Query\Builder $instance */
  24826. return $instance->beforeQuery($callback);
  24827. }
  24828. /**
  24829. * Invoke the "before query" modification callbacks.
  24830. *
  24831. * @return void
  24832. * @static
  24833. */
  24834. public static function applyBeforeQueryCallbacks()
  24835. {
  24836. /** @var \Illuminate\Database\Query\Builder $instance */
  24837. $instance->applyBeforeQueryCallbacks();
  24838. }
  24839. /**
  24840. * Get the SQL representation of the query.
  24841. *
  24842. * @return string
  24843. * @static
  24844. */
  24845. public static function toSql()
  24846. {
  24847. /** @var \Illuminate\Database\Query\Builder $instance */
  24848. return $instance->toSql();
  24849. }
  24850. /**
  24851. * Get the raw SQL representation of the query with embedded bindings.
  24852. *
  24853. * @return string
  24854. * @static
  24855. */
  24856. public static function toRawSql()
  24857. {
  24858. /** @var \Illuminate\Database\Query\Builder $instance */
  24859. return $instance->toRawSql();
  24860. }
  24861. /**
  24862. * Get a single expression value from the first result of a query.
  24863. *
  24864. * @return mixed
  24865. * @static
  24866. */
  24867. public static function rawValue($expression, $bindings = [])
  24868. {
  24869. /** @var \Illuminate\Database\Query\Builder $instance */
  24870. return $instance->rawValue($expression, $bindings);
  24871. }
  24872. /**
  24873. * Get the count of the total records for the paginator.
  24874. *
  24875. * @param array<string|\Illuminate\Contracts\Database\Query\Expression> $columns
  24876. * @return int<0, max>
  24877. * @static
  24878. */
  24879. public static function getCountForPagination($columns = [])
  24880. {
  24881. /** @var \Illuminate\Database\Query\Builder $instance */
  24882. return $instance->getCountForPagination($columns);
  24883. }
  24884. /**
  24885. * Concatenate values of a given column as a string.
  24886. *
  24887. * @param string $column
  24888. * @param string $glue
  24889. * @return string
  24890. * @static
  24891. */
  24892. public static function implode($column, $glue = '')
  24893. {
  24894. /** @var \Illuminate\Database\Query\Builder $instance */
  24895. return $instance->implode($column, $glue);
  24896. }
  24897. /**
  24898. * Determine if any rows exist for the current query.
  24899. *
  24900. * @return bool
  24901. * @static
  24902. */
  24903. public static function exists()
  24904. {
  24905. /** @var \Illuminate\Database\Query\Builder $instance */
  24906. return $instance->exists();
  24907. }
  24908. /**
  24909. * Determine if no rows exist for the current query.
  24910. *
  24911. * @return bool
  24912. * @static
  24913. */
  24914. public static function doesntExist()
  24915. {
  24916. /** @var \Illuminate\Database\Query\Builder $instance */
  24917. return $instance->doesntExist();
  24918. }
  24919. /**
  24920. * Execute the given callback if no rows exist for the current query.
  24921. *
  24922. * @return mixed
  24923. * @static
  24924. */
  24925. public static function existsOr($callback)
  24926. {
  24927. /** @var \Illuminate\Database\Query\Builder $instance */
  24928. return $instance->existsOr($callback);
  24929. }
  24930. /**
  24931. * Execute the given callback if rows exist for the current query.
  24932. *
  24933. * @return mixed
  24934. * @static
  24935. */
  24936. public static function doesntExistOr($callback)
  24937. {
  24938. /** @var \Illuminate\Database\Query\Builder $instance */
  24939. return $instance->doesntExistOr($callback);
  24940. }
  24941. /**
  24942. * Retrieve the "count" result of the query.
  24943. *
  24944. * @param \Illuminate\Contracts\Database\Query\Expression|string $columns
  24945. * @return int<0, max>
  24946. * @static
  24947. */
  24948. public static function count($columns = '*')
  24949. {
  24950. /** @var \Illuminate\Database\Query\Builder $instance */
  24951. return $instance->count($columns);
  24952. }
  24953. /**
  24954. * Retrieve the minimum value of a given column.
  24955. *
  24956. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24957. * @return mixed
  24958. * @static
  24959. */
  24960. public static function min($column)
  24961. {
  24962. /** @var \Illuminate\Database\Query\Builder $instance */
  24963. return $instance->min($column);
  24964. }
  24965. /**
  24966. * Retrieve the maximum value of a given column.
  24967. *
  24968. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24969. * @return mixed
  24970. * @static
  24971. */
  24972. public static function max($column)
  24973. {
  24974. /** @var \Illuminate\Database\Query\Builder $instance */
  24975. return $instance->max($column);
  24976. }
  24977. /**
  24978. * Retrieve the sum of the values of a given column.
  24979. *
  24980. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24981. * @return mixed
  24982. * @static
  24983. */
  24984. public static function sum($column)
  24985. {
  24986. /** @var \Illuminate\Database\Query\Builder $instance */
  24987. return $instance->sum($column);
  24988. }
  24989. /**
  24990. * Retrieve the average of the values of a given column.
  24991. *
  24992. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24993. * @return mixed
  24994. * @static
  24995. */
  24996. public static function avg($column)
  24997. {
  24998. /** @var \Illuminate\Database\Query\Builder $instance */
  24999. return $instance->avg($column);
  25000. }
  25001. /**
  25002. * Alias for the "avg" method.
  25003. *
  25004. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25005. * @return mixed
  25006. * @static
  25007. */
  25008. public static function average($column)
  25009. {
  25010. /** @var \Illuminate\Database\Query\Builder $instance */
  25011. return $instance->average($column);
  25012. }
  25013. /**
  25014. * Execute an aggregate function on the database.
  25015. *
  25016. * @param string $function
  25017. * @param array $columns
  25018. * @return mixed
  25019. * @static
  25020. */
  25021. public static function aggregate($function, $columns = [])
  25022. {
  25023. /** @var \Illuminate\Database\Query\Builder $instance */
  25024. return $instance->aggregate($function, $columns);
  25025. }
  25026. /**
  25027. * Execute a numeric aggregate function on the database.
  25028. *
  25029. * @param string $function
  25030. * @param array $columns
  25031. * @return float|int
  25032. * @static
  25033. */
  25034. public static function numericAggregate($function, $columns = [])
  25035. {
  25036. /** @var \Illuminate\Database\Query\Builder $instance */
  25037. return $instance->numericAggregate($function, $columns);
  25038. }
  25039. /**
  25040. * Insert new records into the database.
  25041. *
  25042. * @return bool
  25043. * @static
  25044. */
  25045. public static function insert($values)
  25046. {
  25047. /** @var \Illuminate\Database\Query\Builder $instance */
  25048. return $instance->insert($values);
  25049. }
  25050. /**
  25051. * Insert new records into the database while ignoring errors.
  25052. *
  25053. * @return int<0, max>
  25054. * @static
  25055. */
  25056. public static function insertOrIgnore($values)
  25057. {
  25058. /** @var \Illuminate\Database\Query\Builder $instance */
  25059. return $instance->insertOrIgnore($values);
  25060. }
  25061. /**
  25062. * Insert a new record and get the value of the primary key.
  25063. *
  25064. * @param string|null $sequence
  25065. * @return int
  25066. * @static
  25067. */
  25068. public static function insertGetId($values, $sequence = null)
  25069. {
  25070. /** @var \Illuminate\Database\Query\Builder $instance */
  25071. return $instance->insertGetId($values, $sequence);
  25072. }
  25073. /**
  25074. * Insert new records into the table using a subquery.
  25075. *
  25076. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25077. * @return int
  25078. * @static
  25079. */
  25080. public static function insertUsing($columns, $query)
  25081. {
  25082. /** @var \Illuminate\Database\Query\Builder $instance */
  25083. return $instance->insertUsing($columns, $query);
  25084. }
  25085. /**
  25086. * Insert new records into the table using a subquery while ignoring errors.
  25087. *
  25088. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25089. * @return int
  25090. * @static
  25091. */
  25092. public static function insertOrIgnoreUsing($columns, $query)
  25093. {
  25094. /** @var \Illuminate\Database\Query\Builder $instance */
  25095. return $instance->insertOrIgnoreUsing($columns, $query);
  25096. }
  25097. /**
  25098. * Update records in a PostgreSQL database using the update from syntax.
  25099. *
  25100. * @return int
  25101. * @static
  25102. */
  25103. public static function updateFrom($values)
  25104. {
  25105. /** @var \Illuminate\Database\Query\Builder $instance */
  25106. return $instance->updateFrom($values);
  25107. }
  25108. /**
  25109. * Insert or update a record matching the attributes, and fill it with values.
  25110. *
  25111. * @return bool
  25112. * @static
  25113. */
  25114. public static function updateOrInsert($attributes, $values = [])
  25115. {
  25116. /** @var \Illuminate\Database\Query\Builder $instance */
  25117. return $instance->updateOrInsert($attributes, $values);
  25118. }
  25119. /**
  25120. * Increment the given column's values by the given amounts.
  25121. *
  25122. * @param array<string, float|int|numeric-string> $columns
  25123. * @param array<string, mixed> $extra
  25124. * @return int<0, max>
  25125. * @throws \InvalidArgumentException
  25126. * @static
  25127. */
  25128. public static function incrementEach($columns, $extra = [])
  25129. {
  25130. /** @var \Illuminate\Database\Query\Builder $instance */
  25131. return $instance->incrementEach($columns, $extra);
  25132. }
  25133. /**
  25134. * Decrement the given column's values by the given amounts.
  25135. *
  25136. * @param array<string, float|int|numeric-string> $columns
  25137. * @param array<string, mixed> $extra
  25138. * @return int<0, max>
  25139. * @throws \InvalidArgumentException
  25140. * @static
  25141. */
  25142. public static function decrementEach($columns, $extra = [])
  25143. {
  25144. /** @var \Illuminate\Database\Query\Builder $instance */
  25145. return $instance->decrementEach($columns, $extra);
  25146. }
  25147. /**
  25148. * Run a truncate statement on the table.
  25149. *
  25150. * @return void
  25151. * @static
  25152. */
  25153. public static function truncate()
  25154. {
  25155. /** @var \Illuminate\Database\Query\Builder $instance */
  25156. $instance->truncate();
  25157. }
  25158. /**
  25159. * Get all of the query builder's columns in a text-only array with all expressions evaluated.
  25160. *
  25161. * @return list<string>
  25162. * @static
  25163. */
  25164. public static function getColumns()
  25165. {
  25166. /** @var \Illuminate\Database\Query\Builder $instance */
  25167. return $instance->getColumns();
  25168. }
  25169. /**
  25170. * Create a raw database expression.
  25171. *
  25172. * @param mixed $value
  25173. * @return \Illuminate\Contracts\Database\Query\Expression
  25174. * @static
  25175. */
  25176. public static function raw($value)
  25177. {
  25178. /** @var \Illuminate\Database\Query\Builder $instance */
  25179. return $instance->raw($value);
  25180. }
  25181. /**
  25182. * Get the current query value bindings in a flattened array.
  25183. *
  25184. * @return list<mixed>
  25185. * @static
  25186. */
  25187. public static function getBindings()
  25188. {
  25189. /** @var \Illuminate\Database\Query\Builder $instance */
  25190. return $instance->getBindings();
  25191. }
  25192. /**
  25193. * Get the raw array of bindings.
  25194. *
  25195. * @return \Illuminate\Database\Query\array{ select: list<mixed>,
  25196. * from: list<mixed>,
  25197. * join: list<mixed>,
  25198. * where: list<mixed>,
  25199. * groupBy: list<mixed>,
  25200. * having: list<mixed>,
  25201. * order: list<mixed>,
  25202. * union: list<mixed>,
  25203. * unionOrder: list<mixed>,
  25204. * }
  25205. * @static
  25206. */
  25207. public static function getRawBindings()
  25208. {
  25209. /** @var \Illuminate\Database\Query\Builder $instance */
  25210. return $instance->getRawBindings();
  25211. }
  25212. /**
  25213. * Set the bindings on the query builder.
  25214. *
  25215. * @param list<mixed> $bindings
  25216. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25217. * @return \Illuminate\Database\Eloquent\Builder<static>
  25218. * @throws \InvalidArgumentException
  25219. * @static
  25220. */
  25221. public static function setBindings($bindings, $type = 'where')
  25222. {
  25223. /** @var \Illuminate\Database\Query\Builder $instance */
  25224. return $instance->setBindings($bindings, $type);
  25225. }
  25226. /**
  25227. * Add a binding to the query.
  25228. *
  25229. * @param mixed $value
  25230. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25231. * @return \Illuminate\Database\Eloquent\Builder<static>
  25232. * @throws \InvalidArgumentException
  25233. * @static
  25234. */
  25235. public static function addBinding($value, $type = 'where')
  25236. {
  25237. /** @var \Illuminate\Database\Query\Builder $instance */
  25238. return $instance->addBinding($value, $type);
  25239. }
  25240. /**
  25241. * Cast the given binding value.
  25242. *
  25243. * @param mixed $value
  25244. * @return mixed
  25245. * @static
  25246. */
  25247. public static function castBinding($value)
  25248. {
  25249. /** @var \Illuminate\Database\Query\Builder $instance */
  25250. return $instance->castBinding($value);
  25251. }
  25252. /**
  25253. * Merge an array of bindings into our bindings.
  25254. *
  25255. * @param self $query
  25256. * @return \Illuminate\Database\Eloquent\Builder<static>
  25257. * @static
  25258. */
  25259. public static function mergeBindings($query)
  25260. {
  25261. /** @var \Illuminate\Database\Query\Builder $instance */
  25262. return $instance->mergeBindings($query);
  25263. }
  25264. /**
  25265. * Remove all of the expressions from a list of bindings.
  25266. *
  25267. * @param array<mixed> $bindings
  25268. * @return list<mixed>
  25269. * @static
  25270. */
  25271. public static function cleanBindings($bindings)
  25272. {
  25273. /** @var \Illuminate\Database\Query\Builder $instance */
  25274. return $instance->cleanBindings($bindings);
  25275. }
  25276. /**
  25277. * Get the database query processor instance.
  25278. *
  25279. * @return \Illuminate\Database\Query\Processors\Processor
  25280. * @static
  25281. */
  25282. public static function getProcessor()
  25283. {
  25284. /** @var \Illuminate\Database\Query\Builder $instance */
  25285. return $instance->getProcessor();
  25286. }
  25287. /**
  25288. * Get the query grammar instance.
  25289. *
  25290. * @return \Illuminate\Database\Query\Grammars\Grammar
  25291. * @static
  25292. */
  25293. public static function getGrammar()
  25294. {
  25295. /** @var \Illuminate\Database\Query\Builder $instance */
  25296. return $instance->getGrammar();
  25297. }
  25298. /**
  25299. * Use the "write" PDO connection when executing the query.
  25300. *
  25301. * @return \Illuminate\Database\Eloquent\Builder<static>
  25302. * @static
  25303. */
  25304. public static function useWritePdo()
  25305. {
  25306. /** @var \Illuminate\Database\Query\Builder $instance */
  25307. return $instance->useWritePdo();
  25308. }
  25309. /**
  25310. * Clone the query without the given properties.
  25311. *
  25312. * @return static
  25313. * @static
  25314. */
  25315. public static function cloneWithout($properties)
  25316. {
  25317. /** @var \Illuminate\Database\Query\Builder $instance */
  25318. return $instance->cloneWithout($properties);
  25319. }
  25320. /**
  25321. * Clone the query without the given bindings.
  25322. *
  25323. * @return static
  25324. * @static
  25325. */
  25326. public static function cloneWithoutBindings($except)
  25327. {
  25328. /** @var \Illuminate\Database\Query\Builder $instance */
  25329. return $instance->cloneWithoutBindings($except);
  25330. }
  25331. /**
  25332. * Dump the current SQL and bindings.
  25333. *
  25334. * @param mixed $args
  25335. * @return \Illuminate\Database\Eloquent\Builder<static>
  25336. * @static
  25337. */
  25338. public static function dump(...$args)
  25339. {
  25340. /** @var \Illuminate\Database\Query\Builder $instance */
  25341. return $instance->dump(...$args);
  25342. }
  25343. /**
  25344. * Dump the raw current SQL with embedded bindings.
  25345. *
  25346. * @return \Illuminate\Database\Eloquent\Builder<static>
  25347. * @static
  25348. */
  25349. public static function dumpRawSql()
  25350. {
  25351. /** @var \Illuminate\Database\Query\Builder $instance */
  25352. return $instance->dumpRawSql();
  25353. }
  25354. /**
  25355. * Die and dump the current SQL and bindings.
  25356. *
  25357. * @return never
  25358. * @static
  25359. */
  25360. public static function dd()
  25361. {
  25362. /** @var \Illuminate\Database\Query\Builder $instance */
  25363. return $instance->dd();
  25364. }
  25365. /**
  25366. * Die and dump the current SQL with embedded bindings.
  25367. *
  25368. * @return never
  25369. * @static
  25370. */
  25371. public static function ddRawSql()
  25372. {
  25373. /** @var \Illuminate\Database\Query\Builder $instance */
  25374. return $instance->ddRawSql();
  25375. }
  25376. /**
  25377. * Add a where clause to determine if a "date" column is in the past to the query.
  25378. *
  25379. * @param array|string $columns
  25380. * @return \Illuminate\Database\Eloquent\Builder<static>
  25381. * @static
  25382. */
  25383. public static function wherePast($columns)
  25384. {
  25385. /** @var \Illuminate\Database\Query\Builder $instance */
  25386. return $instance->wherePast($columns);
  25387. }
  25388. /**
  25389. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25390. *
  25391. * @param array|string $columns
  25392. * @return \Illuminate\Database\Eloquent\Builder<static>
  25393. * @static
  25394. */
  25395. public static function whereNowOrPast($columns)
  25396. {
  25397. /** @var \Illuminate\Database\Query\Builder $instance */
  25398. return $instance->whereNowOrPast($columns);
  25399. }
  25400. /**
  25401. * Add an "or where" clause to determine if a "date" column is in the past to the query.
  25402. *
  25403. * @param array|string $columns
  25404. * @return \Illuminate\Database\Eloquent\Builder<static>
  25405. * @static
  25406. */
  25407. public static function orWherePast($columns)
  25408. {
  25409. /** @var \Illuminate\Database\Query\Builder $instance */
  25410. return $instance->orWherePast($columns);
  25411. }
  25412. /**
  25413. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25414. *
  25415. * @param array|string $columns
  25416. * @return \Illuminate\Database\Eloquent\Builder<static>
  25417. * @static
  25418. */
  25419. public static function orWhereNowOrPast($columns)
  25420. {
  25421. /** @var \Illuminate\Database\Query\Builder $instance */
  25422. return $instance->orWhereNowOrPast($columns);
  25423. }
  25424. /**
  25425. * Add a where clause to determine if a "date" column is in the future to the query.
  25426. *
  25427. * @param array|string $columns
  25428. * @return \Illuminate\Database\Eloquent\Builder<static>
  25429. * @static
  25430. */
  25431. public static function whereFuture($columns)
  25432. {
  25433. /** @var \Illuminate\Database\Query\Builder $instance */
  25434. return $instance->whereFuture($columns);
  25435. }
  25436. /**
  25437. * Add a where clause to determine if a "date" column is in the future or now to the query.
  25438. *
  25439. * @param array|string $columns
  25440. * @return \Illuminate\Database\Eloquent\Builder<static>
  25441. * @static
  25442. */
  25443. public static function whereNowOrFuture($columns)
  25444. {
  25445. /** @var \Illuminate\Database\Query\Builder $instance */
  25446. return $instance->whereNowOrFuture($columns);
  25447. }
  25448. /**
  25449. * Add an "or where" clause to determine if a "date" column is in the future to the query.
  25450. *
  25451. * @param array|string $columns
  25452. * @return \Illuminate\Database\Eloquent\Builder<static>
  25453. * @static
  25454. */
  25455. public static function orWhereFuture($columns)
  25456. {
  25457. /** @var \Illuminate\Database\Query\Builder $instance */
  25458. return $instance->orWhereFuture($columns);
  25459. }
  25460. /**
  25461. * Add an "or where" clause to determine if a "date" column is in the future or now to the query.
  25462. *
  25463. * @param array|string $columns
  25464. * @return \Illuminate\Database\Eloquent\Builder<static>
  25465. * @static
  25466. */
  25467. public static function orWhereNowOrFuture($columns)
  25468. {
  25469. /** @var \Illuminate\Database\Query\Builder $instance */
  25470. return $instance->orWhereNowOrFuture($columns);
  25471. }
  25472. /**
  25473. * Add a "where date" clause to determine if a "date" column is today to the query.
  25474. *
  25475. * @param array|string $columns
  25476. * @param string $boolean
  25477. * @return \Illuminate\Database\Eloquent\Builder<static>
  25478. * @static
  25479. */
  25480. public static function whereToday($columns, $boolean = 'and')
  25481. {
  25482. /** @var \Illuminate\Database\Query\Builder $instance */
  25483. return $instance->whereToday($columns, $boolean);
  25484. }
  25485. /**
  25486. * Add a "where date" clause to determine if a "date" column is before today.
  25487. *
  25488. * @param array|string $columns
  25489. * @return \Illuminate\Database\Eloquent\Builder<static>
  25490. * @static
  25491. */
  25492. public static function whereBeforeToday($columns)
  25493. {
  25494. /** @var \Illuminate\Database\Query\Builder $instance */
  25495. return $instance->whereBeforeToday($columns);
  25496. }
  25497. /**
  25498. * Add a "where date" clause to determine if a "date" column is today or before to the query.
  25499. *
  25500. * @param array|string $columns
  25501. * @return \Illuminate\Database\Eloquent\Builder<static>
  25502. * @static
  25503. */
  25504. public static function whereTodayOrBefore($columns)
  25505. {
  25506. /** @var \Illuminate\Database\Query\Builder $instance */
  25507. return $instance->whereTodayOrBefore($columns);
  25508. }
  25509. /**
  25510. * Add a "where date" clause to determine if a "date" column is after today.
  25511. *
  25512. * @param array|string $columns
  25513. * @return \Illuminate\Database\Eloquent\Builder<static>
  25514. * @static
  25515. */
  25516. public static function whereAfterToday($columns)
  25517. {
  25518. /** @var \Illuminate\Database\Query\Builder $instance */
  25519. return $instance->whereAfterToday($columns);
  25520. }
  25521. /**
  25522. * Add a "where date" clause to determine if a "date" column is today or after to the query.
  25523. *
  25524. * @param array|string $columns
  25525. * @return \Illuminate\Database\Eloquent\Builder<static>
  25526. * @static
  25527. */
  25528. public static function whereTodayOrAfter($columns)
  25529. {
  25530. /** @var \Illuminate\Database\Query\Builder $instance */
  25531. return $instance->whereTodayOrAfter($columns);
  25532. }
  25533. /**
  25534. * Add an "or where date" clause to determine if a "date" column is today to the query.
  25535. *
  25536. * @param array|string $columns
  25537. * @return \Illuminate\Database\Eloquent\Builder<static>
  25538. * @static
  25539. */
  25540. public static function orWhereToday($columns)
  25541. {
  25542. /** @var \Illuminate\Database\Query\Builder $instance */
  25543. return $instance->orWhereToday($columns);
  25544. }
  25545. /**
  25546. * Add an "or where date" clause to determine if a "date" column is before today.
  25547. *
  25548. * @param array|string $columns
  25549. * @return \Illuminate\Database\Eloquent\Builder<static>
  25550. * @static
  25551. */
  25552. public static function orWhereBeforeToday($columns)
  25553. {
  25554. /** @var \Illuminate\Database\Query\Builder $instance */
  25555. return $instance->orWhereBeforeToday($columns);
  25556. }
  25557. /**
  25558. * Add an "or where date" clause to determine if a "date" column is today or before to the query.
  25559. *
  25560. * @param array|string $columns
  25561. * @return \Illuminate\Database\Eloquent\Builder<static>
  25562. * @static
  25563. */
  25564. public static function orWhereTodayOrBefore($columns)
  25565. {
  25566. /** @var \Illuminate\Database\Query\Builder $instance */
  25567. return $instance->orWhereTodayOrBefore($columns);
  25568. }
  25569. /**
  25570. * Add an "or where date" clause to determine if a "date" column is after today.
  25571. *
  25572. * @param array|string $columns
  25573. * @return \Illuminate\Database\Eloquent\Builder<static>
  25574. * @static
  25575. */
  25576. public static function orWhereAfterToday($columns)
  25577. {
  25578. /** @var \Illuminate\Database\Query\Builder $instance */
  25579. return $instance->orWhereAfterToday($columns);
  25580. }
  25581. /**
  25582. * Add an "or where date" clause to determine if a "date" column is today or after to the query.
  25583. *
  25584. * @param array|string $columns
  25585. * @return \Illuminate\Database\Eloquent\Builder<static>
  25586. * @static
  25587. */
  25588. public static function orWhereTodayOrAfter($columns)
  25589. {
  25590. /** @var \Illuminate\Database\Query\Builder $instance */
  25591. return $instance->orWhereTodayOrAfter($columns);
  25592. }
  25593. /**
  25594. * Explains the query.
  25595. *
  25596. * @return \Illuminate\Support\Collection
  25597. * @static
  25598. */
  25599. public static function explain()
  25600. {
  25601. /** @var \Illuminate\Database\Query\Builder $instance */
  25602. return $instance->explain();
  25603. }
  25604. /**
  25605. * Register a custom macro.
  25606. *
  25607. * @param string $name
  25608. * @param object|callable $macro
  25609. * @param-closure-this static $macro
  25610. * @return void
  25611. * @static
  25612. */
  25613. public static function macro($name, $macro)
  25614. {
  25615. \Illuminate\Database\Query\Builder::macro($name, $macro);
  25616. }
  25617. /**
  25618. * Mix another object into the class.
  25619. *
  25620. * @param object $mixin
  25621. * @param bool $replace
  25622. * @return void
  25623. * @throws \ReflectionException
  25624. * @static
  25625. */
  25626. public static function mixin($mixin, $replace = true)
  25627. {
  25628. \Illuminate\Database\Query\Builder::mixin($mixin, $replace);
  25629. }
  25630. /**
  25631. * Flush the existing macros.
  25632. *
  25633. * @return void
  25634. * @static
  25635. */
  25636. public static function flushMacros()
  25637. {
  25638. \Illuminate\Database\Query\Builder::flushMacros();
  25639. }
  25640. /**
  25641. * Dynamically handle calls to the class.
  25642. *
  25643. * @param string $method
  25644. * @param array $parameters
  25645. * @return mixed
  25646. * @throws \BadMethodCallException
  25647. * @static
  25648. */
  25649. public static function macroCall($method, $parameters)
  25650. {
  25651. /** @var \Illuminate\Database\Query\Builder $instance */
  25652. return $instance->macroCall($method, $parameters);
  25653. }
  25654. }
  25655. class Event extends \Illuminate\Support\Facades\Event {}
  25656. class File extends \Illuminate\Support\Facades\File {}
  25657. class Gate extends \Illuminate\Support\Facades\Gate {}
  25658. class Hash extends \Illuminate\Support\Facades\Hash {}
  25659. class Http extends \Illuminate\Support\Facades\Http {}
  25660. class Js extends \Illuminate\Support\Js {}
  25661. class Lang extends \Illuminate\Support\Facades\Lang {}
  25662. class Log extends \Illuminate\Support\Facades\Log {}
  25663. class Mail extends \Illuminate\Support\Facades\Mail {}
  25664. class Notification extends \Illuminate\Support\Facades\Notification {}
  25665. class Number extends \Illuminate\Support\Number {}
  25666. class Password extends \Illuminate\Support\Facades\Password {}
  25667. class Process extends \Illuminate\Support\Facades\Process {}
  25668. class Queue extends \Illuminate\Support\Facades\Queue {}
  25669. class RateLimiter extends \Illuminate\Support\Facades\RateLimiter {}
  25670. class Redirect extends \Illuminate\Support\Facades\Redirect {}
  25671. class Request extends \Illuminate\Support\Facades\Request {}
  25672. class Response extends \Illuminate\Support\Facades\Response {}
  25673. class Route extends \Illuminate\Support\Facades\Route {}
  25674. class Schedule extends \Illuminate\Support\Facades\Schedule {}
  25675. class Schema extends \Illuminate\Support\Facades\Schema {}
  25676. class Session extends \Illuminate\Support\Facades\Session {}
  25677. class Storage extends \Illuminate\Support\Facades\Storage {}
  25678. class Str extends \Illuminate\Support\Str {}
  25679. class URL extends \Illuminate\Support\Facades\URL {}
  25680. class Uri extends \Illuminate\Support\Uri {}
  25681. class Validator extends \Illuminate\Support\Facades\Validator {}
  25682. class View extends \Illuminate\Support\Facades\View {}
  25683. class Vite extends \Illuminate\Support\Facades\Vite {}
  25684. }