_ide_helper.php 879 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831
  1. <?php
  2. /* @noinspection ALL */
  3. // @formatter:off
  4. // phpcs:ignoreFile
  5. /**
  6. * A helper file for Laravel, to provide autocomplete information to your IDE
  7. * Generated for Laravel 12.20.0.
  8. *
  9. * This file should not be included in your code, only analyzed by your IDE!
  10. *
  11. * @author Barry vd. Heuvel <barryvdh@gmail.com>
  12. * @see https://github.com/barryvdh/laravel-ide-helper
  13. */
  14. namespace Illuminate\Support\Facades {
  15. /**
  16. * @see \Illuminate\Foundation\Application
  17. */
  18. class App {
  19. /**
  20. * Begin configuring a new Laravel application instance.
  21. *
  22. * @param string|null $basePath
  23. * @return \Illuminate\Foundation\Configuration\ApplicationBuilder
  24. * @static
  25. */
  26. public static function configure($basePath = null)
  27. {
  28. return \Illuminate\Foundation\Application::configure($basePath);
  29. }
  30. /**
  31. * Infer the application's base directory from the environment.
  32. *
  33. * @return string
  34. * @static
  35. */
  36. public static function inferBasePath()
  37. {
  38. return \Illuminate\Foundation\Application::inferBasePath();
  39. }
  40. /**
  41. * Get the version number of the application.
  42. *
  43. * @return string
  44. * @static
  45. */
  46. public static function version()
  47. {
  48. /** @var \Illuminate\Foundation\Application $instance */
  49. return $instance->version();
  50. }
  51. /**
  52. * Run the given array of bootstrap classes.
  53. *
  54. * @param string[] $bootstrappers
  55. * @return void
  56. * @static
  57. */
  58. public static function bootstrapWith($bootstrappers)
  59. {
  60. /** @var \Illuminate\Foundation\Application $instance */
  61. $instance->bootstrapWith($bootstrappers);
  62. }
  63. /**
  64. * Register a callback to run after loading the environment.
  65. *
  66. * @param \Closure $callback
  67. * @return void
  68. * @static
  69. */
  70. public static function afterLoadingEnvironment($callback)
  71. {
  72. /** @var \Illuminate\Foundation\Application $instance */
  73. $instance->afterLoadingEnvironment($callback);
  74. }
  75. /**
  76. * Register a callback to run before a bootstrapper.
  77. *
  78. * @param string $bootstrapper
  79. * @param \Closure $callback
  80. * @return void
  81. * @static
  82. */
  83. public static function beforeBootstrapping($bootstrapper, $callback)
  84. {
  85. /** @var \Illuminate\Foundation\Application $instance */
  86. $instance->beforeBootstrapping($bootstrapper, $callback);
  87. }
  88. /**
  89. * Register a callback to run after a bootstrapper.
  90. *
  91. * @param string $bootstrapper
  92. * @param \Closure $callback
  93. * @return void
  94. * @static
  95. */
  96. public static function afterBootstrapping($bootstrapper, $callback)
  97. {
  98. /** @var \Illuminate\Foundation\Application $instance */
  99. $instance->afterBootstrapping($bootstrapper, $callback);
  100. }
  101. /**
  102. * Determine if the application has been bootstrapped before.
  103. *
  104. * @return bool
  105. * @static
  106. */
  107. public static function hasBeenBootstrapped()
  108. {
  109. /** @var \Illuminate\Foundation\Application $instance */
  110. return $instance->hasBeenBootstrapped();
  111. }
  112. /**
  113. * Set the base path for the application.
  114. *
  115. * @param string $basePath
  116. * @return \Illuminate\Foundation\Application
  117. * @static
  118. */
  119. public static function setBasePath($basePath)
  120. {
  121. /** @var \Illuminate\Foundation\Application $instance */
  122. return $instance->setBasePath($basePath);
  123. }
  124. /**
  125. * Get the path to the application "app" directory.
  126. *
  127. * @param string $path
  128. * @return string
  129. * @static
  130. */
  131. public static function path($path = '')
  132. {
  133. /** @var \Illuminate\Foundation\Application $instance */
  134. return $instance->path($path);
  135. }
  136. /**
  137. * Set the application directory.
  138. *
  139. * @param string $path
  140. * @return \Illuminate\Foundation\Application
  141. * @static
  142. */
  143. public static function useAppPath($path)
  144. {
  145. /** @var \Illuminate\Foundation\Application $instance */
  146. return $instance->useAppPath($path);
  147. }
  148. /**
  149. * Get the base path of the Laravel installation.
  150. *
  151. * @param string $path
  152. * @return string
  153. * @static
  154. */
  155. public static function basePath($path = '')
  156. {
  157. /** @var \Illuminate\Foundation\Application $instance */
  158. return $instance->basePath($path);
  159. }
  160. /**
  161. * Get the path to the bootstrap directory.
  162. *
  163. * @param string $path
  164. * @return string
  165. * @static
  166. */
  167. public static function bootstrapPath($path = '')
  168. {
  169. /** @var \Illuminate\Foundation\Application $instance */
  170. return $instance->bootstrapPath($path);
  171. }
  172. /**
  173. * Get the path to the service provider list in the bootstrap directory.
  174. *
  175. * @return string
  176. * @static
  177. */
  178. public static function getBootstrapProvidersPath()
  179. {
  180. /** @var \Illuminate\Foundation\Application $instance */
  181. return $instance->getBootstrapProvidersPath();
  182. }
  183. /**
  184. * Set the bootstrap file directory.
  185. *
  186. * @param string $path
  187. * @return \Illuminate\Foundation\Application
  188. * @static
  189. */
  190. public static function useBootstrapPath($path)
  191. {
  192. /** @var \Illuminate\Foundation\Application $instance */
  193. return $instance->useBootstrapPath($path);
  194. }
  195. /**
  196. * Get the path to the application configuration files.
  197. *
  198. * @param string $path
  199. * @return string
  200. * @static
  201. */
  202. public static function configPath($path = '')
  203. {
  204. /** @var \Illuminate\Foundation\Application $instance */
  205. return $instance->configPath($path);
  206. }
  207. /**
  208. * Set the configuration directory.
  209. *
  210. * @param string $path
  211. * @return \Illuminate\Foundation\Application
  212. * @static
  213. */
  214. public static function useConfigPath($path)
  215. {
  216. /** @var \Illuminate\Foundation\Application $instance */
  217. return $instance->useConfigPath($path);
  218. }
  219. /**
  220. * Get the path to the database directory.
  221. *
  222. * @param string $path
  223. * @return string
  224. * @static
  225. */
  226. public static function databasePath($path = '')
  227. {
  228. /** @var \Illuminate\Foundation\Application $instance */
  229. return $instance->databasePath($path);
  230. }
  231. /**
  232. * Set the database directory.
  233. *
  234. * @param string $path
  235. * @return \Illuminate\Foundation\Application
  236. * @static
  237. */
  238. public static function useDatabasePath($path)
  239. {
  240. /** @var \Illuminate\Foundation\Application $instance */
  241. return $instance->useDatabasePath($path);
  242. }
  243. /**
  244. * Get the path to the language files.
  245. *
  246. * @param string $path
  247. * @return string
  248. * @static
  249. */
  250. public static function langPath($path = '')
  251. {
  252. /** @var \Illuminate\Foundation\Application $instance */
  253. return $instance->langPath($path);
  254. }
  255. /**
  256. * Set the language file directory.
  257. *
  258. * @param string $path
  259. * @return \Illuminate\Foundation\Application
  260. * @static
  261. */
  262. public static function useLangPath($path)
  263. {
  264. /** @var \Illuminate\Foundation\Application $instance */
  265. return $instance->useLangPath($path);
  266. }
  267. /**
  268. * Get the path to the public / web directory.
  269. *
  270. * @param string $path
  271. * @return string
  272. * @static
  273. */
  274. public static function publicPath($path = '')
  275. {
  276. /** @var \Illuminate\Foundation\Application $instance */
  277. return $instance->publicPath($path);
  278. }
  279. /**
  280. * Set the public / web directory.
  281. *
  282. * @param string $path
  283. * @return \Illuminate\Foundation\Application
  284. * @static
  285. */
  286. public static function usePublicPath($path)
  287. {
  288. /** @var \Illuminate\Foundation\Application $instance */
  289. return $instance->usePublicPath($path);
  290. }
  291. /**
  292. * Get the path to the storage directory.
  293. *
  294. * @param string $path
  295. * @return string
  296. * @static
  297. */
  298. public static function storagePath($path = '')
  299. {
  300. /** @var \Illuminate\Foundation\Application $instance */
  301. return $instance->storagePath($path);
  302. }
  303. /**
  304. * Set the storage directory.
  305. *
  306. * @param string $path
  307. * @return \Illuminate\Foundation\Application
  308. * @static
  309. */
  310. public static function useStoragePath($path)
  311. {
  312. /** @var \Illuminate\Foundation\Application $instance */
  313. return $instance->useStoragePath($path);
  314. }
  315. /**
  316. * Get the path to the resources directory.
  317. *
  318. * @param string $path
  319. * @return string
  320. * @static
  321. */
  322. public static function resourcePath($path = '')
  323. {
  324. /** @var \Illuminate\Foundation\Application $instance */
  325. return $instance->resourcePath($path);
  326. }
  327. /**
  328. * Get the path to the views directory.
  329. *
  330. * This method returns the first configured path in the array of view paths.
  331. *
  332. * @param string $path
  333. * @return string
  334. * @static
  335. */
  336. public static function viewPath($path = '')
  337. {
  338. /** @var \Illuminate\Foundation\Application $instance */
  339. return $instance->viewPath($path);
  340. }
  341. /**
  342. * Join the given paths together.
  343. *
  344. * @param string $basePath
  345. * @param string $path
  346. * @return string
  347. * @static
  348. */
  349. public static function joinPaths($basePath, $path = '')
  350. {
  351. /** @var \Illuminate\Foundation\Application $instance */
  352. return $instance->joinPaths($basePath, $path);
  353. }
  354. /**
  355. * Get the path to the environment file directory.
  356. *
  357. * @return string
  358. * @static
  359. */
  360. public static function environmentPath()
  361. {
  362. /** @var \Illuminate\Foundation\Application $instance */
  363. return $instance->environmentPath();
  364. }
  365. /**
  366. * Set the directory for the environment file.
  367. *
  368. * @param string $path
  369. * @return \Illuminate\Foundation\Application
  370. * @static
  371. */
  372. public static function useEnvironmentPath($path)
  373. {
  374. /** @var \Illuminate\Foundation\Application $instance */
  375. return $instance->useEnvironmentPath($path);
  376. }
  377. /**
  378. * Set the environment file to be loaded during bootstrapping.
  379. *
  380. * @param string $file
  381. * @return \Illuminate\Foundation\Application
  382. * @static
  383. */
  384. public static function loadEnvironmentFrom($file)
  385. {
  386. /** @var \Illuminate\Foundation\Application $instance */
  387. return $instance->loadEnvironmentFrom($file);
  388. }
  389. /**
  390. * Get the environment file the application is using.
  391. *
  392. * @return string
  393. * @static
  394. */
  395. public static function environmentFile()
  396. {
  397. /** @var \Illuminate\Foundation\Application $instance */
  398. return $instance->environmentFile();
  399. }
  400. /**
  401. * Get the fully qualified path to the environment file.
  402. *
  403. * @return string
  404. * @static
  405. */
  406. public static function environmentFilePath()
  407. {
  408. /** @var \Illuminate\Foundation\Application $instance */
  409. return $instance->environmentFilePath();
  410. }
  411. /**
  412. * Get or check the current application environment.
  413. *
  414. * @param string|array $environments
  415. * @return string|bool
  416. * @static
  417. */
  418. public static function environment(...$environments)
  419. {
  420. /** @var \Illuminate\Foundation\Application $instance */
  421. return $instance->environment(...$environments);
  422. }
  423. /**
  424. * Determine if the application is in the local environment.
  425. *
  426. * @return bool
  427. * @static
  428. */
  429. public static function isLocal()
  430. {
  431. /** @var \Illuminate\Foundation\Application $instance */
  432. return $instance->isLocal();
  433. }
  434. /**
  435. * Determine if the application is in the production environment.
  436. *
  437. * @return bool
  438. * @static
  439. */
  440. public static function isProduction()
  441. {
  442. /** @var \Illuminate\Foundation\Application $instance */
  443. return $instance->isProduction();
  444. }
  445. /**
  446. * Detect the application's current environment.
  447. *
  448. * @param \Closure $callback
  449. * @return string
  450. * @static
  451. */
  452. public static function detectEnvironment($callback)
  453. {
  454. /** @var \Illuminate\Foundation\Application $instance */
  455. return $instance->detectEnvironment($callback);
  456. }
  457. /**
  458. * Determine if the application is running in the console.
  459. *
  460. * @return bool
  461. * @static
  462. */
  463. public static function runningInConsole()
  464. {
  465. /** @var \Illuminate\Foundation\Application $instance */
  466. return $instance->runningInConsole();
  467. }
  468. /**
  469. * Determine if the application is running any of the given console commands.
  470. *
  471. * @param string|array $commands
  472. * @return bool
  473. * @static
  474. */
  475. public static function runningConsoleCommand(...$commands)
  476. {
  477. /** @var \Illuminate\Foundation\Application $instance */
  478. return $instance->runningConsoleCommand(...$commands);
  479. }
  480. /**
  481. * Determine if the application is running unit tests.
  482. *
  483. * @return bool
  484. * @static
  485. */
  486. public static function runningUnitTests()
  487. {
  488. /** @var \Illuminate\Foundation\Application $instance */
  489. return $instance->runningUnitTests();
  490. }
  491. /**
  492. * Determine if the application is running with debug mode enabled.
  493. *
  494. * @return bool
  495. * @static
  496. */
  497. public static function hasDebugModeEnabled()
  498. {
  499. /** @var \Illuminate\Foundation\Application $instance */
  500. return $instance->hasDebugModeEnabled();
  501. }
  502. /**
  503. * Register a new registered listener.
  504. *
  505. * @param callable $callback
  506. * @return void
  507. * @static
  508. */
  509. public static function registered($callback)
  510. {
  511. /** @var \Illuminate\Foundation\Application $instance */
  512. $instance->registered($callback);
  513. }
  514. /**
  515. * Register all of the configured providers.
  516. *
  517. * @return void
  518. * @static
  519. */
  520. public static function registerConfiguredProviders()
  521. {
  522. /** @var \Illuminate\Foundation\Application $instance */
  523. $instance->registerConfiguredProviders();
  524. }
  525. /**
  526. * Register a service provider with the application.
  527. *
  528. * @param \Illuminate\Support\ServiceProvider|string $provider
  529. * @param bool $force
  530. * @return \Illuminate\Support\ServiceProvider
  531. * @static
  532. */
  533. public static function register($provider, $force = false)
  534. {
  535. /** @var \Illuminate\Foundation\Application $instance */
  536. return $instance->register($provider, $force);
  537. }
  538. /**
  539. * Get the registered service provider instance if it exists.
  540. *
  541. * @param \Illuminate\Support\ServiceProvider|string $provider
  542. * @return \Illuminate\Support\ServiceProvider|null
  543. * @static
  544. */
  545. public static function getProvider($provider)
  546. {
  547. /** @var \Illuminate\Foundation\Application $instance */
  548. return $instance->getProvider($provider);
  549. }
  550. /**
  551. * Get the registered service provider instances if any exist.
  552. *
  553. * @param \Illuminate\Support\ServiceProvider|string $provider
  554. * @return array
  555. * @static
  556. */
  557. public static function getProviders($provider)
  558. {
  559. /** @var \Illuminate\Foundation\Application $instance */
  560. return $instance->getProviders($provider);
  561. }
  562. /**
  563. * Resolve a service provider instance from the class name.
  564. *
  565. * @param string $provider
  566. * @return \Illuminate\Support\ServiceProvider
  567. * @static
  568. */
  569. public static function resolveProvider($provider)
  570. {
  571. /** @var \Illuminate\Foundation\Application $instance */
  572. return $instance->resolveProvider($provider);
  573. }
  574. /**
  575. * Load and boot all of the remaining deferred providers.
  576. *
  577. * @return void
  578. * @static
  579. */
  580. public static function loadDeferredProviders()
  581. {
  582. /** @var \Illuminate\Foundation\Application $instance */
  583. $instance->loadDeferredProviders();
  584. }
  585. /**
  586. * Load the provider for a deferred service.
  587. *
  588. * @param string $service
  589. * @return void
  590. * @static
  591. */
  592. public static function loadDeferredProvider($service)
  593. {
  594. /** @var \Illuminate\Foundation\Application $instance */
  595. $instance->loadDeferredProvider($service);
  596. }
  597. /**
  598. * Register a deferred provider and service.
  599. *
  600. * @param string $provider
  601. * @param string|null $service
  602. * @return void
  603. * @static
  604. */
  605. public static function registerDeferredProvider($provider, $service = null)
  606. {
  607. /** @var \Illuminate\Foundation\Application $instance */
  608. $instance->registerDeferredProvider($provider, $service);
  609. }
  610. /**
  611. * Resolve the given type from the container.
  612. *
  613. * @template TClass of object
  614. * @param string|class-string<TClass> $abstract
  615. * @param array $parameters
  616. * @return ($abstract is class-string<TClass> ? TClass : mixed)
  617. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  618. * @static
  619. */
  620. public static function make($abstract, $parameters = [])
  621. {
  622. /** @var \Illuminate\Foundation\Application $instance */
  623. return $instance->make($abstract, $parameters);
  624. }
  625. /**
  626. * Determine if the given abstract type has been bound.
  627. *
  628. * @param string $abstract
  629. * @return bool
  630. * @static
  631. */
  632. public static function bound($abstract)
  633. {
  634. /** @var \Illuminate\Foundation\Application $instance */
  635. return $instance->bound($abstract);
  636. }
  637. /**
  638. * Determine if the application has booted.
  639. *
  640. * @return bool
  641. * @static
  642. */
  643. public static function isBooted()
  644. {
  645. /** @var \Illuminate\Foundation\Application $instance */
  646. return $instance->isBooted();
  647. }
  648. /**
  649. * Boot the application's service providers.
  650. *
  651. * @return void
  652. * @static
  653. */
  654. public static function boot()
  655. {
  656. /** @var \Illuminate\Foundation\Application $instance */
  657. $instance->boot();
  658. }
  659. /**
  660. * Register a new boot listener.
  661. *
  662. * @param callable $callback
  663. * @return void
  664. * @static
  665. */
  666. public static function booting($callback)
  667. {
  668. /** @var \Illuminate\Foundation\Application $instance */
  669. $instance->booting($callback);
  670. }
  671. /**
  672. * Register a new "booted" listener.
  673. *
  674. * @param callable $callback
  675. * @return void
  676. * @static
  677. */
  678. public static function booted($callback)
  679. {
  680. /** @var \Illuminate\Foundation\Application $instance */
  681. $instance->booted($callback);
  682. }
  683. /**
  684. * {@inheritdoc}
  685. *
  686. * @return \Symfony\Component\HttpFoundation\Response
  687. * @static
  688. */
  689. public static function handle($request, $type = 1, $catch = true)
  690. {
  691. /** @var \Illuminate\Foundation\Application $instance */
  692. return $instance->handle($request, $type, $catch);
  693. }
  694. /**
  695. * Handle the incoming HTTP request and send the response to the browser.
  696. *
  697. * @param \Illuminate\Http\Request $request
  698. * @return void
  699. * @static
  700. */
  701. public static function handleRequest($request)
  702. {
  703. /** @var \Illuminate\Foundation\Application $instance */
  704. $instance->handleRequest($request);
  705. }
  706. /**
  707. * Handle the incoming Artisan command.
  708. *
  709. * @param \Symfony\Component\Console\Input\InputInterface $input
  710. * @return int
  711. * @static
  712. */
  713. public static function handleCommand($input)
  714. {
  715. /** @var \Illuminate\Foundation\Application $instance */
  716. return $instance->handleCommand($input);
  717. }
  718. /**
  719. * Determine if the framework's base configuration should be merged.
  720. *
  721. * @return bool
  722. * @static
  723. */
  724. public static function shouldMergeFrameworkConfiguration()
  725. {
  726. /** @var \Illuminate\Foundation\Application $instance */
  727. return $instance->shouldMergeFrameworkConfiguration();
  728. }
  729. /**
  730. * Indicate that the framework's base configuration should not be merged.
  731. *
  732. * @return \Illuminate\Foundation\Application
  733. * @static
  734. */
  735. public static function dontMergeFrameworkConfiguration()
  736. {
  737. /** @var \Illuminate\Foundation\Application $instance */
  738. return $instance->dontMergeFrameworkConfiguration();
  739. }
  740. /**
  741. * Determine if middleware has been disabled for the application.
  742. *
  743. * @return bool
  744. * @static
  745. */
  746. public static function shouldSkipMiddleware()
  747. {
  748. /** @var \Illuminate\Foundation\Application $instance */
  749. return $instance->shouldSkipMiddleware();
  750. }
  751. /**
  752. * Get the path to the cached services.php file.
  753. *
  754. * @return string
  755. * @static
  756. */
  757. public static function getCachedServicesPath()
  758. {
  759. /** @var \Illuminate\Foundation\Application $instance */
  760. return $instance->getCachedServicesPath();
  761. }
  762. /**
  763. * Get the path to the cached packages.php file.
  764. *
  765. * @return string
  766. * @static
  767. */
  768. public static function getCachedPackagesPath()
  769. {
  770. /** @var \Illuminate\Foundation\Application $instance */
  771. return $instance->getCachedPackagesPath();
  772. }
  773. /**
  774. * Determine if the application configuration is cached.
  775. *
  776. * @return bool
  777. * @static
  778. */
  779. public static function configurationIsCached()
  780. {
  781. /** @var \Illuminate\Foundation\Application $instance */
  782. return $instance->configurationIsCached();
  783. }
  784. /**
  785. * Get the path to the configuration cache file.
  786. *
  787. * @return string
  788. * @static
  789. */
  790. public static function getCachedConfigPath()
  791. {
  792. /** @var \Illuminate\Foundation\Application $instance */
  793. return $instance->getCachedConfigPath();
  794. }
  795. /**
  796. * Determine if the application routes are cached.
  797. *
  798. * @return bool
  799. * @static
  800. */
  801. public static function routesAreCached()
  802. {
  803. /** @var \Illuminate\Foundation\Application $instance */
  804. return $instance->routesAreCached();
  805. }
  806. /**
  807. * Get the path to the routes cache file.
  808. *
  809. * @return string
  810. * @static
  811. */
  812. public static function getCachedRoutesPath()
  813. {
  814. /** @var \Illuminate\Foundation\Application $instance */
  815. return $instance->getCachedRoutesPath();
  816. }
  817. /**
  818. * Determine if the application events are cached.
  819. *
  820. * @return bool
  821. * @static
  822. */
  823. public static function eventsAreCached()
  824. {
  825. /** @var \Illuminate\Foundation\Application $instance */
  826. return $instance->eventsAreCached();
  827. }
  828. /**
  829. * Get the path to the events cache file.
  830. *
  831. * @return string
  832. * @static
  833. */
  834. public static function getCachedEventsPath()
  835. {
  836. /** @var \Illuminate\Foundation\Application $instance */
  837. return $instance->getCachedEventsPath();
  838. }
  839. /**
  840. * Add new prefix to list of absolute path prefixes.
  841. *
  842. * @param string $prefix
  843. * @return \Illuminate\Foundation\Application
  844. * @static
  845. */
  846. public static function addAbsoluteCachePathPrefix($prefix)
  847. {
  848. /** @var \Illuminate\Foundation\Application $instance */
  849. return $instance->addAbsoluteCachePathPrefix($prefix);
  850. }
  851. /**
  852. * Get an instance of the maintenance mode manager implementation.
  853. *
  854. * @return \Illuminate\Contracts\Foundation\MaintenanceMode
  855. * @static
  856. */
  857. public static function maintenanceMode()
  858. {
  859. /** @var \Illuminate\Foundation\Application $instance */
  860. return $instance->maintenanceMode();
  861. }
  862. /**
  863. * Determine if the application is currently down for maintenance.
  864. *
  865. * @return bool
  866. * @static
  867. */
  868. public static function isDownForMaintenance()
  869. {
  870. /** @var \Illuminate\Foundation\Application $instance */
  871. return $instance->isDownForMaintenance();
  872. }
  873. /**
  874. * Throw an HttpException with the given data.
  875. *
  876. * @param int $code
  877. * @param string $message
  878. * @param array $headers
  879. * @return never
  880. * @throws \Symfony\Component\HttpKernel\Exception\HttpException
  881. * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  882. * @static
  883. */
  884. public static function abort($code, $message = '', $headers = [])
  885. {
  886. /** @var \Illuminate\Foundation\Application $instance */
  887. return $instance->abort($code, $message, $headers);
  888. }
  889. /**
  890. * Register a terminating callback with the application.
  891. *
  892. * @param callable|string $callback
  893. * @return \Illuminate\Foundation\Application
  894. * @static
  895. */
  896. public static function terminating($callback)
  897. {
  898. /** @var \Illuminate\Foundation\Application $instance */
  899. return $instance->terminating($callback);
  900. }
  901. /**
  902. * Terminate the application.
  903. *
  904. * @return void
  905. * @static
  906. */
  907. public static function terminate()
  908. {
  909. /** @var \Illuminate\Foundation\Application $instance */
  910. $instance->terminate();
  911. }
  912. /**
  913. * Get the service providers that have been loaded.
  914. *
  915. * @return array<string, bool>
  916. * @static
  917. */
  918. public static function getLoadedProviders()
  919. {
  920. /** @var \Illuminate\Foundation\Application $instance */
  921. return $instance->getLoadedProviders();
  922. }
  923. /**
  924. * Determine if the given service provider is loaded.
  925. *
  926. * @param string $provider
  927. * @return bool
  928. * @static
  929. */
  930. public static function providerIsLoaded($provider)
  931. {
  932. /** @var \Illuminate\Foundation\Application $instance */
  933. return $instance->providerIsLoaded($provider);
  934. }
  935. /**
  936. * Get the application's deferred services.
  937. *
  938. * @return array
  939. * @static
  940. */
  941. public static function getDeferredServices()
  942. {
  943. /** @var \Illuminate\Foundation\Application $instance */
  944. return $instance->getDeferredServices();
  945. }
  946. /**
  947. * Set the application's deferred services.
  948. *
  949. * @param array $services
  950. * @return void
  951. * @static
  952. */
  953. public static function setDeferredServices($services)
  954. {
  955. /** @var \Illuminate\Foundation\Application $instance */
  956. $instance->setDeferredServices($services);
  957. }
  958. /**
  959. * Determine if the given service is a deferred service.
  960. *
  961. * @param string $service
  962. * @return bool
  963. * @static
  964. */
  965. public static function isDeferredService($service)
  966. {
  967. /** @var \Illuminate\Foundation\Application $instance */
  968. return $instance->isDeferredService($service);
  969. }
  970. /**
  971. * Add an array of services to the application's deferred services.
  972. *
  973. * @param array $services
  974. * @return void
  975. * @static
  976. */
  977. public static function addDeferredServices($services)
  978. {
  979. /** @var \Illuminate\Foundation\Application $instance */
  980. $instance->addDeferredServices($services);
  981. }
  982. /**
  983. * Remove an array of services from the application's deferred services.
  984. *
  985. * @param array $services
  986. * @return void
  987. * @static
  988. */
  989. public static function removeDeferredServices($services)
  990. {
  991. /** @var \Illuminate\Foundation\Application $instance */
  992. $instance->removeDeferredServices($services);
  993. }
  994. /**
  995. * Configure the real-time facade namespace.
  996. *
  997. * @param string $namespace
  998. * @return void
  999. * @static
  1000. */
  1001. public static function provideFacades($namespace)
  1002. {
  1003. /** @var \Illuminate\Foundation\Application $instance */
  1004. $instance->provideFacades($namespace);
  1005. }
  1006. /**
  1007. * Get the current application locale.
  1008. *
  1009. * @return string
  1010. * @static
  1011. */
  1012. public static function getLocale()
  1013. {
  1014. /** @var \Illuminate\Foundation\Application $instance */
  1015. return $instance->getLocale();
  1016. }
  1017. /**
  1018. * Get the current application locale.
  1019. *
  1020. * @return string
  1021. * @static
  1022. */
  1023. public static function currentLocale()
  1024. {
  1025. /** @var \Illuminate\Foundation\Application $instance */
  1026. return $instance->currentLocale();
  1027. }
  1028. /**
  1029. * Get the current application fallback locale.
  1030. *
  1031. * @return string
  1032. * @static
  1033. */
  1034. public static function getFallbackLocale()
  1035. {
  1036. /** @var \Illuminate\Foundation\Application $instance */
  1037. return $instance->getFallbackLocale();
  1038. }
  1039. /**
  1040. * Set the current application locale.
  1041. *
  1042. * @param string $locale
  1043. * @return void
  1044. * @static
  1045. */
  1046. public static function setLocale($locale)
  1047. {
  1048. /** @var \Illuminate\Foundation\Application $instance */
  1049. $instance->setLocale($locale);
  1050. }
  1051. /**
  1052. * Set the current application fallback locale.
  1053. *
  1054. * @param string $fallbackLocale
  1055. * @return void
  1056. * @static
  1057. */
  1058. public static function setFallbackLocale($fallbackLocale)
  1059. {
  1060. /** @var \Illuminate\Foundation\Application $instance */
  1061. $instance->setFallbackLocale($fallbackLocale);
  1062. }
  1063. /**
  1064. * Determine if the application locale is the given locale.
  1065. *
  1066. * @param string $locale
  1067. * @return bool
  1068. * @static
  1069. */
  1070. public static function isLocale($locale)
  1071. {
  1072. /** @var \Illuminate\Foundation\Application $instance */
  1073. return $instance->isLocale($locale);
  1074. }
  1075. /**
  1076. * Register the core class aliases in the container.
  1077. *
  1078. * @return void
  1079. * @static
  1080. */
  1081. public static function registerCoreContainerAliases()
  1082. {
  1083. /** @var \Illuminate\Foundation\Application $instance */
  1084. $instance->registerCoreContainerAliases();
  1085. }
  1086. /**
  1087. * Flush the container of all bindings and resolved instances.
  1088. *
  1089. * @return void
  1090. * @static
  1091. */
  1092. public static function flush()
  1093. {
  1094. /** @var \Illuminate\Foundation\Application $instance */
  1095. $instance->flush();
  1096. }
  1097. /**
  1098. * Get the application namespace.
  1099. *
  1100. * @return string
  1101. * @throws \RuntimeException
  1102. * @static
  1103. */
  1104. public static function getNamespace()
  1105. {
  1106. /** @var \Illuminate\Foundation\Application $instance */
  1107. return $instance->getNamespace();
  1108. }
  1109. /**
  1110. * Define a contextual binding.
  1111. *
  1112. * @param array|string $concrete
  1113. * @return \Illuminate\Contracts\Container\ContextualBindingBuilder
  1114. * @static
  1115. */
  1116. public static function when($concrete)
  1117. {
  1118. //Method inherited from \Illuminate\Container\Container
  1119. /** @var \Illuminate\Foundation\Application $instance */
  1120. return $instance->when($concrete);
  1121. }
  1122. /**
  1123. * Define a contextual binding based on an attribute.
  1124. *
  1125. * @param string $attribute
  1126. * @param \Closure $handler
  1127. * @return void
  1128. * @static
  1129. */
  1130. public static function whenHasAttribute($attribute, $handler)
  1131. {
  1132. //Method inherited from \Illuminate\Container\Container
  1133. /** @var \Illuminate\Foundation\Application $instance */
  1134. $instance->whenHasAttribute($attribute, $handler);
  1135. }
  1136. /**
  1137. * Returns true if the container can return an entry for the given identifier.
  1138. *
  1139. * Returns false otherwise.
  1140. *
  1141. * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
  1142. * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
  1143. *
  1144. * @return bool
  1145. * @param string $id Identifier of the entry to look for.
  1146. * @return bool
  1147. * @static
  1148. */
  1149. public static function has($id)
  1150. {
  1151. //Method inherited from \Illuminate\Container\Container
  1152. /** @var \Illuminate\Foundation\Application $instance */
  1153. return $instance->has($id);
  1154. }
  1155. /**
  1156. * Determine if the given abstract type has been resolved.
  1157. *
  1158. * @param string $abstract
  1159. * @return bool
  1160. * @static
  1161. */
  1162. public static function resolved($abstract)
  1163. {
  1164. //Method inherited from \Illuminate\Container\Container
  1165. /** @var \Illuminate\Foundation\Application $instance */
  1166. return $instance->resolved($abstract);
  1167. }
  1168. /**
  1169. * Determine if a given type is shared.
  1170. *
  1171. * @param string $abstract
  1172. * @return bool
  1173. * @static
  1174. */
  1175. public static function isShared($abstract)
  1176. {
  1177. //Method inherited from \Illuminate\Container\Container
  1178. /** @var \Illuminate\Foundation\Application $instance */
  1179. return $instance->isShared($abstract);
  1180. }
  1181. /**
  1182. * Determine if a given string is an alias.
  1183. *
  1184. * @param string $name
  1185. * @return bool
  1186. * @static
  1187. */
  1188. public static function isAlias($name)
  1189. {
  1190. //Method inherited from \Illuminate\Container\Container
  1191. /** @var \Illuminate\Foundation\Application $instance */
  1192. return $instance->isAlias($name);
  1193. }
  1194. /**
  1195. * Register a binding with the container.
  1196. *
  1197. * @param \Closure|string $abstract
  1198. * @param \Closure|string|null $concrete
  1199. * @param bool $shared
  1200. * @return void
  1201. * @throws \TypeError
  1202. * @throws ReflectionException
  1203. * @static
  1204. */
  1205. public static function bind($abstract, $concrete = null, $shared = false)
  1206. {
  1207. //Method inherited from \Illuminate\Container\Container
  1208. /** @var \Illuminate\Foundation\Application $instance */
  1209. $instance->bind($abstract, $concrete, $shared);
  1210. }
  1211. /**
  1212. * Determine if the container has a method binding.
  1213. *
  1214. * @param string $method
  1215. * @return bool
  1216. * @static
  1217. */
  1218. public static function hasMethodBinding($method)
  1219. {
  1220. //Method inherited from \Illuminate\Container\Container
  1221. /** @var \Illuminate\Foundation\Application $instance */
  1222. return $instance->hasMethodBinding($method);
  1223. }
  1224. /**
  1225. * Bind a callback to resolve with Container::call.
  1226. *
  1227. * @param array|string $method
  1228. * @param \Closure $callback
  1229. * @return void
  1230. * @static
  1231. */
  1232. public static function bindMethod($method, $callback)
  1233. {
  1234. //Method inherited from \Illuminate\Container\Container
  1235. /** @var \Illuminate\Foundation\Application $instance */
  1236. $instance->bindMethod($method, $callback);
  1237. }
  1238. /**
  1239. * Get the method binding for the given method.
  1240. *
  1241. * @param string $method
  1242. * @param mixed $instance
  1243. * @return mixed
  1244. * @static
  1245. */
  1246. public static function callMethodBinding($method, $instance)
  1247. {
  1248. //Method inherited from \Illuminate\Container\Container
  1249. /** @var \Illuminate\Foundation\Application $instance */
  1250. return $instance->callMethodBinding($method, $instance);
  1251. }
  1252. /**
  1253. * Add a contextual binding to the container.
  1254. *
  1255. * @param string $concrete
  1256. * @param \Closure|string $abstract
  1257. * @param \Closure|string $implementation
  1258. * @return void
  1259. * @static
  1260. */
  1261. public static function addContextualBinding($concrete, $abstract, $implementation)
  1262. {
  1263. //Method inherited from \Illuminate\Container\Container
  1264. /** @var \Illuminate\Foundation\Application $instance */
  1265. $instance->addContextualBinding($concrete, $abstract, $implementation);
  1266. }
  1267. /**
  1268. * Register a binding if it hasn't already been registered.
  1269. *
  1270. * @param \Closure|string $abstract
  1271. * @param \Closure|string|null $concrete
  1272. * @param bool $shared
  1273. * @return void
  1274. * @static
  1275. */
  1276. public static function bindIf($abstract, $concrete = null, $shared = false)
  1277. {
  1278. //Method inherited from \Illuminate\Container\Container
  1279. /** @var \Illuminate\Foundation\Application $instance */
  1280. $instance->bindIf($abstract, $concrete, $shared);
  1281. }
  1282. /**
  1283. * Register a shared binding in the container.
  1284. *
  1285. * @param \Closure|string $abstract
  1286. * @param \Closure|string|null $concrete
  1287. * @return void
  1288. * @static
  1289. */
  1290. public static function singleton($abstract, $concrete = null)
  1291. {
  1292. //Method inherited from \Illuminate\Container\Container
  1293. /** @var \Illuminate\Foundation\Application $instance */
  1294. $instance->singleton($abstract, $concrete);
  1295. }
  1296. /**
  1297. * Register a shared binding if it hasn't already been registered.
  1298. *
  1299. * @param \Closure|string $abstract
  1300. * @param \Closure|string|null $concrete
  1301. * @return void
  1302. * @static
  1303. */
  1304. public static function singletonIf($abstract, $concrete = null)
  1305. {
  1306. //Method inherited from \Illuminate\Container\Container
  1307. /** @var \Illuminate\Foundation\Application $instance */
  1308. $instance->singletonIf($abstract, $concrete);
  1309. }
  1310. /**
  1311. * Register a scoped binding in the container.
  1312. *
  1313. * @param \Closure|string $abstract
  1314. * @param \Closure|string|null $concrete
  1315. * @return void
  1316. * @static
  1317. */
  1318. public static function scoped($abstract, $concrete = null)
  1319. {
  1320. //Method inherited from \Illuminate\Container\Container
  1321. /** @var \Illuminate\Foundation\Application $instance */
  1322. $instance->scoped($abstract, $concrete);
  1323. }
  1324. /**
  1325. * Register a scoped binding if it hasn't already been registered.
  1326. *
  1327. * @param \Closure|string $abstract
  1328. * @param \Closure|string|null $concrete
  1329. * @return void
  1330. * @static
  1331. */
  1332. public static function scopedIf($abstract, $concrete = null)
  1333. {
  1334. //Method inherited from \Illuminate\Container\Container
  1335. /** @var \Illuminate\Foundation\Application $instance */
  1336. $instance->scopedIf($abstract, $concrete);
  1337. }
  1338. /**
  1339. * "Extend" an abstract type in the container.
  1340. *
  1341. * @param string $abstract
  1342. * @param \Closure $closure
  1343. * @return void
  1344. * @throws \InvalidArgumentException
  1345. * @static
  1346. */
  1347. public static function extend($abstract, $closure)
  1348. {
  1349. //Method inherited from \Illuminate\Container\Container
  1350. /** @var \Illuminate\Foundation\Application $instance */
  1351. $instance->extend($abstract, $closure);
  1352. }
  1353. /**
  1354. * Register an existing instance as shared in the container.
  1355. *
  1356. * @template TInstance of mixed
  1357. * @param string $abstract
  1358. * @param TInstance $instance
  1359. * @return TInstance
  1360. * @static
  1361. */
  1362. public static function instance($abstract, $instance)
  1363. {
  1364. //Method inherited from \Illuminate\Container\Container
  1365. /** @var \Illuminate\Foundation\Application $instance */
  1366. return $instance->instance($abstract, $instance);
  1367. }
  1368. /**
  1369. * Assign a set of tags to a given binding.
  1370. *
  1371. * @param array|string $abstracts
  1372. * @param array|mixed $tags
  1373. * @return void
  1374. * @static
  1375. */
  1376. public static function tag($abstracts, $tags)
  1377. {
  1378. //Method inherited from \Illuminate\Container\Container
  1379. /** @var \Illuminate\Foundation\Application $instance */
  1380. $instance->tag($abstracts, $tags);
  1381. }
  1382. /**
  1383. * Resolve all of the bindings for a given tag.
  1384. *
  1385. * @param string $tag
  1386. * @return iterable
  1387. * @static
  1388. */
  1389. public static function tagged($tag)
  1390. {
  1391. //Method inherited from \Illuminate\Container\Container
  1392. /** @var \Illuminate\Foundation\Application $instance */
  1393. return $instance->tagged($tag);
  1394. }
  1395. /**
  1396. * Alias a type to a different name.
  1397. *
  1398. * @param string $abstract
  1399. * @param string $alias
  1400. * @return void
  1401. * @throws \LogicException
  1402. * @static
  1403. */
  1404. public static function alias($abstract, $alias)
  1405. {
  1406. //Method inherited from \Illuminate\Container\Container
  1407. /** @var \Illuminate\Foundation\Application $instance */
  1408. $instance->alias($abstract, $alias);
  1409. }
  1410. /**
  1411. * Bind a new callback to an abstract's rebind event.
  1412. *
  1413. * @param string $abstract
  1414. * @param \Closure $callback
  1415. * @return mixed
  1416. * @static
  1417. */
  1418. public static function rebinding($abstract, $callback)
  1419. {
  1420. //Method inherited from \Illuminate\Container\Container
  1421. /** @var \Illuminate\Foundation\Application $instance */
  1422. return $instance->rebinding($abstract, $callback);
  1423. }
  1424. /**
  1425. * Refresh an instance on the given target and method.
  1426. *
  1427. * @param string $abstract
  1428. * @param mixed $target
  1429. * @param string $method
  1430. * @return mixed
  1431. * @static
  1432. */
  1433. public static function refresh($abstract, $target, $method)
  1434. {
  1435. //Method inherited from \Illuminate\Container\Container
  1436. /** @var \Illuminate\Foundation\Application $instance */
  1437. return $instance->refresh($abstract, $target, $method);
  1438. }
  1439. /**
  1440. * Wrap the given closure such that its dependencies will be injected when executed.
  1441. *
  1442. * @param \Closure $callback
  1443. * @param array $parameters
  1444. * @return \Closure
  1445. * @static
  1446. */
  1447. public static function wrap($callback, $parameters = [])
  1448. {
  1449. //Method inherited from \Illuminate\Container\Container
  1450. /** @var \Illuminate\Foundation\Application $instance */
  1451. return $instance->wrap($callback, $parameters);
  1452. }
  1453. /**
  1454. * Call the given Closure / class@method and inject its dependencies.
  1455. *
  1456. * @param callable|string $callback
  1457. * @param array<string, mixed> $parameters
  1458. * @param string|null $defaultMethod
  1459. * @return mixed
  1460. * @throws \InvalidArgumentException
  1461. * @static
  1462. */
  1463. public static function call($callback, $parameters = [], $defaultMethod = null)
  1464. {
  1465. //Method inherited from \Illuminate\Container\Container
  1466. /** @var \Illuminate\Foundation\Application $instance */
  1467. return $instance->call($callback, $parameters, $defaultMethod);
  1468. }
  1469. /**
  1470. * Get a closure to resolve the given type from the container.
  1471. *
  1472. * @template TClass of object
  1473. * @param string|class-string<TClass> $abstract
  1474. * @return ($abstract is class-string<TClass> ? \Closure(): TClass : \Closure(): mixed)
  1475. * @static
  1476. */
  1477. public static function factory($abstract)
  1478. {
  1479. //Method inherited from \Illuminate\Container\Container
  1480. /** @var \Illuminate\Foundation\Application $instance */
  1481. return $instance->factory($abstract);
  1482. }
  1483. /**
  1484. * An alias function name for make().
  1485. *
  1486. * @template TClass of object
  1487. * @param string|class-string<TClass>|callable $abstract
  1488. * @param array $parameters
  1489. * @return ($abstract is class-string<TClass> ? TClass : mixed)
  1490. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  1491. * @static
  1492. */
  1493. public static function makeWith($abstract, $parameters = [])
  1494. {
  1495. //Method inherited from \Illuminate\Container\Container
  1496. /** @var \Illuminate\Foundation\Application $instance */
  1497. return $instance->makeWith($abstract, $parameters);
  1498. }
  1499. /**
  1500. * {@inheritdoc}
  1501. *
  1502. * @template TClass of object
  1503. * @param string|class-string<TClass> $id
  1504. * @return ($id is class-string<TClass> ? TClass : mixed)
  1505. * @static
  1506. */
  1507. public static function get($id)
  1508. {
  1509. //Method inherited from \Illuminate\Container\Container
  1510. /** @var \Illuminate\Foundation\Application $instance */
  1511. return $instance->get($id);
  1512. }
  1513. /**
  1514. * Instantiate a concrete instance of the given type.
  1515. *
  1516. * @template TClass of object
  1517. * @param \Closure(static, array): TClass|class-string<TClass> $concrete
  1518. * @return TClass
  1519. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  1520. * @throws \Illuminate\Contracts\Container\CircularDependencyException
  1521. * @static
  1522. */
  1523. public static function build($concrete)
  1524. {
  1525. //Method inherited from \Illuminate\Container\Container
  1526. /** @var \Illuminate\Foundation\Application $instance */
  1527. return $instance->build($concrete);
  1528. }
  1529. /**
  1530. * Resolve a dependency based on an attribute.
  1531. *
  1532. * @param \ReflectionAttribute $attribute
  1533. * @return mixed
  1534. * @static
  1535. */
  1536. public static function resolveFromAttribute($attribute)
  1537. {
  1538. //Method inherited from \Illuminate\Container\Container
  1539. /** @var \Illuminate\Foundation\Application $instance */
  1540. return $instance->resolveFromAttribute($attribute);
  1541. }
  1542. /**
  1543. * Register a new before resolving callback for all types.
  1544. *
  1545. * @param \Closure|string $abstract
  1546. * @param \Closure|null $callback
  1547. * @return void
  1548. * @static
  1549. */
  1550. public static function beforeResolving($abstract, $callback = null)
  1551. {
  1552. //Method inherited from \Illuminate\Container\Container
  1553. /** @var \Illuminate\Foundation\Application $instance */
  1554. $instance->beforeResolving($abstract, $callback);
  1555. }
  1556. /**
  1557. * Register a new resolving callback.
  1558. *
  1559. * @param \Closure|string $abstract
  1560. * @param \Closure|null $callback
  1561. * @return void
  1562. * @static
  1563. */
  1564. public static function resolving($abstract, $callback = null)
  1565. {
  1566. //Method inherited from \Illuminate\Container\Container
  1567. /** @var \Illuminate\Foundation\Application $instance */
  1568. $instance->resolving($abstract, $callback);
  1569. }
  1570. /**
  1571. * Register a new after resolving callback for all types.
  1572. *
  1573. * @param \Closure|string $abstract
  1574. * @param \Closure|null $callback
  1575. * @return void
  1576. * @static
  1577. */
  1578. public static function afterResolving($abstract, $callback = null)
  1579. {
  1580. //Method inherited from \Illuminate\Container\Container
  1581. /** @var \Illuminate\Foundation\Application $instance */
  1582. $instance->afterResolving($abstract, $callback);
  1583. }
  1584. /**
  1585. * Register a new after resolving attribute callback for all types.
  1586. *
  1587. * @param string $attribute
  1588. * @param \Closure $callback
  1589. * @return void
  1590. * @static
  1591. */
  1592. public static function afterResolvingAttribute($attribute, $callback)
  1593. {
  1594. //Method inherited from \Illuminate\Container\Container
  1595. /** @var \Illuminate\Foundation\Application $instance */
  1596. $instance->afterResolvingAttribute($attribute, $callback);
  1597. }
  1598. /**
  1599. * Fire all of the after resolving attribute callbacks.
  1600. *
  1601. * @param \ReflectionAttribute[] $attributes
  1602. * @param mixed $object
  1603. * @return void
  1604. * @static
  1605. */
  1606. public static function fireAfterResolvingAttributeCallbacks($attributes, $object)
  1607. {
  1608. //Method inherited from \Illuminate\Container\Container
  1609. /** @var \Illuminate\Foundation\Application $instance */
  1610. $instance->fireAfterResolvingAttributeCallbacks($attributes, $object);
  1611. }
  1612. /**
  1613. * Get the name of the binding the container is currently resolving.
  1614. *
  1615. * @return class-string|string|null
  1616. * @static
  1617. */
  1618. public static function currentlyResolving()
  1619. {
  1620. //Method inherited from \Illuminate\Container\Container
  1621. /** @var \Illuminate\Foundation\Application $instance */
  1622. return $instance->currentlyResolving();
  1623. }
  1624. /**
  1625. * Get the container's bindings.
  1626. *
  1627. * @return array
  1628. * @static
  1629. */
  1630. public static function getBindings()
  1631. {
  1632. //Method inherited from \Illuminate\Container\Container
  1633. /** @var \Illuminate\Foundation\Application $instance */
  1634. return $instance->getBindings();
  1635. }
  1636. /**
  1637. * Get the alias for an abstract if available.
  1638. *
  1639. * @param string $abstract
  1640. * @return string
  1641. * @static
  1642. */
  1643. public static function getAlias($abstract)
  1644. {
  1645. //Method inherited from \Illuminate\Container\Container
  1646. /** @var \Illuminate\Foundation\Application $instance */
  1647. return $instance->getAlias($abstract);
  1648. }
  1649. /**
  1650. * Remove all of the extender callbacks for a given type.
  1651. *
  1652. * @param string $abstract
  1653. * @return void
  1654. * @static
  1655. */
  1656. public static function forgetExtenders($abstract)
  1657. {
  1658. //Method inherited from \Illuminate\Container\Container
  1659. /** @var \Illuminate\Foundation\Application $instance */
  1660. $instance->forgetExtenders($abstract);
  1661. }
  1662. /**
  1663. * Remove a resolved instance from the instance cache.
  1664. *
  1665. * @param string $abstract
  1666. * @return void
  1667. * @static
  1668. */
  1669. public static function forgetInstance($abstract)
  1670. {
  1671. //Method inherited from \Illuminate\Container\Container
  1672. /** @var \Illuminate\Foundation\Application $instance */
  1673. $instance->forgetInstance($abstract);
  1674. }
  1675. /**
  1676. * Clear all of the instances from the container.
  1677. *
  1678. * @return void
  1679. * @static
  1680. */
  1681. public static function forgetInstances()
  1682. {
  1683. //Method inherited from \Illuminate\Container\Container
  1684. /** @var \Illuminate\Foundation\Application $instance */
  1685. $instance->forgetInstances();
  1686. }
  1687. /**
  1688. * Clear all of the scoped instances from the container.
  1689. *
  1690. * @return void
  1691. * @static
  1692. */
  1693. public static function forgetScopedInstances()
  1694. {
  1695. //Method inherited from \Illuminate\Container\Container
  1696. /** @var \Illuminate\Foundation\Application $instance */
  1697. $instance->forgetScopedInstances();
  1698. }
  1699. /**
  1700. * Get the globally available instance of the container.
  1701. *
  1702. * @return static
  1703. * @static
  1704. */
  1705. public static function getInstance()
  1706. {
  1707. //Method inherited from \Illuminate\Container\Container
  1708. return \Illuminate\Foundation\Application::getInstance();
  1709. }
  1710. /**
  1711. * Set the shared instance of the container.
  1712. *
  1713. * @param \Illuminate\Contracts\Container\Container|null $container
  1714. * @return \Illuminate\Contracts\Container\Container|static
  1715. * @static
  1716. */
  1717. public static function setInstance($container = null)
  1718. {
  1719. //Method inherited from \Illuminate\Container\Container
  1720. return \Illuminate\Foundation\Application::setInstance($container);
  1721. }
  1722. /**
  1723. * Determine if a given offset exists.
  1724. *
  1725. * @param string $key
  1726. * @return bool
  1727. * @static
  1728. */
  1729. public static function offsetExists($key)
  1730. {
  1731. //Method inherited from \Illuminate\Container\Container
  1732. /** @var \Illuminate\Foundation\Application $instance */
  1733. return $instance->offsetExists($key);
  1734. }
  1735. /**
  1736. * Get the value at a given offset.
  1737. *
  1738. * @param string $key
  1739. * @return mixed
  1740. * @static
  1741. */
  1742. public static function offsetGet($key)
  1743. {
  1744. //Method inherited from \Illuminate\Container\Container
  1745. /** @var \Illuminate\Foundation\Application $instance */
  1746. return $instance->offsetGet($key);
  1747. }
  1748. /**
  1749. * Set the value at a given offset.
  1750. *
  1751. * @param string $key
  1752. * @param mixed $value
  1753. * @return void
  1754. * @static
  1755. */
  1756. public static function offsetSet($key, $value)
  1757. {
  1758. //Method inherited from \Illuminate\Container\Container
  1759. /** @var \Illuminate\Foundation\Application $instance */
  1760. $instance->offsetSet($key, $value);
  1761. }
  1762. /**
  1763. * Unset the value at a given offset.
  1764. *
  1765. * @param string $key
  1766. * @return void
  1767. * @static
  1768. */
  1769. public static function offsetUnset($key)
  1770. {
  1771. //Method inherited from \Illuminate\Container\Container
  1772. /** @var \Illuminate\Foundation\Application $instance */
  1773. $instance->offsetUnset($key);
  1774. }
  1775. /**
  1776. * Register a custom macro.
  1777. *
  1778. * @param string $name
  1779. * @param object|callable $macro
  1780. * @param-closure-this static $macro
  1781. * @return void
  1782. * @static
  1783. */
  1784. public static function macro($name, $macro)
  1785. {
  1786. \Illuminate\Foundation\Application::macro($name, $macro);
  1787. }
  1788. /**
  1789. * Mix another object into the class.
  1790. *
  1791. * @param object $mixin
  1792. * @param bool $replace
  1793. * @return void
  1794. * @throws \ReflectionException
  1795. * @static
  1796. */
  1797. public static function mixin($mixin, $replace = true)
  1798. {
  1799. \Illuminate\Foundation\Application::mixin($mixin, $replace);
  1800. }
  1801. /**
  1802. * Checks if macro is registered.
  1803. *
  1804. * @param string $name
  1805. * @return bool
  1806. * @static
  1807. */
  1808. public static function hasMacro($name)
  1809. {
  1810. return \Illuminate\Foundation\Application::hasMacro($name);
  1811. }
  1812. /**
  1813. * Flush the existing macros.
  1814. *
  1815. * @return void
  1816. * @static
  1817. */
  1818. public static function flushMacros()
  1819. {
  1820. \Illuminate\Foundation\Application::flushMacros();
  1821. }
  1822. }
  1823. /**
  1824. * @see \Illuminate\Foundation\Console\Kernel
  1825. */
  1826. class Artisan {
  1827. /**
  1828. * Re-route the Symfony command events to their Laravel counterparts.
  1829. *
  1830. * @internal
  1831. * @return \Illuminate\Foundation\Console\Kernel
  1832. * @static
  1833. */
  1834. public static function rerouteSymfonyCommandEvents()
  1835. {
  1836. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1837. return $instance->rerouteSymfonyCommandEvents();
  1838. }
  1839. /**
  1840. * Run the console application.
  1841. *
  1842. * @param \Symfony\Component\Console\Input\InputInterface $input
  1843. * @param \Symfony\Component\Console\Output\OutputInterface|null $output
  1844. * @return int
  1845. * @static
  1846. */
  1847. public static function handle($input, $output = null)
  1848. {
  1849. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1850. return $instance->handle($input, $output);
  1851. }
  1852. /**
  1853. * Terminate the application.
  1854. *
  1855. * @param \Symfony\Component\Console\Input\InputInterface $input
  1856. * @param int $status
  1857. * @return void
  1858. * @static
  1859. */
  1860. public static function terminate($input, $status)
  1861. {
  1862. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1863. $instance->terminate($input, $status);
  1864. }
  1865. /**
  1866. * Register a callback to be invoked when the command lifecycle duration exceeds a given amount of time.
  1867. *
  1868. * @param \DateTimeInterface|\Carbon\CarbonInterval|float|int $threshold
  1869. * @param callable $handler
  1870. * @return void
  1871. * @static
  1872. */
  1873. public static function whenCommandLifecycleIsLongerThan($threshold, $handler)
  1874. {
  1875. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1876. $instance->whenCommandLifecycleIsLongerThan($threshold, $handler);
  1877. }
  1878. /**
  1879. * When the command being handled started.
  1880. *
  1881. * @return \Illuminate\Support\Carbon|null
  1882. * @static
  1883. */
  1884. public static function commandStartedAt()
  1885. {
  1886. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1887. return $instance->commandStartedAt();
  1888. }
  1889. /**
  1890. * Resolve a console schedule instance.
  1891. *
  1892. * @return \Illuminate\Console\Scheduling\Schedule
  1893. * @static
  1894. */
  1895. public static function resolveConsoleSchedule()
  1896. {
  1897. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1898. return $instance->resolveConsoleSchedule();
  1899. }
  1900. /**
  1901. * Register a Closure based command with the application.
  1902. *
  1903. * @param string $signature
  1904. * @param \Closure $callback
  1905. * @return \Illuminate\Foundation\Console\ClosureCommand
  1906. * @static
  1907. */
  1908. public static function command($signature, $callback)
  1909. {
  1910. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1911. return $instance->command($signature, $callback);
  1912. }
  1913. /**
  1914. * Register the given command with the console application.
  1915. *
  1916. * @param \Symfony\Component\Console\Command\Command $command
  1917. * @return void
  1918. * @static
  1919. */
  1920. public static function registerCommand($command)
  1921. {
  1922. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1923. $instance->registerCommand($command);
  1924. }
  1925. /**
  1926. * Run an Artisan console command by name.
  1927. *
  1928. * @param string $command
  1929. * @param array $parameters
  1930. * @param \Symfony\Component\Console\Output\OutputInterface|null $outputBuffer
  1931. * @return int
  1932. * @throws \Symfony\Component\Console\Exception\CommandNotFoundException
  1933. * @static
  1934. */
  1935. public static function call($command, $parameters = [], $outputBuffer = null)
  1936. {
  1937. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1938. return $instance->call($command, $parameters, $outputBuffer);
  1939. }
  1940. /**
  1941. * Queue the given console command.
  1942. *
  1943. * @param string $command
  1944. * @param array $parameters
  1945. * @return \Illuminate\Foundation\Bus\PendingDispatch
  1946. * @static
  1947. */
  1948. public static function queue($command, $parameters = [])
  1949. {
  1950. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1951. return $instance->queue($command, $parameters);
  1952. }
  1953. /**
  1954. * Get all of the commands registered with the console.
  1955. *
  1956. * @return array
  1957. * @static
  1958. */
  1959. public static function all()
  1960. {
  1961. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1962. return $instance->all();
  1963. }
  1964. /**
  1965. * Get the output for the last run command.
  1966. *
  1967. * @return string
  1968. * @static
  1969. */
  1970. public static function output()
  1971. {
  1972. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1973. return $instance->output();
  1974. }
  1975. /**
  1976. * Bootstrap the application for artisan commands.
  1977. *
  1978. * @return void
  1979. * @static
  1980. */
  1981. public static function bootstrap()
  1982. {
  1983. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1984. $instance->bootstrap();
  1985. }
  1986. /**
  1987. * Bootstrap the application without booting service providers.
  1988. *
  1989. * @return void
  1990. * @static
  1991. */
  1992. public static function bootstrapWithoutBootingProviders()
  1993. {
  1994. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  1995. $instance->bootstrapWithoutBootingProviders();
  1996. }
  1997. /**
  1998. * Set the Artisan application instance.
  1999. *
  2000. * @param \Illuminate\Console\Application|null $artisan
  2001. * @return void
  2002. * @static
  2003. */
  2004. public static function setArtisan($artisan)
  2005. {
  2006. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2007. $instance->setArtisan($artisan);
  2008. }
  2009. /**
  2010. * Set the Artisan commands provided by the application.
  2011. *
  2012. * @param array $commands
  2013. * @return \Illuminate\Foundation\Console\Kernel
  2014. * @static
  2015. */
  2016. public static function addCommands($commands)
  2017. {
  2018. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2019. return $instance->addCommands($commands);
  2020. }
  2021. /**
  2022. * Set the paths that should have their Artisan commands automatically discovered.
  2023. *
  2024. * @param array $paths
  2025. * @return \Illuminate\Foundation\Console\Kernel
  2026. * @static
  2027. */
  2028. public static function addCommandPaths($paths)
  2029. {
  2030. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2031. return $instance->addCommandPaths($paths);
  2032. }
  2033. /**
  2034. * Set the paths that should have their Artisan "routes" automatically discovered.
  2035. *
  2036. * @param array $paths
  2037. * @return \Illuminate\Foundation\Console\Kernel
  2038. * @static
  2039. */
  2040. public static function addCommandRoutePaths($paths)
  2041. {
  2042. /** @var \Illuminate\Foundation\Console\Kernel $instance */
  2043. return $instance->addCommandRoutePaths($paths);
  2044. }
  2045. }
  2046. /**
  2047. * @see \Illuminate\Auth\AuthManager
  2048. * @see \Illuminate\Auth\SessionGuard
  2049. */
  2050. class Auth {
  2051. /**
  2052. * Attempt to get the guard from the local cache.
  2053. *
  2054. * @param string|null $name
  2055. * @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
  2056. * @static
  2057. */
  2058. public static function guard($name = null)
  2059. {
  2060. /** @var \Illuminate\Auth\AuthManager $instance */
  2061. return $instance->guard($name);
  2062. }
  2063. /**
  2064. * Create a session based authentication guard.
  2065. *
  2066. * @param string $name
  2067. * @param array $config
  2068. * @return \Illuminate\Auth\SessionGuard
  2069. * @static
  2070. */
  2071. public static function createSessionDriver($name, $config)
  2072. {
  2073. /** @var \Illuminate\Auth\AuthManager $instance */
  2074. return $instance->createSessionDriver($name, $config);
  2075. }
  2076. /**
  2077. * Create a token based authentication guard.
  2078. *
  2079. * @param string $name
  2080. * @param array $config
  2081. * @return \Illuminate\Auth\TokenGuard
  2082. * @static
  2083. */
  2084. public static function createTokenDriver($name, $config)
  2085. {
  2086. /** @var \Illuminate\Auth\AuthManager $instance */
  2087. return $instance->createTokenDriver($name, $config);
  2088. }
  2089. /**
  2090. * Get the default authentication driver name.
  2091. *
  2092. * @return string
  2093. * @static
  2094. */
  2095. public static function getDefaultDriver()
  2096. {
  2097. /** @var \Illuminate\Auth\AuthManager $instance */
  2098. return $instance->getDefaultDriver();
  2099. }
  2100. /**
  2101. * Set the default guard driver the factory should serve.
  2102. *
  2103. * @param string $name
  2104. * @return void
  2105. * @static
  2106. */
  2107. public static function shouldUse($name)
  2108. {
  2109. /** @var \Illuminate\Auth\AuthManager $instance */
  2110. $instance->shouldUse($name);
  2111. }
  2112. /**
  2113. * Set the default authentication driver name.
  2114. *
  2115. * @param string $name
  2116. * @return void
  2117. * @static
  2118. */
  2119. public static function setDefaultDriver($name)
  2120. {
  2121. /** @var \Illuminate\Auth\AuthManager $instance */
  2122. $instance->setDefaultDriver($name);
  2123. }
  2124. /**
  2125. * Register a new callback based request guard.
  2126. *
  2127. * @param string $driver
  2128. * @param callable $callback
  2129. * @return \Illuminate\Auth\AuthManager
  2130. * @static
  2131. */
  2132. public static function viaRequest($driver, $callback)
  2133. {
  2134. /** @var \Illuminate\Auth\AuthManager $instance */
  2135. return $instance->viaRequest($driver, $callback);
  2136. }
  2137. /**
  2138. * Get the user resolver callback.
  2139. *
  2140. * @return \Closure
  2141. * @static
  2142. */
  2143. public static function userResolver()
  2144. {
  2145. /** @var \Illuminate\Auth\AuthManager $instance */
  2146. return $instance->userResolver();
  2147. }
  2148. /**
  2149. * Set the callback to be used to resolve users.
  2150. *
  2151. * @param \Closure $userResolver
  2152. * @return \Illuminate\Auth\AuthManager
  2153. * @static
  2154. */
  2155. public static function resolveUsersUsing($userResolver)
  2156. {
  2157. /** @var \Illuminate\Auth\AuthManager $instance */
  2158. return $instance->resolveUsersUsing($userResolver);
  2159. }
  2160. /**
  2161. * Register a custom driver creator Closure.
  2162. *
  2163. * @param string $driver
  2164. * @param \Closure $callback
  2165. * @return \Illuminate\Auth\AuthManager
  2166. * @static
  2167. */
  2168. public static function extend($driver, $callback)
  2169. {
  2170. /** @var \Illuminate\Auth\AuthManager $instance */
  2171. return $instance->extend($driver, $callback);
  2172. }
  2173. /**
  2174. * Register a custom provider creator Closure.
  2175. *
  2176. * @param string $name
  2177. * @param \Closure $callback
  2178. * @return \Illuminate\Auth\AuthManager
  2179. * @static
  2180. */
  2181. public static function provider($name, $callback)
  2182. {
  2183. /** @var \Illuminate\Auth\AuthManager $instance */
  2184. return $instance->provider($name, $callback);
  2185. }
  2186. /**
  2187. * Determines if any guards have already been resolved.
  2188. *
  2189. * @return bool
  2190. * @static
  2191. */
  2192. public static function hasResolvedGuards()
  2193. {
  2194. /** @var \Illuminate\Auth\AuthManager $instance */
  2195. return $instance->hasResolvedGuards();
  2196. }
  2197. /**
  2198. * Forget all of the resolved guard instances.
  2199. *
  2200. * @return \Illuminate\Auth\AuthManager
  2201. * @static
  2202. */
  2203. public static function forgetGuards()
  2204. {
  2205. /** @var \Illuminate\Auth\AuthManager $instance */
  2206. return $instance->forgetGuards();
  2207. }
  2208. /**
  2209. * Set the application instance used by the manager.
  2210. *
  2211. * @param \Illuminate\Contracts\Foundation\Application $app
  2212. * @return \Illuminate\Auth\AuthManager
  2213. * @static
  2214. */
  2215. public static function setApplication($app)
  2216. {
  2217. /** @var \Illuminate\Auth\AuthManager $instance */
  2218. return $instance->setApplication($app);
  2219. }
  2220. /**
  2221. * Create the user provider implementation for the driver.
  2222. *
  2223. * @param string|null $provider
  2224. * @return \Illuminate\Contracts\Auth\UserProvider|null
  2225. * @throws \InvalidArgumentException
  2226. * @static
  2227. */
  2228. public static function createUserProvider($provider = null)
  2229. {
  2230. /** @var \Illuminate\Auth\AuthManager $instance */
  2231. return $instance->createUserProvider($provider);
  2232. }
  2233. /**
  2234. * Get the default user provider name.
  2235. *
  2236. * @return string
  2237. * @static
  2238. */
  2239. public static function getDefaultUserProvider()
  2240. {
  2241. /** @var \Illuminate\Auth\AuthManager $instance */
  2242. return $instance->getDefaultUserProvider();
  2243. }
  2244. /**
  2245. * Get the currently authenticated user.
  2246. *
  2247. * @return \App\Models\User|null
  2248. * @static
  2249. */
  2250. public static function user()
  2251. {
  2252. /** @var \Illuminate\Auth\SessionGuard $instance */
  2253. return $instance->user();
  2254. }
  2255. /**
  2256. * Get the ID for the currently authenticated user.
  2257. *
  2258. * @return int|string|null
  2259. * @static
  2260. */
  2261. public static function id()
  2262. {
  2263. /** @var \Illuminate\Auth\SessionGuard $instance */
  2264. return $instance->id();
  2265. }
  2266. /**
  2267. * Log a user into the application without sessions or cookies.
  2268. *
  2269. * @param array $credentials
  2270. * @return bool
  2271. * @static
  2272. */
  2273. public static function once($credentials = [])
  2274. {
  2275. /** @var \Illuminate\Auth\SessionGuard $instance */
  2276. return $instance->once($credentials);
  2277. }
  2278. /**
  2279. * Log the given user ID into the application without sessions or cookies.
  2280. *
  2281. * @param mixed $id
  2282. * @return \App\Models\User|false
  2283. * @static
  2284. */
  2285. public static function onceUsingId($id)
  2286. {
  2287. /** @var \Illuminate\Auth\SessionGuard $instance */
  2288. return $instance->onceUsingId($id);
  2289. }
  2290. /**
  2291. * Validate a user's credentials.
  2292. *
  2293. * @param array $credentials
  2294. * @return bool
  2295. * @static
  2296. */
  2297. public static function validate($credentials = [])
  2298. {
  2299. /** @var \Illuminate\Auth\SessionGuard $instance */
  2300. return $instance->validate($credentials);
  2301. }
  2302. /**
  2303. * Attempt to authenticate using HTTP Basic Auth.
  2304. *
  2305. * @param string $field
  2306. * @param array $extraConditions
  2307. * @return \Symfony\Component\HttpFoundation\Response|null
  2308. * @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
  2309. * @static
  2310. */
  2311. public static function basic($field = 'email', $extraConditions = [])
  2312. {
  2313. /** @var \Illuminate\Auth\SessionGuard $instance */
  2314. return $instance->basic($field, $extraConditions);
  2315. }
  2316. /**
  2317. * Perform a stateless HTTP Basic login attempt.
  2318. *
  2319. * @param string $field
  2320. * @param array $extraConditions
  2321. * @return \Symfony\Component\HttpFoundation\Response|null
  2322. * @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
  2323. * @static
  2324. */
  2325. public static function onceBasic($field = 'email', $extraConditions = [])
  2326. {
  2327. /** @var \Illuminate\Auth\SessionGuard $instance */
  2328. return $instance->onceBasic($field, $extraConditions);
  2329. }
  2330. /**
  2331. * Attempt to authenticate a user using the given credentials.
  2332. *
  2333. * @param array $credentials
  2334. * @param bool $remember
  2335. * @return bool
  2336. * @static
  2337. */
  2338. public static function attempt($credentials = [], $remember = false)
  2339. {
  2340. /** @var \Illuminate\Auth\SessionGuard $instance */
  2341. return $instance->attempt($credentials, $remember);
  2342. }
  2343. /**
  2344. * Attempt to authenticate a user with credentials and additional callbacks.
  2345. *
  2346. * @param array $credentials
  2347. * @param array|callable|null $callbacks
  2348. * @param bool $remember
  2349. * @return bool
  2350. * @static
  2351. */
  2352. public static function attemptWhen($credentials = [], $callbacks = null, $remember = false)
  2353. {
  2354. /** @var \Illuminate\Auth\SessionGuard $instance */
  2355. return $instance->attemptWhen($credentials, $callbacks, $remember);
  2356. }
  2357. /**
  2358. * Log the given user ID into the application.
  2359. *
  2360. * @param mixed $id
  2361. * @param bool $remember
  2362. * @return \App\Models\User|false
  2363. * @static
  2364. */
  2365. public static function loginUsingId($id, $remember = false)
  2366. {
  2367. /** @var \Illuminate\Auth\SessionGuard $instance */
  2368. return $instance->loginUsingId($id, $remember);
  2369. }
  2370. /**
  2371. * Log a user into the application.
  2372. *
  2373. * @param \Illuminate\Contracts\Auth\Authenticatable $user
  2374. * @param bool $remember
  2375. * @return void
  2376. * @static
  2377. */
  2378. public static function login($user, $remember = false)
  2379. {
  2380. /** @var \Illuminate\Auth\SessionGuard $instance */
  2381. $instance->login($user, $remember);
  2382. }
  2383. /**
  2384. * Log the user out of the application.
  2385. *
  2386. * @return void
  2387. * @static
  2388. */
  2389. public static function logout()
  2390. {
  2391. /** @var \Illuminate\Auth\SessionGuard $instance */
  2392. $instance->logout();
  2393. }
  2394. /**
  2395. * Log the user out of the application on their current device only.
  2396. *
  2397. * This method does not cycle the "remember" token.
  2398. *
  2399. * @return void
  2400. * @static
  2401. */
  2402. public static function logoutCurrentDevice()
  2403. {
  2404. /** @var \Illuminate\Auth\SessionGuard $instance */
  2405. $instance->logoutCurrentDevice();
  2406. }
  2407. /**
  2408. * Invalidate other sessions for the current user.
  2409. *
  2410. * The application must be using the AuthenticateSession middleware.
  2411. *
  2412. * @param string $password
  2413. * @return \App\Models\User|null
  2414. * @throws \Illuminate\Auth\AuthenticationException
  2415. * @static
  2416. */
  2417. public static function logoutOtherDevices($password)
  2418. {
  2419. /** @var \Illuminate\Auth\SessionGuard $instance */
  2420. return $instance->logoutOtherDevices($password);
  2421. }
  2422. /**
  2423. * Register an authentication attempt event listener.
  2424. *
  2425. * @param mixed $callback
  2426. * @return void
  2427. * @static
  2428. */
  2429. public static function attempting($callback)
  2430. {
  2431. /** @var \Illuminate\Auth\SessionGuard $instance */
  2432. $instance->attempting($callback);
  2433. }
  2434. /**
  2435. * Get the last user we attempted to authenticate.
  2436. *
  2437. * @return \App\Models\User
  2438. * @static
  2439. */
  2440. public static function getLastAttempted()
  2441. {
  2442. /** @var \Illuminate\Auth\SessionGuard $instance */
  2443. return $instance->getLastAttempted();
  2444. }
  2445. /**
  2446. * Get a unique identifier for the auth session value.
  2447. *
  2448. * @return string
  2449. * @static
  2450. */
  2451. public static function getName()
  2452. {
  2453. /** @var \Illuminate\Auth\SessionGuard $instance */
  2454. return $instance->getName();
  2455. }
  2456. /**
  2457. * Get the name of the cookie used to store the "recaller".
  2458. *
  2459. * @return string
  2460. * @static
  2461. */
  2462. public static function getRecallerName()
  2463. {
  2464. /** @var \Illuminate\Auth\SessionGuard $instance */
  2465. return $instance->getRecallerName();
  2466. }
  2467. /**
  2468. * Determine if the user was authenticated via "remember me" cookie.
  2469. *
  2470. * @return bool
  2471. * @static
  2472. */
  2473. public static function viaRemember()
  2474. {
  2475. /** @var \Illuminate\Auth\SessionGuard $instance */
  2476. return $instance->viaRemember();
  2477. }
  2478. /**
  2479. * Set the number of minutes the remember me cookie should be valid for.
  2480. *
  2481. * @param int $minutes
  2482. * @return \Illuminate\Auth\SessionGuard
  2483. * @static
  2484. */
  2485. public static function setRememberDuration($minutes)
  2486. {
  2487. /** @var \Illuminate\Auth\SessionGuard $instance */
  2488. return $instance->setRememberDuration($minutes);
  2489. }
  2490. /**
  2491. * Get the cookie creator instance used by the guard.
  2492. *
  2493. * @return \Illuminate\Contracts\Cookie\QueueingFactory
  2494. * @throws \RuntimeException
  2495. * @static
  2496. */
  2497. public static function getCookieJar()
  2498. {
  2499. /** @var \Illuminate\Auth\SessionGuard $instance */
  2500. return $instance->getCookieJar();
  2501. }
  2502. /**
  2503. * Set the cookie creator instance used by the guard.
  2504. *
  2505. * @param \Illuminate\Contracts\Cookie\QueueingFactory $cookie
  2506. * @return void
  2507. * @static
  2508. */
  2509. public static function setCookieJar($cookie)
  2510. {
  2511. /** @var \Illuminate\Auth\SessionGuard $instance */
  2512. $instance->setCookieJar($cookie);
  2513. }
  2514. /**
  2515. * Get the event dispatcher instance.
  2516. *
  2517. * @return \Illuminate\Contracts\Events\Dispatcher
  2518. * @static
  2519. */
  2520. public static function getDispatcher()
  2521. {
  2522. /** @var \Illuminate\Auth\SessionGuard $instance */
  2523. return $instance->getDispatcher();
  2524. }
  2525. /**
  2526. * Set the event dispatcher instance.
  2527. *
  2528. * @param \Illuminate\Contracts\Events\Dispatcher $events
  2529. * @return void
  2530. * @static
  2531. */
  2532. public static function setDispatcher($events)
  2533. {
  2534. /** @var \Illuminate\Auth\SessionGuard $instance */
  2535. $instance->setDispatcher($events);
  2536. }
  2537. /**
  2538. * Get the session store used by the guard.
  2539. *
  2540. * @return \Illuminate\Contracts\Session\Session
  2541. * @static
  2542. */
  2543. public static function getSession()
  2544. {
  2545. /** @var \Illuminate\Auth\SessionGuard $instance */
  2546. return $instance->getSession();
  2547. }
  2548. /**
  2549. * Return the currently cached user.
  2550. *
  2551. * @return \App\Models\User|null
  2552. * @static
  2553. */
  2554. public static function getUser()
  2555. {
  2556. /** @var \Illuminate\Auth\SessionGuard $instance */
  2557. return $instance->getUser();
  2558. }
  2559. /**
  2560. * Set the current user.
  2561. *
  2562. * @param \Illuminate\Contracts\Auth\Authenticatable $user
  2563. * @return \Illuminate\Auth\SessionGuard
  2564. * @static
  2565. */
  2566. public static function setUser($user)
  2567. {
  2568. /** @var \Illuminate\Auth\SessionGuard $instance */
  2569. return $instance->setUser($user);
  2570. }
  2571. /**
  2572. * Get the current request instance.
  2573. *
  2574. * @return \Symfony\Component\HttpFoundation\Request
  2575. * @static
  2576. */
  2577. public static function getRequest()
  2578. {
  2579. /** @var \Illuminate\Auth\SessionGuard $instance */
  2580. return $instance->getRequest();
  2581. }
  2582. /**
  2583. * Set the current request instance.
  2584. *
  2585. * @param \Symfony\Component\HttpFoundation\Request $request
  2586. * @return \Illuminate\Auth\SessionGuard
  2587. * @static
  2588. */
  2589. public static function setRequest($request)
  2590. {
  2591. /** @var \Illuminate\Auth\SessionGuard $instance */
  2592. return $instance->setRequest($request);
  2593. }
  2594. /**
  2595. * Get the timebox instance used by the guard.
  2596. *
  2597. * @return \Illuminate\Support\Timebox
  2598. * @static
  2599. */
  2600. public static function getTimebox()
  2601. {
  2602. /** @var \Illuminate\Auth\SessionGuard $instance */
  2603. return $instance->getTimebox();
  2604. }
  2605. /**
  2606. * Determine if the current user is authenticated. If not, throw an exception.
  2607. *
  2608. * @return \App\Models\User
  2609. * @throws \Illuminate\Auth\AuthenticationException
  2610. * @static
  2611. */
  2612. public static function authenticate()
  2613. {
  2614. /** @var \Illuminate\Auth\SessionGuard $instance */
  2615. return $instance->authenticate();
  2616. }
  2617. /**
  2618. * Determine if the guard has a user instance.
  2619. *
  2620. * @return bool
  2621. * @static
  2622. */
  2623. public static function hasUser()
  2624. {
  2625. /** @var \Illuminate\Auth\SessionGuard $instance */
  2626. return $instance->hasUser();
  2627. }
  2628. /**
  2629. * Determine if the current user is authenticated.
  2630. *
  2631. * @return bool
  2632. * @static
  2633. */
  2634. public static function check()
  2635. {
  2636. /** @var \Illuminate\Auth\SessionGuard $instance */
  2637. return $instance->check();
  2638. }
  2639. /**
  2640. * Determine if the current user is a guest.
  2641. *
  2642. * @return bool
  2643. * @static
  2644. */
  2645. public static function guest()
  2646. {
  2647. /** @var \Illuminate\Auth\SessionGuard $instance */
  2648. return $instance->guest();
  2649. }
  2650. /**
  2651. * Forget the current user.
  2652. *
  2653. * @return \Illuminate\Auth\SessionGuard
  2654. * @static
  2655. */
  2656. public static function forgetUser()
  2657. {
  2658. /** @var \Illuminate\Auth\SessionGuard $instance */
  2659. return $instance->forgetUser();
  2660. }
  2661. /**
  2662. * Get the user provider used by the guard.
  2663. *
  2664. * @return \Illuminate\Contracts\Auth\UserProvider
  2665. * @static
  2666. */
  2667. public static function getProvider()
  2668. {
  2669. /** @var \Illuminate\Auth\SessionGuard $instance */
  2670. return $instance->getProvider();
  2671. }
  2672. /**
  2673. * Set the user provider used by the guard.
  2674. *
  2675. * @param \Illuminate\Contracts\Auth\UserProvider $provider
  2676. * @return void
  2677. * @static
  2678. */
  2679. public static function setProvider($provider)
  2680. {
  2681. /** @var \Illuminate\Auth\SessionGuard $instance */
  2682. $instance->setProvider($provider);
  2683. }
  2684. /**
  2685. * Register a custom macro.
  2686. *
  2687. * @param string $name
  2688. * @param object|callable $macro
  2689. * @param-closure-this static $macro
  2690. * @return void
  2691. * @static
  2692. */
  2693. public static function macro($name, $macro)
  2694. {
  2695. \Illuminate\Auth\SessionGuard::macro($name, $macro);
  2696. }
  2697. /**
  2698. * Mix another object into the class.
  2699. *
  2700. * @param object $mixin
  2701. * @param bool $replace
  2702. * @return void
  2703. * @throws \ReflectionException
  2704. * @static
  2705. */
  2706. public static function mixin($mixin, $replace = true)
  2707. {
  2708. \Illuminate\Auth\SessionGuard::mixin($mixin, $replace);
  2709. }
  2710. /**
  2711. * Checks if macro is registered.
  2712. *
  2713. * @param string $name
  2714. * @return bool
  2715. * @static
  2716. */
  2717. public static function hasMacro($name)
  2718. {
  2719. return \Illuminate\Auth\SessionGuard::hasMacro($name);
  2720. }
  2721. /**
  2722. * Flush the existing macros.
  2723. *
  2724. * @return void
  2725. * @static
  2726. */
  2727. public static function flushMacros()
  2728. {
  2729. \Illuminate\Auth\SessionGuard::flushMacros();
  2730. }
  2731. }
  2732. /**
  2733. * @see \Illuminate\View\Compilers\BladeCompiler
  2734. */
  2735. class Blade {
  2736. /**
  2737. * Compile the view at the given path.
  2738. *
  2739. * @param string|null $path
  2740. * @return void
  2741. * @static
  2742. */
  2743. public static function compile($path = null)
  2744. {
  2745. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2746. $instance->compile($path);
  2747. }
  2748. /**
  2749. * Get the path currently being compiled.
  2750. *
  2751. * @return string
  2752. * @static
  2753. */
  2754. public static function getPath()
  2755. {
  2756. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2757. return $instance->getPath();
  2758. }
  2759. /**
  2760. * Set the path currently being compiled.
  2761. *
  2762. * @param string $path
  2763. * @return void
  2764. * @static
  2765. */
  2766. public static function setPath($path)
  2767. {
  2768. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2769. $instance->setPath($path);
  2770. }
  2771. /**
  2772. * Compile the given Blade template contents.
  2773. *
  2774. * @param string $value
  2775. * @return string
  2776. * @static
  2777. */
  2778. public static function compileString($value)
  2779. {
  2780. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2781. return $instance->compileString($value);
  2782. }
  2783. /**
  2784. * Evaluate and render a Blade string to HTML.
  2785. *
  2786. * @param string $string
  2787. * @param array $data
  2788. * @param bool $deleteCachedView
  2789. * @return string
  2790. * @static
  2791. */
  2792. public static function render($string, $data = [], $deleteCachedView = false)
  2793. {
  2794. return \Illuminate\View\Compilers\BladeCompiler::render($string, $data, $deleteCachedView);
  2795. }
  2796. /**
  2797. * Render a component instance to HTML.
  2798. *
  2799. * @param \Illuminate\View\Component $component
  2800. * @return string
  2801. * @static
  2802. */
  2803. public static function renderComponent($component)
  2804. {
  2805. return \Illuminate\View\Compilers\BladeCompiler::renderComponent($component);
  2806. }
  2807. /**
  2808. * Strip the parentheses from the given expression.
  2809. *
  2810. * @param string $expression
  2811. * @return string
  2812. * @static
  2813. */
  2814. public static function stripParentheses($expression)
  2815. {
  2816. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2817. return $instance->stripParentheses($expression);
  2818. }
  2819. /**
  2820. * Register a custom Blade compiler.
  2821. *
  2822. * @param callable $compiler
  2823. * @return void
  2824. * @static
  2825. */
  2826. public static function extend($compiler)
  2827. {
  2828. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2829. $instance->extend($compiler);
  2830. }
  2831. /**
  2832. * Get the extensions used by the compiler.
  2833. *
  2834. * @return array
  2835. * @static
  2836. */
  2837. public static function getExtensions()
  2838. {
  2839. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2840. return $instance->getExtensions();
  2841. }
  2842. /**
  2843. * Register an "if" statement directive.
  2844. *
  2845. * @param string $name
  2846. * @param callable $callback
  2847. * @return void
  2848. * @static
  2849. */
  2850. public static function if($name, $callback)
  2851. {
  2852. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2853. $instance->if($name, $callback);
  2854. }
  2855. /**
  2856. * Check the result of a condition.
  2857. *
  2858. * @param string $name
  2859. * @param mixed $parameters
  2860. * @return bool
  2861. * @static
  2862. */
  2863. public static function check($name, ...$parameters)
  2864. {
  2865. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2866. return $instance->check($name, ...$parameters);
  2867. }
  2868. /**
  2869. * Register a class-based component alias directive.
  2870. *
  2871. * @param string $class
  2872. * @param string|null $alias
  2873. * @param string $prefix
  2874. * @return void
  2875. * @static
  2876. */
  2877. public static function component($class, $alias = null, $prefix = '')
  2878. {
  2879. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2880. $instance->component($class, $alias, $prefix);
  2881. }
  2882. /**
  2883. * Register an array of class-based components.
  2884. *
  2885. * @param array $components
  2886. * @param string $prefix
  2887. * @return void
  2888. * @static
  2889. */
  2890. public static function components($components, $prefix = '')
  2891. {
  2892. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2893. $instance->components($components, $prefix);
  2894. }
  2895. /**
  2896. * Get the registered class component aliases.
  2897. *
  2898. * @return array
  2899. * @static
  2900. */
  2901. public static function getClassComponentAliases()
  2902. {
  2903. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2904. return $instance->getClassComponentAliases();
  2905. }
  2906. /**
  2907. * Register a new anonymous component path.
  2908. *
  2909. * @param string $path
  2910. * @param string|null $prefix
  2911. * @return void
  2912. * @static
  2913. */
  2914. public static function anonymousComponentPath($path, $prefix = null)
  2915. {
  2916. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2917. $instance->anonymousComponentPath($path, $prefix);
  2918. }
  2919. /**
  2920. * Register an anonymous component namespace.
  2921. *
  2922. * @param string $directory
  2923. * @param string|null $prefix
  2924. * @return void
  2925. * @static
  2926. */
  2927. public static function anonymousComponentNamespace($directory, $prefix = null)
  2928. {
  2929. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2930. $instance->anonymousComponentNamespace($directory, $prefix);
  2931. }
  2932. /**
  2933. * Register a class-based component namespace.
  2934. *
  2935. * @param string $namespace
  2936. * @param string $prefix
  2937. * @return void
  2938. * @static
  2939. */
  2940. public static function componentNamespace($namespace, $prefix)
  2941. {
  2942. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2943. $instance->componentNamespace($namespace, $prefix);
  2944. }
  2945. /**
  2946. * Get the registered anonymous component paths.
  2947. *
  2948. * @return array
  2949. * @static
  2950. */
  2951. public static function getAnonymousComponentPaths()
  2952. {
  2953. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2954. return $instance->getAnonymousComponentPaths();
  2955. }
  2956. /**
  2957. * Get the registered anonymous component namespaces.
  2958. *
  2959. * @return array
  2960. * @static
  2961. */
  2962. public static function getAnonymousComponentNamespaces()
  2963. {
  2964. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2965. return $instance->getAnonymousComponentNamespaces();
  2966. }
  2967. /**
  2968. * Get the registered class component namespaces.
  2969. *
  2970. * @return array
  2971. * @static
  2972. */
  2973. public static function getClassComponentNamespaces()
  2974. {
  2975. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2976. return $instance->getClassComponentNamespaces();
  2977. }
  2978. /**
  2979. * Register a component alias directive.
  2980. *
  2981. * @param string $path
  2982. * @param string|null $alias
  2983. * @return void
  2984. * @static
  2985. */
  2986. public static function aliasComponent($path, $alias = null)
  2987. {
  2988. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  2989. $instance->aliasComponent($path, $alias);
  2990. }
  2991. /**
  2992. * Register an include alias directive.
  2993. *
  2994. * @param string $path
  2995. * @param string|null $alias
  2996. * @return void
  2997. * @static
  2998. */
  2999. public static function include($path, $alias = null)
  3000. {
  3001. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3002. $instance->include($path, $alias);
  3003. }
  3004. /**
  3005. * Register an include alias directive.
  3006. *
  3007. * @param string $path
  3008. * @param string|null $alias
  3009. * @return void
  3010. * @static
  3011. */
  3012. public static function aliasInclude($path, $alias = null)
  3013. {
  3014. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3015. $instance->aliasInclude($path, $alias);
  3016. }
  3017. /**
  3018. * Register a handler for custom directives, binding the handler to the compiler.
  3019. *
  3020. * @param string $name
  3021. * @param callable $handler
  3022. * @return void
  3023. * @throws \InvalidArgumentException
  3024. * @static
  3025. */
  3026. public static function bindDirective($name, $handler)
  3027. {
  3028. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3029. $instance->bindDirective($name, $handler);
  3030. }
  3031. /**
  3032. * Register a handler for custom directives.
  3033. *
  3034. * @param string $name
  3035. * @param callable $handler
  3036. * @param bool $bind
  3037. * @return void
  3038. * @throws \InvalidArgumentException
  3039. * @static
  3040. */
  3041. public static function directive($name, $handler, $bind = false)
  3042. {
  3043. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3044. $instance->directive($name, $handler, $bind);
  3045. }
  3046. /**
  3047. * Get the list of custom directives.
  3048. *
  3049. * @return array
  3050. * @static
  3051. */
  3052. public static function getCustomDirectives()
  3053. {
  3054. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3055. return $instance->getCustomDirectives();
  3056. }
  3057. /**
  3058. * Indicate that the following callable should be used to prepare strings for compilation.
  3059. *
  3060. * @param callable $callback
  3061. * @return \Illuminate\View\Compilers\BladeCompiler
  3062. * @static
  3063. */
  3064. public static function prepareStringsForCompilationUsing($callback)
  3065. {
  3066. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3067. return $instance->prepareStringsForCompilationUsing($callback);
  3068. }
  3069. /**
  3070. * Register a new precompiler.
  3071. *
  3072. * @param callable $precompiler
  3073. * @return void
  3074. * @static
  3075. */
  3076. public static function precompiler($precompiler)
  3077. {
  3078. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3079. $instance->precompiler($precompiler);
  3080. }
  3081. /**
  3082. * Execute the given callback using a custom echo format.
  3083. *
  3084. * @param string $format
  3085. * @param callable $callback
  3086. * @return string
  3087. * @static
  3088. */
  3089. public static function usingEchoFormat($format, $callback)
  3090. {
  3091. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3092. return $instance->usingEchoFormat($format, $callback);
  3093. }
  3094. /**
  3095. * Set the echo format to be used by the compiler.
  3096. *
  3097. * @param string $format
  3098. * @return void
  3099. * @static
  3100. */
  3101. public static function setEchoFormat($format)
  3102. {
  3103. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3104. $instance->setEchoFormat($format);
  3105. }
  3106. /**
  3107. * Set the "echo" format to double encode entities.
  3108. *
  3109. * @return void
  3110. * @static
  3111. */
  3112. public static function withDoubleEncoding()
  3113. {
  3114. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3115. $instance->withDoubleEncoding();
  3116. }
  3117. /**
  3118. * Set the "echo" format to not double encode entities.
  3119. *
  3120. * @return void
  3121. * @static
  3122. */
  3123. public static function withoutDoubleEncoding()
  3124. {
  3125. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3126. $instance->withoutDoubleEncoding();
  3127. }
  3128. /**
  3129. * Indicate that component tags should not be compiled.
  3130. *
  3131. * @return void
  3132. * @static
  3133. */
  3134. public static function withoutComponentTags()
  3135. {
  3136. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3137. $instance->withoutComponentTags();
  3138. }
  3139. /**
  3140. * Get the path to the compiled version of a view.
  3141. *
  3142. * @param string $path
  3143. * @return string
  3144. * @static
  3145. */
  3146. public static function getCompiledPath($path)
  3147. {
  3148. //Method inherited from \Illuminate\View\Compilers\Compiler
  3149. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3150. return $instance->getCompiledPath($path);
  3151. }
  3152. /**
  3153. * Determine if the view at the given path is expired.
  3154. *
  3155. * @param string $path
  3156. * @return bool
  3157. * @throws \ErrorException
  3158. * @static
  3159. */
  3160. public static function isExpired($path)
  3161. {
  3162. //Method inherited from \Illuminate\View\Compilers\Compiler
  3163. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3164. return $instance->isExpired($path);
  3165. }
  3166. /**
  3167. * Get a new component hash for a component name.
  3168. *
  3169. * @param string $component
  3170. * @return string
  3171. * @static
  3172. */
  3173. public static function newComponentHash($component)
  3174. {
  3175. return \Illuminate\View\Compilers\BladeCompiler::newComponentHash($component);
  3176. }
  3177. /**
  3178. * Compile a class component opening.
  3179. *
  3180. * @param string $component
  3181. * @param string $alias
  3182. * @param string $data
  3183. * @param string $hash
  3184. * @return string
  3185. * @static
  3186. */
  3187. public static function compileClassComponentOpening($component, $alias, $data, $hash)
  3188. {
  3189. return \Illuminate\View\Compilers\BladeCompiler::compileClassComponentOpening($component, $alias, $data, $hash);
  3190. }
  3191. /**
  3192. * Compile the end-component statements into valid PHP.
  3193. *
  3194. * @return string
  3195. * @static
  3196. */
  3197. public static function compileEndComponentClass()
  3198. {
  3199. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3200. return $instance->compileEndComponentClass();
  3201. }
  3202. /**
  3203. * Sanitize the given component attribute value.
  3204. *
  3205. * @param mixed $value
  3206. * @return mixed
  3207. * @static
  3208. */
  3209. public static function sanitizeComponentAttribute($value)
  3210. {
  3211. return \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($value);
  3212. }
  3213. /**
  3214. * Compile an end-once block into valid PHP.
  3215. *
  3216. * @return string
  3217. * @static
  3218. */
  3219. public static function compileEndOnce()
  3220. {
  3221. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3222. return $instance->compileEndOnce();
  3223. }
  3224. /**
  3225. * Add a handler to be executed before echoing a given class.
  3226. *
  3227. * @param string|callable $class
  3228. * @param callable|null $handler
  3229. * @return void
  3230. * @static
  3231. */
  3232. public static function stringable($class, $handler = null)
  3233. {
  3234. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3235. $instance->stringable($class, $handler);
  3236. }
  3237. /**
  3238. * Compile Blade echos into valid PHP.
  3239. *
  3240. * @param string $value
  3241. * @return string
  3242. * @static
  3243. */
  3244. public static function compileEchos($value)
  3245. {
  3246. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3247. return $instance->compileEchos($value);
  3248. }
  3249. /**
  3250. * Apply the echo handler for the value if it exists.
  3251. *
  3252. * @param string $value
  3253. * @return string
  3254. * @static
  3255. */
  3256. public static function applyEchoHandler($value)
  3257. {
  3258. /** @var \Illuminate\View\Compilers\BladeCompiler $instance */
  3259. return $instance->applyEchoHandler($value);
  3260. }
  3261. }
  3262. /**
  3263. * @method static mixed auth(\Illuminate\Http\Request $request)
  3264. * @method static mixed validAuthenticationResponse(\Illuminate\Http\Request $request, mixed $result)
  3265. * @method static void broadcast(array $channels, string $event, array $payload = [])
  3266. * @method static array|null resolveAuthenticatedUser(\Illuminate\Http\Request $request)
  3267. * @method static void resolveAuthenticatedUserUsing(\Closure $callback)
  3268. * @method static \Illuminate\Broadcasting\Broadcasters\Broadcaster channel(\Illuminate\Contracts\Broadcasting\HasBroadcastChannel|string $channel, callable|string $callback, array $options = [])
  3269. * @method static \Illuminate\Support\Collection getChannels()
  3270. * @see \Illuminate\Broadcasting\BroadcastManager
  3271. * @see \Illuminate\Broadcasting\Broadcasters\Broadcaster
  3272. */
  3273. class Broadcast {
  3274. /**
  3275. * Register the routes for handling broadcast channel authentication and sockets.
  3276. *
  3277. * @param array|null $attributes
  3278. * @return void
  3279. * @static
  3280. */
  3281. public static function routes($attributes = null)
  3282. {
  3283. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3284. $instance->routes($attributes);
  3285. }
  3286. /**
  3287. * Register the routes for handling broadcast user authentication.
  3288. *
  3289. * @param array|null $attributes
  3290. * @return void
  3291. * @static
  3292. */
  3293. public static function userRoutes($attributes = null)
  3294. {
  3295. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3296. $instance->userRoutes($attributes);
  3297. }
  3298. /**
  3299. * Register the routes for handling broadcast authentication and sockets.
  3300. *
  3301. * Alias of "routes" method.
  3302. *
  3303. * @param array|null $attributes
  3304. * @return void
  3305. * @static
  3306. */
  3307. public static function channelRoutes($attributes = null)
  3308. {
  3309. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3310. $instance->channelRoutes($attributes);
  3311. }
  3312. /**
  3313. * Get the socket ID for the given request.
  3314. *
  3315. * @param \Illuminate\Http\Request|null $request
  3316. * @return string|null
  3317. * @static
  3318. */
  3319. public static function socket($request = null)
  3320. {
  3321. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3322. return $instance->socket($request);
  3323. }
  3324. /**
  3325. * Begin sending an anonymous broadcast to the given channels.
  3326. *
  3327. * @static
  3328. */
  3329. public static function on($channels)
  3330. {
  3331. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3332. return $instance->on($channels);
  3333. }
  3334. /**
  3335. * Begin sending an anonymous broadcast to the given private channels.
  3336. *
  3337. * @static
  3338. */
  3339. public static function private($channel)
  3340. {
  3341. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3342. return $instance->private($channel);
  3343. }
  3344. /**
  3345. * Begin sending an anonymous broadcast to the given presence channels.
  3346. *
  3347. * @static
  3348. */
  3349. public static function presence($channel)
  3350. {
  3351. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3352. return $instance->presence($channel);
  3353. }
  3354. /**
  3355. * Begin broadcasting an event.
  3356. *
  3357. * @param mixed|null $event
  3358. * @return \Illuminate\Broadcasting\PendingBroadcast
  3359. * @static
  3360. */
  3361. public static function event($event = null)
  3362. {
  3363. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3364. return $instance->event($event);
  3365. }
  3366. /**
  3367. * Queue the given event for broadcast.
  3368. *
  3369. * @param mixed $event
  3370. * @return void
  3371. * @static
  3372. */
  3373. public static function queue($event)
  3374. {
  3375. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3376. $instance->queue($event);
  3377. }
  3378. /**
  3379. * Get a driver instance.
  3380. *
  3381. * @param string|null $driver
  3382. * @return mixed
  3383. * @static
  3384. */
  3385. public static function connection($driver = null)
  3386. {
  3387. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3388. return $instance->connection($driver);
  3389. }
  3390. /**
  3391. * Get a driver instance.
  3392. *
  3393. * @param string|null $name
  3394. * @return mixed
  3395. * @static
  3396. */
  3397. public static function driver($name = null)
  3398. {
  3399. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3400. return $instance->driver($name);
  3401. }
  3402. /**
  3403. * Get a Pusher instance for the given configuration.
  3404. *
  3405. * @param array $config
  3406. * @return \Pusher\Pusher
  3407. * @static
  3408. */
  3409. public static function pusher($config)
  3410. {
  3411. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3412. return $instance->pusher($config);
  3413. }
  3414. /**
  3415. * Get an Ably instance for the given configuration.
  3416. *
  3417. * @param array $config
  3418. * @return \Ably\AblyRest
  3419. * @static
  3420. */
  3421. public static function ably($config)
  3422. {
  3423. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3424. return $instance->ably($config);
  3425. }
  3426. /**
  3427. * Get the default driver name.
  3428. *
  3429. * @return string
  3430. * @static
  3431. */
  3432. public static function getDefaultDriver()
  3433. {
  3434. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3435. return $instance->getDefaultDriver();
  3436. }
  3437. /**
  3438. * Set the default driver name.
  3439. *
  3440. * @param string $name
  3441. * @return void
  3442. * @static
  3443. */
  3444. public static function setDefaultDriver($name)
  3445. {
  3446. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3447. $instance->setDefaultDriver($name);
  3448. }
  3449. /**
  3450. * Disconnect the given disk and remove from local cache.
  3451. *
  3452. * @param string|null $name
  3453. * @return void
  3454. * @static
  3455. */
  3456. public static function purge($name = null)
  3457. {
  3458. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3459. $instance->purge($name);
  3460. }
  3461. /**
  3462. * Register a custom driver creator Closure.
  3463. *
  3464. * @param string $driver
  3465. * @param \Closure $callback
  3466. * @return \Illuminate\Broadcasting\BroadcastManager
  3467. * @static
  3468. */
  3469. public static function extend($driver, $callback)
  3470. {
  3471. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3472. return $instance->extend($driver, $callback);
  3473. }
  3474. /**
  3475. * Get the application instance used by the manager.
  3476. *
  3477. * @return \Illuminate\Contracts\Foundation\Application
  3478. * @static
  3479. */
  3480. public static function getApplication()
  3481. {
  3482. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3483. return $instance->getApplication();
  3484. }
  3485. /**
  3486. * Set the application instance used by the manager.
  3487. *
  3488. * @param \Illuminate\Contracts\Foundation\Application $app
  3489. * @return \Illuminate\Broadcasting\BroadcastManager
  3490. * @static
  3491. */
  3492. public static function setApplication($app)
  3493. {
  3494. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3495. return $instance->setApplication($app);
  3496. }
  3497. /**
  3498. * Forget all of the resolved driver instances.
  3499. *
  3500. * @return \Illuminate\Broadcasting\BroadcastManager
  3501. * @static
  3502. */
  3503. public static function forgetDrivers()
  3504. {
  3505. /** @var \Illuminate\Broadcasting\BroadcastManager $instance */
  3506. return $instance->forgetDrivers();
  3507. }
  3508. }
  3509. /**
  3510. * @see \Illuminate\Bus\Dispatcher
  3511. * @see \Illuminate\Support\Testing\Fakes\BusFake
  3512. */
  3513. class Bus {
  3514. /**
  3515. * Dispatch a command to its appropriate handler.
  3516. *
  3517. * @param mixed $command
  3518. * @return mixed
  3519. * @static
  3520. */
  3521. public static function dispatch($command)
  3522. {
  3523. /** @var \Illuminate\Bus\Dispatcher $instance */
  3524. return $instance->dispatch($command);
  3525. }
  3526. /**
  3527. * Dispatch a command to its appropriate handler in the current process.
  3528. *
  3529. * Queueable jobs will be dispatched to the "sync" queue.
  3530. *
  3531. * @param mixed $command
  3532. * @param mixed $handler
  3533. * @return mixed
  3534. * @static
  3535. */
  3536. public static function dispatchSync($command, $handler = null)
  3537. {
  3538. /** @var \Illuminate\Bus\Dispatcher $instance */
  3539. return $instance->dispatchSync($command, $handler);
  3540. }
  3541. /**
  3542. * Dispatch a command to its appropriate handler in the current process without using the synchronous queue.
  3543. *
  3544. * @param mixed $command
  3545. * @param mixed $handler
  3546. * @return mixed
  3547. * @static
  3548. */
  3549. public static function dispatchNow($command, $handler = null)
  3550. {
  3551. /** @var \Illuminate\Bus\Dispatcher $instance */
  3552. return $instance->dispatchNow($command, $handler);
  3553. }
  3554. /**
  3555. * Attempt to find the batch with the given ID.
  3556. *
  3557. * @param string $batchId
  3558. * @return \Illuminate\Bus\Batch|null
  3559. * @static
  3560. */
  3561. public static function findBatch($batchId)
  3562. {
  3563. /** @var \Illuminate\Bus\Dispatcher $instance */
  3564. return $instance->findBatch($batchId);
  3565. }
  3566. /**
  3567. * Create a new batch of queueable jobs.
  3568. *
  3569. * @param \Illuminate\Support\Collection|array|mixed $jobs
  3570. * @return \Illuminate\Bus\PendingBatch
  3571. * @static
  3572. */
  3573. public static function batch($jobs)
  3574. {
  3575. /** @var \Illuminate\Bus\Dispatcher $instance */
  3576. return $instance->batch($jobs);
  3577. }
  3578. /**
  3579. * Create a new chain of queueable jobs.
  3580. *
  3581. * @param \Illuminate\Support\Collection|array $jobs
  3582. * @return \Illuminate\Foundation\Bus\PendingChain
  3583. * @static
  3584. */
  3585. public static function chain($jobs)
  3586. {
  3587. /** @var \Illuminate\Bus\Dispatcher $instance */
  3588. return $instance->chain($jobs);
  3589. }
  3590. /**
  3591. * Determine if the given command has a handler.
  3592. *
  3593. * @param mixed $command
  3594. * @return bool
  3595. * @static
  3596. */
  3597. public static function hasCommandHandler($command)
  3598. {
  3599. /** @var \Illuminate\Bus\Dispatcher $instance */
  3600. return $instance->hasCommandHandler($command);
  3601. }
  3602. /**
  3603. * Retrieve the handler for a command.
  3604. *
  3605. * @param mixed $command
  3606. * @return bool|mixed
  3607. * @static
  3608. */
  3609. public static function getCommandHandler($command)
  3610. {
  3611. /** @var \Illuminate\Bus\Dispatcher $instance */
  3612. return $instance->getCommandHandler($command);
  3613. }
  3614. /**
  3615. * Dispatch a command to its appropriate handler behind a queue.
  3616. *
  3617. * @param mixed $command
  3618. * @return mixed
  3619. * @throws \RuntimeException
  3620. * @static
  3621. */
  3622. public static function dispatchToQueue($command)
  3623. {
  3624. /** @var \Illuminate\Bus\Dispatcher $instance */
  3625. return $instance->dispatchToQueue($command);
  3626. }
  3627. /**
  3628. * Dispatch a command to its appropriate handler after the current process.
  3629. *
  3630. * @param mixed $command
  3631. * @param mixed $handler
  3632. * @return void
  3633. * @static
  3634. */
  3635. public static function dispatchAfterResponse($command, $handler = null)
  3636. {
  3637. /** @var \Illuminate\Bus\Dispatcher $instance */
  3638. $instance->dispatchAfterResponse($command, $handler);
  3639. }
  3640. /**
  3641. * Set the pipes through which commands should be piped before dispatching.
  3642. *
  3643. * @param array $pipes
  3644. * @return \Illuminate\Bus\Dispatcher
  3645. * @static
  3646. */
  3647. public static function pipeThrough($pipes)
  3648. {
  3649. /** @var \Illuminate\Bus\Dispatcher $instance */
  3650. return $instance->pipeThrough($pipes);
  3651. }
  3652. /**
  3653. * Map a command to a handler.
  3654. *
  3655. * @param array $map
  3656. * @return \Illuminate\Bus\Dispatcher
  3657. * @static
  3658. */
  3659. public static function map($map)
  3660. {
  3661. /** @var \Illuminate\Bus\Dispatcher $instance */
  3662. return $instance->map($map);
  3663. }
  3664. /**
  3665. * Allow dispatching after responses.
  3666. *
  3667. * @return \Illuminate\Bus\Dispatcher
  3668. * @static
  3669. */
  3670. public static function withDispatchingAfterResponses()
  3671. {
  3672. /** @var \Illuminate\Bus\Dispatcher $instance */
  3673. return $instance->withDispatchingAfterResponses();
  3674. }
  3675. /**
  3676. * Disable dispatching after responses.
  3677. *
  3678. * @return \Illuminate\Bus\Dispatcher
  3679. * @static
  3680. */
  3681. public static function withoutDispatchingAfterResponses()
  3682. {
  3683. /** @var \Illuminate\Bus\Dispatcher $instance */
  3684. return $instance->withoutDispatchingAfterResponses();
  3685. }
  3686. /**
  3687. * Specify the jobs that should be dispatched instead of faked.
  3688. *
  3689. * @param array|string $jobsToDispatch
  3690. * @return \Illuminate\Support\Testing\Fakes\BusFake
  3691. * @static
  3692. */
  3693. public static function except($jobsToDispatch)
  3694. {
  3695. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3696. return $instance->except($jobsToDispatch);
  3697. }
  3698. /**
  3699. * Assert if a job was dispatched based on a truth-test callback.
  3700. *
  3701. * @param string|\Closure $command
  3702. * @param callable|int|null $callback
  3703. * @return void
  3704. * @static
  3705. */
  3706. public static function assertDispatched($command, $callback = null)
  3707. {
  3708. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3709. $instance->assertDispatched($command, $callback);
  3710. }
  3711. /**
  3712. * Assert if a job was pushed a number of times.
  3713. *
  3714. * @param string|\Closure $command
  3715. * @param int $times
  3716. * @return void
  3717. * @static
  3718. */
  3719. public static function assertDispatchedTimes($command, $times = 1)
  3720. {
  3721. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3722. $instance->assertDispatchedTimes($command, $times);
  3723. }
  3724. /**
  3725. * Determine if a job was dispatched based on a truth-test callback.
  3726. *
  3727. * @param string|\Closure $command
  3728. * @param callable|null $callback
  3729. * @return void
  3730. * @static
  3731. */
  3732. public static function assertNotDispatched($command, $callback = null)
  3733. {
  3734. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3735. $instance->assertNotDispatched($command, $callback);
  3736. }
  3737. /**
  3738. * Assert that no jobs were dispatched.
  3739. *
  3740. * @return void
  3741. * @static
  3742. */
  3743. public static function assertNothingDispatched()
  3744. {
  3745. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3746. $instance->assertNothingDispatched();
  3747. }
  3748. /**
  3749. * Assert if a job was explicitly dispatched synchronously based on a truth-test callback.
  3750. *
  3751. * @param string|\Closure $command
  3752. * @param callable|int|null $callback
  3753. * @return void
  3754. * @static
  3755. */
  3756. public static function assertDispatchedSync($command, $callback = null)
  3757. {
  3758. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3759. $instance->assertDispatchedSync($command, $callback);
  3760. }
  3761. /**
  3762. * Assert if a job was pushed synchronously a number of times.
  3763. *
  3764. * @param string|\Closure $command
  3765. * @param int $times
  3766. * @return void
  3767. * @static
  3768. */
  3769. public static function assertDispatchedSyncTimes($command, $times = 1)
  3770. {
  3771. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3772. $instance->assertDispatchedSyncTimes($command, $times);
  3773. }
  3774. /**
  3775. * Determine if a job was dispatched based on a truth-test callback.
  3776. *
  3777. * @param string|\Closure $command
  3778. * @param callable|null $callback
  3779. * @return void
  3780. * @static
  3781. */
  3782. public static function assertNotDispatchedSync($command, $callback = null)
  3783. {
  3784. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3785. $instance->assertNotDispatchedSync($command, $callback);
  3786. }
  3787. /**
  3788. * Assert if a job was dispatched after the response was sent based on a truth-test callback.
  3789. *
  3790. * @param string|\Closure $command
  3791. * @param callable|int|null $callback
  3792. * @return void
  3793. * @static
  3794. */
  3795. public static function assertDispatchedAfterResponse($command, $callback = null)
  3796. {
  3797. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3798. $instance->assertDispatchedAfterResponse($command, $callback);
  3799. }
  3800. /**
  3801. * Assert if a job was pushed after the response was sent a number of times.
  3802. *
  3803. * @param string|\Closure $command
  3804. * @param int $times
  3805. * @return void
  3806. * @static
  3807. */
  3808. public static function assertDispatchedAfterResponseTimes($command, $times = 1)
  3809. {
  3810. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3811. $instance->assertDispatchedAfterResponseTimes($command, $times);
  3812. }
  3813. /**
  3814. * Determine if a job was dispatched based on a truth-test callback.
  3815. *
  3816. * @param string|\Closure $command
  3817. * @param callable|null $callback
  3818. * @return void
  3819. * @static
  3820. */
  3821. public static function assertNotDispatchedAfterResponse($command, $callback = null)
  3822. {
  3823. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3824. $instance->assertNotDispatchedAfterResponse($command, $callback);
  3825. }
  3826. /**
  3827. * Assert if a chain of jobs was dispatched.
  3828. *
  3829. * @param array $expectedChain
  3830. * @return void
  3831. * @static
  3832. */
  3833. public static function assertChained($expectedChain)
  3834. {
  3835. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3836. $instance->assertChained($expectedChain);
  3837. }
  3838. /**
  3839. * Assert no chained jobs was dispatched.
  3840. *
  3841. * @return void
  3842. * @static
  3843. */
  3844. public static function assertNothingChained()
  3845. {
  3846. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3847. $instance->assertNothingChained();
  3848. }
  3849. /**
  3850. * Assert if a job was dispatched with an empty chain based on a truth-test callback.
  3851. *
  3852. * @param string|\Closure $command
  3853. * @param callable|null $callback
  3854. * @return void
  3855. * @static
  3856. */
  3857. public static function assertDispatchedWithoutChain($command, $callback = null)
  3858. {
  3859. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3860. $instance->assertDispatchedWithoutChain($command, $callback);
  3861. }
  3862. /**
  3863. * Create a new assertion about a chained batch.
  3864. *
  3865. * @param \Closure $callback
  3866. * @return \Illuminate\Support\Testing\Fakes\ChainedBatchTruthTest
  3867. * @static
  3868. */
  3869. public static function chainedBatch($callback)
  3870. {
  3871. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3872. return $instance->chainedBatch($callback);
  3873. }
  3874. /**
  3875. * Assert if a batch was dispatched based on a truth-test callback.
  3876. *
  3877. * @param callable $callback
  3878. * @return void
  3879. * @static
  3880. */
  3881. public static function assertBatched($callback)
  3882. {
  3883. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3884. $instance->assertBatched($callback);
  3885. }
  3886. /**
  3887. * Assert the number of batches that have been dispatched.
  3888. *
  3889. * @param int $count
  3890. * @return void
  3891. * @static
  3892. */
  3893. public static function assertBatchCount($count)
  3894. {
  3895. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3896. $instance->assertBatchCount($count);
  3897. }
  3898. /**
  3899. * Assert that no batched jobs were dispatched.
  3900. *
  3901. * @return void
  3902. * @static
  3903. */
  3904. public static function assertNothingBatched()
  3905. {
  3906. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3907. $instance->assertNothingBatched();
  3908. }
  3909. /**
  3910. * Assert that no jobs were dispatched, chained, or batched.
  3911. *
  3912. * @return void
  3913. * @static
  3914. */
  3915. public static function assertNothingPlaced()
  3916. {
  3917. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3918. $instance->assertNothingPlaced();
  3919. }
  3920. /**
  3921. * Get all of the jobs matching a truth-test callback.
  3922. *
  3923. * @param string $command
  3924. * @param callable|null $callback
  3925. * @return \Illuminate\Support\Collection
  3926. * @static
  3927. */
  3928. public static function dispatched($command, $callback = null)
  3929. {
  3930. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3931. return $instance->dispatched($command, $callback);
  3932. }
  3933. /**
  3934. * Get all of the jobs dispatched synchronously matching a truth-test callback.
  3935. *
  3936. * @param string $command
  3937. * @param callable|null $callback
  3938. * @return \Illuminate\Support\Collection
  3939. * @static
  3940. */
  3941. public static function dispatchedSync($command, $callback = null)
  3942. {
  3943. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3944. return $instance->dispatchedSync($command, $callback);
  3945. }
  3946. /**
  3947. * Get all of the jobs dispatched after the response was sent matching a truth-test callback.
  3948. *
  3949. * @param string $command
  3950. * @param callable|null $callback
  3951. * @return \Illuminate\Support\Collection
  3952. * @static
  3953. */
  3954. public static function dispatchedAfterResponse($command, $callback = null)
  3955. {
  3956. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3957. return $instance->dispatchedAfterResponse($command, $callback);
  3958. }
  3959. /**
  3960. * Get all of the pending batches matching a truth-test callback.
  3961. *
  3962. * @param callable $callback
  3963. * @return \Illuminate\Support\Collection
  3964. * @static
  3965. */
  3966. public static function batched($callback)
  3967. {
  3968. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3969. return $instance->batched($callback);
  3970. }
  3971. /**
  3972. * Determine if there are any stored commands for a given class.
  3973. *
  3974. * @param string $command
  3975. * @return bool
  3976. * @static
  3977. */
  3978. public static function hasDispatched($command)
  3979. {
  3980. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3981. return $instance->hasDispatched($command);
  3982. }
  3983. /**
  3984. * Determine if there are any stored commands for a given class.
  3985. *
  3986. * @param string $command
  3987. * @return bool
  3988. * @static
  3989. */
  3990. public static function hasDispatchedSync($command)
  3991. {
  3992. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  3993. return $instance->hasDispatchedSync($command);
  3994. }
  3995. /**
  3996. * Determine if there are any stored commands for a given class.
  3997. *
  3998. * @param string $command
  3999. * @return bool
  4000. * @static
  4001. */
  4002. public static function hasDispatchedAfterResponse($command)
  4003. {
  4004. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4005. return $instance->hasDispatchedAfterResponse($command);
  4006. }
  4007. /**
  4008. * Dispatch an empty job batch for testing.
  4009. *
  4010. * @param string $name
  4011. * @return \Illuminate\Bus\Batch
  4012. * @static
  4013. */
  4014. public static function dispatchFakeBatch($name = '')
  4015. {
  4016. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4017. return $instance->dispatchFakeBatch($name);
  4018. }
  4019. /**
  4020. * Record the fake pending batch dispatch.
  4021. *
  4022. * @param \Illuminate\Bus\PendingBatch $pendingBatch
  4023. * @return \Illuminate\Bus\Batch
  4024. * @static
  4025. */
  4026. public static function recordPendingBatch($pendingBatch)
  4027. {
  4028. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4029. return $instance->recordPendingBatch($pendingBatch);
  4030. }
  4031. /**
  4032. * Specify if commands should be serialized and restored when being batched.
  4033. *
  4034. * @param bool $serializeAndRestore
  4035. * @return \Illuminate\Support\Testing\Fakes\BusFake
  4036. * @static
  4037. */
  4038. public static function serializeAndRestore($serializeAndRestore = true)
  4039. {
  4040. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4041. return $instance->serializeAndRestore($serializeAndRestore);
  4042. }
  4043. /**
  4044. * Get the batches that have been dispatched.
  4045. *
  4046. * @return array
  4047. * @static
  4048. */
  4049. public static function dispatchedBatches()
  4050. {
  4051. /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
  4052. return $instance->dispatchedBatches();
  4053. }
  4054. }
  4055. /**
  4056. * @see \Illuminate\Cache\CacheManager
  4057. * @see \Illuminate\Cache\Repository
  4058. */
  4059. class Cache {
  4060. /**
  4061. * Get a cache store instance by name, wrapped in a repository.
  4062. *
  4063. * @param string|null $name
  4064. * @return \Illuminate\Contracts\Cache\Repository
  4065. * @static
  4066. */
  4067. public static function store($name = null)
  4068. {
  4069. /** @var \Illuminate\Cache\CacheManager $instance */
  4070. return $instance->store($name);
  4071. }
  4072. /**
  4073. * Get a cache driver instance.
  4074. *
  4075. * @param string|null $driver
  4076. * @return \Illuminate\Contracts\Cache\Repository
  4077. * @static
  4078. */
  4079. public static function driver($driver = null)
  4080. {
  4081. /** @var \Illuminate\Cache\CacheManager $instance */
  4082. return $instance->driver($driver);
  4083. }
  4084. /**
  4085. * Get a memoized cache driver instance.
  4086. *
  4087. * @param string|null $driver
  4088. * @return \Illuminate\Contracts\Cache\Repository
  4089. * @static
  4090. */
  4091. public static function memo($driver = null)
  4092. {
  4093. /** @var \Illuminate\Cache\CacheManager $instance */
  4094. return $instance->memo($driver);
  4095. }
  4096. /**
  4097. * Resolve the given store.
  4098. *
  4099. * @param string $name
  4100. * @return \Illuminate\Contracts\Cache\Repository
  4101. * @throws \InvalidArgumentException
  4102. * @static
  4103. */
  4104. public static function resolve($name)
  4105. {
  4106. /** @var \Illuminate\Cache\CacheManager $instance */
  4107. return $instance->resolve($name);
  4108. }
  4109. /**
  4110. * Build a cache repository with the given configuration.
  4111. *
  4112. * @param array $config
  4113. * @return \Illuminate\Cache\Repository
  4114. * @static
  4115. */
  4116. public static function build($config)
  4117. {
  4118. /** @var \Illuminate\Cache\CacheManager $instance */
  4119. return $instance->build($config);
  4120. }
  4121. /**
  4122. * Create a new cache repository with the given implementation.
  4123. *
  4124. * @param \Illuminate\Contracts\Cache\Store $store
  4125. * @param array $config
  4126. * @return \Illuminate\Cache\Repository
  4127. * @static
  4128. */
  4129. public static function repository($store, $config = [])
  4130. {
  4131. /** @var \Illuminate\Cache\CacheManager $instance */
  4132. return $instance->repository($store, $config);
  4133. }
  4134. /**
  4135. * Re-set the event dispatcher on all resolved cache repositories.
  4136. *
  4137. * @return void
  4138. * @static
  4139. */
  4140. public static function refreshEventDispatcher()
  4141. {
  4142. /** @var \Illuminate\Cache\CacheManager $instance */
  4143. $instance->refreshEventDispatcher();
  4144. }
  4145. /**
  4146. * Get the default cache driver name.
  4147. *
  4148. * @return string
  4149. * @static
  4150. */
  4151. public static function getDefaultDriver()
  4152. {
  4153. /** @var \Illuminate\Cache\CacheManager $instance */
  4154. return $instance->getDefaultDriver();
  4155. }
  4156. /**
  4157. * Set the default cache driver name.
  4158. *
  4159. * @param string $name
  4160. * @return void
  4161. * @static
  4162. */
  4163. public static function setDefaultDriver($name)
  4164. {
  4165. /** @var \Illuminate\Cache\CacheManager $instance */
  4166. $instance->setDefaultDriver($name);
  4167. }
  4168. /**
  4169. * Unset the given driver instances.
  4170. *
  4171. * @param array|string|null $name
  4172. * @return \Illuminate\Cache\CacheManager
  4173. * @static
  4174. */
  4175. public static function forgetDriver($name = null)
  4176. {
  4177. /** @var \Illuminate\Cache\CacheManager $instance */
  4178. return $instance->forgetDriver($name);
  4179. }
  4180. /**
  4181. * Disconnect the given driver and remove from local cache.
  4182. *
  4183. * @param string|null $name
  4184. * @return void
  4185. * @static
  4186. */
  4187. public static function purge($name = null)
  4188. {
  4189. /** @var \Illuminate\Cache\CacheManager $instance */
  4190. $instance->purge($name);
  4191. }
  4192. /**
  4193. * Register a custom driver creator Closure.
  4194. *
  4195. * @param string $driver
  4196. * @param \Closure $callback
  4197. * @param-closure-this $this $callback
  4198. * @return \Illuminate\Cache\CacheManager
  4199. * @static
  4200. */
  4201. public static function extend($driver, $callback)
  4202. {
  4203. /** @var \Illuminate\Cache\CacheManager $instance */
  4204. return $instance->extend($driver, $callback);
  4205. }
  4206. /**
  4207. * Set the application instance used by the manager.
  4208. *
  4209. * @param \Illuminate\Contracts\Foundation\Application $app
  4210. * @return \Illuminate\Cache\CacheManager
  4211. * @static
  4212. */
  4213. public static function setApplication($app)
  4214. {
  4215. /** @var \Illuminate\Cache\CacheManager $instance */
  4216. return $instance->setApplication($app);
  4217. }
  4218. /**
  4219. * Determine if an item exists in the cache.
  4220. *
  4221. * @param array|string $key
  4222. * @return bool
  4223. * @static
  4224. */
  4225. public static function has($key)
  4226. {
  4227. /** @var \Illuminate\Cache\Repository $instance */
  4228. return $instance->has($key);
  4229. }
  4230. /**
  4231. * Determine if an item doesn't exist in the cache.
  4232. *
  4233. * @param string $key
  4234. * @return bool
  4235. * @static
  4236. */
  4237. public static function missing($key)
  4238. {
  4239. /** @var \Illuminate\Cache\Repository $instance */
  4240. return $instance->missing($key);
  4241. }
  4242. /**
  4243. * Retrieve an item from the cache by key.
  4244. *
  4245. * @param array|string $key
  4246. * @param mixed $default
  4247. * @return mixed
  4248. * @static
  4249. */
  4250. public static function get($key, $default = null)
  4251. {
  4252. /** @var \Illuminate\Cache\Repository $instance */
  4253. return $instance->get($key, $default);
  4254. }
  4255. /**
  4256. * Retrieve multiple items from the cache by key.
  4257. *
  4258. * Items not found in the cache will have a null value.
  4259. *
  4260. * @param array $keys
  4261. * @return array
  4262. * @static
  4263. */
  4264. public static function many($keys)
  4265. {
  4266. /** @var \Illuminate\Cache\Repository $instance */
  4267. return $instance->many($keys);
  4268. }
  4269. /**
  4270. * Obtains multiple cache items by their unique keys.
  4271. *
  4272. * @return iterable
  4273. * @param iterable<string> $keys A list of keys that can be obtained in a single operation.
  4274. * @param mixed $default Default value to return for keys that do not exist.
  4275. * @return iterable<string, mixed> A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
  4276. * @throws \Psr\SimpleCache\InvalidArgumentException
  4277. * MUST be thrown if $keys is neither an array nor a Traversable,
  4278. * or if any of the $keys are not a legal value.
  4279. * @static
  4280. */
  4281. public static function getMultiple($keys, $default = null)
  4282. {
  4283. /** @var \Illuminate\Cache\Repository $instance */
  4284. return $instance->getMultiple($keys, $default);
  4285. }
  4286. /**
  4287. * Retrieve an item from the cache and delete it.
  4288. *
  4289. * @param array|string $key
  4290. * @param mixed $default
  4291. * @return mixed
  4292. * @static
  4293. */
  4294. public static function pull($key, $default = null)
  4295. {
  4296. /** @var \Illuminate\Cache\Repository $instance */
  4297. return $instance->pull($key, $default);
  4298. }
  4299. /**
  4300. * Store an item in the cache.
  4301. *
  4302. * @param array|string $key
  4303. * @param mixed $value
  4304. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  4305. * @return bool
  4306. * @static
  4307. */
  4308. public static function put($key, $value, $ttl = null)
  4309. {
  4310. /** @var \Illuminate\Cache\Repository $instance */
  4311. return $instance->put($key, $value, $ttl);
  4312. }
  4313. /**
  4314. * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
  4315. *
  4316. * @return bool
  4317. * @param string $key The key of the item to store.
  4318. * @param mixed $value The value of the item to store, must be serializable.
  4319. * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
  4320. * the driver supports TTL then the library may set a default value
  4321. * for it or let the driver take care of that.
  4322. * @return bool True on success and false on failure.
  4323. * @throws \Psr\SimpleCache\InvalidArgumentException
  4324. * MUST be thrown if the $key string is not a legal value.
  4325. * @static
  4326. */
  4327. public static function set($key, $value, $ttl = null)
  4328. {
  4329. /** @var \Illuminate\Cache\Repository $instance */
  4330. return $instance->set($key, $value, $ttl);
  4331. }
  4332. /**
  4333. * Store multiple items in the cache for a given number of seconds.
  4334. *
  4335. * @param array $values
  4336. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  4337. * @return bool
  4338. * @static
  4339. */
  4340. public static function putMany($values, $ttl = null)
  4341. {
  4342. /** @var \Illuminate\Cache\Repository $instance */
  4343. return $instance->putMany($values, $ttl);
  4344. }
  4345. /**
  4346. * Persists a set of key => value pairs in the cache, with an optional TTL.
  4347. *
  4348. * @return bool
  4349. * @param iterable $values A list of key => value pairs for a multiple-set operation.
  4350. * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
  4351. * the driver supports TTL then the library may set a default value
  4352. * for it or let the driver take care of that.
  4353. * @return bool True on success and false on failure.
  4354. * @throws \Psr\SimpleCache\InvalidArgumentException
  4355. * MUST be thrown if $values is neither an array nor a Traversable,
  4356. * or if any of the $values are not a legal value.
  4357. * @static
  4358. */
  4359. public static function setMultiple($values, $ttl = null)
  4360. {
  4361. /** @var \Illuminate\Cache\Repository $instance */
  4362. return $instance->setMultiple($values, $ttl);
  4363. }
  4364. /**
  4365. * Store an item in the cache if the key does not exist.
  4366. *
  4367. * @param string $key
  4368. * @param mixed $value
  4369. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  4370. * @return bool
  4371. * @static
  4372. */
  4373. public static function add($key, $value, $ttl = null)
  4374. {
  4375. /** @var \Illuminate\Cache\Repository $instance */
  4376. return $instance->add($key, $value, $ttl);
  4377. }
  4378. /**
  4379. * Increment the value of an item in the cache.
  4380. *
  4381. * @param string $key
  4382. * @param mixed $value
  4383. * @return int|bool
  4384. * @static
  4385. */
  4386. public static function increment($key, $value = 1)
  4387. {
  4388. /** @var \Illuminate\Cache\Repository $instance */
  4389. return $instance->increment($key, $value);
  4390. }
  4391. /**
  4392. * Decrement the value of an item in the cache.
  4393. *
  4394. * @param string $key
  4395. * @param mixed $value
  4396. * @return int|bool
  4397. * @static
  4398. */
  4399. public static function decrement($key, $value = 1)
  4400. {
  4401. /** @var \Illuminate\Cache\Repository $instance */
  4402. return $instance->decrement($key, $value);
  4403. }
  4404. /**
  4405. * Store an item in the cache indefinitely.
  4406. *
  4407. * @param string $key
  4408. * @param mixed $value
  4409. * @return bool
  4410. * @static
  4411. */
  4412. public static function forever($key, $value)
  4413. {
  4414. /** @var \Illuminate\Cache\Repository $instance */
  4415. return $instance->forever($key, $value);
  4416. }
  4417. /**
  4418. * Get an item from the cache, or execute the given Closure and store the result.
  4419. *
  4420. * @template TCacheValue
  4421. * @param string $key
  4422. * @param \Closure|\DateTimeInterface|\DateInterval|int|null $ttl
  4423. * @param \Closure(): TCacheValue $callback
  4424. * @return TCacheValue
  4425. * @static
  4426. */
  4427. public static function remember($key, $ttl, $callback)
  4428. {
  4429. /** @var \Illuminate\Cache\Repository $instance */
  4430. return $instance->remember($key, $ttl, $callback);
  4431. }
  4432. /**
  4433. * Get an item from the cache, or execute the given Closure and store the result forever.
  4434. *
  4435. * @template TCacheValue
  4436. * @param string $key
  4437. * @param \Closure(): TCacheValue $callback
  4438. * @return TCacheValue
  4439. * @static
  4440. */
  4441. public static function sear($key, $callback)
  4442. {
  4443. /** @var \Illuminate\Cache\Repository $instance */
  4444. return $instance->sear($key, $callback);
  4445. }
  4446. /**
  4447. * Get an item from the cache, or execute the given Closure and store the result forever.
  4448. *
  4449. * @template TCacheValue
  4450. * @param string $key
  4451. * @param \Closure(): TCacheValue $callback
  4452. * @return TCacheValue
  4453. * @static
  4454. */
  4455. public static function rememberForever($key, $callback)
  4456. {
  4457. /** @var \Illuminate\Cache\Repository $instance */
  4458. return $instance->rememberForever($key, $callback);
  4459. }
  4460. /**
  4461. * Retrieve an item from the cache by key, refreshing it in the background if it is stale.
  4462. *
  4463. * @template TCacheValue
  4464. * @param string $key
  4465. * @param array{ 0: \DateTimeInterface|\DateInterval|int, 1: \DateTimeInterface|\DateInterval|int } $ttl
  4466. * @param (callable(): TCacheValue) $callback
  4467. * @param array{ seconds?: int, owner?: string }|null $lock
  4468. * @param bool $alwaysDefer
  4469. * @return TCacheValue
  4470. * @static
  4471. */
  4472. public static function flexible($key, $ttl, $callback, $lock = null, $alwaysDefer = false)
  4473. {
  4474. /** @var \Illuminate\Cache\Repository $instance */
  4475. return $instance->flexible($key, $ttl, $callback, $lock, $alwaysDefer);
  4476. }
  4477. /**
  4478. * Remove an item from the cache.
  4479. *
  4480. * @param string $key
  4481. * @return bool
  4482. * @static
  4483. */
  4484. public static function forget($key)
  4485. {
  4486. /** @var \Illuminate\Cache\Repository $instance */
  4487. return $instance->forget($key);
  4488. }
  4489. /**
  4490. * Delete an item from the cache by its unique key.
  4491. *
  4492. * @return bool
  4493. * @param string $key The unique cache key of the item to delete.
  4494. * @return bool True if the item was successfully removed. False if there was an error.
  4495. * @throws \Psr\SimpleCache\InvalidArgumentException
  4496. * MUST be thrown if the $key string is not a legal value.
  4497. * @static
  4498. */
  4499. public static function delete($key)
  4500. {
  4501. /** @var \Illuminate\Cache\Repository $instance */
  4502. return $instance->delete($key);
  4503. }
  4504. /**
  4505. * Deletes multiple cache items in a single operation.
  4506. *
  4507. * @return bool
  4508. * @param iterable<string> $keys A list of string-based keys to be deleted.
  4509. * @return bool True if the items were successfully removed. False if there was an error.
  4510. * @throws \Psr\SimpleCache\InvalidArgumentException
  4511. * MUST be thrown if $keys is neither an array nor a Traversable,
  4512. * or if any of the $keys are not a legal value.
  4513. * @static
  4514. */
  4515. public static function deleteMultiple($keys)
  4516. {
  4517. /** @var \Illuminate\Cache\Repository $instance */
  4518. return $instance->deleteMultiple($keys);
  4519. }
  4520. /**
  4521. * Wipes clean the entire cache's keys.
  4522. *
  4523. * @return bool
  4524. * @return bool True on success and false on failure.
  4525. * @static
  4526. */
  4527. public static function clear()
  4528. {
  4529. /** @var \Illuminate\Cache\Repository $instance */
  4530. return $instance->clear();
  4531. }
  4532. /**
  4533. * Begin executing a new tags operation if the store supports it.
  4534. *
  4535. * @param array|mixed $names
  4536. * @return \Illuminate\Cache\TaggedCache
  4537. * @throws \BadMethodCallException
  4538. * @static
  4539. */
  4540. public static function tags($names)
  4541. {
  4542. /** @var \Illuminate\Cache\Repository $instance */
  4543. return $instance->tags($names);
  4544. }
  4545. /**
  4546. * Get the name of the cache store.
  4547. *
  4548. * @return string|null
  4549. * @static
  4550. */
  4551. public static function getName()
  4552. {
  4553. /** @var \Illuminate\Cache\Repository $instance */
  4554. return $instance->getName();
  4555. }
  4556. /**
  4557. * Determine if the current store supports tags.
  4558. *
  4559. * @return bool
  4560. * @static
  4561. */
  4562. public static function supportsTags()
  4563. {
  4564. /** @var \Illuminate\Cache\Repository $instance */
  4565. return $instance->supportsTags();
  4566. }
  4567. /**
  4568. * Get the default cache time.
  4569. *
  4570. * @return int|null
  4571. * @static
  4572. */
  4573. public static function getDefaultCacheTime()
  4574. {
  4575. /** @var \Illuminate\Cache\Repository $instance */
  4576. return $instance->getDefaultCacheTime();
  4577. }
  4578. /**
  4579. * Set the default cache time in seconds.
  4580. *
  4581. * @param int|null $seconds
  4582. * @return \Illuminate\Cache\Repository
  4583. * @static
  4584. */
  4585. public static function setDefaultCacheTime($seconds)
  4586. {
  4587. /** @var \Illuminate\Cache\Repository $instance */
  4588. return $instance->setDefaultCacheTime($seconds);
  4589. }
  4590. /**
  4591. * Get the cache store implementation.
  4592. *
  4593. * @return \Illuminate\Contracts\Cache\Store
  4594. * @static
  4595. */
  4596. public static function getStore()
  4597. {
  4598. /** @var \Illuminate\Cache\Repository $instance */
  4599. return $instance->getStore();
  4600. }
  4601. /**
  4602. * Set the cache store implementation.
  4603. *
  4604. * @param \Illuminate\Contracts\Cache\Store $store
  4605. * @return static
  4606. * @static
  4607. */
  4608. public static function setStore($store)
  4609. {
  4610. /** @var \Illuminate\Cache\Repository $instance */
  4611. return $instance->setStore($store);
  4612. }
  4613. /**
  4614. * Get the event dispatcher instance.
  4615. *
  4616. * @return \Illuminate\Contracts\Events\Dispatcher|null
  4617. * @static
  4618. */
  4619. public static function getEventDispatcher()
  4620. {
  4621. /** @var \Illuminate\Cache\Repository $instance */
  4622. return $instance->getEventDispatcher();
  4623. }
  4624. /**
  4625. * Set the event dispatcher instance.
  4626. *
  4627. * @param \Illuminate\Contracts\Events\Dispatcher $events
  4628. * @return void
  4629. * @static
  4630. */
  4631. public static function setEventDispatcher($events)
  4632. {
  4633. /** @var \Illuminate\Cache\Repository $instance */
  4634. $instance->setEventDispatcher($events);
  4635. }
  4636. /**
  4637. * Determine if a cached value exists.
  4638. *
  4639. * @param string $key
  4640. * @return bool
  4641. * @static
  4642. */
  4643. public static function offsetExists($key)
  4644. {
  4645. /** @var \Illuminate\Cache\Repository $instance */
  4646. return $instance->offsetExists($key);
  4647. }
  4648. /**
  4649. * Retrieve an item from the cache by key.
  4650. *
  4651. * @param string $key
  4652. * @return mixed
  4653. * @static
  4654. */
  4655. public static function offsetGet($key)
  4656. {
  4657. /** @var \Illuminate\Cache\Repository $instance */
  4658. return $instance->offsetGet($key);
  4659. }
  4660. /**
  4661. * Store an item in the cache for the default time.
  4662. *
  4663. * @param string $key
  4664. * @param mixed $value
  4665. * @return void
  4666. * @static
  4667. */
  4668. public static function offsetSet($key, $value)
  4669. {
  4670. /** @var \Illuminate\Cache\Repository $instance */
  4671. $instance->offsetSet($key, $value);
  4672. }
  4673. /**
  4674. * Remove an item from the cache.
  4675. *
  4676. * @param string $key
  4677. * @return void
  4678. * @static
  4679. */
  4680. public static function offsetUnset($key)
  4681. {
  4682. /** @var \Illuminate\Cache\Repository $instance */
  4683. $instance->offsetUnset($key);
  4684. }
  4685. /**
  4686. * Register a custom macro.
  4687. *
  4688. * @param string $name
  4689. * @param object|callable $macro
  4690. * @param-closure-this static $macro
  4691. * @return void
  4692. * @static
  4693. */
  4694. public static function macro($name, $macro)
  4695. {
  4696. \Illuminate\Cache\Repository::macro($name, $macro);
  4697. }
  4698. /**
  4699. * Mix another object into the class.
  4700. *
  4701. * @param object $mixin
  4702. * @param bool $replace
  4703. * @return void
  4704. * @throws \ReflectionException
  4705. * @static
  4706. */
  4707. public static function mixin($mixin, $replace = true)
  4708. {
  4709. \Illuminate\Cache\Repository::mixin($mixin, $replace);
  4710. }
  4711. /**
  4712. * Checks if macro is registered.
  4713. *
  4714. * @param string $name
  4715. * @return bool
  4716. * @static
  4717. */
  4718. public static function hasMacro($name)
  4719. {
  4720. return \Illuminate\Cache\Repository::hasMacro($name);
  4721. }
  4722. /**
  4723. * Flush the existing macros.
  4724. *
  4725. * @return void
  4726. * @static
  4727. */
  4728. public static function flushMacros()
  4729. {
  4730. \Illuminate\Cache\Repository::flushMacros();
  4731. }
  4732. /**
  4733. * Dynamically handle calls to the class.
  4734. *
  4735. * @param string $method
  4736. * @param array $parameters
  4737. * @return mixed
  4738. * @throws \BadMethodCallException
  4739. * @static
  4740. */
  4741. public static function macroCall($method, $parameters)
  4742. {
  4743. /** @var \Illuminate\Cache\Repository $instance */
  4744. return $instance->macroCall($method, $parameters);
  4745. }
  4746. /**
  4747. * Get a lock instance.
  4748. *
  4749. * @param string $name
  4750. * @param int $seconds
  4751. * @param string|null $owner
  4752. * @return \Illuminate\Contracts\Cache\Lock
  4753. * @static
  4754. */
  4755. public static function lock($name, $seconds = 0, $owner = null)
  4756. {
  4757. /** @var \Illuminate\Cache\RedisStore $instance */
  4758. return $instance->lock($name, $seconds, $owner);
  4759. }
  4760. /**
  4761. * Restore a lock instance using the owner identifier.
  4762. *
  4763. * @param string $name
  4764. * @param string $owner
  4765. * @return \Illuminate\Contracts\Cache\Lock
  4766. * @static
  4767. */
  4768. public static function restoreLock($name, $owner)
  4769. {
  4770. /** @var \Illuminate\Cache\RedisStore $instance */
  4771. return $instance->restoreLock($name, $owner);
  4772. }
  4773. /**
  4774. * Remove all items from the cache.
  4775. *
  4776. * @return bool
  4777. * @static
  4778. */
  4779. public static function flush()
  4780. {
  4781. /** @var \Illuminate\Cache\RedisStore $instance */
  4782. return $instance->flush();
  4783. }
  4784. /**
  4785. * Remove all expired tag set entries.
  4786. *
  4787. * @return void
  4788. * @static
  4789. */
  4790. public static function flushStaleTags()
  4791. {
  4792. /** @var \Illuminate\Cache\RedisStore $instance */
  4793. $instance->flushStaleTags();
  4794. }
  4795. /**
  4796. * Get the Redis connection instance.
  4797. *
  4798. * @return \Illuminate\Redis\Connections\Connection
  4799. * @static
  4800. */
  4801. public static function connection()
  4802. {
  4803. /** @var \Illuminate\Cache\RedisStore $instance */
  4804. return $instance->connection();
  4805. }
  4806. /**
  4807. * Get the Redis connection instance that should be used to manage locks.
  4808. *
  4809. * @return \Illuminate\Redis\Connections\Connection
  4810. * @static
  4811. */
  4812. public static function lockConnection()
  4813. {
  4814. /** @var \Illuminate\Cache\RedisStore $instance */
  4815. return $instance->lockConnection();
  4816. }
  4817. /**
  4818. * Specify the name of the connection that should be used to store data.
  4819. *
  4820. * @param string $connection
  4821. * @return void
  4822. * @static
  4823. */
  4824. public static function setConnection($connection)
  4825. {
  4826. /** @var \Illuminate\Cache\RedisStore $instance */
  4827. $instance->setConnection($connection);
  4828. }
  4829. /**
  4830. * Specify the name of the connection that should be used to manage locks.
  4831. *
  4832. * @param string $connection
  4833. * @return \Illuminate\Cache\RedisStore
  4834. * @static
  4835. */
  4836. public static function setLockConnection($connection)
  4837. {
  4838. /** @var \Illuminate\Cache\RedisStore $instance */
  4839. return $instance->setLockConnection($connection);
  4840. }
  4841. /**
  4842. * Get the Redis database instance.
  4843. *
  4844. * @return \Illuminate\Contracts\Redis\Factory
  4845. * @static
  4846. */
  4847. public static function getRedis()
  4848. {
  4849. /** @var \Illuminate\Cache\RedisStore $instance */
  4850. return $instance->getRedis();
  4851. }
  4852. /**
  4853. * Get the cache key prefix.
  4854. *
  4855. * @return string
  4856. * @static
  4857. */
  4858. public static function getPrefix()
  4859. {
  4860. /** @var \Illuminate\Cache\RedisStore $instance */
  4861. return $instance->getPrefix();
  4862. }
  4863. /**
  4864. * Set the cache key prefix.
  4865. *
  4866. * @param string $prefix
  4867. * @return void
  4868. * @static
  4869. */
  4870. public static function setPrefix($prefix)
  4871. {
  4872. /** @var \Illuminate\Cache\RedisStore $instance */
  4873. $instance->setPrefix($prefix);
  4874. }
  4875. }
  4876. /**
  4877. * @method static array run(\Closure|array $tasks)
  4878. * @method static \Illuminate\Support\Defer\DeferredCallback defer(\Closure|array $tasks)
  4879. * @see \Illuminate\Concurrency\ConcurrencyManager
  4880. */
  4881. class Concurrency {
  4882. /**
  4883. * Get a driver instance by name.
  4884. *
  4885. * @param string|null $name
  4886. * @return mixed
  4887. * @static
  4888. */
  4889. public static function driver($name = null)
  4890. {
  4891. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4892. return $instance->driver($name);
  4893. }
  4894. /**
  4895. * Create an instance of the process concurrency driver.
  4896. *
  4897. * @param array $config
  4898. * @return \Illuminate\Concurrency\ProcessDriver
  4899. * @static
  4900. */
  4901. public static function createProcessDriver($config)
  4902. {
  4903. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4904. return $instance->createProcessDriver($config);
  4905. }
  4906. /**
  4907. * Create an instance of the fork concurrency driver.
  4908. *
  4909. * @param array $config
  4910. * @return \Illuminate\Concurrency\ForkDriver
  4911. * @throws \RuntimeException
  4912. * @static
  4913. */
  4914. public static function createForkDriver($config)
  4915. {
  4916. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4917. return $instance->createForkDriver($config);
  4918. }
  4919. /**
  4920. * Create an instance of the sync concurrency driver.
  4921. *
  4922. * @param array $config
  4923. * @return \Illuminate\Concurrency\SyncDriver
  4924. * @static
  4925. */
  4926. public static function createSyncDriver($config)
  4927. {
  4928. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4929. return $instance->createSyncDriver($config);
  4930. }
  4931. /**
  4932. * Get the default instance name.
  4933. *
  4934. * @return string
  4935. * @static
  4936. */
  4937. public static function getDefaultInstance()
  4938. {
  4939. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4940. return $instance->getDefaultInstance();
  4941. }
  4942. /**
  4943. * Set the default instance name.
  4944. *
  4945. * @param string $name
  4946. * @return void
  4947. * @static
  4948. */
  4949. public static function setDefaultInstance($name)
  4950. {
  4951. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4952. $instance->setDefaultInstance($name);
  4953. }
  4954. /**
  4955. * Get the instance specific configuration.
  4956. *
  4957. * @param string $name
  4958. * @return array
  4959. * @static
  4960. */
  4961. public static function getInstanceConfig($name)
  4962. {
  4963. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4964. return $instance->getInstanceConfig($name);
  4965. }
  4966. /**
  4967. * Get an instance by name.
  4968. *
  4969. * @param string|null $name
  4970. * @return mixed
  4971. * @static
  4972. */
  4973. public static function instance($name = null)
  4974. {
  4975. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4976. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4977. return $instance->instance($name);
  4978. }
  4979. /**
  4980. * Unset the given instances.
  4981. *
  4982. * @param array|string|null $name
  4983. * @return \Illuminate\Concurrency\ConcurrencyManager
  4984. * @static
  4985. */
  4986. public static function forgetInstance($name = null)
  4987. {
  4988. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  4989. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  4990. return $instance->forgetInstance($name);
  4991. }
  4992. /**
  4993. * Disconnect the given instance and remove from local cache.
  4994. *
  4995. * @param string|null $name
  4996. * @return void
  4997. * @static
  4998. */
  4999. public static function purge($name = null)
  5000. {
  5001. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  5002. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  5003. $instance->purge($name);
  5004. }
  5005. /**
  5006. * Register a custom instance creator Closure.
  5007. *
  5008. * @param string $name
  5009. * @param \Closure $callback
  5010. * @param-closure-this $this $callback
  5011. * @return \Illuminate\Concurrency\ConcurrencyManager
  5012. * @static
  5013. */
  5014. public static function extend($name, $callback)
  5015. {
  5016. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  5017. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  5018. return $instance->extend($name, $callback);
  5019. }
  5020. /**
  5021. * Set the application instance used by the manager.
  5022. *
  5023. * @param \Illuminate\Contracts\Foundation\Application $app
  5024. * @return \Illuminate\Concurrency\ConcurrencyManager
  5025. * @static
  5026. */
  5027. public static function setApplication($app)
  5028. {
  5029. //Method inherited from \Illuminate\Support\MultipleInstanceManager
  5030. /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */
  5031. return $instance->setApplication($app);
  5032. }
  5033. }
  5034. /**
  5035. * @see \Illuminate\Config\Repository
  5036. */
  5037. class Config {
  5038. /**
  5039. * Determine if the given configuration value exists.
  5040. *
  5041. * @param string $key
  5042. * @return bool
  5043. * @static
  5044. */
  5045. public static function has($key)
  5046. {
  5047. /** @var \Illuminate\Config\Repository $instance */
  5048. return $instance->has($key);
  5049. }
  5050. /**
  5051. * Get the specified configuration value.
  5052. *
  5053. * @param array|string $key
  5054. * @param mixed $default
  5055. * @return mixed
  5056. * @static
  5057. */
  5058. public static function get($key, $default = null)
  5059. {
  5060. /** @var \Illuminate\Config\Repository $instance */
  5061. return $instance->get($key, $default);
  5062. }
  5063. /**
  5064. * Get many configuration values.
  5065. *
  5066. * @param array<string|int,mixed> $keys
  5067. * @return array<string,mixed>
  5068. * @static
  5069. */
  5070. public static function getMany($keys)
  5071. {
  5072. /** @var \Illuminate\Config\Repository $instance */
  5073. return $instance->getMany($keys);
  5074. }
  5075. /**
  5076. * Get the specified string configuration value.
  5077. *
  5078. * @param string $key
  5079. * @param (\Closure():(string|null))|string|null $default
  5080. * @return string
  5081. * @static
  5082. */
  5083. public static function string($key, $default = null)
  5084. {
  5085. /** @var \Illuminate\Config\Repository $instance */
  5086. return $instance->string($key, $default);
  5087. }
  5088. /**
  5089. * Get the specified integer configuration value.
  5090. *
  5091. * @param string $key
  5092. * @param (\Closure():(int|null))|int|null $default
  5093. * @return int
  5094. * @static
  5095. */
  5096. public static function integer($key, $default = null)
  5097. {
  5098. /** @var \Illuminate\Config\Repository $instance */
  5099. return $instance->integer($key, $default);
  5100. }
  5101. /**
  5102. * Get the specified float configuration value.
  5103. *
  5104. * @param string $key
  5105. * @param (\Closure():(float|null))|float|null $default
  5106. * @return float
  5107. * @static
  5108. */
  5109. public static function float($key, $default = null)
  5110. {
  5111. /** @var \Illuminate\Config\Repository $instance */
  5112. return $instance->float($key, $default);
  5113. }
  5114. /**
  5115. * Get the specified boolean configuration value.
  5116. *
  5117. * @param string $key
  5118. * @param (\Closure():(bool|null))|bool|null $default
  5119. * @return bool
  5120. * @static
  5121. */
  5122. public static function boolean($key, $default = null)
  5123. {
  5124. /** @var \Illuminate\Config\Repository $instance */
  5125. return $instance->boolean($key, $default);
  5126. }
  5127. /**
  5128. * Get the specified array configuration value.
  5129. *
  5130. * @param string $key
  5131. * @param (\Closure():(array<array-key, mixed>|null))|array<array-key, mixed>|null $default
  5132. * @return array<array-key, mixed>
  5133. * @static
  5134. */
  5135. public static function array($key, $default = null)
  5136. {
  5137. /** @var \Illuminate\Config\Repository $instance */
  5138. return $instance->array($key, $default);
  5139. }
  5140. /**
  5141. * Get the specified array configuration value as a collection.
  5142. *
  5143. * @param string $key
  5144. * @param (\Closure():(array<array-key, mixed>|null))|array<array-key, mixed>|null $default
  5145. * @return Collection<array-key, mixed>
  5146. * @static
  5147. */
  5148. public static function collection($key, $default = null)
  5149. {
  5150. /** @var \Illuminate\Config\Repository $instance */
  5151. return $instance->collection($key, $default);
  5152. }
  5153. /**
  5154. * Set a given configuration value.
  5155. *
  5156. * @param array|string $key
  5157. * @param mixed $value
  5158. * @return void
  5159. * @static
  5160. */
  5161. public static function set($key, $value = null)
  5162. {
  5163. /** @var \Illuminate\Config\Repository $instance */
  5164. $instance->set($key, $value);
  5165. }
  5166. /**
  5167. * Prepend a value onto an array configuration value.
  5168. *
  5169. * @param string $key
  5170. * @param mixed $value
  5171. * @return void
  5172. * @static
  5173. */
  5174. public static function prepend($key, $value)
  5175. {
  5176. /** @var \Illuminate\Config\Repository $instance */
  5177. $instance->prepend($key, $value);
  5178. }
  5179. /**
  5180. * Push a value onto an array configuration value.
  5181. *
  5182. * @param string $key
  5183. * @param mixed $value
  5184. * @return void
  5185. * @static
  5186. */
  5187. public static function push($key, $value)
  5188. {
  5189. /** @var \Illuminate\Config\Repository $instance */
  5190. $instance->push($key, $value);
  5191. }
  5192. /**
  5193. * Get all of the configuration items for the application.
  5194. *
  5195. * @return array
  5196. * @static
  5197. */
  5198. public static function all()
  5199. {
  5200. /** @var \Illuminate\Config\Repository $instance */
  5201. return $instance->all();
  5202. }
  5203. /**
  5204. * Determine if the given configuration option exists.
  5205. *
  5206. * @param string $key
  5207. * @return bool
  5208. * @static
  5209. */
  5210. public static function offsetExists($key)
  5211. {
  5212. /** @var \Illuminate\Config\Repository $instance */
  5213. return $instance->offsetExists($key);
  5214. }
  5215. /**
  5216. * Get a configuration option.
  5217. *
  5218. * @param string $key
  5219. * @return mixed
  5220. * @static
  5221. */
  5222. public static function offsetGet($key)
  5223. {
  5224. /** @var \Illuminate\Config\Repository $instance */
  5225. return $instance->offsetGet($key);
  5226. }
  5227. /**
  5228. * Set a configuration option.
  5229. *
  5230. * @param string $key
  5231. * @param mixed $value
  5232. * @return void
  5233. * @static
  5234. */
  5235. public static function offsetSet($key, $value)
  5236. {
  5237. /** @var \Illuminate\Config\Repository $instance */
  5238. $instance->offsetSet($key, $value);
  5239. }
  5240. /**
  5241. * Unset a configuration option.
  5242. *
  5243. * @param string $key
  5244. * @return void
  5245. * @static
  5246. */
  5247. public static function offsetUnset($key)
  5248. {
  5249. /** @var \Illuminate\Config\Repository $instance */
  5250. $instance->offsetUnset($key);
  5251. }
  5252. /**
  5253. * Register a custom macro.
  5254. *
  5255. * @param string $name
  5256. * @param object|callable $macro
  5257. * @param-closure-this static $macro
  5258. * @return void
  5259. * @static
  5260. */
  5261. public static function macro($name, $macro)
  5262. {
  5263. \Illuminate\Config\Repository::macro($name, $macro);
  5264. }
  5265. /**
  5266. * Mix another object into the class.
  5267. *
  5268. * @param object $mixin
  5269. * @param bool $replace
  5270. * @return void
  5271. * @throws \ReflectionException
  5272. * @static
  5273. */
  5274. public static function mixin($mixin, $replace = true)
  5275. {
  5276. \Illuminate\Config\Repository::mixin($mixin, $replace);
  5277. }
  5278. /**
  5279. * Checks if macro is registered.
  5280. *
  5281. * @param string $name
  5282. * @return bool
  5283. * @static
  5284. */
  5285. public static function hasMacro($name)
  5286. {
  5287. return \Illuminate\Config\Repository::hasMacro($name);
  5288. }
  5289. /**
  5290. * Flush the existing macros.
  5291. *
  5292. * @return void
  5293. * @static
  5294. */
  5295. public static function flushMacros()
  5296. {
  5297. \Illuminate\Config\Repository::flushMacros();
  5298. }
  5299. }
  5300. /**
  5301. * @see \Illuminate\Log\Context\Repository
  5302. */
  5303. class Context {
  5304. /**
  5305. * Determine if the given key exists.
  5306. *
  5307. * @param string $key
  5308. * @return bool
  5309. * @static
  5310. */
  5311. public static function has($key)
  5312. {
  5313. /** @var \Illuminate\Log\Context\Repository $instance */
  5314. return $instance->has($key);
  5315. }
  5316. /**
  5317. * Determine if the given key is missing.
  5318. *
  5319. * @param string $key
  5320. * @return bool
  5321. * @static
  5322. */
  5323. public static function missing($key)
  5324. {
  5325. /** @var \Illuminate\Log\Context\Repository $instance */
  5326. return $instance->missing($key);
  5327. }
  5328. /**
  5329. * Determine if the given key exists within the hidden context data.
  5330. *
  5331. * @param string $key
  5332. * @return bool
  5333. * @static
  5334. */
  5335. public static function hasHidden($key)
  5336. {
  5337. /** @var \Illuminate\Log\Context\Repository $instance */
  5338. return $instance->hasHidden($key);
  5339. }
  5340. /**
  5341. * Determine if the given key is missing within the hidden context data.
  5342. *
  5343. * @param string $key
  5344. * @return bool
  5345. * @static
  5346. */
  5347. public static function missingHidden($key)
  5348. {
  5349. /** @var \Illuminate\Log\Context\Repository $instance */
  5350. return $instance->missingHidden($key);
  5351. }
  5352. /**
  5353. * Retrieve all the context data.
  5354. *
  5355. * @return array<string, mixed>
  5356. * @static
  5357. */
  5358. public static function all()
  5359. {
  5360. /** @var \Illuminate\Log\Context\Repository $instance */
  5361. return $instance->all();
  5362. }
  5363. /**
  5364. * Retrieve all the hidden context data.
  5365. *
  5366. * @return array<string, mixed>
  5367. * @static
  5368. */
  5369. public static function allHidden()
  5370. {
  5371. /** @var \Illuminate\Log\Context\Repository $instance */
  5372. return $instance->allHidden();
  5373. }
  5374. /**
  5375. * Retrieve the given key's value.
  5376. *
  5377. * @param string $key
  5378. * @param mixed $default
  5379. * @return mixed
  5380. * @static
  5381. */
  5382. public static function get($key, $default = null)
  5383. {
  5384. /** @var \Illuminate\Log\Context\Repository $instance */
  5385. return $instance->get($key, $default);
  5386. }
  5387. /**
  5388. * Retrieve the given key's hidden value.
  5389. *
  5390. * @param string $key
  5391. * @param mixed $default
  5392. * @return mixed
  5393. * @static
  5394. */
  5395. public static function getHidden($key, $default = null)
  5396. {
  5397. /** @var \Illuminate\Log\Context\Repository $instance */
  5398. return $instance->getHidden($key, $default);
  5399. }
  5400. /**
  5401. * Retrieve the given key's value and then forget it.
  5402. *
  5403. * @param string $key
  5404. * @param mixed $default
  5405. * @return mixed
  5406. * @static
  5407. */
  5408. public static function pull($key, $default = null)
  5409. {
  5410. /** @var \Illuminate\Log\Context\Repository $instance */
  5411. return $instance->pull($key, $default);
  5412. }
  5413. /**
  5414. * Retrieve the given key's hidden value and then forget it.
  5415. *
  5416. * @param string $key
  5417. * @param mixed $default
  5418. * @return mixed
  5419. * @static
  5420. */
  5421. public static function pullHidden($key, $default = null)
  5422. {
  5423. /** @var \Illuminate\Log\Context\Repository $instance */
  5424. return $instance->pullHidden($key, $default);
  5425. }
  5426. /**
  5427. * Retrieve only the values of the given keys.
  5428. *
  5429. * @param array<int, string> $keys
  5430. * @return array<string, mixed>
  5431. * @static
  5432. */
  5433. public static function only($keys)
  5434. {
  5435. /** @var \Illuminate\Log\Context\Repository $instance */
  5436. return $instance->only($keys);
  5437. }
  5438. /**
  5439. * Retrieve only the hidden values of the given keys.
  5440. *
  5441. * @param array<int, string> $keys
  5442. * @return array<string, mixed>
  5443. * @static
  5444. */
  5445. public static function onlyHidden($keys)
  5446. {
  5447. /** @var \Illuminate\Log\Context\Repository $instance */
  5448. return $instance->onlyHidden($keys);
  5449. }
  5450. /**
  5451. * Retrieve all values except those with the given keys.
  5452. *
  5453. * @param array<int, string> $keys
  5454. * @return array<string, mixed>
  5455. * @static
  5456. */
  5457. public static function except($keys)
  5458. {
  5459. /** @var \Illuminate\Log\Context\Repository $instance */
  5460. return $instance->except($keys);
  5461. }
  5462. /**
  5463. * Retrieve all hidden values except those with the given keys.
  5464. *
  5465. * @param array<int, string> $keys
  5466. * @return array<string, mixed>
  5467. * @static
  5468. */
  5469. public static function exceptHidden($keys)
  5470. {
  5471. /** @var \Illuminate\Log\Context\Repository $instance */
  5472. return $instance->exceptHidden($keys);
  5473. }
  5474. /**
  5475. * Add a context value.
  5476. *
  5477. * @param string|array<string, mixed> $key
  5478. * @param mixed $value
  5479. * @return \Illuminate\Log\Context\Repository
  5480. * @static
  5481. */
  5482. public static function add($key, $value = null)
  5483. {
  5484. /** @var \Illuminate\Log\Context\Repository $instance */
  5485. return $instance->add($key, $value);
  5486. }
  5487. /**
  5488. * Add a hidden context value.
  5489. *
  5490. * @param string|array<string, mixed> $key
  5491. * @param mixed $value
  5492. * @return \Illuminate\Log\Context\Repository
  5493. * @static
  5494. */
  5495. public static function addHidden($key, $value = null)
  5496. {
  5497. /** @var \Illuminate\Log\Context\Repository $instance */
  5498. return $instance->addHidden($key, $value);
  5499. }
  5500. /**
  5501. * Add a context value if it does not exist yet, and return the value.
  5502. *
  5503. * @param string $key
  5504. * @param mixed $value
  5505. * @return mixed
  5506. * @static
  5507. */
  5508. public static function remember($key, $value)
  5509. {
  5510. /** @var \Illuminate\Log\Context\Repository $instance */
  5511. return $instance->remember($key, $value);
  5512. }
  5513. /**
  5514. * Add a hidden context value if it does not exist yet, and return the value.
  5515. *
  5516. * @param string $key
  5517. * @param mixed $value
  5518. * @return mixed
  5519. * @static
  5520. */
  5521. public static function rememberHidden($key, $value)
  5522. {
  5523. /** @var \Illuminate\Log\Context\Repository $instance */
  5524. return $instance->rememberHidden($key, $value);
  5525. }
  5526. /**
  5527. * Forget the given context key.
  5528. *
  5529. * @param string|array<int, string> $key
  5530. * @return \Illuminate\Log\Context\Repository
  5531. * @static
  5532. */
  5533. public static function forget($key)
  5534. {
  5535. /** @var \Illuminate\Log\Context\Repository $instance */
  5536. return $instance->forget($key);
  5537. }
  5538. /**
  5539. * Forget the given hidden context key.
  5540. *
  5541. * @param string|array<int, string> $key
  5542. * @return \Illuminate\Log\Context\Repository
  5543. * @static
  5544. */
  5545. public static function forgetHidden($key)
  5546. {
  5547. /** @var \Illuminate\Log\Context\Repository $instance */
  5548. return $instance->forgetHidden($key);
  5549. }
  5550. /**
  5551. * Add a context value if it does not exist yet.
  5552. *
  5553. * @param string $key
  5554. * @param mixed $value
  5555. * @return \Illuminate\Log\Context\Repository
  5556. * @static
  5557. */
  5558. public static function addIf($key, $value)
  5559. {
  5560. /** @var \Illuminate\Log\Context\Repository $instance */
  5561. return $instance->addIf($key, $value);
  5562. }
  5563. /**
  5564. * Add a hidden context value if it does not exist yet.
  5565. *
  5566. * @param string $key
  5567. * @param mixed $value
  5568. * @return \Illuminate\Log\Context\Repository
  5569. * @static
  5570. */
  5571. public static function addHiddenIf($key, $value)
  5572. {
  5573. /** @var \Illuminate\Log\Context\Repository $instance */
  5574. return $instance->addHiddenIf($key, $value);
  5575. }
  5576. /**
  5577. * Push the given values onto the key's stack.
  5578. *
  5579. * @param string $key
  5580. * @param mixed $values
  5581. * @return \Illuminate\Log\Context\Repository
  5582. * @throws \RuntimeException
  5583. * @static
  5584. */
  5585. public static function push($key, ...$values)
  5586. {
  5587. /** @var \Illuminate\Log\Context\Repository $instance */
  5588. return $instance->push($key, ...$values);
  5589. }
  5590. /**
  5591. * Pop the latest value from the key's stack.
  5592. *
  5593. * @param string $key
  5594. * @return mixed
  5595. * @throws \RuntimeException
  5596. * @static
  5597. */
  5598. public static function pop($key)
  5599. {
  5600. /** @var \Illuminate\Log\Context\Repository $instance */
  5601. return $instance->pop($key);
  5602. }
  5603. /**
  5604. * Push the given hidden values onto the key's stack.
  5605. *
  5606. * @param string $key
  5607. * @param mixed $values
  5608. * @return \Illuminate\Log\Context\Repository
  5609. * @throws \RuntimeException
  5610. * @static
  5611. */
  5612. public static function pushHidden($key, ...$values)
  5613. {
  5614. /** @var \Illuminate\Log\Context\Repository $instance */
  5615. return $instance->pushHidden($key, ...$values);
  5616. }
  5617. /**
  5618. * Pop the latest hidden value from the key's stack.
  5619. *
  5620. * @param string $key
  5621. * @return mixed
  5622. * @throws \RuntimeException
  5623. * @static
  5624. */
  5625. public static function popHidden($key)
  5626. {
  5627. /** @var \Illuminate\Log\Context\Repository $instance */
  5628. return $instance->popHidden($key);
  5629. }
  5630. /**
  5631. * Increment a context counter.
  5632. *
  5633. * @param string $key
  5634. * @param int $amount
  5635. * @return \Illuminate\Log\Context\Repository
  5636. * @static
  5637. */
  5638. public static function increment($key, $amount = 1)
  5639. {
  5640. /** @var \Illuminate\Log\Context\Repository $instance */
  5641. return $instance->increment($key, $amount);
  5642. }
  5643. /**
  5644. * Decrement a context counter.
  5645. *
  5646. * @param string $key
  5647. * @param int $amount
  5648. * @return \Illuminate\Log\Context\Repository
  5649. * @static
  5650. */
  5651. public static function decrement($key, $amount = 1)
  5652. {
  5653. /** @var \Illuminate\Log\Context\Repository $instance */
  5654. return $instance->decrement($key, $amount);
  5655. }
  5656. /**
  5657. * Determine if the given value is in the given stack.
  5658. *
  5659. * @param string $key
  5660. * @param mixed $value
  5661. * @param bool $strict
  5662. * @return bool
  5663. * @throws \RuntimeException
  5664. * @static
  5665. */
  5666. public static function stackContains($key, $value, $strict = false)
  5667. {
  5668. /** @var \Illuminate\Log\Context\Repository $instance */
  5669. return $instance->stackContains($key, $value, $strict);
  5670. }
  5671. /**
  5672. * Determine if the given value is in the given hidden stack.
  5673. *
  5674. * @param string $key
  5675. * @param mixed $value
  5676. * @param bool $strict
  5677. * @return bool
  5678. * @throws \RuntimeException
  5679. * @static
  5680. */
  5681. public static function hiddenStackContains($key, $value, $strict = false)
  5682. {
  5683. /** @var \Illuminate\Log\Context\Repository $instance */
  5684. return $instance->hiddenStackContains($key, $value, $strict);
  5685. }
  5686. /**
  5687. * Run the callback function with the given context values and restore the original context state when complete.
  5688. *
  5689. * @param callable $callback
  5690. * @param array<string, mixed> $data
  5691. * @param array<string, mixed> $hidden
  5692. * @return mixed
  5693. * @static
  5694. */
  5695. public static function scope($callback, $data = [], $hidden = [])
  5696. {
  5697. /** @var \Illuminate\Log\Context\Repository $instance */
  5698. return $instance->scope($callback, $data, $hidden);
  5699. }
  5700. /**
  5701. * Determine if the repository is empty.
  5702. *
  5703. * @return bool
  5704. * @static
  5705. */
  5706. public static function isEmpty()
  5707. {
  5708. /** @var \Illuminate\Log\Context\Repository $instance */
  5709. return $instance->isEmpty();
  5710. }
  5711. /**
  5712. * Execute the given callback when context is about to be dehydrated.
  5713. *
  5714. * @param callable $callback
  5715. * @return \Illuminate\Log\Context\Repository
  5716. * @static
  5717. */
  5718. public static function dehydrating($callback)
  5719. {
  5720. /** @var \Illuminate\Log\Context\Repository $instance */
  5721. return $instance->dehydrating($callback);
  5722. }
  5723. /**
  5724. * Execute the given callback when context has been hydrated.
  5725. *
  5726. * @param callable $callback
  5727. * @return \Illuminate\Log\Context\Repository
  5728. * @static
  5729. */
  5730. public static function hydrated($callback)
  5731. {
  5732. /** @var \Illuminate\Log\Context\Repository $instance */
  5733. return $instance->hydrated($callback);
  5734. }
  5735. /**
  5736. * Handle unserialize exceptions using the given callback.
  5737. *
  5738. * @param callable|null $callback
  5739. * @return static
  5740. * @static
  5741. */
  5742. public static function handleUnserializeExceptionsUsing($callback)
  5743. {
  5744. /** @var \Illuminate\Log\Context\Repository $instance */
  5745. return $instance->handleUnserializeExceptionsUsing($callback);
  5746. }
  5747. /**
  5748. * Flush all context data.
  5749. *
  5750. * @return \Illuminate\Log\Context\Repository
  5751. * @static
  5752. */
  5753. public static function flush()
  5754. {
  5755. /** @var \Illuminate\Log\Context\Repository $instance */
  5756. return $instance->flush();
  5757. }
  5758. /**
  5759. * Dehydrate the context data.
  5760. *
  5761. * @internal
  5762. * @return \Illuminate\Log\Context\?array
  5763. * @static
  5764. */
  5765. public static function dehydrate()
  5766. {
  5767. /** @var \Illuminate\Log\Context\Repository $instance */
  5768. return $instance->dehydrate();
  5769. }
  5770. /**
  5771. * Hydrate the context instance.
  5772. *
  5773. * @internal
  5774. * @param \Illuminate\Log\Context\?array $context
  5775. * @return \Illuminate\Log\Context\Repository
  5776. * @throws \RuntimeException
  5777. * @static
  5778. */
  5779. public static function hydrate($context)
  5780. {
  5781. /** @var \Illuminate\Log\Context\Repository $instance */
  5782. return $instance->hydrate($context);
  5783. }
  5784. /**
  5785. * Apply the callback if the given "value" is (or resolves to) truthy.
  5786. *
  5787. * @template TWhenParameter
  5788. * @template TWhenReturnType
  5789. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  5790. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  5791. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  5792. * @return $this|TWhenReturnType
  5793. * @static
  5794. */
  5795. public static function when($value = null, $callback = null, $default = null)
  5796. {
  5797. /** @var \Illuminate\Log\Context\Repository $instance */
  5798. return $instance->when($value, $callback, $default);
  5799. }
  5800. /**
  5801. * Apply the callback if the given "value" is (or resolves to) falsy.
  5802. *
  5803. * @template TUnlessParameter
  5804. * @template TUnlessReturnType
  5805. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  5806. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  5807. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  5808. * @return $this|TUnlessReturnType
  5809. * @static
  5810. */
  5811. public static function unless($value = null, $callback = null, $default = null)
  5812. {
  5813. /** @var \Illuminate\Log\Context\Repository $instance */
  5814. return $instance->unless($value, $callback, $default);
  5815. }
  5816. /**
  5817. * Register a custom macro.
  5818. *
  5819. * @param string $name
  5820. * @param object|callable $macro
  5821. * @param-closure-this static $macro
  5822. * @return void
  5823. * @static
  5824. */
  5825. public static function macro($name, $macro)
  5826. {
  5827. \Illuminate\Log\Context\Repository::macro($name, $macro);
  5828. }
  5829. /**
  5830. * Mix another object into the class.
  5831. *
  5832. * @param object $mixin
  5833. * @param bool $replace
  5834. * @return void
  5835. * @throws \ReflectionException
  5836. * @static
  5837. */
  5838. public static function mixin($mixin, $replace = true)
  5839. {
  5840. \Illuminate\Log\Context\Repository::mixin($mixin, $replace);
  5841. }
  5842. /**
  5843. * Checks if macro is registered.
  5844. *
  5845. * @param string $name
  5846. * @return bool
  5847. * @static
  5848. */
  5849. public static function hasMacro($name)
  5850. {
  5851. return \Illuminate\Log\Context\Repository::hasMacro($name);
  5852. }
  5853. /**
  5854. * Flush the existing macros.
  5855. *
  5856. * @return void
  5857. * @static
  5858. */
  5859. public static function flushMacros()
  5860. {
  5861. \Illuminate\Log\Context\Repository::flushMacros();
  5862. }
  5863. /**
  5864. * Restore the model from the model identifier instance.
  5865. *
  5866. * @param \Illuminate\Contracts\Database\ModelIdentifier $value
  5867. * @return \Illuminate\Database\Eloquent\Model
  5868. * @static
  5869. */
  5870. public static function restoreModel($value)
  5871. {
  5872. /** @var \Illuminate\Log\Context\Repository $instance */
  5873. return $instance->restoreModel($value);
  5874. }
  5875. }
  5876. /**
  5877. * @see \Illuminate\Cookie\CookieJar
  5878. */
  5879. class Cookie {
  5880. /**
  5881. * Create a new cookie instance.
  5882. *
  5883. * @param string $name
  5884. * @param string $value
  5885. * @param int $minutes
  5886. * @param string|null $path
  5887. * @param string|null $domain
  5888. * @param bool|null $secure
  5889. * @param bool $httpOnly
  5890. * @param bool $raw
  5891. * @param string|null $sameSite
  5892. * @return \Symfony\Component\HttpFoundation\Cookie
  5893. * @static
  5894. */
  5895. public static function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
  5896. {
  5897. /** @var \Illuminate\Cookie\CookieJar $instance */
  5898. return $instance->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
  5899. }
  5900. /**
  5901. * Create a cookie that lasts "forever" (400 days).
  5902. *
  5903. * @param string $name
  5904. * @param string $value
  5905. * @param string|null $path
  5906. * @param string|null $domain
  5907. * @param bool|null $secure
  5908. * @param bool $httpOnly
  5909. * @param bool $raw
  5910. * @param string|null $sameSite
  5911. * @return \Symfony\Component\HttpFoundation\Cookie
  5912. * @static
  5913. */
  5914. public static function forever($name, $value, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
  5915. {
  5916. /** @var \Illuminate\Cookie\CookieJar $instance */
  5917. return $instance->forever($name, $value, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
  5918. }
  5919. /**
  5920. * Expire the given cookie.
  5921. *
  5922. * @param string $name
  5923. * @param string|null $path
  5924. * @param string|null $domain
  5925. * @return \Symfony\Component\HttpFoundation\Cookie
  5926. * @static
  5927. */
  5928. public static function forget($name, $path = null, $domain = null)
  5929. {
  5930. /** @var \Illuminate\Cookie\CookieJar $instance */
  5931. return $instance->forget($name, $path, $domain);
  5932. }
  5933. /**
  5934. * Determine if a cookie has been queued.
  5935. *
  5936. * @param string $key
  5937. * @param string|null $path
  5938. * @return bool
  5939. * @static
  5940. */
  5941. public static function hasQueued($key, $path = null)
  5942. {
  5943. /** @var \Illuminate\Cookie\CookieJar $instance */
  5944. return $instance->hasQueued($key, $path);
  5945. }
  5946. /**
  5947. * Get a queued cookie instance.
  5948. *
  5949. * @param string $key
  5950. * @param mixed $default
  5951. * @param string|null $path
  5952. * @return \Symfony\Component\HttpFoundation\Cookie|null
  5953. * @static
  5954. */
  5955. public static function queued($key, $default = null, $path = null)
  5956. {
  5957. /** @var \Illuminate\Cookie\CookieJar $instance */
  5958. return $instance->queued($key, $default, $path);
  5959. }
  5960. /**
  5961. * Queue a cookie to send with the next response.
  5962. *
  5963. * @param mixed $parameters
  5964. * @return void
  5965. * @static
  5966. */
  5967. public static function queue(...$parameters)
  5968. {
  5969. /** @var \Illuminate\Cookie\CookieJar $instance */
  5970. $instance->queue(...$parameters);
  5971. }
  5972. /**
  5973. * Queue a cookie to expire with the next response.
  5974. *
  5975. * @param string $name
  5976. * @param string|null $path
  5977. * @param string|null $domain
  5978. * @return void
  5979. * @static
  5980. */
  5981. public static function expire($name, $path = null, $domain = null)
  5982. {
  5983. /** @var \Illuminate\Cookie\CookieJar $instance */
  5984. $instance->expire($name, $path, $domain);
  5985. }
  5986. /**
  5987. * Remove a cookie from the queue.
  5988. *
  5989. * @param string $name
  5990. * @param string|null $path
  5991. * @return void
  5992. * @static
  5993. */
  5994. public static function unqueue($name, $path = null)
  5995. {
  5996. /** @var \Illuminate\Cookie\CookieJar $instance */
  5997. $instance->unqueue($name, $path);
  5998. }
  5999. /**
  6000. * Set the default path and domain for the jar.
  6001. *
  6002. * @param string $path
  6003. * @param string|null $domain
  6004. * @param bool|null $secure
  6005. * @param string|null $sameSite
  6006. * @return \Illuminate\Cookie\CookieJar
  6007. * @static
  6008. */
  6009. public static function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null)
  6010. {
  6011. /** @var \Illuminate\Cookie\CookieJar $instance */
  6012. return $instance->setDefaultPathAndDomain($path, $domain, $secure, $sameSite);
  6013. }
  6014. /**
  6015. * Get the cookies which have been queued for the next request.
  6016. *
  6017. * @return \Symfony\Component\HttpFoundation\Cookie[]
  6018. * @static
  6019. */
  6020. public static function getQueuedCookies()
  6021. {
  6022. /** @var \Illuminate\Cookie\CookieJar $instance */
  6023. return $instance->getQueuedCookies();
  6024. }
  6025. /**
  6026. * Flush the cookies which have been queued for the next request.
  6027. *
  6028. * @return \Illuminate\Cookie\CookieJar
  6029. * @static
  6030. */
  6031. public static function flushQueuedCookies()
  6032. {
  6033. /** @var \Illuminate\Cookie\CookieJar $instance */
  6034. return $instance->flushQueuedCookies();
  6035. }
  6036. /**
  6037. * Register a custom macro.
  6038. *
  6039. * @param string $name
  6040. * @param object|callable $macro
  6041. * @param-closure-this static $macro
  6042. * @return void
  6043. * @static
  6044. */
  6045. public static function macro($name, $macro)
  6046. {
  6047. \Illuminate\Cookie\CookieJar::macro($name, $macro);
  6048. }
  6049. /**
  6050. * Mix another object into the class.
  6051. *
  6052. * @param object $mixin
  6053. * @param bool $replace
  6054. * @return void
  6055. * @throws \ReflectionException
  6056. * @static
  6057. */
  6058. public static function mixin($mixin, $replace = true)
  6059. {
  6060. \Illuminate\Cookie\CookieJar::mixin($mixin, $replace);
  6061. }
  6062. /**
  6063. * Checks if macro is registered.
  6064. *
  6065. * @param string $name
  6066. * @return bool
  6067. * @static
  6068. */
  6069. public static function hasMacro($name)
  6070. {
  6071. return \Illuminate\Cookie\CookieJar::hasMacro($name);
  6072. }
  6073. /**
  6074. * Flush the existing macros.
  6075. *
  6076. * @return void
  6077. * @static
  6078. */
  6079. public static function flushMacros()
  6080. {
  6081. \Illuminate\Cookie\CookieJar::flushMacros();
  6082. }
  6083. }
  6084. /**
  6085. * @see \Illuminate\Encryption\Encrypter
  6086. */
  6087. class Crypt {
  6088. /**
  6089. * Determine if the given key and cipher combination is valid.
  6090. *
  6091. * @param string $key
  6092. * @param string $cipher
  6093. * @return bool
  6094. * @static
  6095. */
  6096. public static function supported($key, $cipher)
  6097. {
  6098. return \Illuminate\Encryption\Encrypter::supported($key, $cipher);
  6099. }
  6100. /**
  6101. * Create a new encryption key for the given cipher.
  6102. *
  6103. * @param string $cipher
  6104. * @return string
  6105. * @static
  6106. */
  6107. public static function generateKey($cipher)
  6108. {
  6109. return \Illuminate\Encryption\Encrypter::generateKey($cipher);
  6110. }
  6111. /**
  6112. * Encrypt the given value.
  6113. *
  6114. * @param mixed $value
  6115. * @param bool $serialize
  6116. * @return string
  6117. * @throws \Illuminate\Contracts\Encryption\EncryptException
  6118. * @static
  6119. */
  6120. public static function encrypt($value, $serialize = true)
  6121. {
  6122. /** @var \Illuminate\Encryption\Encrypter $instance */
  6123. return $instance->encrypt($value, $serialize);
  6124. }
  6125. /**
  6126. * Encrypt a string without serialization.
  6127. *
  6128. * @param string $value
  6129. * @return string
  6130. * @throws \Illuminate\Contracts\Encryption\EncryptException
  6131. * @static
  6132. */
  6133. public static function encryptString($value)
  6134. {
  6135. /** @var \Illuminate\Encryption\Encrypter $instance */
  6136. return $instance->encryptString($value);
  6137. }
  6138. /**
  6139. * Decrypt the given value.
  6140. *
  6141. * @param string $payload
  6142. * @param bool $unserialize
  6143. * @return mixed
  6144. * @throws \Illuminate\Contracts\Encryption\DecryptException
  6145. * @static
  6146. */
  6147. public static function decrypt($payload, $unserialize = true)
  6148. {
  6149. /** @var \Illuminate\Encryption\Encrypter $instance */
  6150. return $instance->decrypt($payload, $unserialize);
  6151. }
  6152. /**
  6153. * Decrypt the given string without unserialization.
  6154. *
  6155. * @param string $payload
  6156. * @return string
  6157. * @throws \Illuminate\Contracts\Encryption\DecryptException
  6158. * @static
  6159. */
  6160. public static function decryptString($payload)
  6161. {
  6162. /** @var \Illuminate\Encryption\Encrypter $instance */
  6163. return $instance->decryptString($payload);
  6164. }
  6165. /**
  6166. * Get the encryption key that the encrypter is currently using.
  6167. *
  6168. * @return string
  6169. * @static
  6170. */
  6171. public static function getKey()
  6172. {
  6173. /** @var \Illuminate\Encryption\Encrypter $instance */
  6174. return $instance->getKey();
  6175. }
  6176. /**
  6177. * Get the current encryption key and all previous encryption keys.
  6178. *
  6179. * @return array
  6180. * @static
  6181. */
  6182. public static function getAllKeys()
  6183. {
  6184. /** @var \Illuminate\Encryption\Encrypter $instance */
  6185. return $instance->getAllKeys();
  6186. }
  6187. /**
  6188. * Get the previous encryption keys.
  6189. *
  6190. * @return array
  6191. * @static
  6192. */
  6193. public static function getPreviousKeys()
  6194. {
  6195. /** @var \Illuminate\Encryption\Encrypter $instance */
  6196. return $instance->getPreviousKeys();
  6197. }
  6198. /**
  6199. * Set the previous / legacy encryption keys that should be utilized if decryption fails.
  6200. *
  6201. * @param array $keys
  6202. * @return \Illuminate\Encryption\Encrypter
  6203. * @static
  6204. */
  6205. public static function previousKeys($keys)
  6206. {
  6207. /** @var \Illuminate\Encryption\Encrypter $instance */
  6208. return $instance->previousKeys($keys);
  6209. }
  6210. }
  6211. /**
  6212. * @see https://carbon.nesbot.com/docs/
  6213. * @see https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Factory.php
  6214. * @method static bool canBeCreatedFromFormat(?string $date, string $format)
  6215. * @method static \Illuminate\Support\Carbon|null create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $timezone = null)
  6216. * @method static \Illuminate\Support\Carbon createFromDate($year = null, $month = null, $day = null, $timezone = null)
  6217. * @method static \Illuminate\Support\Carbon|null createFromFormat($format, $time, $timezone = null)
  6218. * @method static \Illuminate\Support\Carbon|null createFromIsoFormat(string $format, string $time, $timezone = null, ?string $locale = 'en', ?\Symfony\Contracts\Translation\TranslatorInterface $translator = null)
  6219. * @method static \Illuminate\Support\Carbon|null createFromLocaleFormat(string $format, string $locale, string $time, $timezone = null)
  6220. * @method static \Illuminate\Support\Carbon|null createFromLocaleIsoFormat(string $format, string $locale, string $time, $timezone = null)
  6221. * @method static \Illuminate\Support\Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $timezone = null)
  6222. * @method static \Illuminate\Support\Carbon createFromTimeString(string $time, \DateTimeZone|string|int|null $timezone = null)
  6223. * @method static \Illuminate\Support\Carbon createFromTimestamp(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
  6224. * @method static \Illuminate\Support\Carbon createFromTimestampMs(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
  6225. * @method static \Illuminate\Support\Carbon createFromTimestampMsUTC($timestamp)
  6226. * @method static \Illuminate\Support\Carbon createFromTimestampUTC(string|int|float $timestamp)
  6227. * @method static \Illuminate\Support\Carbon createMidnightDate($year = null, $month = null, $day = null, $timezone = null)
  6228. * @method static \Illuminate\Support\Carbon|null createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $timezone = null)
  6229. * @method static \Illuminate\Support\Carbon createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $timezone = null)
  6230. * @method static void disableHumanDiffOption($humanDiffOption)
  6231. * @method static void enableHumanDiffOption($humanDiffOption)
  6232. * @method static mixed executeWithLocale(string $locale, callable $func)
  6233. * @method static \Illuminate\Support\Carbon fromSerialized($value)
  6234. * @method static array getAvailableLocales()
  6235. * @method static array getAvailableLocalesInfo()
  6236. * @method static array getDays()
  6237. * @method static ?string getFallbackLocale()
  6238. * @method static array getFormatsToIsoReplacements()
  6239. * @method static int getHumanDiffOptions()
  6240. * @method static array getIsoUnits()
  6241. * @method static array|false getLastErrors()
  6242. * @method static string getLocale()
  6243. * @method static int getMidDayAt()
  6244. * @method static string getTimeFormatByPrecision(string $unitPrecision)
  6245. * @method static string|\Closure|null getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null)
  6246. * @method static \Illuminate\Support\Carbon|null getTestNow()
  6247. * @method static \Symfony\Contracts\Translation\TranslatorInterface getTranslator()
  6248. * @method static int getWeekEndsAt(?string $locale = null)
  6249. * @method static int getWeekStartsAt(?string $locale = null)
  6250. * @method static array getWeekendDays()
  6251. * @method static bool hasFormat(string $date, string $format)
  6252. * @method static bool hasFormatWithModifiers(string $date, string $format)
  6253. * @method static bool hasMacro($name)
  6254. * @method static bool hasRelativeKeywords(?string $time)
  6255. * @method static bool hasTestNow()
  6256. * @method static \Illuminate\Support\Carbon instance(\DateTimeInterface $date)
  6257. * @method static bool isImmutable()
  6258. * @method static bool isModifiableUnit($unit)
  6259. * @method static bool isMutable()
  6260. * @method static bool isStrictModeEnabled()
  6261. * @method static bool localeHasDiffOneDayWords(string $locale)
  6262. * @method static bool localeHasDiffSyntax(string $locale)
  6263. * @method static bool localeHasDiffTwoDayWords(string $locale)
  6264. * @method static bool localeHasPeriodSyntax($locale)
  6265. * @method static bool localeHasShortUnits(string $locale)
  6266. * @method static void macro(string $name, ?callable $macro)
  6267. * @method static \Illuminate\Support\Carbon|null make($var, \DateTimeZone|string|null $timezone = null)
  6268. * @method static void mixin(object|string $mixin)
  6269. * @method static \Illuminate\Support\Carbon now(\DateTimeZone|string|int|null $timezone = null)
  6270. * @method static \Illuminate\Support\Carbon parse(\DateTimeInterface|\Carbon\WeekDay|\Carbon\Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
  6271. * @method static \Illuminate\Support\Carbon parseFromLocale(string $time, ?string $locale = null, \DateTimeZone|string|int|null $timezone = null)
  6272. * @method static string pluralUnit(string $unit)
  6273. * @method static \Illuminate\Support\Carbon|null rawCreateFromFormat(string $format, string $time, $timezone = null)
  6274. * @method static \Illuminate\Support\Carbon rawParse(\DateTimeInterface|\Carbon\WeekDay|\Carbon\Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
  6275. * @method static void resetMonthsOverflow()
  6276. * @method static void resetToStringFormat()
  6277. * @method static void resetYearsOverflow()
  6278. * @method static void serializeUsing($callback)
  6279. * @method static void setFallbackLocale(string $locale)
  6280. * @method static void setHumanDiffOptions($humanDiffOptions)
  6281. * @method static void setLocale(string $locale)
  6282. * @method static void setMidDayAt($hour)
  6283. * @method static void setTestNow(mixed $testNow = null)
  6284. * @method static void setTestNowAndTimezone(mixed $testNow = null, $timezone = null)
  6285. * @method static void setToStringFormat(string|\Closure|null $format)
  6286. * @method static void setTranslator(\Symfony\Contracts\Translation\TranslatorInterface $translator)
  6287. * @method static void setWeekEndsAt($day)
  6288. * @method static void setWeekStartsAt($day)
  6289. * @method static void setWeekendDays($days)
  6290. * @method static bool shouldOverflowMonths()
  6291. * @method static bool shouldOverflowYears()
  6292. * @method static string singularUnit(string $unit)
  6293. * @method static void sleep(int|float $seconds)
  6294. * @method static \Illuminate\Support\Carbon today(\DateTimeZone|string|int|null $timezone = null)
  6295. * @method static \Illuminate\Support\Carbon tomorrow(\DateTimeZone|string|int|null $timezone = null)
  6296. * @method static string translateTimeString(string $timeString, ?string $from = null, ?string $to = null, int $mode = \Carbon\CarbonInterface::TRANSLATE_ALL)
  6297. * @method static string translateWith(\Symfony\Contracts\Translation\TranslatorInterface $translator, string $key, array $parameters = [], $number = null)
  6298. * @method static void useMonthsOverflow($monthsOverflow = true)
  6299. * @method static void useStrictMode($strictModeEnabled = true)
  6300. * @method static void useYearsOverflow($yearsOverflow = true)
  6301. * @method static mixed withTestNow(mixed $testNow, callable $callback)
  6302. * @method static static withTimeZone(\DateTimeZone|string|int|null $timezone)
  6303. * @method static \Illuminate\Support\Carbon yesterday(\DateTimeZone|string|int|null $timezone = null)
  6304. * @see \Illuminate\Support\DateFactory
  6305. */
  6306. class Date {
  6307. /**
  6308. * Use the given handler when generating dates (class name, callable, or factory).
  6309. *
  6310. * @param mixed $handler
  6311. * @return mixed
  6312. * @throws \InvalidArgumentException
  6313. * @static
  6314. */
  6315. public static function use($handler)
  6316. {
  6317. return \Illuminate\Support\DateFactory::use($handler);
  6318. }
  6319. /**
  6320. * Use the default date class when generating dates.
  6321. *
  6322. * @return void
  6323. * @static
  6324. */
  6325. public static function useDefault()
  6326. {
  6327. \Illuminate\Support\DateFactory::useDefault();
  6328. }
  6329. /**
  6330. * Execute the given callable on each date creation.
  6331. *
  6332. * @param callable $callable
  6333. * @return void
  6334. * @static
  6335. */
  6336. public static function useCallable($callable)
  6337. {
  6338. \Illuminate\Support\DateFactory::useCallable($callable);
  6339. }
  6340. /**
  6341. * Use the given date type (class) when generating dates.
  6342. *
  6343. * @param string $dateClass
  6344. * @return void
  6345. * @static
  6346. */
  6347. public static function useClass($dateClass)
  6348. {
  6349. \Illuminate\Support\DateFactory::useClass($dateClass);
  6350. }
  6351. /**
  6352. * Use the given Carbon factory when generating dates.
  6353. *
  6354. * @param object $factory
  6355. * @return void
  6356. * @static
  6357. */
  6358. public static function useFactory($factory)
  6359. {
  6360. \Illuminate\Support\DateFactory::useFactory($factory);
  6361. }
  6362. }
  6363. /**
  6364. * @see \Illuminate\Database\DatabaseManager
  6365. */
  6366. class DB {
  6367. /**
  6368. * Get a database connection instance.
  6369. *
  6370. * @param string|null $name
  6371. * @return \Illuminate\Database\Connection
  6372. * @static
  6373. */
  6374. public static function connection($name = null)
  6375. {
  6376. /** @var \Illuminate\Database\DatabaseManager $instance */
  6377. return $instance->connection($name);
  6378. }
  6379. /**
  6380. * Build a database connection instance from the given configuration.
  6381. *
  6382. * @param array $config
  6383. * @return \Illuminate\Database\PostgresConnection
  6384. * @static
  6385. */
  6386. public static function build($config)
  6387. {
  6388. /** @var \Illuminate\Database\DatabaseManager $instance */
  6389. return $instance->build($config);
  6390. }
  6391. /**
  6392. * Calculate the dynamic connection name for an on-demand connection based on its configuration.
  6393. *
  6394. * @param array $config
  6395. * @return string
  6396. * @static
  6397. */
  6398. public static function calculateDynamicConnectionName($config)
  6399. {
  6400. return \Illuminate\Database\DatabaseManager::calculateDynamicConnectionName($config);
  6401. }
  6402. /**
  6403. * Get a database connection instance from the given configuration.
  6404. *
  6405. * @param string $name
  6406. * @param array $config
  6407. * @param bool $force
  6408. * @return \Illuminate\Database\PostgresConnection
  6409. * @static
  6410. */
  6411. public static function connectUsing($name, $config, $force = false)
  6412. {
  6413. /** @var \Illuminate\Database\DatabaseManager $instance */
  6414. return $instance->connectUsing($name, $config, $force);
  6415. }
  6416. /**
  6417. * Disconnect from the given database and remove from local cache.
  6418. *
  6419. * @param string|null $name
  6420. * @return void
  6421. * @static
  6422. */
  6423. public static function purge($name = null)
  6424. {
  6425. /** @var \Illuminate\Database\DatabaseManager $instance */
  6426. $instance->purge($name);
  6427. }
  6428. /**
  6429. * Disconnect from the given database.
  6430. *
  6431. * @param string|null $name
  6432. * @return void
  6433. * @static
  6434. */
  6435. public static function disconnect($name = null)
  6436. {
  6437. /** @var \Illuminate\Database\DatabaseManager $instance */
  6438. $instance->disconnect($name);
  6439. }
  6440. /**
  6441. * Reconnect to the given database.
  6442. *
  6443. * @param string|null $name
  6444. * @return \Illuminate\Database\Connection
  6445. * @static
  6446. */
  6447. public static function reconnect($name = null)
  6448. {
  6449. /** @var \Illuminate\Database\DatabaseManager $instance */
  6450. return $instance->reconnect($name);
  6451. }
  6452. /**
  6453. * Set the default database connection for the callback execution.
  6454. *
  6455. * @param string $name
  6456. * @param callable $callback
  6457. * @return mixed
  6458. * @static
  6459. */
  6460. public static function usingConnection($name, $callback)
  6461. {
  6462. /** @var \Illuminate\Database\DatabaseManager $instance */
  6463. return $instance->usingConnection($name, $callback);
  6464. }
  6465. /**
  6466. * Get the default connection name.
  6467. *
  6468. * @return string
  6469. * @static
  6470. */
  6471. public static function getDefaultConnection()
  6472. {
  6473. /** @var \Illuminate\Database\DatabaseManager $instance */
  6474. return $instance->getDefaultConnection();
  6475. }
  6476. /**
  6477. * Set the default connection name.
  6478. *
  6479. * @param string $name
  6480. * @return void
  6481. * @static
  6482. */
  6483. public static function setDefaultConnection($name)
  6484. {
  6485. /** @var \Illuminate\Database\DatabaseManager $instance */
  6486. $instance->setDefaultConnection($name);
  6487. }
  6488. /**
  6489. * Get all of the supported drivers.
  6490. *
  6491. * @return string[]
  6492. * @static
  6493. */
  6494. public static function supportedDrivers()
  6495. {
  6496. /** @var \Illuminate\Database\DatabaseManager $instance */
  6497. return $instance->supportedDrivers();
  6498. }
  6499. /**
  6500. * Get all of the drivers that are actually available.
  6501. *
  6502. * @return string[]
  6503. * @static
  6504. */
  6505. public static function availableDrivers()
  6506. {
  6507. /** @var \Illuminate\Database\DatabaseManager $instance */
  6508. return $instance->availableDrivers();
  6509. }
  6510. /**
  6511. * Register an extension connection resolver.
  6512. *
  6513. * @param string $name
  6514. * @param callable $resolver
  6515. * @return void
  6516. * @static
  6517. */
  6518. public static function extend($name, $resolver)
  6519. {
  6520. /** @var \Illuminate\Database\DatabaseManager $instance */
  6521. $instance->extend($name, $resolver);
  6522. }
  6523. /**
  6524. * Remove an extension connection resolver.
  6525. *
  6526. * @param string $name
  6527. * @return void
  6528. * @static
  6529. */
  6530. public static function forgetExtension($name)
  6531. {
  6532. /** @var \Illuminate\Database\DatabaseManager $instance */
  6533. $instance->forgetExtension($name);
  6534. }
  6535. /**
  6536. * Return all of the created connections.
  6537. *
  6538. * @return array<string, \Illuminate\Database\Connection>
  6539. * @static
  6540. */
  6541. public static function getConnections()
  6542. {
  6543. /** @var \Illuminate\Database\DatabaseManager $instance */
  6544. return $instance->getConnections();
  6545. }
  6546. /**
  6547. * Set the database reconnector callback.
  6548. *
  6549. * @param callable $reconnector
  6550. * @return void
  6551. * @static
  6552. */
  6553. public static function setReconnector($reconnector)
  6554. {
  6555. /** @var \Illuminate\Database\DatabaseManager $instance */
  6556. $instance->setReconnector($reconnector);
  6557. }
  6558. /**
  6559. * Set the application instance used by the manager.
  6560. *
  6561. * @param \Illuminate\Contracts\Foundation\Application $app
  6562. * @return \Illuminate\Database\DatabaseManager
  6563. * @static
  6564. */
  6565. public static function setApplication($app)
  6566. {
  6567. /** @var \Illuminate\Database\DatabaseManager $instance */
  6568. return $instance->setApplication($app);
  6569. }
  6570. /**
  6571. * Register a custom macro.
  6572. *
  6573. * @param string $name
  6574. * @param object|callable $macro
  6575. * @param-closure-this static $macro
  6576. * @return void
  6577. * @static
  6578. */
  6579. public static function macro($name, $macro)
  6580. {
  6581. \Illuminate\Database\DatabaseManager::macro($name, $macro);
  6582. }
  6583. /**
  6584. * Mix another object into the class.
  6585. *
  6586. * @param object $mixin
  6587. * @param bool $replace
  6588. * @return void
  6589. * @throws \ReflectionException
  6590. * @static
  6591. */
  6592. public static function mixin($mixin, $replace = true)
  6593. {
  6594. \Illuminate\Database\DatabaseManager::mixin($mixin, $replace);
  6595. }
  6596. /**
  6597. * Checks if macro is registered.
  6598. *
  6599. * @param string $name
  6600. * @return bool
  6601. * @static
  6602. */
  6603. public static function hasMacro($name)
  6604. {
  6605. return \Illuminate\Database\DatabaseManager::hasMacro($name);
  6606. }
  6607. /**
  6608. * Flush the existing macros.
  6609. *
  6610. * @return void
  6611. * @static
  6612. */
  6613. public static function flushMacros()
  6614. {
  6615. \Illuminate\Database\DatabaseManager::flushMacros();
  6616. }
  6617. /**
  6618. * Dynamically handle calls to the class.
  6619. *
  6620. * @param string $method
  6621. * @param array $parameters
  6622. * @return mixed
  6623. * @throws \BadMethodCallException
  6624. * @static
  6625. */
  6626. public static function macroCall($method, $parameters)
  6627. {
  6628. /** @var \Illuminate\Database\DatabaseManager $instance */
  6629. return $instance->macroCall($method, $parameters);
  6630. }
  6631. /**
  6632. * Get a human-readable name for the given connection driver.
  6633. *
  6634. * @return string
  6635. * @static
  6636. */
  6637. public static function getDriverTitle()
  6638. {
  6639. /** @var \Illuminate\Database\PostgresConnection $instance */
  6640. return $instance->getDriverTitle();
  6641. }
  6642. /**
  6643. * Get a schema builder instance for the connection.
  6644. *
  6645. * @return \Illuminate\Database\Schema\PostgresBuilder
  6646. * @static
  6647. */
  6648. public static function getSchemaBuilder()
  6649. {
  6650. /** @var \Illuminate\Database\PostgresConnection $instance */
  6651. return $instance->getSchemaBuilder();
  6652. }
  6653. /**
  6654. * Get the schema state for the connection.
  6655. *
  6656. * @param \Illuminate\Filesystem\Filesystem|null $files
  6657. * @param callable|null $processFactory
  6658. * @return \Illuminate\Database\Schema\PostgresSchemaState
  6659. * @static
  6660. */
  6661. public static function getSchemaState($files = null, $processFactory = null)
  6662. {
  6663. /** @var \Illuminate\Database\PostgresConnection $instance */
  6664. return $instance->getSchemaState($files, $processFactory);
  6665. }
  6666. /**
  6667. * Set the query grammar to the default implementation.
  6668. *
  6669. * @return void
  6670. * @static
  6671. */
  6672. public static function useDefaultQueryGrammar()
  6673. {
  6674. //Method inherited from \Illuminate\Database\Connection
  6675. /** @var \Illuminate\Database\PostgresConnection $instance */
  6676. $instance->useDefaultQueryGrammar();
  6677. }
  6678. /**
  6679. * Set the schema grammar to the default implementation.
  6680. *
  6681. * @return void
  6682. * @static
  6683. */
  6684. public static function useDefaultSchemaGrammar()
  6685. {
  6686. //Method inherited from \Illuminate\Database\Connection
  6687. /** @var \Illuminate\Database\PostgresConnection $instance */
  6688. $instance->useDefaultSchemaGrammar();
  6689. }
  6690. /**
  6691. * Set the query post processor to the default implementation.
  6692. *
  6693. * @return void
  6694. * @static
  6695. */
  6696. public static function useDefaultPostProcessor()
  6697. {
  6698. //Method inherited from \Illuminate\Database\Connection
  6699. /** @var \Illuminate\Database\PostgresConnection $instance */
  6700. $instance->useDefaultPostProcessor();
  6701. }
  6702. /**
  6703. * Begin a fluent query against a database table.
  6704. *
  6705. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string $table
  6706. * @param string|null $as
  6707. * @return \Illuminate\Database\Query\Builder
  6708. * @static
  6709. */
  6710. public static function table($table, $as = null)
  6711. {
  6712. //Method inherited from \Illuminate\Database\Connection
  6713. /** @var \Illuminate\Database\PostgresConnection $instance */
  6714. return $instance->table($table, $as);
  6715. }
  6716. /**
  6717. * Get a new query builder instance.
  6718. *
  6719. * @return \Illuminate\Database\Query\Builder
  6720. * @static
  6721. */
  6722. public static function query()
  6723. {
  6724. //Method inherited from \Illuminate\Database\Connection
  6725. /** @var \Illuminate\Database\PostgresConnection $instance */
  6726. return $instance->query();
  6727. }
  6728. /**
  6729. * Run a select statement and return a single result.
  6730. *
  6731. * @param string $query
  6732. * @param array $bindings
  6733. * @param bool $useReadPdo
  6734. * @return mixed
  6735. * @static
  6736. */
  6737. public static function selectOne($query, $bindings = [], $useReadPdo = true)
  6738. {
  6739. //Method inherited from \Illuminate\Database\Connection
  6740. /** @var \Illuminate\Database\PostgresConnection $instance */
  6741. return $instance->selectOne($query, $bindings, $useReadPdo);
  6742. }
  6743. /**
  6744. * Run a select statement and return the first column of the first row.
  6745. *
  6746. * @param string $query
  6747. * @param array $bindings
  6748. * @param bool $useReadPdo
  6749. * @return mixed
  6750. * @throws \Illuminate\Database\MultipleColumnsSelectedException
  6751. * @static
  6752. */
  6753. public static function scalar($query, $bindings = [], $useReadPdo = true)
  6754. {
  6755. //Method inherited from \Illuminate\Database\Connection
  6756. /** @var \Illuminate\Database\PostgresConnection $instance */
  6757. return $instance->scalar($query, $bindings, $useReadPdo);
  6758. }
  6759. /**
  6760. * Run a select statement against the database.
  6761. *
  6762. * @param string $query
  6763. * @param array $bindings
  6764. * @return array
  6765. * @static
  6766. */
  6767. public static function selectFromWriteConnection($query, $bindings = [])
  6768. {
  6769. //Method inherited from \Illuminate\Database\Connection
  6770. /** @var \Illuminate\Database\PostgresConnection $instance */
  6771. return $instance->selectFromWriteConnection($query, $bindings);
  6772. }
  6773. /**
  6774. * Run a select statement against the database.
  6775. *
  6776. * @param string $query
  6777. * @param array $bindings
  6778. * @param bool $useReadPdo
  6779. * @return array
  6780. * @static
  6781. */
  6782. public static function select($query, $bindings = [], $useReadPdo = true)
  6783. {
  6784. //Method inherited from \Illuminate\Database\Connection
  6785. /** @var \Illuminate\Database\PostgresConnection $instance */
  6786. return $instance->select($query, $bindings, $useReadPdo);
  6787. }
  6788. /**
  6789. * Run a select statement against the database and returns all of the result sets.
  6790. *
  6791. * @param string $query
  6792. * @param array $bindings
  6793. * @param bool $useReadPdo
  6794. * @return array
  6795. * @static
  6796. */
  6797. public static function selectResultSets($query, $bindings = [], $useReadPdo = true)
  6798. {
  6799. //Method inherited from \Illuminate\Database\Connection
  6800. /** @var \Illuminate\Database\PostgresConnection $instance */
  6801. return $instance->selectResultSets($query, $bindings, $useReadPdo);
  6802. }
  6803. /**
  6804. * Run a select statement against the database and returns a generator.
  6805. *
  6806. * @param string $query
  6807. * @param array $bindings
  6808. * @param bool $useReadPdo
  6809. * @return \Generator<int, \stdClass>
  6810. * @static
  6811. */
  6812. public static function cursor($query, $bindings = [], $useReadPdo = true)
  6813. {
  6814. //Method inherited from \Illuminate\Database\Connection
  6815. /** @var \Illuminate\Database\PostgresConnection $instance */
  6816. return $instance->cursor($query, $bindings, $useReadPdo);
  6817. }
  6818. /**
  6819. * Run an insert statement against the database.
  6820. *
  6821. * @param string $query
  6822. * @param array $bindings
  6823. * @return bool
  6824. * @static
  6825. */
  6826. public static function insert($query, $bindings = [])
  6827. {
  6828. //Method inherited from \Illuminate\Database\Connection
  6829. /** @var \Illuminate\Database\PostgresConnection $instance */
  6830. return $instance->insert($query, $bindings);
  6831. }
  6832. /**
  6833. * Run an update statement against the database.
  6834. *
  6835. * @param string $query
  6836. * @param array $bindings
  6837. * @return int
  6838. * @static
  6839. */
  6840. public static function update($query, $bindings = [])
  6841. {
  6842. //Method inherited from \Illuminate\Database\Connection
  6843. /** @var \Illuminate\Database\PostgresConnection $instance */
  6844. return $instance->update($query, $bindings);
  6845. }
  6846. /**
  6847. * Run a delete statement against the database.
  6848. *
  6849. * @param string $query
  6850. * @param array $bindings
  6851. * @return int
  6852. * @static
  6853. */
  6854. public static function delete($query, $bindings = [])
  6855. {
  6856. //Method inherited from \Illuminate\Database\Connection
  6857. /** @var \Illuminate\Database\PostgresConnection $instance */
  6858. return $instance->delete($query, $bindings);
  6859. }
  6860. /**
  6861. * Execute an SQL statement and return the boolean result.
  6862. *
  6863. * @param string $query
  6864. * @param array $bindings
  6865. * @return bool
  6866. * @static
  6867. */
  6868. public static function statement($query, $bindings = [])
  6869. {
  6870. //Method inherited from \Illuminate\Database\Connection
  6871. /** @var \Illuminate\Database\PostgresConnection $instance */
  6872. return $instance->statement($query, $bindings);
  6873. }
  6874. /**
  6875. * Run an SQL statement and get the number of rows affected.
  6876. *
  6877. * @param string $query
  6878. * @param array $bindings
  6879. * @return int
  6880. * @static
  6881. */
  6882. public static function affectingStatement($query, $bindings = [])
  6883. {
  6884. //Method inherited from \Illuminate\Database\Connection
  6885. /** @var \Illuminate\Database\PostgresConnection $instance */
  6886. return $instance->affectingStatement($query, $bindings);
  6887. }
  6888. /**
  6889. * Run a raw, unprepared query against the PDO connection.
  6890. *
  6891. * @param string $query
  6892. * @return bool
  6893. * @static
  6894. */
  6895. public static function unprepared($query)
  6896. {
  6897. //Method inherited from \Illuminate\Database\Connection
  6898. /** @var \Illuminate\Database\PostgresConnection $instance */
  6899. return $instance->unprepared($query);
  6900. }
  6901. /**
  6902. * Get the number of open connections for the database.
  6903. *
  6904. * @return int|null
  6905. * @static
  6906. */
  6907. public static function threadCount()
  6908. {
  6909. //Method inherited from \Illuminate\Database\Connection
  6910. /** @var \Illuminate\Database\PostgresConnection $instance */
  6911. return $instance->threadCount();
  6912. }
  6913. /**
  6914. * Execute the given callback in "dry run" mode.
  6915. *
  6916. * @param \Closure $callback
  6917. * @return array
  6918. * @static
  6919. */
  6920. public static function pretend($callback)
  6921. {
  6922. //Method inherited from \Illuminate\Database\Connection
  6923. /** @var \Illuminate\Database\PostgresConnection $instance */
  6924. return $instance->pretend($callback);
  6925. }
  6926. /**
  6927. * Execute the given callback without "pretending".
  6928. *
  6929. * @param \Closure $callback
  6930. * @return mixed
  6931. * @static
  6932. */
  6933. public static function withoutPretending($callback)
  6934. {
  6935. //Method inherited from \Illuminate\Database\Connection
  6936. /** @var \Illuminate\Database\PostgresConnection $instance */
  6937. return $instance->withoutPretending($callback);
  6938. }
  6939. /**
  6940. * Bind values to their parameters in the given statement.
  6941. *
  6942. * @param \PDOStatement $statement
  6943. * @param array $bindings
  6944. * @return void
  6945. * @static
  6946. */
  6947. public static function bindValues($statement, $bindings)
  6948. {
  6949. //Method inherited from \Illuminate\Database\Connection
  6950. /** @var \Illuminate\Database\PostgresConnection $instance */
  6951. $instance->bindValues($statement, $bindings);
  6952. }
  6953. /**
  6954. * Prepare the query bindings for execution.
  6955. *
  6956. * @param array $bindings
  6957. * @return array
  6958. * @static
  6959. */
  6960. public static function prepareBindings($bindings)
  6961. {
  6962. //Method inherited from \Illuminate\Database\Connection
  6963. /** @var \Illuminate\Database\PostgresConnection $instance */
  6964. return $instance->prepareBindings($bindings);
  6965. }
  6966. /**
  6967. * Log a query in the connection's query log.
  6968. *
  6969. * @param string $query
  6970. * @param array $bindings
  6971. * @param float|null $time
  6972. * @return void
  6973. * @static
  6974. */
  6975. public static function logQuery($query, $bindings, $time = null)
  6976. {
  6977. //Method inherited from \Illuminate\Database\Connection
  6978. /** @var \Illuminate\Database\PostgresConnection $instance */
  6979. $instance->logQuery($query, $bindings, $time);
  6980. }
  6981. /**
  6982. * Register a callback to be invoked when the connection queries for longer than a given amount of time.
  6983. *
  6984. * @param \DateTimeInterface|\Carbon\CarbonInterval|float|int $threshold
  6985. * @param callable $handler
  6986. * @return void
  6987. * @static
  6988. */
  6989. public static function whenQueryingForLongerThan($threshold, $handler)
  6990. {
  6991. //Method inherited from \Illuminate\Database\Connection
  6992. /** @var \Illuminate\Database\PostgresConnection $instance */
  6993. $instance->whenQueryingForLongerThan($threshold, $handler);
  6994. }
  6995. /**
  6996. * Allow all the query duration handlers to run again, even if they have already run.
  6997. *
  6998. * @return void
  6999. * @static
  7000. */
  7001. public static function allowQueryDurationHandlersToRunAgain()
  7002. {
  7003. //Method inherited from \Illuminate\Database\Connection
  7004. /** @var \Illuminate\Database\PostgresConnection $instance */
  7005. $instance->allowQueryDurationHandlersToRunAgain();
  7006. }
  7007. /**
  7008. * Get the duration of all run queries in milliseconds.
  7009. *
  7010. * @return float
  7011. * @static
  7012. */
  7013. public static function totalQueryDuration()
  7014. {
  7015. //Method inherited from \Illuminate\Database\Connection
  7016. /** @var \Illuminate\Database\PostgresConnection $instance */
  7017. return $instance->totalQueryDuration();
  7018. }
  7019. /**
  7020. * Reset the duration of all run queries.
  7021. *
  7022. * @return void
  7023. * @static
  7024. */
  7025. public static function resetTotalQueryDuration()
  7026. {
  7027. //Method inherited from \Illuminate\Database\Connection
  7028. /** @var \Illuminate\Database\PostgresConnection $instance */
  7029. $instance->resetTotalQueryDuration();
  7030. }
  7031. /**
  7032. * Reconnect to the database if a PDO connection is missing.
  7033. *
  7034. * @return void
  7035. * @static
  7036. */
  7037. public static function reconnectIfMissingConnection()
  7038. {
  7039. //Method inherited from \Illuminate\Database\Connection
  7040. /** @var \Illuminate\Database\PostgresConnection $instance */
  7041. $instance->reconnectIfMissingConnection();
  7042. }
  7043. /**
  7044. * Register a hook to be run just before a database transaction is started.
  7045. *
  7046. * @param \Closure $callback
  7047. * @return \Illuminate\Database\PostgresConnection
  7048. * @static
  7049. */
  7050. public static function beforeStartingTransaction($callback)
  7051. {
  7052. //Method inherited from \Illuminate\Database\Connection
  7053. /** @var \Illuminate\Database\PostgresConnection $instance */
  7054. return $instance->beforeStartingTransaction($callback);
  7055. }
  7056. /**
  7057. * Register a hook to be run just before a database query is executed.
  7058. *
  7059. * @param \Closure $callback
  7060. * @return \Illuminate\Database\PostgresConnection
  7061. * @static
  7062. */
  7063. public static function beforeExecuting($callback)
  7064. {
  7065. //Method inherited from \Illuminate\Database\Connection
  7066. /** @var \Illuminate\Database\PostgresConnection $instance */
  7067. return $instance->beforeExecuting($callback);
  7068. }
  7069. /**
  7070. * Register a database query listener with the connection.
  7071. *
  7072. * @param \Closure $callback
  7073. * @return void
  7074. * @static
  7075. */
  7076. public static function listen($callback)
  7077. {
  7078. //Method inherited from \Illuminate\Database\Connection
  7079. /** @var \Illuminate\Database\PostgresConnection $instance */
  7080. $instance->listen($callback);
  7081. }
  7082. /**
  7083. * Get a new raw query expression.
  7084. *
  7085. * @param mixed $value
  7086. * @return \Illuminate\Contracts\Database\Query\Expression
  7087. * @static
  7088. */
  7089. public static function raw($value)
  7090. {
  7091. //Method inherited from \Illuminate\Database\Connection
  7092. /** @var \Illuminate\Database\PostgresConnection $instance */
  7093. return $instance->raw($value);
  7094. }
  7095. /**
  7096. * Escape a value for safe SQL embedding.
  7097. *
  7098. * @param string|float|int|bool|null $value
  7099. * @param bool $binary
  7100. * @return string
  7101. * @static
  7102. */
  7103. public static function escape($value, $binary = false)
  7104. {
  7105. //Method inherited from \Illuminate\Database\Connection
  7106. /** @var \Illuminate\Database\PostgresConnection $instance */
  7107. return $instance->escape($value, $binary);
  7108. }
  7109. /**
  7110. * Determine if the database connection has modified any database records.
  7111. *
  7112. * @return bool
  7113. * @static
  7114. */
  7115. public static function hasModifiedRecords()
  7116. {
  7117. //Method inherited from \Illuminate\Database\Connection
  7118. /** @var \Illuminate\Database\PostgresConnection $instance */
  7119. return $instance->hasModifiedRecords();
  7120. }
  7121. /**
  7122. * Indicate if any records have been modified.
  7123. *
  7124. * @param bool $value
  7125. * @return void
  7126. * @static
  7127. */
  7128. public static function recordsHaveBeenModified($value = true)
  7129. {
  7130. //Method inherited from \Illuminate\Database\Connection
  7131. /** @var \Illuminate\Database\PostgresConnection $instance */
  7132. $instance->recordsHaveBeenModified($value);
  7133. }
  7134. /**
  7135. * Set the record modification state.
  7136. *
  7137. * @param bool $value
  7138. * @return \Illuminate\Database\PostgresConnection
  7139. * @static
  7140. */
  7141. public static function setRecordModificationState($value)
  7142. {
  7143. //Method inherited from \Illuminate\Database\Connection
  7144. /** @var \Illuminate\Database\PostgresConnection $instance */
  7145. return $instance->setRecordModificationState($value);
  7146. }
  7147. /**
  7148. * Reset the record modification state.
  7149. *
  7150. * @return void
  7151. * @static
  7152. */
  7153. public static function forgetRecordModificationState()
  7154. {
  7155. //Method inherited from \Illuminate\Database\Connection
  7156. /** @var \Illuminate\Database\PostgresConnection $instance */
  7157. $instance->forgetRecordModificationState();
  7158. }
  7159. /**
  7160. * Indicate that the connection should use the write PDO connection for reads.
  7161. *
  7162. * @param bool $value
  7163. * @return \Illuminate\Database\PostgresConnection
  7164. * @static
  7165. */
  7166. public static function useWriteConnectionWhenReading($value = true)
  7167. {
  7168. //Method inherited from \Illuminate\Database\Connection
  7169. /** @var \Illuminate\Database\PostgresConnection $instance */
  7170. return $instance->useWriteConnectionWhenReading($value);
  7171. }
  7172. /**
  7173. * Get the current PDO connection.
  7174. *
  7175. * @return \PDO
  7176. * @static
  7177. */
  7178. public static function getPdo()
  7179. {
  7180. //Method inherited from \Illuminate\Database\Connection
  7181. /** @var \Illuminate\Database\PostgresConnection $instance */
  7182. return $instance->getPdo();
  7183. }
  7184. /**
  7185. * Get the current PDO connection parameter without executing any reconnect logic.
  7186. *
  7187. * @return \PDO|\Closure|null
  7188. * @static
  7189. */
  7190. public static function getRawPdo()
  7191. {
  7192. //Method inherited from \Illuminate\Database\Connection
  7193. /** @var \Illuminate\Database\PostgresConnection $instance */
  7194. return $instance->getRawPdo();
  7195. }
  7196. /**
  7197. * Get the current PDO connection used for reading.
  7198. *
  7199. * @return \PDO
  7200. * @static
  7201. */
  7202. public static function getReadPdo()
  7203. {
  7204. //Method inherited from \Illuminate\Database\Connection
  7205. /** @var \Illuminate\Database\PostgresConnection $instance */
  7206. return $instance->getReadPdo();
  7207. }
  7208. /**
  7209. * Get the current read PDO connection parameter without executing any reconnect logic.
  7210. *
  7211. * @return \PDO|\Closure|null
  7212. * @static
  7213. */
  7214. public static function getRawReadPdo()
  7215. {
  7216. //Method inherited from \Illuminate\Database\Connection
  7217. /** @var \Illuminate\Database\PostgresConnection $instance */
  7218. return $instance->getRawReadPdo();
  7219. }
  7220. /**
  7221. * Set the PDO connection.
  7222. *
  7223. * @param \PDO|\Closure|null $pdo
  7224. * @return \Illuminate\Database\PostgresConnection
  7225. * @static
  7226. */
  7227. public static function setPdo($pdo)
  7228. {
  7229. //Method inherited from \Illuminate\Database\Connection
  7230. /** @var \Illuminate\Database\PostgresConnection $instance */
  7231. return $instance->setPdo($pdo);
  7232. }
  7233. /**
  7234. * Set the PDO connection used for reading.
  7235. *
  7236. * @param \PDO|\Closure|null $pdo
  7237. * @return \Illuminate\Database\PostgresConnection
  7238. * @static
  7239. */
  7240. public static function setReadPdo($pdo)
  7241. {
  7242. //Method inherited from \Illuminate\Database\Connection
  7243. /** @var \Illuminate\Database\PostgresConnection $instance */
  7244. return $instance->setReadPdo($pdo);
  7245. }
  7246. /**
  7247. * Get the database connection name.
  7248. *
  7249. * @return string|null
  7250. * @static
  7251. */
  7252. public static function getName()
  7253. {
  7254. //Method inherited from \Illuminate\Database\Connection
  7255. /** @var \Illuminate\Database\PostgresConnection $instance */
  7256. return $instance->getName();
  7257. }
  7258. /**
  7259. * Get the database connection full name.
  7260. *
  7261. * @return string|null
  7262. * @static
  7263. */
  7264. public static function getNameWithReadWriteType()
  7265. {
  7266. //Method inherited from \Illuminate\Database\Connection
  7267. /** @var \Illuminate\Database\PostgresConnection $instance */
  7268. return $instance->getNameWithReadWriteType();
  7269. }
  7270. /**
  7271. * Get an option from the configuration options.
  7272. *
  7273. * @param string|null $option
  7274. * @return mixed
  7275. * @static
  7276. */
  7277. public static function getConfig($option = null)
  7278. {
  7279. //Method inherited from \Illuminate\Database\Connection
  7280. /** @var \Illuminate\Database\PostgresConnection $instance */
  7281. return $instance->getConfig($option);
  7282. }
  7283. /**
  7284. * Get the PDO driver name.
  7285. *
  7286. * @return string
  7287. * @static
  7288. */
  7289. public static function getDriverName()
  7290. {
  7291. //Method inherited from \Illuminate\Database\Connection
  7292. /** @var \Illuminate\Database\PostgresConnection $instance */
  7293. return $instance->getDriverName();
  7294. }
  7295. /**
  7296. * Get the query grammar used by the connection.
  7297. *
  7298. * @return \Illuminate\Database\Query\Grammars\Grammar
  7299. * @static
  7300. */
  7301. public static function getQueryGrammar()
  7302. {
  7303. //Method inherited from \Illuminate\Database\Connection
  7304. /** @var \Illuminate\Database\PostgresConnection $instance */
  7305. return $instance->getQueryGrammar();
  7306. }
  7307. /**
  7308. * Set the query grammar used by the connection.
  7309. *
  7310. * @param \Illuminate\Database\Query\Grammars\Grammar $grammar
  7311. * @return \Illuminate\Database\PostgresConnection
  7312. * @static
  7313. */
  7314. public static function setQueryGrammar($grammar)
  7315. {
  7316. //Method inherited from \Illuminate\Database\Connection
  7317. /** @var \Illuminate\Database\PostgresConnection $instance */
  7318. return $instance->setQueryGrammar($grammar);
  7319. }
  7320. /**
  7321. * Get the schema grammar used by the connection.
  7322. *
  7323. * @return \Illuminate\Database\Schema\Grammars\Grammar
  7324. * @static
  7325. */
  7326. public static function getSchemaGrammar()
  7327. {
  7328. //Method inherited from \Illuminate\Database\Connection
  7329. /** @var \Illuminate\Database\PostgresConnection $instance */
  7330. return $instance->getSchemaGrammar();
  7331. }
  7332. /**
  7333. * Set the schema grammar used by the connection.
  7334. *
  7335. * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
  7336. * @return \Illuminate\Database\PostgresConnection
  7337. * @static
  7338. */
  7339. public static function setSchemaGrammar($grammar)
  7340. {
  7341. //Method inherited from \Illuminate\Database\Connection
  7342. /** @var \Illuminate\Database\PostgresConnection $instance */
  7343. return $instance->setSchemaGrammar($grammar);
  7344. }
  7345. /**
  7346. * Get the query post processor used by the connection.
  7347. *
  7348. * @return \Illuminate\Database\Query\Processors\Processor
  7349. * @static
  7350. */
  7351. public static function getPostProcessor()
  7352. {
  7353. //Method inherited from \Illuminate\Database\Connection
  7354. /** @var \Illuminate\Database\PostgresConnection $instance */
  7355. return $instance->getPostProcessor();
  7356. }
  7357. /**
  7358. * Set the query post processor used by the connection.
  7359. *
  7360. * @param \Illuminate\Database\Query\Processors\Processor $processor
  7361. * @return \Illuminate\Database\PostgresConnection
  7362. * @static
  7363. */
  7364. public static function setPostProcessor($processor)
  7365. {
  7366. //Method inherited from \Illuminate\Database\Connection
  7367. /** @var \Illuminate\Database\PostgresConnection $instance */
  7368. return $instance->setPostProcessor($processor);
  7369. }
  7370. /**
  7371. * Get the event dispatcher used by the connection.
  7372. *
  7373. * @return \Illuminate\Contracts\Events\Dispatcher
  7374. * @static
  7375. */
  7376. public static function getEventDispatcher()
  7377. {
  7378. //Method inherited from \Illuminate\Database\Connection
  7379. /** @var \Illuminate\Database\PostgresConnection $instance */
  7380. return $instance->getEventDispatcher();
  7381. }
  7382. /**
  7383. * Set the event dispatcher instance on the connection.
  7384. *
  7385. * @param \Illuminate\Contracts\Events\Dispatcher $events
  7386. * @return \Illuminate\Database\PostgresConnection
  7387. * @static
  7388. */
  7389. public static function setEventDispatcher($events)
  7390. {
  7391. //Method inherited from \Illuminate\Database\Connection
  7392. /** @var \Illuminate\Database\PostgresConnection $instance */
  7393. return $instance->setEventDispatcher($events);
  7394. }
  7395. /**
  7396. * Unset the event dispatcher for this connection.
  7397. *
  7398. * @return void
  7399. * @static
  7400. */
  7401. public static function unsetEventDispatcher()
  7402. {
  7403. //Method inherited from \Illuminate\Database\Connection
  7404. /** @var \Illuminate\Database\PostgresConnection $instance */
  7405. $instance->unsetEventDispatcher();
  7406. }
  7407. /**
  7408. * Set the transaction manager instance on the connection.
  7409. *
  7410. * @param \Illuminate\Database\DatabaseTransactionsManager $manager
  7411. * @return \Illuminate\Database\PostgresConnection
  7412. * @static
  7413. */
  7414. public static function setTransactionManager($manager)
  7415. {
  7416. //Method inherited from \Illuminate\Database\Connection
  7417. /** @var \Illuminate\Database\PostgresConnection $instance */
  7418. return $instance->setTransactionManager($manager);
  7419. }
  7420. /**
  7421. * Unset the transaction manager for this connection.
  7422. *
  7423. * @return void
  7424. * @static
  7425. */
  7426. public static function unsetTransactionManager()
  7427. {
  7428. //Method inherited from \Illuminate\Database\Connection
  7429. /** @var \Illuminate\Database\PostgresConnection $instance */
  7430. $instance->unsetTransactionManager();
  7431. }
  7432. /**
  7433. * Determine if the connection is in a "dry run".
  7434. *
  7435. * @return bool
  7436. * @static
  7437. */
  7438. public static function pretending()
  7439. {
  7440. //Method inherited from \Illuminate\Database\Connection
  7441. /** @var \Illuminate\Database\PostgresConnection $instance */
  7442. return $instance->pretending();
  7443. }
  7444. /**
  7445. * Get the connection query log.
  7446. *
  7447. * @return array
  7448. * @static
  7449. */
  7450. public static function getQueryLog()
  7451. {
  7452. //Method inherited from \Illuminate\Database\Connection
  7453. /** @var \Illuminate\Database\PostgresConnection $instance */
  7454. return $instance->getQueryLog();
  7455. }
  7456. /**
  7457. * Get the connection query log with embedded bindings.
  7458. *
  7459. * @return array
  7460. * @static
  7461. */
  7462. public static function getRawQueryLog()
  7463. {
  7464. //Method inherited from \Illuminate\Database\Connection
  7465. /** @var \Illuminate\Database\PostgresConnection $instance */
  7466. return $instance->getRawQueryLog();
  7467. }
  7468. /**
  7469. * Clear the query log.
  7470. *
  7471. * @return void
  7472. * @static
  7473. */
  7474. public static function flushQueryLog()
  7475. {
  7476. //Method inherited from \Illuminate\Database\Connection
  7477. /** @var \Illuminate\Database\PostgresConnection $instance */
  7478. $instance->flushQueryLog();
  7479. }
  7480. /**
  7481. * Enable the query log on the connection.
  7482. *
  7483. * @return void
  7484. * @static
  7485. */
  7486. public static function enableQueryLog()
  7487. {
  7488. //Method inherited from \Illuminate\Database\Connection
  7489. /** @var \Illuminate\Database\PostgresConnection $instance */
  7490. $instance->enableQueryLog();
  7491. }
  7492. /**
  7493. * Disable the query log on the connection.
  7494. *
  7495. * @return void
  7496. * @static
  7497. */
  7498. public static function disableQueryLog()
  7499. {
  7500. //Method inherited from \Illuminate\Database\Connection
  7501. /** @var \Illuminate\Database\PostgresConnection $instance */
  7502. $instance->disableQueryLog();
  7503. }
  7504. /**
  7505. * Determine whether we're logging queries.
  7506. *
  7507. * @return bool
  7508. * @static
  7509. */
  7510. public static function logging()
  7511. {
  7512. //Method inherited from \Illuminate\Database\Connection
  7513. /** @var \Illuminate\Database\PostgresConnection $instance */
  7514. return $instance->logging();
  7515. }
  7516. /**
  7517. * Get the name of the connected database.
  7518. *
  7519. * @return string
  7520. * @static
  7521. */
  7522. public static function getDatabaseName()
  7523. {
  7524. //Method inherited from \Illuminate\Database\Connection
  7525. /** @var \Illuminate\Database\PostgresConnection $instance */
  7526. return $instance->getDatabaseName();
  7527. }
  7528. /**
  7529. * Set the name of the connected database.
  7530. *
  7531. * @param string $database
  7532. * @return \Illuminate\Database\PostgresConnection
  7533. * @static
  7534. */
  7535. public static function setDatabaseName($database)
  7536. {
  7537. //Method inherited from \Illuminate\Database\Connection
  7538. /** @var \Illuminate\Database\PostgresConnection $instance */
  7539. return $instance->setDatabaseName($database);
  7540. }
  7541. /**
  7542. * Set the read / write type of the connection.
  7543. *
  7544. * @param string|null $readWriteType
  7545. * @return \Illuminate\Database\PostgresConnection
  7546. * @static
  7547. */
  7548. public static function setReadWriteType($readWriteType)
  7549. {
  7550. //Method inherited from \Illuminate\Database\Connection
  7551. /** @var \Illuminate\Database\PostgresConnection $instance */
  7552. return $instance->setReadWriteType($readWriteType);
  7553. }
  7554. /**
  7555. * Get the table prefix for the connection.
  7556. *
  7557. * @return string
  7558. * @static
  7559. */
  7560. public static function getTablePrefix()
  7561. {
  7562. //Method inherited from \Illuminate\Database\Connection
  7563. /** @var \Illuminate\Database\PostgresConnection $instance */
  7564. return $instance->getTablePrefix();
  7565. }
  7566. /**
  7567. * Set the table prefix in use by the connection.
  7568. *
  7569. * @param string $prefix
  7570. * @return \Illuminate\Database\PostgresConnection
  7571. * @static
  7572. */
  7573. public static function setTablePrefix($prefix)
  7574. {
  7575. //Method inherited from \Illuminate\Database\Connection
  7576. /** @var \Illuminate\Database\PostgresConnection $instance */
  7577. return $instance->setTablePrefix($prefix);
  7578. }
  7579. /**
  7580. * Execute the given callback without table prefix.
  7581. *
  7582. * @param \Closure $callback
  7583. * @return mixed
  7584. * @static
  7585. */
  7586. public static function withoutTablePrefix($callback)
  7587. {
  7588. //Method inherited from \Illuminate\Database\Connection
  7589. /** @var \Illuminate\Database\PostgresConnection $instance */
  7590. return $instance->withoutTablePrefix($callback);
  7591. }
  7592. /**
  7593. * Get the server version for the connection.
  7594. *
  7595. * @return string
  7596. * @static
  7597. */
  7598. public static function getServerVersion()
  7599. {
  7600. //Method inherited from \Illuminate\Database\Connection
  7601. /** @var \Illuminate\Database\PostgresConnection $instance */
  7602. return $instance->getServerVersion();
  7603. }
  7604. /**
  7605. * Register a connection resolver.
  7606. *
  7607. * @param string $driver
  7608. * @param \Closure $callback
  7609. * @return void
  7610. * @static
  7611. */
  7612. public static function resolverFor($driver, $callback)
  7613. {
  7614. //Method inherited from \Illuminate\Database\Connection
  7615. \Illuminate\Database\PostgresConnection::resolverFor($driver, $callback);
  7616. }
  7617. /**
  7618. * Get the connection resolver for the given driver.
  7619. *
  7620. * @param string $driver
  7621. * @return \Closure|null
  7622. * @static
  7623. */
  7624. public static function getResolver($driver)
  7625. {
  7626. //Method inherited from \Illuminate\Database\Connection
  7627. return \Illuminate\Database\PostgresConnection::getResolver($driver);
  7628. }
  7629. /**
  7630. * @template TReturn of mixed
  7631. *
  7632. * Execute a Closure within a transaction.
  7633. * @param (\Closure(static): TReturn) $callback
  7634. * @param int $attempts
  7635. * @return TReturn
  7636. * @throws \Throwable
  7637. * @static
  7638. */
  7639. public static function transaction($callback, $attempts = 1)
  7640. {
  7641. //Method inherited from \Illuminate\Database\Connection
  7642. /** @var \Illuminate\Database\PostgresConnection $instance */
  7643. return $instance->transaction($callback, $attempts);
  7644. }
  7645. /**
  7646. * Start a new database transaction.
  7647. *
  7648. * @return void
  7649. * @throws \Throwable
  7650. * @static
  7651. */
  7652. public static function beginTransaction()
  7653. {
  7654. //Method inherited from \Illuminate\Database\Connection
  7655. /** @var \Illuminate\Database\PostgresConnection $instance */
  7656. $instance->beginTransaction();
  7657. }
  7658. /**
  7659. * Commit the active database transaction.
  7660. *
  7661. * @return void
  7662. * @throws \Throwable
  7663. * @static
  7664. */
  7665. public static function commit()
  7666. {
  7667. //Method inherited from \Illuminate\Database\Connection
  7668. /** @var \Illuminate\Database\PostgresConnection $instance */
  7669. $instance->commit();
  7670. }
  7671. /**
  7672. * Rollback the active database transaction.
  7673. *
  7674. * @param int|null $toLevel
  7675. * @return void
  7676. * @throws \Throwable
  7677. * @static
  7678. */
  7679. public static function rollBack($toLevel = null)
  7680. {
  7681. //Method inherited from \Illuminate\Database\Connection
  7682. /** @var \Illuminate\Database\PostgresConnection $instance */
  7683. $instance->rollBack($toLevel);
  7684. }
  7685. /**
  7686. * Get the number of active transactions.
  7687. *
  7688. * @return int
  7689. * @static
  7690. */
  7691. public static function transactionLevel()
  7692. {
  7693. //Method inherited from \Illuminate\Database\Connection
  7694. /** @var \Illuminate\Database\PostgresConnection $instance */
  7695. return $instance->transactionLevel();
  7696. }
  7697. /**
  7698. * Execute the callback after a transaction commits.
  7699. *
  7700. * @param callable $callback
  7701. * @return void
  7702. * @throws \RuntimeException
  7703. * @static
  7704. */
  7705. public static function afterCommit($callback)
  7706. {
  7707. //Method inherited from \Illuminate\Database\Connection
  7708. /** @var \Illuminate\Database\PostgresConnection $instance */
  7709. $instance->afterCommit($callback);
  7710. }
  7711. }
  7712. /**
  7713. * @see \Illuminate\Events\Dispatcher
  7714. * @see \Illuminate\Support\Testing\Fakes\EventFake
  7715. */
  7716. class Event {
  7717. /**
  7718. * Register an event listener with the dispatcher.
  7719. *
  7720. * @param \Illuminate\Events\Queued\Closure|callable|array|class-string|string $events
  7721. * @param \Illuminate\Events\Queued\Closure|callable|array|class-string|null $listener
  7722. * @return void
  7723. * @static
  7724. */
  7725. public static function listen($events, $listener = null)
  7726. {
  7727. /** @var \Illuminate\Events\Dispatcher $instance */
  7728. $instance->listen($events, $listener);
  7729. }
  7730. /**
  7731. * Determine if a given event has listeners.
  7732. *
  7733. * @param string $eventName
  7734. * @return bool
  7735. * @static
  7736. */
  7737. public static function hasListeners($eventName)
  7738. {
  7739. /** @var \Illuminate\Events\Dispatcher $instance */
  7740. return $instance->hasListeners($eventName);
  7741. }
  7742. /**
  7743. * Determine if the given event has any wildcard listeners.
  7744. *
  7745. * @param string $eventName
  7746. * @return bool
  7747. * @static
  7748. */
  7749. public static function hasWildcardListeners($eventName)
  7750. {
  7751. /** @var \Illuminate\Events\Dispatcher $instance */
  7752. return $instance->hasWildcardListeners($eventName);
  7753. }
  7754. /**
  7755. * Register an event and payload to be fired later.
  7756. *
  7757. * @param string $event
  7758. * @param object|array $payload
  7759. * @return void
  7760. * @static
  7761. */
  7762. public static function push($event, $payload = [])
  7763. {
  7764. /** @var \Illuminate\Events\Dispatcher $instance */
  7765. $instance->push($event, $payload);
  7766. }
  7767. /**
  7768. * Flush a set of pushed events.
  7769. *
  7770. * @param string $event
  7771. * @return void
  7772. * @static
  7773. */
  7774. public static function flush($event)
  7775. {
  7776. /** @var \Illuminate\Events\Dispatcher $instance */
  7777. $instance->flush($event);
  7778. }
  7779. /**
  7780. * Register an event subscriber with the dispatcher.
  7781. *
  7782. * @param object|string $subscriber
  7783. * @return void
  7784. * @static
  7785. */
  7786. public static function subscribe($subscriber)
  7787. {
  7788. /** @var \Illuminate\Events\Dispatcher $instance */
  7789. $instance->subscribe($subscriber);
  7790. }
  7791. /**
  7792. * Fire an event until the first non-null response is returned.
  7793. *
  7794. * @param string|object $event
  7795. * @param mixed $payload
  7796. * @return mixed
  7797. * @static
  7798. */
  7799. public static function until($event, $payload = [])
  7800. {
  7801. /** @var \Illuminate\Events\Dispatcher $instance */
  7802. return $instance->until($event, $payload);
  7803. }
  7804. /**
  7805. * Fire an event and call the listeners.
  7806. *
  7807. * @param string|object $event
  7808. * @param mixed $payload
  7809. * @param bool $halt
  7810. * @return array|null
  7811. * @static
  7812. */
  7813. public static function dispatch($event, $payload = [], $halt = false)
  7814. {
  7815. /** @var \Illuminate\Events\Dispatcher $instance */
  7816. return $instance->dispatch($event, $payload, $halt);
  7817. }
  7818. /**
  7819. * Get all of the listeners for a given event name.
  7820. *
  7821. * @param string $eventName
  7822. * @return array
  7823. * @static
  7824. */
  7825. public static function getListeners($eventName)
  7826. {
  7827. /** @var \Illuminate\Events\Dispatcher $instance */
  7828. return $instance->getListeners($eventName);
  7829. }
  7830. /**
  7831. * Register an event listener with the dispatcher.
  7832. *
  7833. * @param \Closure|string|array $listener
  7834. * @param bool $wildcard
  7835. * @return \Closure
  7836. * @static
  7837. */
  7838. public static function makeListener($listener, $wildcard = false)
  7839. {
  7840. /** @var \Illuminate\Events\Dispatcher $instance */
  7841. return $instance->makeListener($listener, $wildcard);
  7842. }
  7843. /**
  7844. * Create a class based listener using the IoC container.
  7845. *
  7846. * @param string $listener
  7847. * @param bool $wildcard
  7848. * @return \Closure
  7849. * @static
  7850. */
  7851. public static function createClassListener($listener, $wildcard = false)
  7852. {
  7853. /** @var \Illuminate\Events\Dispatcher $instance */
  7854. return $instance->createClassListener($listener, $wildcard);
  7855. }
  7856. /**
  7857. * Remove a set of listeners from the dispatcher.
  7858. *
  7859. * @param string $event
  7860. * @return void
  7861. * @static
  7862. */
  7863. public static function forget($event)
  7864. {
  7865. /** @var \Illuminate\Events\Dispatcher $instance */
  7866. $instance->forget($event);
  7867. }
  7868. /**
  7869. * Forget all of the pushed listeners.
  7870. *
  7871. * @return void
  7872. * @static
  7873. */
  7874. public static function forgetPushed()
  7875. {
  7876. /** @var \Illuminate\Events\Dispatcher $instance */
  7877. $instance->forgetPushed();
  7878. }
  7879. /**
  7880. * Set the queue resolver implementation.
  7881. *
  7882. * @param callable $resolver
  7883. * @return \Illuminate\Events\Dispatcher
  7884. * @static
  7885. */
  7886. public static function setQueueResolver($resolver)
  7887. {
  7888. /** @var \Illuminate\Events\Dispatcher $instance */
  7889. return $instance->setQueueResolver($resolver);
  7890. }
  7891. /**
  7892. * Set the database transaction manager resolver implementation.
  7893. *
  7894. * @param callable $resolver
  7895. * @return \Illuminate\Events\Dispatcher
  7896. * @static
  7897. */
  7898. public static function setTransactionManagerResolver($resolver)
  7899. {
  7900. /** @var \Illuminate\Events\Dispatcher $instance */
  7901. return $instance->setTransactionManagerResolver($resolver);
  7902. }
  7903. /**
  7904. * Gets the raw, unprepared listeners.
  7905. *
  7906. * @return array
  7907. * @static
  7908. */
  7909. public static function getRawListeners()
  7910. {
  7911. /** @var \Illuminate\Events\Dispatcher $instance */
  7912. return $instance->getRawListeners();
  7913. }
  7914. /**
  7915. * Register a custom macro.
  7916. *
  7917. * @param string $name
  7918. * @param object|callable $macro
  7919. * @param-closure-this static $macro
  7920. * @return void
  7921. * @static
  7922. */
  7923. public static function macro($name, $macro)
  7924. {
  7925. \Illuminate\Events\Dispatcher::macro($name, $macro);
  7926. }
  7927. /**
  7928. * Mix another object into the class.
  7929. *
  7930. * @param object $mixin
  7931. * @param bool $replace
  7932. * @return void
  7933. * @throws \ReflectionException
  7934. * @static
  7935. */
  7936. public static function mixin($mixin, $replace = true)
  7937. {
  7938. \Illuminate\Events\Dispatcher::mixin($mixin, $replace);
  7939. }
  7940. /**
  7941. * Checks if macro is registered.
  7942. *
  7943. * @param string $name
  7944. * @return bool
  7945. * @static
  7946. */
  7947. public static function hasMacro($name)
  7948. {
  7949. return \Illuminate\Events\Dispatcher::hasMacro($name);
  7950. }
  7951. /**
  7952. * Flush the existing macros.
  7953. *
  7954. * @return void
  7955. * @static
  7956. */
  7957. public static function flushMacros()
  7958. {
  7959. \Illuminate\Events\Dispatcher::flushMacros();
  7960. }
  7961. /**
  7962. * Specify the events that should be dispatched instead of faked.
  7963. *
  7964. * @param array|string $eventsToDispatch
  7965. * @return \Illuminate\Support\Testing\Fakes\EventFake
  7966. * @static
  7967. */
  7968. public static function except($eventsToDispatch)
  7969. {
  7970. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7971. return $instance->except($eventsToDispatch);
  7972. }
  7973. /**
  7974. * Assert if an event has a listener attached to it.
  7975. *
  7976. * @param string $expectedEvent
  7977. * @param string|array $expectedListener
  7978. * @return void
  7979. * @static
  7980. */
  7981. public static function assertListening($expectedEvent, $expectedListener)
  7982. {
  7983. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7984. $instance->assertListening($expectedEvent, $expectedListener);
  7985. }
  7986. /**
  7987. * Assert if an event was dispatched based on a truth-test callback.
  7988. *
  7989. * @param string|\Closure $event
  7990. * @param callable|int|null $callback
  7991. * @return void
  7992. * @static
  7993. */
  7994. public static function assertDispatched($event, $callback = null)
  7995. {
  7996. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  7997. $instance->assertDispatched($event, $callback);
  7998. }
  7999. /**
  8000. * Assert if an event was dispatched a number of times.
  8001. *
  8002. * @param string $event
  8003. * @param int $times
  8004. * @return void
  8005. * @static
  8006. */
  8007. public static function assertDispatchedTimes($event, $times = 1)
  8008. {
  8009. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8010. $instance->assertDispatchedTimes($event, $times);
  8011. }
  8012. /**
  8013. * Determine if an event was dispatched based on a truth-test callback.
  8014. *
  8015. * @param string|\Closure $event
  8016. * @param callable|null $callback
  8017. * @return void
  8018. * @static
  8019. */
  8020. public static function assertNotDispatched($event, $callback = null)
  8021. {
  8022. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8023. $instance->assertNotDispatched($event, $callback);
  8024. }
  8025. /**
  8026. * Assert that no events were dispatched.
  8027. *
  8028. * @return void
  8029. * @static
  8030. */
  8031. public static function assertNothingDispatched()
  8032. {
  8033. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8034. $instance->assertNothingDispatched();
  8035. }
  8036. /**
  8037. * Get all of the events matching a truth-test callback.
  8038. *
  8039. * @param string $event
  8040. * @param callable|null $callback
  8041. * @return \Illuminate\Support\Collection
  8042. * @static
  8043. */
  8044. public static function dispatched($event, $callback = null)
  8045. {
  8046. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8047. return $instance->dispatched($event, $callback);
  8048. }
  8049. /**
  8050. * Determine if the given event has been dispatched.
  8051. *
  8052. * @param string $event
  8053. * @return bool
  8054. * @static
  8055. */
  8056. public static function hasDispatched($event)
  8057. {
  8058. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8059. return $instance->hasDispatched($event);
  8060. }
  8061. /**
  8062. * Get the events that have been dispatched.
  8063. *
  8064. * @return array
  8065. * @static
  8066. */
  8067. public static function dispatchedEvents()
  8068. {
  8069. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  8070. return $instance->dispatchedEvents();
  8071. }
  8072. }
  8073. /**
  8074. * @see \Illuminate\Filesystem\Filesystem
  8075. */
  8076. class File {
  8077. /**
  8078. * Determine if a file or directory exists.
  8079. *
  8080. * @param string $path
  8081. * @return bool
  8082. * @static
  8083. */
  8084. public static function exists($path)
  8085. {
  8086. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8087. return $instance->exists($path);
  8088. }
  8089. /**
  8090. * Determine if a file or directory is missing.
  8091. *
  8092. * @param string $path
  8093. * @return bool
  8094. * @static
  8095. */
  8096. public static function missing($path)
  8097. {
  8098. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8099. return $instance->missing($path);
  8100. }
  8101. /**
  8102. * Get the contents of a file.
  8103. *
  8104. * @param string $path
  8105. * @param bool $lock
  8106. * @return string
  8107. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8108. * @static
  8109. */
  8110. public static function get($path, $lock = false)
  8111. {
  8112. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8113. return $instance->get($path, $lock);
  8114. }
  8115. /**
  8116. * Get the contents of a file as decoded JSON.
  8117. *
  8118. * @param string $path
  8119. * @param int $flags
  8120. * @param bool $lock
  8121. * @return array
  8122. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8123. * @static
  8124. */
  8125. public static function json($path, $flags = 0, $lock = false)
  8126. {
  8127. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8128. return $instance->json($path, $flags, $lock);
  8129. }
  8130. /**
  8131. * Get contents of a file with shared access.
  8132. *
  8133. * @param string $path
  8134. * @return string
  8135. * @static
  8136. */
  8137. public static function sharedGet($path)
  8138. {
  8139. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8140. return $instance->sharedGet($path);
  8141. }
  8142. /**
  8143. * Get the returned value of a file.
  8144. *
  8145. * @param string $path
  8146. * @param array $data
  8147. * @return mixed
  8148. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8149. * @static
  8150. */
  8151. public static function getRequire($path, $data = [])
  8152. {
  8153. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8154. return $instance->getRequire($path, $data);
  8155. }
  8156. /**
  8157. * Require the given file once.
  8158. *
  8159. * @param string $path
  8160. * @param array $data
  8161. * @return mixed
  8162. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8163. * @static
  8164. */
  8165. public static function requireOnce($path, $data = [])
  8166. {
  8167. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8168. return $instance->requireOnce($path, $data);
  8169. }
  8170. /**
  8171. * Get the contents of a file one line at a time.
  8172. *
  8173. * @param string $path
  8174. * @return \Illuminate\Support\LazyCollection
  8175. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  8176. * @static
  8177. */
  8178. public static function lines($path)
  8179. {
  8180. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8181. return $instance->lines($path);
  8182. }
  8183. /**
  8184. * Get the hash of the file at the given path.
  8185. *
  8186. * @param string $path
  8187. * @param string $algorithm
  8188. * @return string|false
  8189. * @static
  8190. */
  8191. public static function hash($path, $algorithm = 'md5')
  8192. {
  8193. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8194. return $instance->hash($path, $algorithm);
  8195. }
  8196. /**
  8197. * Write the contents of a file.
  8198. *
  8199. * @param string $path
  8200. * @param string $contents
  8201. * @param bool $lock
  8202. * @return int|bool
  8203. * @static
  8204. */
  8205. public static function put($path, $contents, $lock = false)
  8206. {
  8207. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8208. return $instance->put($path, $contents, $lock);
  8209. }
  8210. /**
  8211. * Write the contents of a file, replacing it atomically if it already exists.
  8212. *
  8213. * @param string $path
  8214. * @param string $content
  8215. * @param int|null $mode
  8216. * @return void
  8217. * @static
  8218. */
  8219. public static function replace($path, $content, $mode = null)
  8220. {
  8221. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8222. $instance->replace($path, $content, $mode);
  8223. }
  8224. /**
  8225. * Replace a given string within a given file.
  8226. *
  8227. * @param array|string $search
  8228. * @param array|string $replace
  8229. * @param string $path
  8230. * @return void
  8231. * @static
  8232. */
  8233. public static function replaceInFile($search, $replace, $path)
  8234. {
  8235. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8236. $instance->replaceInFile($search, $replace, $path);
  8237. }
  8238. /**
  8239. * Prepend to a file.
  8240. *
  8241. * @param string $path
  8242. * @param string $data
  8243. * @return int
  8244. * @static
  8245. */
  8246. public static function prepend($path, $data)
  8247. {
  8248. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8249. return $instance->prepend($path, $data);
  8250. }
  8251. /**
  8252. * Append to a file.
  8253. *
  8254. * @param string $path
  8255. * @param string $data
  8256. * @param bool $lock
  8257. * @return int
  8258. * @static
  8259. */
  8260. public static function append($path, $data, $lock = false)
  8261. {
  8262. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8263. return $instance->append($path, $data, $lock);
  8264. }
  8265. /**
  8266. * Get or set UNIX mode of a file or directory.
  8267. *
  8268. * @param string $path
  8269. * @param int|null $mode
  8270. * @return mixed
  8271. * @static
  8272. */
  8273. public static function chmod($path, $mode = null)
  8274. {
  8275. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8276. return $instance->chmod($path, $mode);
  8277. }
  8278. /**
  8279. * Delete the file at a given path.
  8280. *
  8281. * @param string|array $paths
  8282. * @return bool
  8283. * @static
  8284. */
  8285. public static function delete($paths)
  8286. {
  8287. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8288. return $instance->delete($paths);
  8289. }
  8290. /**
  8291. * Move a file to a new location.
  8292. *
  8293. * @param string $path
  8294. * @param string $target
  8295. * @return bool
  8296. * @static
  8297. */
  8298. public static function move($path, $target)
  8299. {
  8300. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8301. return $instance->move($path, $target);
  8302. }
  8303. /**
  8304. * Copy a file to a new location.
  8305. *
  8306. * @param string $path
  8307. * @param string $target
  8308. * @return bool
  8309. * @static
  8310. */
  8311. public static function copy($path, $target)
  8312. {
  8313. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8314. return $instance->copy($path, $target);
  8315. }
  8316. /**
  8317. * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file.
  8318. *
  8319. * @param string $target
  8320. * @param string $link
  8321. * @return bool|null
  8322. * @static
  8323. */
  8324. public static function link($target, $link)
  8325. {
  8326. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8327. return $instance->link($target, $link);
  8328. }
  8329. /**
  8330. * Create a relative symlink to the target file or directory.
  8331. *
  8332. * @param string $target
  8333. * @param string $link
  8334. * @return void
  8335. * @throws \RuntimeException
  8336. * @static
  8337. */
  8338. public static function relativeLink($target, $link)
  8339. {
  8340. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8341. $instance->relativeLink($target, $link);
  8342. }
  8343. /**
  8344. * Extract the file name from a file path.
  8345. *
  8346. * @param string $path
  8347. * @return string
  8348. * @static
  8349. */
  8350. public static function name($path)
  8351. {
  8352. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8353. return $instance->name($path);
  8354. }
  8355. /**
  8356. * Extract the trailing name component from a file path.
  8357. *
  8358. * @param string $path
  8359. * @return string
  8360. * @static
  8361. */
  8362. public static function basename($path)
  8363. {
  8364. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8365. return $instance->basename($path);
  8366. }
  8367. /**
  8368. * Extract the parent directory from a file path.
  8369. *
  8370. * @param string $path
  8371. * @return string
  8372. * @static
  8373. */
  8374. public static function dirname($path)
  8375. {
  8376. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8377. return $instance->dirname($path);
  8378. }
  8379. /**
  8380. * Extract the file extension from a file path.
  8381. *
  8382. * @param string $path
  8383. * @return string
  8384. * @static
  8385. */
  8386. public static function extension($path)
  8387. {
  8388. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8389. return $instance->extension($path);
  8390. }
  8391. /**
  8392. * Guess the file extension from the mime-type of a given file.
  8393. *
  8394. * @param string $path
  8395. * @return string|null
  8396. * @throws \RuntimeException
  8397. * @static
  8398. */
  8399. public static function guessExtension($path)
  8400. {
  8401. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8402. return $instance->guessExtension($path);
  8403. }
  8404. /**
  8405. * Get the file type of a given file.
  8406. *
  8407. * @param string $path
  8408. * @return string
  8409. * @static
  8410. */
  8411. public static function type($path)
  8412. {
  8413. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8414. return $instance->type($path);
  8415. }
  8416. /**
  8417. * Get the mime-type of a given file.
  8418. *
  8419. * @param string $path
  8420. * @return string|false
  8421. * @static
  8422. */
  8423. public static function mimeType($path)
  8424. {
  8425. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8426. return $instance->mimeType($path);
  8427. }
  8428. /**
  8429. * Get the file size of a given file.
  8430. *
  8431. * @param string $path
  8432. * @return int
  8433. * @static
  8434. */
  8435. public static function size($path)
  8436. {
  8437. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8438. return $instance->size($path);
  8439. }
  8440. /**
  8441. * Get the file's last modification time.
  8442. *
  8443. * @param string $path
  8444. * @return int
  8445. * @static
  8446. */
  8447. public static function lastModified($path)
  8448. {
  8449. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8450. return $instance->lastModified($path);
  8451. }
  8452. /**
  8453. * Determine if the given path is a directory.
  8454. *
  8455. * @param string $directory
  8456. * @return bool
  8457. * @static
  8458. */
  8459. public static function isDirectory($directory)
  8460. {
  8461. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8462. return $instance->isDirectory($directory);
  8463. }
  8464. /**
  8465. * Determine if the given path is a directory that does not contain any other files or directories.
  8466. *
  8467. * @param string $directory
  8468. * @param bool $ignoreDotFiles
  8469. * @return bool
  8470. * @static
  8471. */
  8472. public static function isEmptyDirectory($directory, $ignoreDotFiles = false)
  8473. {
  8474. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8475. return $instance->isEmptyDirectory($directory, $ignoreDotFiles);
  8476. }
  8477. /**
  8478. * Determine if the given path is readable.
  8479. *
  8480. * @param string $path
  8481. * @return bool
  8482. * @static
  8483. */
  8484. public static function isReadable($path)
  8485. {
  8486. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8487. return $instance->isReadable($path);
  8488. }
  8489. /**
  8490. * Determine if the given path is writable.
  8491. *
  8492. * @param string $path
  8493. * @return bool
  8494. * @static
  8495. */
  8496. public static function isWritable($path)
  8497. {
  8498. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8499. return $instance->isWritable($path);
  8500. }
  8501. /**
  8502. * Determine if two files are the same by comparing their hashes.
  8503. *
  8504. * @param string $firstFile
  8505. * @param string $secondFile
  8506. * @return bool
  8507. * @static
  8508. */
  8509. public static function hasSameHash($firstFile, $secondFile)
  8510. {
  8511. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8512. return $instance->hasSameHash($firstFile, $secondFile);
  8513. }
  8514. /**
  8515. * Determine if the given path is a file.
  8516. *
  8517. * @param string $file
  8518. * @return bool
  8519. * @static
  8520. */
  8521. public static function isFile($file)
  8522. {
  8523. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8524. return $instance->isFile($file);
  8525. }
  8526. /**
  8527. * Find path names matching a given pattern.
  8528. *
  8529. * @param string $pattern
  8530. * @param int $flags
  8531. * @return array
  8532. * @static
  8533. */
  8534. public static function glob($pattern, $flags = 0)
  8535. {
  8536. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8537. return $instance->glob($pattern, $flags);
  8538. }
  8539. /**
  8540. * Get an array of all files in a directory.
  8541. *
  8542. * @param string $directory
  8543. * @param bool $hidden
  8544. * @return \Symfony\Component\Finder\SplFileInfo[]
  8545. * @static
  8546. */
  8547. public static function files($directory, $hidden = false)
  8548. {
  8549. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8550. return $instance->files($directory, $hidden);
  8551. }
  8552. /**
  8553. * Get all of the files from the given directory (recursive).
  8554. *
  8555. * @param string $directory
  8556. * @param bool $hidden
  8557. * @return \Symfony\Component\Finder\SplFileInfo[]
  8558. * @static
  8559. */
  8560. public static function allFiles($directory, $hidden = false)
  8561. {
  8562. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8563. return $instance->allFiles($directory, $hidden);
  8564. }
  8565. /**
  8566. * Get all of the directories within a given directory.
  8567. *
  8568. * @param string $directory
  8569. * @return array
  8570. * @static
  8571. */
  8572. public static function directories($directory)
  8573. {
  8574. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8575. return $instance->directories($directory);
  8576. }
  8577. /**
  8578. * Ensure a directory exists.
  8579. *
  8580. * @param string $path
  8581. * @param int $mode
  8582. * @param bool $recursive
  8583. * @return void
  8584. * @static
  8585. */
  8586. public static function ensureDirectoryExists($path, $mode = 493, $recursive = true)
  8587. {
  8588. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8589. $instance->ensureDirectoryExists($path, $mode, $recursive);
  8590. }
  8591. /**
  8592. * Create a directory.
  8593. *
  8594. * @param string $path
  8595. * @param int $mode
  8596. * @param bool $recursive
  8597. * @param bool $force
  8598. * @return bool
  8599. * @static
  8600. */
  8601. public static function makeDirectory($path, $mode = 493, $recursive = false, $force = false)
  8602. {
  8603. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8604. return $instance->makeDirectory($path, $mode, $recursive, $force);
  8605. }
  8606. /**
  8607. * Move a directory.
  8608. *
  8609. * @param string $from
  8610. * @param string $to
  8611. * @param bool $overwrite
  8612. * @return bool
  8613. * @static
  8614. */
  8615. public static function moveDirectory($from, $to, $overwrite = false)
  8616. {
  8617. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8618. return $instance->moveDirectory($from, $to, $overwrite);
  8619. }
  8620. /**
  8621. * Copy a directory from one location to another.
  8622. *
  8623. * @param string $directory
  8624. * @param string $destination
  8625. * @param int|null $options
  8626. * @return bool
  8627. * @static
  8628. */
  8629. public static function copyDirectory($directory, $destination, $options = null)
  8630. {
  8631. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8632. return $instance->copyDirectory($directory, $destination, $options);
  8633. }
  8634. /**
  8635. * Recursively delete a directory.
  8636. *
  8637. * The directory itself may be optionally preserved.
  8638. *
  8639. * @param string $directory
  8640. * @param bool $preserve
  8641. * @return bool
  8642. * @static
  8643. */
  8644. public static function deleteDirectory($directory, $preserve = false)
  8645. {
  8646. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8647. return $instance->deleteDirectory($directory, $preserve);
  8648. }
  8649. /**
  8650. * Remove all of the directories within a given directory.
  8651. *
  8652. * @param string $directory
  8653. * @return bool
  8654. * @static
  8655. */
  8656. public static function deleteDirectories($directory)
  8657. {
  8658. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8659. return $instance->deleteDirectories($directory);
  8660. }
  8661. /**
  8662. * Empty the specified directory of all files and folders.
  8663. *
  8664. * @param string $directory
  8665. * @return bool
  8666. * @static
  8667. */
  8668. public static function cleanDirectory($directory)
  8669. {
  8670. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8671. return $instance->cleanDirectory($directory);
  8672. }
  8673. /**
  8674. * Apply the callback if the given "value" is (or resolves to) truthy.
  8675. *
  8676. * @template TWhenParameter
  8677. * @template TWhenReturnType
  8678. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  8679. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  8680. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  8681. * @return $this|TWhenReturnType
  8682. * @static
  8683. */
  8684. public static function when($value = null, $callback = null, $default = null)
  8685. {
  8686. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8687. return $instance->when($value, $callback, $default);
  8688. }
  8689. /**
  8690. * Apply the callback if the given "value" is (or resolves to) falsy.
  8691. *
  8692. * @template TUnlessParameter
  8693. * @template TUnlessReturnType
  8694. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  8695. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  8696. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  8697. * @return $this|TUnlessReturnType
  8698. * @static
  8699. */
  8700. public static function unless($value = null, $callback = null, $default = null)
  8701. {
  8702. /** @var \Illuminate\Filesystem\Filesystem $instance */
  8703. return $instance->unless($value, $callback, $default);
  8704. }
  8705. /**
  8706. * Register a custom macro.
  8707. *
  8708. * @param string $name
  8709. * @param object|callable $macro
  8710. * @param-closure-this static $macro
  8711. * @return void
  8712. * @static
  8713. */
  8714. public static function macro($name, $macro)
  8715. {
  8716. \Illuminate\Filesystem\Filesystem::macro($name, $macro);
  8717. }
  8718. /**
  8719. * Mix another object into the class.
  8720. *
  8721. * @param object $mixin
  8722. * @param bool $replace
  8723. * @return void
  8724. * @throws \ReflectionException
  8725. * @static
  8726. */
  8727. public static function mixin($mixin, $replace = true)
  8728. {
  8729. \Illuminate\Filesystem\Filesystem::mixin($mixin, $replace);
  8730. }
  8731. /**
  8732. * Checks if macro is registered.
  8733. *
  8734. * @param string $name
  8735. * @return bool
  8736. * @static
  8737. */
  8738. public static function hasMacro($name)
  8739. {
  8740. return \Illuminate\Filesystem\Filesystem::hasMacro($name);
  8741. }
  8742. /**
  8743. * Flush the existing macros.
  8744. *
  8745. * @return void
  8746. * @static
  8747. */
  8748. public static function flushMacros()
  8749. {
  8750. \Illuminate\Filesystem\Filesystem::flushMacros();
  8751. }
  8752. }
  8753. /**
  8754. * @see \Illuminate\Auth\Access\Gate
  8755. */
  8756. class Gate {
  8757. /**
  8758. * Determine if a given ability has been defined.
  8759. *
  8760. * @param string|array $ability
  8761. * @return bool
  8762. * @static
  8763. */
  8764. public static function has($ability)
  8765. {
  8766. /** @var \Illuminate\Auth\Access\Gate $instance */
  8767. return $instance->has($ability);
  8768. }
  8769. /**
  8770. * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is false.
  8771. *
  8772. * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition
  8773. * @param string|null $message
  8774. * @param string|null $code
  8775. * @return \Illuminate\Auth\Access\Response
  8776. * @throws \Illuminate\Auth\Access\AuthorizationException
  8777. * @static
  8778. */
  8779. public static function allowIf($condition, $message = null, $code = null)
  8780. {
  8781. /** @var \Illuminate\Auth\Access\Gate $instance */
  8782. return $instance->allowIf($condition, $message, $code);
  8783. }
  8784. /**
  8785. * Perform an on-demand authorization check. Throw an authorization exception if the condition or callback is true.
  8786. *
  8787. * @param \Illuminate\Auth\Access\Response|\Closure|bool $condition
  8788. * @param string|null $message
  8789. * @param string|null $code
  8790. * @return \Illuminate\Auth\Access\Response
  8791. * @throws \Illuminate\Auth\Access\AuthorizationException
  8792. * @static
  8793. */
  8794. public static function denyIf($condition, $message = null, $code = null)
  8795. {
  8796. /** @var \Illuminate\Auth\Access\Gate $instance */
  8797. return $instance->denyIf($condition, $message, $code);
  8798. }
  8799. /**
  8800. * Define a new ability.
  8801. *
  8802. * @param \UnitEnum|string $ability
  8803. * @param callable|array|string $callback
  8804. * @return \Illuminate\Auth\Access\Gate
  8805. * @throws \InvalidArgumentException
  8806. * @static
  8807. */
  8808. public static function define($ability, $callback)
  8809. {
  8810. /** @var \Illuminate\Auth\Access\Gate $instance */
  8811. return $instance->define($ability, $callback);
  8812. }
  8813. /**
  8814. * Define abilities for a resource.
  8815. *
  8816. * @param string $name
  8817. * @param string $class
  8818. * @param array|null $abilities
  8819. * @return \Illuminate\Auth\Access\Gate
  8820. * @static
  8821. */
  8822. public static function resource($name, $class, $abilities = null)
  8823. {
  8824. /** @var \Illuminate\Auth\Access\Gate $instance */
  8825. return $instance->resource($name, $class, $abilities);
  8826. }
  8827. /**
  8828. * Define a policy class for a given class type.
  8829. *
  8830. * @param string $class
  8831. * @param string $policy
  8832. * @return \Illuminate\Auth\Access\Gate
  8833. * @static
  8834. */
  8835. public static function policy($class, $policy)
  8836. {
  8837. /** @var \Illuminate\Auth\Access\Gate $instance */
  8838. return $instance->policy($class, $policy);
  8839. }
  8840. /**
  8841. * Register a callback to run before all Gate checks.
  8842. *
  8843. * @param callable $callback
  8844. * @return \Illuminate\Auth\Access\Gate
  8845. * @static
  8846. */
  8847. public static function before($callback)
  8848. {
  8849. /** @var \Illuminate\Auth\Access\Gate $instance */
  8850. return $instance->before($callback);
  8851. }
  8852. /**
  8853. * Register a callback to run after all Gate checks.
  8854. *
  8855. * @param callable $callback
  8856. * @return \Illuminate\Auth\Access\Gate
  8857. * @static
  8858. */
  8859. public static function after($callback)
  8860. {
  8861. /** @var \Illuminate\Auth\Access\Gate $instance */
  8862. return $instance->after($callback);
  8863. }
  8864. /**
  8865. * Determine if all of the given abilities should be granted for the current user.
  8866. *
  8867. * @param iterable|\UnitEnum|string $ability
  8868. * @param array|mixed $arguments
  8869. * @return bool
  8870. * @static
  8871. */
  8872. public static function allows($ability, $arguments = [])
  8873. {
  8874. /** @var \Illuminate\Auth\Access\Gate $instance */
  8875. return $instance->allows($ability, $arguments);
  8876. }
  8877. /**
  8878. * Determine if any of the given abilities should be denied for the current user.
  8879. *
  8880. * @param iterable|\UnitEnum|string $ability
  8881. * @param array|mixed $arguments
  8882. * @return bool
  8883. * @static
  8884. */
  8885. public static function denies($ability, $arguments = [])
  8886. {
  8887. /** @var \Illuminate\Auth\Access\Gate $instance */
  8888. return $instance->denies($ability, $arguments);
  8889. }
  8890. /**
  8891. * Determine if all of the given abilities should be granted for the current user.
  8892. *
  8893. * @param iterable|\UnitEnum|string $abilities
  8894. * @param array|mixed $arguments
  8895. * @return bool
  8896. * @static
  8897. */
  8898. public static function check($abilities, $arguments = [])
  8899. {
  8900. /** @var \Illuminate\Auth\Access\Gate $instance */
  8901. return $instance->check($abilities, $arguments);
  8902. }
  8903. /**
  8904. * Determine if any one of the given abilities should be granted for the current user.
  8905. *
  8906. * @param iterable|\UnitEnum|string $abilities
  8907. * @param array|mixed $arguments
  8908. * @return bool
  8909. * @static
  8910. */
  8911. public static function any($abilities, $arguments = [])
  8912. {
  8913. /** @var \Illuminate\Auth\Access\Gate $instance */
  8914. return $instance->any($abilities, $arguments);
  8915. }
  8916. /**
  8917. * Determine if all of the given abilities should be denied for the current user.
  8918. *
  8919. * @param iterable|\UnitEnum|string $abilities
  8920. * @param array|mixed $arguments
  8921. * @return bool
  8922. * @static
  8923. */
  8924. public static function none($abilities, $arguments = [])
  8925. {
  8926. /** @var \Illuminate\Auth\Access\Gate $instance */
  8927. return $instance->none($abilities, $arguments);
  8928. }
  8929. /**
  8930. * Determine if the given ability should be granted for the current user.
  8931. *
  8932. * @param \UnitEnum|string $ability
  8933. * @param array|mixed $arguments
  8934. * @return \Illuminate\Auth\Access\Response
  8935. * @throws \Illuminate\Auth\Access\AuthorizationException
  8936. * @static
  8937. */
  8938. public static function authorize($ability, $arguments = [])
  8939. {
  8940. /** @var \Illuminate\Auth\Access\Gate $instance */
  8941. return $instance->authorize($ability, $arguments);
  8942. }
  8943. /**
  8944. * Inspect the user for the given ability.
  8945. *
  8946. * @param \UnitEnum|string $ability
  8947. * @param array|mixed $arguments
  8948. * @return \Illuminate\Auth\Access\Response
  8949. * @static
  8950. */
  8951. public static function inspect($ability, $arguments = [])
  8952. {
  8953. /** @var \Illuminate\Auth\Access\Gate $instance */
  8954. return $instance->inspect($ability, $arguments);
  8955. }
  8956. /**
  8957. * Get the raw result from the authorization callback.
  8958. *
  8959. * @param string $ability
  8960. * @param array|mixed $arguments
  8961. * @return mixed
  8962. * @throws \Illuminate\Auth\Access\AuthorizationException
  8963. * @static
  8964. */
  8965. public static function raw($ability, $arguments = [])
  8966. {
  8967. /** @var \Illuminate\Auth\Access\Gate $instance */
  8968. return $instance->raw($ability, $arguments);
  8969. }
  8970. /**
  8971. * Get a policy instance for a given class.
  8972. *
  8973. * @param object|string $class
  8974. * @return mixed
  8975. * @static
  8976. */
  8977. public static function getPolicyFor($class)
  8978. {
  8979. /** @var \Illuminate\Auth\Access\Gate $instance */
  8980. return $instance->getPolicyFor($class);
  8981. }
  8982. /**
  8983. * Specify a callback to be used to guess policy names.
  8984. *
  8985. * @param callable $callback
  8986. * @return \Illuminate\Auth\Access\Gate
  8987. * @static
  8988. */
  8989. public static function guessPolicyNamesUsing($callback)
  8990. {
  8991. /** @var \Illuminate\Auth\Access\Gate $instance */
  8992. return $instance->guessPolicyNamesUsing($callback);
  8993. }
  8994. /**
  8995. * Build a policy class instance of the given type.
  8996. *
  8997. * @param object|string $class
  8998. * @return mixed
  8999. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  9000. * @static
  9001. */
  9002. public static function resolvePolicy($class)
  9003. {
  9004. /** @var \Illuminate\Auth\Access\Gate $instance */
  9005. return $instance->resolvePolicy($class);
  9006. }
  9007. /**
  9008. * Get a gate instance for the given user.
  9009. *
  9010. * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user
  9011. * @return static
  9012. * @static
  9013. */
  9014. public static function forUser($user)
  9015. {
  9016. /** @var \Illuminate\Auth\Access\Gate $instance */
  9017. return $instance->forUser($user);
  9018. }
  9019. /**
  9020. * Get all of the defined abilities.
  9021. *
  9022. * @return array
  9023. * @static
  9024. */
  9025. public static function abilities()
  9026. {
  9027. /** @var \Illuminate\Auth\Access\Gate $instance */
  9028. return $instance->abilities();
  9029. }
  9030. /**
  9031. * Get all of the defined policies.
  9032. *
  9033. * @return array
  9034. * @static
  9035. */
  9036. public static function policies()
  9037. {
  9038. /** @var \Illuminate\Auth\Access\Gate $instance */
  9039. return $instance->policies();
  9040. }
  9041. /**
  9042. * Set the default denial response for gates and policies.
  9043. *
  9044. * @param \Illuminate\Auth\Access\Response $response
  9045. * @return \Illuminate\Auth\Access\Gate
  9046. * @static
  9047. */
  9048. public static function defaultDenialResponse($response)
  9049. {
  9050. /** @var \Illuminate\Auth\Access\Gate $instance */
  9051. return $instance->defaultDenialResponse($response);
  9052. }
  9053. /**
  9054. * Set the container instance used by the gate.
  9055. *
  9056. * @param \Illuminate\Contracts\Container\Container $container
  9057. * @return \Illuminate\Auth\Access\Gate
  9058. * @static
  9059. */
  9060. public static function setContainer($container)
  9061. {
  9062. /** @var \Illuminate\Auth\Access\Gate $instance */
  9063. return $instance->setContainer($container);
  9064. }
  9065. /**
  9066. * Deny with a HTTP status code.
  9067. *
  9068. * @param int $status
  9069. * @param string|null $message
  9070. * @param int|null $code
  9071. * @return \Illuminate\Auth\Access\Response
  9072. * @static
  9073. */
  9074. public static function denyWithStatus($status, $message = null, $code = null)
  9075. {
  9076. /** @var \Illuminate\Auth\Access\Gate $instance */
  9077. return $instance->denyWithStatus($status, $message, $code);
  9078. }
  9079. /**
  9080. * Deny with a 404 HTTP status code.
  9081. *
  9082. * @param string|null $message
  9083. * @param int|null $code
  9084. * @return \Illuminate\Auth\Access\Response
  9085. * @static
  9086. */
  9087. public static function denyAsNotFound($message = null, $code = null)
  9088. {
  9089. /** @var \Illuminate\Auth\Access\Gate $instance */
  9090. return $instance->denyAsNotFound($message, $code);
  9091. }
  9092. }
  9093. /**
  9094. * @see \Illuminate\Hashing\HashManager
  9095. * @see \Illuminate\Hashing\AbstractHasher
  9096. */
  9097. class Hash {
  9098. /**
  9099. * Create an instance of the Bcrypt hash Driver.
  9100. *
  9101. * @return \Illuminate\Hashing\BcryptHasher
  9102. * @static
  9103. */
  9104. public static function createBcryptDriver()
  9105. {
  9106. /** @var \Illuminate\Hashing\HashManager $instance */
  9107. return $instance->createBcryptDriver();
  9108. }
  9109. /**
  9110. * Create an instance of the Argon2i hash Driver.
  9111. *
  9112. * @return \Illuminate\Hashing\ArgonHasher
  9113. * @static
  9114. */
  9115. public static function createArgonDriver()
  9116. {
  9117. /** @var \Illuminate\Hashing\HashManager $instance */
  9118. return $instance->createArgonDriver();
  9119. }
  9120. /**
  9121. * Create an instance of the Argon2id hash Driver.
  9122. *
  9123. * @return \Illuminate\Hashing\Argon2IdHasher
  9124. * @static
  9125. */
  9126. public static function createArgon2idDriver()
  9127. {
  9128. /** @var \Illuminate\Hashing\HashManager $instance */
  9129. return $instance->createArgon2idDriver();
  9130. }
  9131. /**
  9132. * Get information about the given hashed value.
  9133. *
  9134. * @param string $hashedValue
  9135. * @return array
  9136. * @static
  9137. */
  9138. public static function info($hashedValue)
  9139. {
  9140. /** @var \Illuminate\Hashing\HashManager $instance */
  9141. return $instance->info($hashedValue);
  9142. }
  9143. /**
  9144. * Hash the given value.
  9145. *
  9146. * @param string $value
  9147. * @param array $options
  9148. * @return string
  9149. * @static
  9150. */
  9151. public static function make($value, $options = [])
  9152. {
  9153. /** @var \Illuminate\Hashing\HashManager $instance */
  9154. return $instance->make($value, $options);
  9155. }
  9156. /**
  9157. * Check the given plain value against a hash.
  9158. *
  9159. * @param string $value
  9160. * @param string $hashedValue
  9161. * @param array $options
  9162. * @return bool
  9163. * @static
  9164. */
  9165. public static function check($value, $hashedValue, $options = [])
  9166. {
  9167. /** @var \Illuminate\Hashing\HashManager $instance */
  9168. return $instance->check($value, $hashedValue, $options);
  9169. }
  9170. /**
  9171. * Check if the given hash has been hashed using the given options.
  9172. *
  9173. * @param string $hashedValue
  9174. * @param array $options
  9175. * @return bool
  9176. * @static
  9177. */
  9178. public static function needsRehash($hashedValue, $options = [])
  9179. {
  9180. /** @var \Illuminate\Hashing\HashManager $instance */
  9181. return $instance->needsRehash($hashedValue, $options);
  9182. }
  9183. /**
  9184. * Determine if a given string is already hashed.
  9185. *
  9186. * @param string $value
  9187. * @return bool
  9188. * @static
  9189. */
  9190. public static function isHashed($value)
  9191. {
  9192. /** @var \Illuminate\Hashing\HashManager $instance */
  9193. return $instance->isHashed($value);
  9194. }
  9195. /**
  9196. * Get the default driver name.
  9197. *
  9198. * @return string
  9199. * @static
  9200. */
  9201. public static function getDefaultDriver()
  9202. {
  9203. /** @var \Illuminate\Hashing\HashManager $instance */
  9204. return $instance->getDefaultDriver();
  9205. }
  9206. /**
  9207. * Verifies that the configuration is less than or equal to what is configured.
  9208. *
  9209. * @param array $value
  9210. * @return bool
  9211. * @internal
  9212. * @static
  9213. */
  9214. public static function verifyConfiguration($value)
  9215. {
  9216. /** @var \Illuminate\Hashing\HashManager $instance */
  9217. return $instance->verifyConfiguration($value);
  9218. }
  9219. /**
  9220. * Get a driver instance.
  9221. *
  9222. * @param string|null $driver
  9223. * @return mixed
  9224. * @throws \InvalidArgumentException
  9225. * @static
  9226. */
  9227. public static function driver($driver = null)
  9228. {
  9229. //Method inherited from \Illuminate\Support\Manager
  9230. /** @var \Illuminate\Hashing\HashManager $instance */
  9231. return $instance->driver($driver);
  9232. }
  9233. /**
  9234. * Register a custom driver creator Closure.
  9235. *
  9236. * @param string $driver
  9237. * @param \Closure $callback
  9238. * @return \Illuminate\Hashing\HashManager
  9239. * @static
  9240. */
  9241. public static function extend($driver, $callback)
  9242. {
  9243. //Method inherited from \Illuminate\Support\Manager
  9244. /** @var \Illuminate\Hashing\HashManager $instance */
  9245. return $instance->extend($driver, $callback);
  9246. }
  9247. /**
  9248. * Get all of the created "drivers".
  9249. *
  9250. * @return array
  9251. * @static
  9252. */
  9253. public static function getDrivers()
  9254. {
  9255. //Method inherited from \Illuminate\Support\Manager
  9256. /** @var \Illuminate\Hashing\HashManager $instance */
  9257. return $instance->getDrivers();
  9258. }
  9259. /**
  9260. * Get the container instance used by the manager.
  9261. *
  9262. * @return \Illuminate\Contracts\Container\Container
  9263. * @static
  9264. */
  9265. public static function getContainer()
  9266. {
  9267. //Method inherited from \Illuminate\Support\Manager
  9268. /** @var \Illuminate\Hashing\HashManager $instance */
  9269. return $instance->getContainer();
  9270. }
  9271. /**
  9272. * Set the container instance used by the manager.
  9273. *
  9274. * @param \Illuminate\Contracts\Container\Container $container
  9275. * @return \Illuminate\Hashing\HashManager
  9276. * @static
  9277. */
  9278. public static function setContainer($container)
  9279. {
  9280. //Method inherited from \Illuminate\Support\Manager
  9281. /** @var \Illuminate\Hashing\HashManager $instance */
  9282. return $instance->setContainer($container);
  9283. }
  9284. /**
  9285. * Forget all of the resolved driver instances.
  9286. *
  9287. * @return \Illuminate\Hashing\HashManager
  9288. * @static
  9289. */
  9290. public static function forgetDrivers()
  9291. {
  9292. //Method inherited from \Illuminate\Support\Manager
  9293. /** @var \Illuminate\Hashing\HashManager $instance */
  9294. return $instance->forgetDrivers();
  9295. }
  9296. }
  9297. /**
  9298. * @method static \Illuminate\Http\Client\PendingRequest baseUrl(string $url)
  9299. * @method static \Illuminate\Http\Client\PendingRequest withBody(\Psr\Http\Message\StreamInterface|string $content, string $contentType = 'application/json')
  9300. * @method static \Illuminate\Http\Client\PendingRequest asJson()
  9301. * @method static \Illuminate\Http\Client\PendingRequest asForm()
  9302. * @method static \Illuminate\Http\Client\PendingRequest attach(string|array $name, string|resource $contents = '', string|null $filename = null, array $headers = [])
  9303. * @method static \Illuminate\Http\Client\PendingRequest asMultipart()
  9304. * @method static \Illuminate\Http\Client\PendingRequest bodyFormat(string $format)
  9305. * @method static \Illuminate\Http\Client\PendingRequest withQueryParameters(array $parameters)
  9306. * @method static \Illuminate\Http\Client\PendingRequest contentType(string $contentType)
  9307. * @method static \Illuminate\Http\Client\PendingRequest acceptJson()
  9308. * @method static \Illuminate\Http\Client\PendingRequest accept(string $contentType)
  9309. * @method static \Illuminate\Http\Client\PendingRequest withHeaders(array $headers)
  9310. * @method static \Illuminate\Http\Client\PendingRequest withHeader(string $name, mixed $value)
  9311. * @method static \Illuminate\Http\Client\PendingRequest replaceHeaders(array $headers)
  9312. * @method static \Illuminate\Http\Client\PendingRequest withBasicAuth(string $username, string $password)
  9313. * @method static \Illuminate\Http\Client\PendingRequest withDigestAuth(string $username, string $password)
  9314. * @method static \Illuminate\Http\Client\PendingRequest withToken(string $token, string $type = 'Bearer')
  9315. * @method static \Illuminate\Http\Client\PendingRequest withUserAgent(string|bool $userAgent)
  9316. * @method static \Illuminate\Http\Client\PendingRequest withUrlParameters(array $parameters = [])
  9317. * @method static \Illuminate\Http\Client\PendingRequest withCookies(array $cookies, string $domain)
  9318. * @method static \Illuminate\Http\Client\PendingRequest maxRedirects(int $max)
  9319. * @method static \Illuminate\Http\Client\PendingRequest withoutRedirecting()
  9320. * @method static \Illuminate\Http\Client\PendingRequest withoutVerifying()
  9321. * @method static \Illuminate\Http\Client\PendingRequest sink(string|resource $to)
  9322. * @method static \Illuminate\Http\Client\PendingRequest timeout(int|float $seconds)
  9323. * @method static \Illuminate\Http\Client\PendingRequest connectTimeout(int|float $seconds)
  9324. * @method static \Illuminate\Http\Client\PendingRequest retry(array|int $times, \Closure|int $sleepMilliseconds = 0, callable|null $when = null, bool $throw = true)
  9325. * @method static \Illuminate\Http\Client\PendingRequest withOptions(array $options)
  9326. * @method static \Illuminate\Http\Client\PendingRequest withMiddleware(callable $middleware)
  9327. * @method static \Illuminate\Http\Client\PendingRequest withRequestMiddleware(callable $middleware)
  9328. * @method static \Illuminate\Http\Client\PendingRequest withResponseMiddleware(callable $middleware)
  9329. * @method static \Illuminate\Http\Client\PendingRequest beforeSending(callable $callback)
  9330. * @method static \Illuminate\Http\Client\PendingRequest throw(callable|null $callback = null)
  9331. * @method static \Illuminate\Http\Client\PendingRequest throwIf(callable|bool $condition)
  9332. * @method static \Illuminate\Http\Client\PendingRequest throwUnless(callable|bool $condition)
  9333. * @method static \Illuminate\Http\Client\PendingRequest dump()
  9334. * @method static \Illuminate\Http\Client\PendingRequest dd()
  9335. * @method static \Illuminate\Http\Client\Response get(string $url, array|string|null $query = null)
  9336. * @method static \Illuminate\Http\Client\Response head(string $url, array|string|null $query = null)
  9337. * @method static \Illuminate\Http\Client\Response post(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9338. * @method static \Illuminate\Http\Client\Response patch(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9339. * @method static \Illuminate\Http\Client\Response put(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9340. * @method static \Illuminate\Http\Client\Response delete(string $url, array|\JsonSerializable|\Illuminate\Contracts\Support\Arrayable $data = [])
  9341. * @method static array pool(callable $callback)
  9342. * @method static \Illuminate\Http\Client\Response send(string $method, string $url, array $options = [])
  9343. * @method static \GuzzleHttp\Client buildClient()
  9344. * @method static \GuzzleHttp\Client createClient(\GuzzleHttp\HandlerStack $handlerStack)
  9345. * @method static \GuzzleHttp\HandlerStack buildHandlerStack()
  9346. * @method static \GuzzleHttp\HandlerStack pushHandlers(\GuzzleHttp\HandlerStack $handlerStack)
  9347. * @method static \Closure buildBeforeSendingHandler()
  9348. * @method static \Closure buildRecorderHandler()
  9349. * @method static \Closure buildStubHandler()
  9350. * @method static \GuzzleHttp\Psr7\RequestInterface runBeforeSendingCallbacks(\GuzzleHttp\Psr7\RequestInterface $request, array $options)
  9351. * @method static array mergeOptions(array ...$options)
  9352. * @method static \Illuminate\Http\Client\PendingRequest stub(callable $callback)
  9353. * @method static \Illuminate\Http\Client\PendingRequest async(bool $async = true)
  9354. * @method static \GuzzleHttp\Promise\PromiseInterface|null getPromise()
  9355. * @method static \Illuminate\Http\Client\PendingRequest truncateExceptionsAt(int $length)
  9356. * @method static \Illuminate\Http\Client\PendingRequest dontTruncateExceptions()
  9357. * @method static \Illuminate\Http\Client\PendingRequest setClient(\GuzzleHttp\Client $client)
  9358. * @method static \Illuminate\Http\Client\PendingRequest setHandler(callable $handler)
  9359. * @method static array getOptions()
  9360. * @method static \Illuminate\Http\Client\PendingRequest|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  9361. * @method static \Illuminate\Http\Client\PendingRequest|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  9362. * @see \Illuminate\Http\Client\Factory
  9363. */
  9364. class Http {
  9365. /**
  9366. * Add middleware to apply to every request.
  9367. *
  9368. * @param callable $middleware
  9369. * @return \Illuminate\Http\Client\Factory
  9370. * @static
  9371. */
  9372. public static function globalMiddleware($middleware)
  9373. {
  9374. /** @var \Illuminate\Http\Client\Factory $instance */
  9375. return $instance->globalMiddleware($middleware);
  9376. }
  9377. /**
  9378. * Add request middleware to apply to every request.
  9379. *
  9380. * @param callable $middleware
  9381. * @return \Illuminate\Http\Client\Factory
  9382. * @static
  9383. */
  9384. public static function globalRequestMiddleware($middleware)
  9385. {
  9386. /** @var \Illuminate\Http\Client\Factory $instance */
  9387. return $instance->globalRequestMiddleware($middleware);
  9388. }
  9389. /**
  9390. * Add response middleware to apply to every request.
  9391. *
  9392. * @param callable $middleware
  9393. * @return \Illuminate\Http\Client\Factory
  9394. * @static
  9395. */
  9396. public static function globalResponseMiddleware($middleware)
  9397. {
  9398. /** @var \Illuminate\Http\Client\Factory $instance */
  9399. return $instance->globalResponseMiddleware($middleware);
  9400. }
  9401. /**
  9402. * Set the options to apply to every request.
  9403. *
  9404. * @param \Closure|array $options
  9405. * @return \Illuminate\Http\Client\Factory
  9406. * @static
  9407. */
  9408. public static function globalOptions($options)
  9409. {
  9410. /** @var \Illuminate\Http\Client\Factory $instance */
  9411. return $instance->globalOptions($options);
  9412. }
  9413. /**
  9414. * Create a new response instance for use during stubbing.
  9415. *
  9416. * @param array|string|null $body
  9417. * @param int $status
  9418. * @param array $headers
  9419. * @return \GuzzleHttp\Promise\PromiseInterface
  9420. * @static
  9421. */
  9422. public static function response($body = null, $status = 200, $headers = [])
  9423. {
  9424. return \Illuminate\Http\Client\Factory::response($body, $status, $headers);
  9425. }
  9426. /**
  9427. * Create a new PSR-7 response instance for use during stubbing.
  9428. *
  9429. * @param array|string|null $body
  9430. * @param int $status
  9431. * @param array<string, mixed> $headers
  9432. * @return \GuzzleHttp\Psr7\Response
  9433. * @static
  9434. */
  9435. public static function psr7Response($body = null, $status = 200, $headers = [])
  9436. {
  9437. return \Illuminate\Http\Client\Factory::psr7Response($body, $status, $headers);
  9438. }
  9439. /**
  9440. * Create a new RequestException instance for use during stubbing.
  9441. *
  9442. * @param array|string|null $body
  9443. * @param int $status
  9444. * @param array<string, mixed> $headers
  9445. * @return \Illuminate\Http\Client\RequestException
  9446. * @static
  9447. */
  9448. public static function failedRequest($body = null, $status = 200, $headers = [])
  9449. {
  9450. return \Illuminate\Http\Client\Factory::failedRequest($body, $status, $headers);
  9451. }
  9452. /**
  9453. * Create a new connection exception for use during stubbing.
  9454. *
  9455. * @param string|null $message
  9456. * @return \Closure(\Illuminate\Http\Client\Request): \GuzzleHttp\Promise\PromiseInterface
  9457. * @static
  9458. */
  9459. public static function failedConnection($message = null)
  9460. {
  9461. return \Illuminate\Http\Client\Factory::failedConnection($message);
  9462. }
  9463. /**
  9464. * Get an invokable object that returns a sequence of responses in order for use during stubbing.
  9465. *
  9466. * @param array $responses
  9467. * @return \Illuminate\Http\Client\ResponseSequence
  9468. * @static
  9469. */
  9470. public static function sequence($responses = [])
  9471. {
  9472. /** @var \Illuminate\Http\Client\Factory $instance */
  9473. return $instance->sequence($responses);
  9474. }
  9475. /**
  9476. * Register a stub callable that will intercept requests and be able to return stub responses.
  9477. *
  9478. * @param callable|array<string, mixed>|null $callback
  9479. * @return \Illuminate\Http\Client\Factory
  9480. * @static
  9481. */
  9482. public static function fake($callback = null)
  9483. {
  9484. /** @var \Illuminate\Http\Client\Factory $instance */
  9485. return $instance->fake($callback);
  9486. }
  9487. /**
  9488. * Register a response sequence for the given URL pattern.
  9489. *
  9490. * @param string $url
  9491. * @return \Illuminate\Http\Client\ResponseSequence
  9492. * @static
  9493. */
  9494. public static function fakeSequence($url = '*')
  9495. {
  9496. /** @var \Illuminate\Http\Client\Factory $instance */
  9497. return $instance->fakeSequence($url);
  9498. }
  9499. /**
  9500. * Stub the given URL using the given callback.
  9501. *
  9502. * @param string $url
  9503. * @param \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface|callable|int|string|array|\Illuminate\Http\Client\ResponseSequence $callback
  9504. * @return \Illuminate\Http\Client\Factory
  9505. * @static
  9506. */
  9507. public static function stubUrl($url, $callback)
  9508. {
  9509. /** @var \Illuminate\Http\Client\Factory $instance */
  9510. return $instance->stubUrl($url, $callback);
  9511. }
  9512. /**
  9513. * Indicate that an exception should be thrown if any request is not faked.
  9514. *
  9515. * @param bool $prevent
  9516. * @return \Illuminate\Http\Client\Factory
  9517. * @static
  9518. */
  9519. public static function preventStrayRequests($prevent = true)
  9520. {
  9521. /** @var \Illuminate\Http\Client\Factory $instance */
  9522. return $instance->preventStrayRequests($prevent);
  9523. }
  9524. /**
  9525. * Determine if stray requests are being prevented.
  9526. *
  9527. * @return bool
  9528. * @static
  9529. */
  9530. public static function preventingStrayRequests()
  9531. {
  9532. /** @var \Illuminate\Http\Client\Factory $instance */
  9533. return $instance->preventingStrayRequests();
  9534. }
  9535. /**
  9536. * Indicate that an exception should not be thrown if any request is not faked.
  9537. *
  9538. * @return \Illuminate\Http\Client\Factory
  9539. * @static
  9540. */
  9541. public static function allowStrayRequests()
  9542. {
  9543. /** @var \Illuminate\Http\Client\Factory $instance */
  9544. return $instance->allowStrayRequests();
  9545. }
  9546. /**
  9547. * Begin recording request / response pairs.
  9548. *
  9549. * @return \Illuminate\Http\Client\Factory
  9550. * @static
  9551. */
  9552. public static function record()
  9553. {
  9554. /** @var \Illuminate\Http\Client\Factory $instance */
  9555. return $instance->record();
  9556. }
  9557. /**
  9558. * Record a request response pair.
  9559. *
  9560. * @param \Illuminate\Http\Client\Request $request
  9561. * @param \Illuminate\Http\Client\Response|null $response
  9562. * @return void
  9563. * @static
  9564. */
  9565. public static function recordRequestResponsePair($request, $response)
  9566. {
  9567. /** @var \Illuminate\Http\Client\Factory $instance */
  9568. $instance->recordRequestResponsePair($request, $response);
  9569. }
  9570. /**
  9571. * Assert that a request / response pair was recorded matching a given truth test.
  9572. *
  9573. * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
  9574. * @return void
  9575. * @static
  9576. */
  9577. public static function assertSent($callback)
  9578. {
  9579. /** @var \Illuminate\Http\Client\Factory $instance */
  9580. $instance->assertSent($callback);
  9581. }
  9582. /**
  9583. * Assert that the given request was sent in the given order.
  9584. *
  9585. * @param list<string|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)|callable> $callbacks
  9586. * @return void
  9587. * @static
  9588. */
  9589. public static function assertSentInOrder($callbacks)
  9590. {
  9591. /** @var \Illuminate\Http\Client\Factory $instance */
  9592. $instance->assertSentInOrder($callbacks);
  9593. }
  9594. /**
  9595. * Assert that a request / response pair was not recorded matching a given truth test.
  9596. *
  9597. * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
  9598. * @return void
  9599. * @static
  9600. */
  9601. public static function assertNotSent($callback)
  9602. {
  9603. /** @var \Illuminate\Http\Client\Factory $instance */
  9604. $instance->assertNotSent($callback);
  9605. }
  9606. /**
  9607. * Assert that no request / response pair was recorded.
  9608. *
  9609. * @return void
  9610. * @static
  9611. */
  9612. public static function assertNothingSent()
  9613. {
  9614. /** @var \Illuminate\Http\Client\Factory $instance */
  9615. $instance->assertNothingSent();
  9616. }
  9617. /**
  9618. * Assert how many requests have been recorded.
  9619. *
  9620. * @param int $count
  9621. * @return void
  9622. * @static
  9623. */
  9624. public static function assertSentCount($count)
  9625. {
  9626. /** @var \Illuminate\Http\Client\Factory $instance */
  9627. $instance->assertSentCount($count);
  9628. }
  9629. /**
  9630. * Assert that every created response sequence is empty.
  9631. *
  9632. * @return void
  9633. * @static
  9634. */
  9635. public static function assertSequencesAreEmpty()
  9636. {
  9637. /** @var \Illuminate\Http\Client\Factory $instance */
  9638. $instance->assertSequencesAreEmpty();
  9639. }
  9640. /**
  9641. * Get a collection of the request / response pairs matching the given truth test.
  9642. *
  9643. * @param (\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)|callable $callback
  9644. * @return \Illuminate\Support\Collection<int, array{0: \Illuminate\Http\Client\Request, 1: \Illuminate\Http\Client\Response|null}>
  9645. * @static
  9646. */
  9647. public static function recorded($callback = null)
  9648. {
  9649. /** @var \Illuminate\Http\Client\Factory $instance */
  9650. return $instance->recorded($callback);
  9651. }
  9652. /**
  9653. * Create a new pending request instance for this factory.
  9654. *
  9655. * @return \Illuminate\Http\Client\PendingRequest
  9656. * @static
  9657. */
  9658. public static function createPendingRequest()
  9659. {
  9660. /** @var \Illuminate\Http\Client\Factory $instance */
  9661. return $instance->createPendingRequest();
  9662. }
  9663. /**
  9664. * Get the current event dispatcher implementation.
  9665. *
  9666. * @return \Illuminate\Contracts\Events\Dispatcher|null
  9667. * @static
  9668. */
  9669. public static function getDispatcher()
  9670. {
  9671. /** @var \Illuminate\Http\Client\Factory $instance */
  9672. return $instance->getDispatcher();
  9673. }
  9674. /**
  9675. * Get the array of global middleware.
  9676. *
  9677. * @return array
  9678. * @static
  9679. */
  9680. public static function getGlobalMiddleware()
  9681. {
  9682. /** @var \Illuminate\Http\Client\Factory $instance */
  9683. return $instance->getGlobalMiddleware();
  9684. }
  9685. /**
  9686. * Register a custom macro.
  9687. *
  9688. * @param string $name
  9689. * @param object|callable $macro
  9690. * @param-closure-this static $macro
  9691. * @return void
  9692. * @static
  9693. */
  9694. public static function macro($name, $macro)
  9695. {
  9696. \Illuminate\Http\Client\Factory::macro($name, $macro);
  9697. }
  9698. /**
  9699. * Mix another object into the class.
  9700. *
  9701. * @param object $mixin
  9702. * @param bool $replace
  9703. * @return void
  9704. * @throws \ReflectionException
  9705. * @static
  9706. */
  9707. public static function mixin($mixin, $replace = true)
  9708. {
  9709. \Illuminate\Http\Client\Factory::mixin($mixin, $replace);
  9710. }
  9711. /**
  9712. * Checks if macro is registered.
  9713. *
  9714. * @param string $name
  9715. * @return bool
  9716. * @static
  9717. */
  9718. public static function hasMacro($name)
  9719. {
  9720. return \Illuminate\Http\Client\Factory::hasMacro($name);
  9721. }
  9722. /**
  9723. * Flush the existing macros.
  9724. *
  9725. * @return void
  9726. * @static
  9727. */
  9728. public static function flushMacros()
  9729. {
  9730. \Illuminate\Http\Client\Factory::flushMacros();
  9731. }
  9732. /**
  9733. * Dynamically handle calls to the class.
  9734. *
  9735. * @param string $method
  9736. * @param array $parameters
  9737. * @return mixed
  9738. * @throws \BadMethodCallException
  9739. * @static
  9740. */
  9741. public static function macroCall($method, $parameters)
  9742. {
  9743. /** @var \Illuminate\Http\Client\Factory $instance */
  9744. return $instance->macroCall($method, $parameters);
  9745. }
  9746. }
  9747. /**
  9748. * @see \Illuminate\Translation\Translator
  9749. */
  9750. class Lang {
  9751. /**
  9752. * Determine if a translation exists for a given locale.
  9753. *
  9754. * @param string $key
  9755. * @param string|null $locale
  9756. * @return bool
  9757. * @static
  9758. */
  9759. public static function hasForLocale($key, $locale = null)
  9760. {
  9761. /** @var \Illuminate\Translation\Translator $instance */
  9762. return $instance->hasForLocale($key, $locale);
  9763. }
  9764. /**
  9765. * Determine if a translation exists.
  9766. *
  9767. * @param string $key
  9768. * @param string|null $locale
  9769. * @param bool $fallback
  9770. * @return bool
  9771. * @static
  9772. */
  9773. public static function has($key, $locale = null, $fallback = true)
  9774. {
  9775. /** @var \Illuminate\Translation\Translator $instance */
  9776. return $instance->has($key, $locale, $fallback);
  9777. }
  9778. /**
  9779. * Get the translation for the given key.
  9780. *
  9781. * @param string $key
  9782. * @param array $replace
  9783. * @param string|null $locale
  9784. * @param bool $fallback
  9785. * @return string|array
  9786. * @static
  9787. */
  9788. public static function get($key, $replace = [], $locale = null, $fallback = true)
  9789. {
  9790. /** @var \Illuminate\Translation\Translator $instance */
  9791. return $instance->get($key, $replace, $locale, $fallback);
  9792. }
  9793. /**
  9794. * Get a translation according to an integer value.
  9795. *
  9796. * @param string $key
  9797. * @param \Countable|int|float|array $number
  9798. * @param array $replace
  9799. * @param string|null $locale
  9800. * @return string
  9801. * @static
  9802. */
  9803. public static function choice($key, $number, $replace = [], $locale = null)
  9804. {
  9805. /** @var \Illuminate\Translation\Translator $instance */
  9806. return $instance->choice($key, $number, $replace, $locale);
  9807. }
  9808. /**
  9809. * Add translation lines to the given locale.
  9810. *
  9811. * @param array $lines
  9812. * @param string $locale
  9813. * @param string $namespace
  9814. * @return void
  9815. * @static
  9816. */
  9817. public static function addLines($lines, $locale, $namespace = '*')
  9818. {
  9819. /** @var \Illuminate\Translation\Translator $instance */
  9820. $instance->addLines($lines, $locale, $namespace);
  9821. }
  9822. /**
  9823. * Load the specified language group.
  9824. *
  9825. * @param string $namespace
  9826. * @param string $group
  9827. * @param string $locale
  9828. * @return void
  9829. * @static
  9830. */
  9831. public static function load($namespace, $group, $locale)
  9832. {
  9833. /** @var \Illuminate\Translation\Translator $instance */
  9834. $instance->load($namespace, $group, $locale);
  9835. }
  9836. /**
  9837. * Register a callback that is responsible for handling missing translation keys.
  9838. *
  9839. * @param callable|null $callback
  9840. * @return static
  9841. * @static
  9842. */
  9843. public static function handleMissingKeysUsing($callback)
  9844. {
  9845. /** @var \Illuminate\Translation\Translator $instance */
  9846. return $instance->handleMissingKeysUsing($callback);
  9847. }
  9848. /**
  9849. * Add a new namespace to the loader.
  9850. *
  9851. * @param string $namespace
  9852. * @param string $hint
  9853. * @return void
  9854. * @static
  9855. */
  9856. public static function addNamespace($namespace, $hint)
  9857. {
  9858. /** @var \Illuminate\Translation\Translator $instance */
  9859. $instance->addNamespace($namespace, $hint);
  9860. }
  9861. /**
  9862. * Add a new path to the loader.
  9863. *
  9864. * @param string $path
  9865. * @return void
  9866. * @static
  9867. */
  9868. public static function addPath($path)
  9869. {
  9870. /** @var \Illuminate\Translation\Translator $instance */
  9871. $instance->addPath($path);
  9872. }
  9873. /**
  9874. * Add a new JSON path to the loader.
  9875. *
  9876. * @param string $path
  9877. * @return void
  9878. * @static
  9879. */
  9880. public static function addJsonPath($path)
  9881. {
  9882. /** @var \Illuminate\Translation\Translator $instance */
  9883. $instance->addJsonPath($path);
  9884. }
  9885. /**
  9886. * Parse a key into namespace, group, and item.
  9887. *
  9888. * @param string $key
  9889. * @return array
  9890. * @static
  9891. */
  9892. public static function parseKey($key)
  9893. {
  9894. /** @var \Illuminate\Translation\Translator $instance */
  9895. return $instance->parseKey($key);
  9896. }
  9897. /**
  9898. * Specify a callback that should be invoked to determined the applicable locale array.
  9899. *
  9900. * @param callable $callback
  9901. * @return void
  9902. * @static
  9903. */
  9904. public static function determineLocalesUsing($callback)
  9905. {
  9906. /** @var \Illuminate\Translation\Translator $instance */
  9907. $instance->determineLocalesUsing($callback);
  9908. }
  9909. /**
  9910. * Get the message selector instance.
  9911. *
  9912. * @return \Illuminate\Translation\MessageSelector
  9913. * @static
  9914. */
  9915. public static function getSelector()
  9916. {
  9917. /** @var \Illuminate\Translation\Translator $instance */
  9918. return $instance->getSelector();
  9919. }
  9920. /**
  9921. * Set the message selector instance.
  9922. *
  9923. * @param \Illuminate\Translation\MessageSelector $selector
  9924. * @return void
  9925. * @static
  9926. */
  9927. public static function setSelector($selector)
  9928. {
  9929. /** @var \Illuminate\Translation\Translator $instance */
  9930. $instance->setSelector($selector);
  9931. }
  9932. /**
  9933. * Get the language line loader implementation.
  9934. *
  9935. * @return \Illuminate\Contracts\Translation\Loader
  9936. * @static
  9937. */
  9938. public static function getLoader()
  9939. {
  9940. /** @var \Illuminate\Translation\Translator $instance */
  9941. return $instance->getLoader();
  9942. }
  9943. /**
  9944. * Get the default locale being used.
  9945. *
  9946. * @return string
  9947. * @static
  9948. */
  9949. public static function locale()
  9950. {
  9951. /** @var \Illuminate\Translation\Translator $instance */
  9952. return $instance->locale();
  9953. }
  9954. /**
  9955. * Get the default locale being used.
  9956. *
  9957. * @return string
  9958. * @static
  9959. */
  9960. public static function getLocale()
  9961. {
  9962. /** @var \Illuminate\Translation\Translator $instance */
  9963. return $instance->getLocale();
  9964. }
  9965. /**
  9966. * Set the default locale.
  9967. *
  9968. * @param string $locale
  9969. * @return void
  9970. * @throws \InvalidArgumentException
  9971. * @static
  9972. */
  9973. public static function setLocale($locale)
  9974. {
  9975. /** @var \Illuminate\Translation\Translator $instance */
  9976. $instance->setLocale($locale);
  9977. }
  9978. /**
  9979. * Get the fallback locale being used.
  9980. *
  9981. * @return string
  9982. * @static
  9983. */
  9984. public static function getFallback()
  9985. {
  9986. /** @var \Illuminate\Translation\Translator $instance */
  9987. return $instance->getFallback();
  9988. }
  9989. /**
  9990. * Set the fallback locale being used.
  9991. *
  9992. * @param string $fallback
  9993. * @return void
  9994. * @static
  9995. */
  9996. public static function setFallback($fallback)
  9997. {
  9998. /** @var \Illuminate\Translation\Translator $instance */
  9999. $instance->setFallback($fallback);
  10000. }
  10001. /**
  10002. * Set the loaded translation groups.
  10003. *
  10004. * @param array $loaded
  10005. * @return void
  10006. * @static
  10007. */
  10008. public static function setLoaded($loaded)
  10009. {
  10010. /** @var \Illuminate\Translation\Translator $instance */
  10011. $instance->setLoaded($loaded);
  10012. }
  10013. /**
  10014. * Add a handler to be executed in order to format a given class to a string during translation replacements.
  10015. *
  10016. * @param callable|string $class
  10017. * @param callable|null $handler
  10018. * @return void
  10019. * @static
  10020. */
  10021. public static function stringable($class, $handler = null)
  10022. {
  10023. /** @var \Illuminate\Translation\Translator $instance */
  10024. $instance->stringable($class, $handler);
  10025. }
  10026. /**
  10027. * Set the parsed value of a key.
  10028. *
  10029. * @param string $key
  10030. * @param array $parsed
  10031. * @return void
  10032. * @static
  10033. */
  10034. public static function setParsedKey($key, $parsed)
  10035. {
  10036. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  10037. /** @var \Illuminate\Translation\Translator $instance */
  10038. $instance->setParsedKey($key, $parsed);
  10039. }
  10040. /**
  10041. * Flush the cache of parsed keys.
  10042. *
  10043. * @return void
  10044. * @static
  10045. */
  10046. public static function flushParsedKeys()
  10047. {
  10048. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  10049. /** @var \Illuminate\Translation\Translator $instance */
  10050. $instance->flushParsedKeys();
  10051. }
  10052. /**
  10053. * Register a custom macro.
  10054. *
  10055. * @param string $name
  10056. * @param object|callable $macro
  10057. * @param-closure-this static $macro
  10058. * @return void
  10059. * @static
  10060. */
  10061. public static function macro($name, $macro)
  10062. {
  10063. \Illuminate\Translation\Translator::macro($name, $macro);
  10064. }
  10065. /**
  10066. * Mix another object into the class.
  10067. *
  10068. * @param object $mixin
  10069. * @param bool $replace
  10070. * @return void
  10071. * @throws \ReflectionException
  10072. * @static
  10073. */
  10074. public static function mixin($mixin, $replace = true)
  10075. {
  10076. \Illuminate\Translation\Translator::mixin($mixin, $replace);
  10077. }
  10078. /**
  10079. * Checks if macro is registered.
  10080. *
  10081. * @param string $name
  10082. * @return bool
  10083. * @static
  10084. */
  10085. public static function hasMacro($name)
  10086. {
  10087. return \Illuminate\Translation\Translator::hasMacro($name);
  10088. }
  10089. /**
  10090. * Flush the existing macros.
  10091. *
  10092. * @return void
  10093. * @static
  10094. */
  10095. public static function flushMacros()
  10096. {
  10097. \Illuminate\Translation\Translator::flushMacros();
  10098. }
  10099. }
  10100. /**
  10101. * @method static void write(string $level, \Illuminate\Contracts\Support\Arrayable|\Illuminate\Contracts\Support\Jsonable|\Illuminate\Support\Stringable|array|string $message, array $context = [])
  10102. * @method static \Illuminate\Log\Logger withContext(array $context = [])
  10103. * @method static void listen(\Closure $callback)
  10104. * @method static \Psr\Log\LoggerInterface getLogger()
  10105. * @method static \Illuminate\Contracts\Events\Dispatcher getEventDispatcher()
  10106. * @method static void setEventDispatcher(\Illuminate\Contracts\Events\Dispatcher $dispatcher)
  10107. * @method static \Illuminate\Log\Logger|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  10108. * @method static \Illuminate\Log\Logger|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  10109. * @see \Illuminate\Log\LogManager
  10110. */
  10111. class Log {
  10112. /**
  10113. * Build an on-demand log channel.
  10114. *
  10115. * @param array $config
  10116. * @return \Psr\Log\LoggerInterface
  10117. * @static
  10118. */
  10119. public static function build($config)
  10120. {
  10121. /** @var \Illuminate\Log\LogManager $instance */
  10122. return $instance->build($config);
  10123. }
  10124. /**
  10125. * Create a new, on-demand aggregate logger instance.
  10126. *
  10127. * @param array $channels
  10128. * @param string|null $channel
  10129. * @return \Psr\Log\LoggerInterface
  10130. * @static
  10131. */
  10132. public static function stack($channels, $channel = null)
  10133. {
  10134. /** @var \Illuminate\Log\LogManager $instance */
  10135. return $instance->stack($channels, $channel);
  10136. }
  10137. /**
  10138. * Get a log channel instance.
  10139. *
  10140. * @param string|null $channel
  10141. * @return \Psr\Log\LoggerInterface
  10142. * @static
  10143. */
  10144. public static function channel($channel = null)
  10145. {
  10146. /** @var \Illuminate\Log\LogManager $instance */
  10147. return $instance->channel($channel);
  10148. }
  10149. /**
  10150. * Get a log driver instance.
  10151. *
  10152. * @param string|null $driver
  10153. * @return \Psr\Log\LoggerInterface
  10154. * @static
  10155. */
  10156. public static function driver($driver = null)
  10157. {
  10158. /** @var \Illuminate\Log\LogManager $instance */
  10159. return $instance->driver($driver);
  10160. }
  10161. /**
  10162. * Share context across channels and stacks.
  10163. *
  10164. * @param array $context
  10165. * @return \Illuminate\Log\LogManager
  10166. * @static
  10167. */
  10168. public static function shareContext($context)
  10169. {
  10170. /** @var \Illuminate\Log\LogManager $instance */
  10171. return $instance->shareContext($context);
  10172. }
  10173. /**
  10174. * The context shared across channels and stacks.
  10175. *
  10176. * @return array
  10177. * @static
  10178. */
  10179. public static function sharedContext()
  10180. {
  10181. /** @var \Illuminate\Log\LogManager $instance */
  10182. return $instance->sharedContext();
  10183. }
  10184. /**
  10185. * Flush the log context on all currently resolved channels.
  10186. *
  10187. * @param string[]|null $keys
  10188. * @return \Illuminate\Log\LogManager
  10189. * @static
  10190. */
  10191. public static function withoutContext($keys = null)
  10192. {
  10193. /** @var \Illuminate\Log\LogManager $instance */
  10194. return $instance->withoutContext($keys);
  10195. }
  10196. /**
  10197. * Flush the shared context.
  10198. *
  10199. * @return \Illuminate\Log\LogManager
  10200. * @static
  10201. */
  10202. public static function flushSharedContext()
  10203. {
  10204. /** @var \Illuminate\Log\LogManager $instance */
  10205. return $instance->flushSharedContext();
  10206. }
  10207. /**
  10208. * Get the default log driver name.
  10209. *
  10210. * @return string|null
  10211. * @static
  10212. */
  10213. public static function getDefaultDriver()
  10214. {
  10215. /** @var \Illuminate\Log\LogManager $instance */
  10216. return $instance->getDefaultDriver();
  10217. }
  10218. /**
  10219. * Set the default log driver name.
  10220. *
  10221. * @param string $name
  10222. * @return void
  10223. * @static
  10224. */
  10225. public static function setDefaultDriver($name)
  10226. {
  10227. /** @var \Illuminate\Log\LogManager $instance */
  10228. $instance->setDefaultDriver($name);
  10229. }
  10230. /**
  10231. * Register a custom driver creator Closure.
  10232. *
  10233. * @param string $driver
  10234. * @param \Closure $callback
  10235. * @param-closure-this $this $callback
  10236. * @return \Illuminate\Log\LogManager
  10237. * @static
  10238. */
  10239. public static function extend($driver, $callback)
  10240. {
  10241. /** @var \Illuminate\Log\LogManager $instance */
  10242. return $instance->extend($driver, $callback);
  10243. }
  10244. /**
  10245. * Unset the given channel instance.
  10246. *
  10247. * @param string|null $driver
  10248. * @return void
  10249. * @static
  10250. */
  10251. public static function forgetChannel($driver = null)
  10252. {
  10253. /** @var \Illuminate\Log\LogManager $instance */
  10254. $instance->forgetChannel($driver);
  10255. }
  10256. /**
  10257. * Get all of the resolved log channels.
  10258. *
  10259. * @return array
  10260. * @static
  10261. */
  10262. public static function getChannels()
  10263. {
  10264. /** @var \Illuminate\Log\LogManager $instance */
  10265. return $instance->getChannels();
  10266. }
  10267. /**
  10268. * System is unusable.
  10269. *
  10270. * @param string|\Stringable $message
  10271. * @param array $context
  10272. * @return void
  10273. * @static
  10274. */
  10275. public static function emergency($message, $context = [])
  10276. {
  10277. /** @var \Illuminate\Log\LogManager $instance */
  10278. $instance->emergency($message, $context);
  10279. }
  10280. /**
  10281. * Action must be taken immediately.
  10282. *
  10283. * Example: Entire website down, database unavailable, etc. This should
  10284. * trigger the SMS alerts and wake you up.
  10285. *
  10286. * @param string|\Stringable $message
  10287. * @param array $context
  10288. * @return void
  10289. * @static
  10290. */
  10291. public static function alert($message, $context = [])
  10292. {
  10293. /** @var \Illuminate\Log\LogManager $instance */
  10294. $instance->alert($message, $context);
  10295. }
  10296. /**
  10297. * Critical conditions.
  10298. *
  10299. * Example: Application component unavailable, unexpected exception.
  10300. *
  10301. * @param string|\Stringable $message
  10302. * @param array $context
  10303. * @return void
  10304. * @static
  10305. */
  10306. public static function critical($message, $context = [])
  10307. {
  10308. /** @var \Illuminate\Log\LogManager $instance */
  10309. $instance->critical($message, $context);
  10310. }
  10311. /**
  10312. * Runtime errors that do not require immediate action but should typically
  10313. * be logged and monitored.
  10314. *
  10315. * @param string|\Stringable $message
  10316. * @param array $context
  10317. * @return void
  10318. * @static
  10319. */
  10320. public static function error($message, $context = [])
  10321. {
  10322. /** @var \Illuminate\Log\LogManager $instance */
  10323. $instance->error($message, $context);
  10324. }
  10325. /**
  10326. * Exceptional occurrences that are not errors.
  10327. *
  10328. * Example: Use of deprecated APIs, poor use of an API, undesirable things
  10329. * that are not necessarily wrong.
  10330. *
  10331. * @param string|\Stringable $message
  10332. * @param array $context
  10333. * @return void
  10334. * @static
  10335. */
  10336. public static function warning($message, $context = [])
  10337. {
  10338. /** @var \Illuminate\Log\LogManager $instance */
  10339. $instance->warning($message, $context);
  10340. }
  10341. /**
  10342. * Normal but significant events.
  10343. *
  10344. * @param string|\Stringable $message
  10345. * @param array $context
  10346. * @return void
  10347. * @static
  10348. */
  10349. public static function notice($message, $context = [])
  10350. {
  10351. /** @var \Illuminate\Log\LogManager $instance */
  10352. $instance->notice($message, $context);
  10353. }
  10354. /**
  10355. * Interesting events.
  10356. *
  10357. * Example: User logs in, SQL logs.
  10358. *
  10359. * @param string|\Stringable $message
  10360. * @param array $context
  10361. * @return void
  10362. * @static
  10363. */
  10364. public static function info($message, $context = [])
  10365. {
  10366. /** @var \Illuminate\Log\LogManager $instance */
  10367. $instance->info($message, $context);
  10368. }
  10369. /**
  10370. * Detailed debug information.
  10371. *
  10372. * @param string|\Stringable $message
  10373. * @param array $context
  10374. * @return void
  10375. * @static
  10376. */
  10377. public static function debug($message, $context = [])
  10378. {
  10379. /** @var \Illuminate\Log\LogManager $instance */
  10380. $instance->debug($message, $context);
  10381. }
  10382. /**
  10383. * Logs with an arbitrary level.
  10384. *
  10385. * @param mixed $level
  10386. * @param string|\Stringable $message
  10387. * @param array $context
  10388. * @return void
  10389. * @static
  10390. */
  10391. public static function log($level, $message, $context = [])
  10392. {
  10393. /** @var \Illuminate\Log\LogManager $instance */
  10394. $instance->log($level, $message, $context);
  10395. }
  10396. /**
  10397. * Set the application instance used by the manager.
  10398. *
  10399. * @param \Illuminate\Contracts\Foundation\Application $app
  10400. * @return \Illuminate\Log\LogManager
  10401. * @static
  10402. */
  10403. public static function setApplication($app)
  10404. {
  10405. /** @var \Illuminate\Log\LogManager $instance */
  10406. return $instance->setApplication($app);
  10407. }
  10408. }
  10409. /**
  10410. * @method static void alwaysFrom(string $address, string|null $name = null)
  10411. * @method static void alwaysReplyTo(string $address, string|null $name = null)
  10412. * @method static void alwaysReturnPath(string $address)
  10413. * @method static void alwaysTo(string $address, string|null $name = null)
  10414. * @method static \Illuminate\Mail\SentMessage|null html(string $html, mixed $callback)
  10415. * @method static \Illuminate\Mail\SentMessage|null plain(string $view, array $data, mixed $callback)
  10416. * @method static string render(string|array $view, array $data = [])
  10417. * @method static mixed onQueue(\BackedEnum|string|null $queue, \Illuminate\Contracts\Mail\Mailable $view)
  10418. * @method static mixed queueOn(string $queue, \Illuminate\Contracts\Mail\Mailable $view)
  10419. * @method static mixed laterOn(string $queue, \DateTimeInterface|\DateInterval|int $delay, \Illuminate\Contracts\Mail\Mailable $view)
  10420. * @method static \Symfony\Component\Mailer\Transport\TransportInterface getSymfonyTransport()
  10421. * @method static \Illuminate\Contracts\View\Factory getViewFactory()
  10422. * @method static void setSymfonyTransport(\Symfony\Component\Mailer\Transport\TransportInterface $transport)
  10423. * @method static \Illuminate\Mail\Mailer setQueue(\Illuminate\Contracts\Queue\Factory $queue)
  10424. * @method static void macro(string $name, object|callable $macro)
  10425. * @method static void mixin(object $mixin, bool $replace = true)
  10426. * @method static bool hasMacro(string $name)
  10427. * @method static void flushMacros()
  10428. * @see \Illuminate\Mail\MailManager
  10429. * @see \Illuminate\Support\Testing\Fakes\MailFake
  10430. */
  10431. class Mail {
  10432. /**
  10433. * Get a mailer instance by name.
  10434. *
  10435. * @param string|null $name
  10436. * @return \Illuminate\Contracts\Mail\Mailer
  10437. * @static
  10438. */
  10439. public static function mailer($name = null)
  10440. {
  10441. /** @var \Illuminate\Mail\MailManager $instance */
  10442. return $instance->mailer($name);
  10443. }
  10444. /**
  10445. * Get a mailer driver instance.
  10446. *
  10447. * @param string|null $driver
  10448. * @return \Illuminate\Mail\Mailer
  10449. * @static
  10450. */
  10451. public static function driver($driver = null)
  10452. {
  10453. /** @var \Illuminate\Mail\MailManager $instance */
  10454. return $instance->driver($driver);
  10455. }
  10456. /**
  10457. * Build a new mailer instance.
  10458. *
  10459. * @param array $config
  10460. * @return \Illuminate\Mail\Mailer
  10461. * @static
  10462. */
  10463. public static function build($config)
  10464. {
  10465. /** @var \Illuminate\Mail\MailManager $instance */
  10466. return $instance->build($config);
  10467. }
  10468. /**
  10469. * Create a new transport instance.
  10470. *
  10471. * @param array $config
  10472. * @return \Symfony\Component\Mailer\Transport\TransportInterface
  10473. * @throws \InvalidArgumentException
  10474. * @static
  10475. */
  10476. public static function createSymfonyTransport($config)
  10477. {
  10478. /** @var \Illuminate\Mail\MailManager $instance */
  10479. return $instance->createSymfonyTransport($config);
  10480. }
  10481. /**
  10482. * Get the default mail driver name.
  10483. *
  10484. * @return string
  10485. * @static
  10486. */
  10487. public static function getDefaultDriver()
  10488. {
  10489. /** @var \Illuminate\Mail\MailManager $instance */
  10490. return $instance->getDefaultDriver();
  10491. }
  10492. /**
  10493. * Set the default mail driver name.
  10494. *
  10495. * @param string $name
  10496. * @return void
  10497. * @static
  10498. */
  10499. public static function setDefaultDriver($name)
  10500. {
  10501. /** @var \Illuminate\Mail\MailManager $instance */
  10502. $instance->setDefaultDriver($name);
  10503. }
  10504. /**
  10505. * Disconnect the given mailer and remove from local cache.
  10506. *
  10507. * @param string|null $name
  10508. * @return void
  10509. * @static
  10510. */
  10511. public static function purge($name = null)
  10512. {
  10513. /** @var \Illuminate\Mail\MailManager $instance */
  10514. $instance->purge($name);
  10515. }
  10516. /**
  10517. * Register a custom transport creator Closure.
  10518. *
  10519. * @param string $driver
  10520. * @param \Closure $callback
  10521. * @return \Illuminate\Mail\MailManager
  10522. * @static
  10523. */
  10524. public static function extend($driver, $callback)
  10525. {
  10526. /** @var \Illuminate\Mail\MailManager $instance */
  10527. return $instance->extend($driver, $callback);
  10528. }
  10529. /**
  10530. * Get the application instance used by the manager.
  10531. *
  10532. * @return \Illuminate\Contracts\Foundation\Application
  10533. * @static
  10534. */
  10535. public static function getApplication()
  10536. {
  10537. /** @var \Illuminate\Mail\MailManager $instance */
  10538. return $instance->getApplication();
  10539. }
  10540. /**
  10541. * Set the application instance used by the manager.
  10542. *
  10543. * @param \Illuminate\Contracts\Foundation\Application $app
  10544. * @return \Illuminate\Mail\MailManager
  10545. * @static
  10546. */
  10547. public static function setApplication($app)
  10548. {
  10549. /** @var \Illuminate\Mail\MailManager $instance */
  10550. return $instance->setApplication($app);
  10551. }
  10552. /**
  10553. * Forget all of the resolved mailer instances.
  10554. *
  10555. * @return \Illuminate\Mail\MailManager
  10556. * @static
  10557. */
  10558. public static function forgetMailers()
  10559. {
  10560. /** @var \Illuminate\Mail\MailManager $instance */
  10561. return $instance->forgetMailers();
  10562. }
  10563. /**
  10564. * Assert if a mailable was sent based on a truth-test callback.
  10565. *
  10566. * @param string|\Closure $mailable
  10567. * @param callable|array|string|int|null $callback
  10568. * @return void
  10569. * @static
  10570. */
  10571. public static function assertSent($mailable, $callback = null)
  10572. {
  10573. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10574. $instance->assertSent($mailable, $callback);
  10575. }
  10576. /**
  10577. * Determine if a mailable was not sent or queued to be sent based on a truth-test callback.
  10578. *
  10579. * @param string|\Closure $mailable
  10580. * @param callable|null $callback
  10581. * @return void
  10582. * @static
  10583. */
  10584. public static function assertNotOutgoing($mailable, $callback = null)
  10585. {
  10586. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10587. $instance->assertNotOutgoing($mailable, $callback);
  10588. }
  10589. /**
  10590. * Determine if a mailable was not sent based on a truth-test callback.
  10591. *
  10592. * @param string|\Closure $mailable
  10593. * @param callable|array|string|null $callback
  10594. * @return void
  10595. * @static
  10596. */
  10597. public static function assertNotSent($mailable, $callback = null)
  10598. {
  10599. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10600. $instance->assertNotSent($mailable, $callback);
  10601. }
  10602. /**
  10603. * Assert that no mailables were sent or queued to be sent.
  10604. *
  10605. * @return void
  10606. * @static
  10607. */
  10608. public static function assertNothingOutgoing()
  10609. {
  10610. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10611. $instance->assertNothingOutgoing();
  10612. }
  10613. /**
  10614. * Assert that no mailables were sent.
  10615. *
  10616. * @return void
  10617. * @static
  10618. */
  10619. public static function assertNothingSent()
  10620. {
  10621. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10622. $instance->assertNothingSent();
  10623. }
  10624. /**
  10625. * Assert if a mailable was queued based on a truth-test callback.
  10626. *
  10627. * @param string|\Closure $mailable
  10628. * @param callable|array|string|int|null $callback
  10629. * @return void
  10630. * @static
  10631. */
  10632. public static function assertQueued($mailable, $callback = null)
  10633. {
  10634. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10635. $instance->assertQueued($mailable, $callback);
  10636. }
  10637. /**
  10638. * Determine if a mailable was not queued based on a truth-test callback.
  10639. *
  10640. * @param string|\Closure $mailable
  10641. * @param callable|array|string|null $callback
  10642. * @return void
  10643. * @static
  10644. */
  10645. public static function assertNotQueued($mailable, $callback = null)
  10646. {
  10647. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10648. $instance->assertNotQueued($mailable, $callback);
  10649. }
  10650. /**
  10651. * Assert that no mailables were queued.
  10652. *
  10653. * @return void
  10654. * @static
  10655. */
  10656. public static function assertNothingQueued()
  10657. {
  10658. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10659. $instance->assertNothingQueued();
  10660. }
  10661. /**
  10662. * Assert the total number of mailables that were sent.
  10663. *
  10664. * @param int $count
  10665. * @return void
  10666. * @static
  10667. */
  10668. public static function assertSentCount($count)
  10669. {
  10670. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10671. $instance->assertSentCount($count);
  10672. }
  10673. /**
  10674. * Assert the total number of mailables that were queued.
  10675. *
  10676. * @param int $count
  10677. * @return void
  10678. * @static
  10679. */
  10680. public static function assertQueuedCount($count)
  10681. {
  10682. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10683. $instance->assertQueuedCount($count);
  10684. }
  10685. /**
  10686. * Assert the total number of mailables that were sent or queued.
  10687. *
  10688. * @param int $count
  10689. * @return void
  10690. * @static
  10691. */
  10692. public static function assertOutgoingCount($count)
  10693. {
  10694. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10695. $instance->assertOutgoingCount($count);
  10696. }
  10697. /**
  10698. * Get all of the mailables matching a truth-test callback.
  10699. *
  10700. * @param string|\Closure $mailable
  10701. * @param callable|null $callback
  10702. * @return \Illuminate\Support\Collection
  10703. * @static
  10704. */
  10705. public static function sent($mailable, $callback = null)
  10706. {
  10707. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10708. return $instance->sent($mailable, $callback);
  10709. }
  10710. /**
  10711. * Determine if the given mailable has been sent.
  10712. *
  10713. * @param string $mailable
  10714. * @return bool
  10715. * @static
  10716. */
  10717. public static function hasSent($mailable)
  10718. {
  10719. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10720. return $instance->hasSent($mailable);
  10721. }
  10722. /**
  10723. * Get all of the queued mailables matching a truth-test callback.
  10724. *
  10725. * @param string|\Closure $mailable
  10726. * @param callable|null $callback
  10727. * @return \Illuminate\Support\Collection
  10728. * @static
  10729. */
  10730. public static function queued($mailable, $callback = null)
  10731. {
  10732. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10733. return $instance->queued($mailable, $callback);
  10734. }
  10735. /**
  10736. * Determine if the given mailable has been queued.
  10737. *
  10738. * @param string $mailable
  10739. * @return bool
  10740. * @static
  10741. */
  10742. public static function hasQueued($mailable)
  10743. {
  10744. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10745. return $instance->hasQueued($mailable);
  10746. }
  10747. /**
  10748. * Begin the process of mailing a mailable class instance.
  10749. *
  10750. * @param mixed $users
  10751. * @return \Illuminate\Mail\PendingMail
  10752. * @static
  10753. */
  10754. public static function to($users)
  10755. {
  10756. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10757. return $instance->to($users);
  10758. }
  10759. /**
  10760. * Begin the process of mailing a mailable class instance.
  10761. *
  10762. * @param mixed $users
  10763. * @return \Illuminate\Mail\PendingMail
  10764. * @static
  10765. */
  10766. public static function cc($users)
  10767. {
  10768. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10769. return $instance->cc($users);
  10770. }
  10771. /**
  10772. * Begin the process of mailing a mailable class instance.
  10773. *
  10774. * @param mixed $users
  10775. * @return \Illuminate\Mail\PendingMail
  10776. * @static
  10777. */
  10778. public static function bcc($users)
  10779. {
  10780. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10781. return $instance->bcc($users);
  10782. }
  10783. /**
  10784. * Send a new message with only a raw text part.
  10785. *
  10786. * @param string $text
  10787. * @param \Closure|string $callback
  10788. * @return void
  10789. * @static
  10790. */
  10791. public static function raw($text, $callback)
  10792. {
  10793. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10794. $instance->raw($text, $callback);
  10795. }
  10796. /**
  10797. * Send a new message using a view.
  10798. *
  10799. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10800. * @param array $data
  10801. * @param \Closure|string|null $callback
  10802. * @return mixed|void
  10803. * @static
  10804. */
  10805. public static function send($view, $data = [], $callback = null)
  10806. {
  10807. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10808. return $instance->send($view, $data, $callback);
  10809. }
  10810. /**
  10811. * Send a new message synchronously using a view.
  10812. *
  10813. * @param \Illuminate\Contracts\Mail\Mailable|string|array $mailable
  10814. * @param array $data
  10815. * @param \Closure|string|null $callback
  10816. * @return void
  10817. * @static
  10818. */
  10819. public static function sendNow($mailable, $data = [], $callback = null)
  10820. {
  10821. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10822. $instance->sendNow($mailable, $data, $callback);
  10823. }
  10824. /**
  10825. * Queue a new message for sending.
  10826. *
  10827. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10828. * @param string|null $queue
  10829. * @return mixed
  10830. * @static
  10831. */
  10832. public static function queue($view, $queue = null)
  10833. {
  10834. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10835. return $instance->queue($view, $queue);
  10836. }
  10837. /**
  10838. * Queue a new e-mail message for sending after (n) seconds.
  10839. *
  10840. * @param \DateTimeInterface|\DateInterval|int $delay
  10841. * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
  10842. * @param string|null $queue
  10843. * @return mixed
  10844. * @static
  10845. */
  10846. public static function later($delay, $view, $queue = null)
  10847. {
  10848. /** @var \Illuminate\Support\Testing\Fakes\MailFake $instance */
  10849. return $instance->later($delay, $view, $queue);
  10850. }
  10851. }
  10852. /**
  10853. * @see \Illuminate\Notifications\ChannelManager
  10854. * @see \Illuminate\Support\Testing\Fakes\NotificationFake
  10855. */
  10856. class Notification {
  10857. /**
  10858. * Send the given notification to the given notifiable entities.
  10859. *
  10860. * @param \Illuminate\Support\Collection|array|mixed $notifiables
  10861. * @param mixed $notification
  10862. * @return void
  10863. * @static
  10864. */
  10865. public static function send($notifiables, $notification)
  10866. {
  10867. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10868. $instance->send($notifiables, $notification);
  10869. }
  10870. /**
  10871. * Send the given notification immediately.
  10872. *
  10873. * @param \Illuminate\Support\Collection|array|mixed $notifiables
  10874. * @param mixed $notification
  10875. * @param array|null $channels
  10876. * @return void
  10877. * @static
  10878. */
  10879. public static function sendNow($notifiables, $notification, $channels = null)
  10880. {
  10881. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10882. $instance->sendNow($notifiables, $notification, $channels);
  10883. }
  10884. /**
  10885. * Get a channel instance.
  10886. *
  10887. * @param string|null $name
  10888. * @return mixed
  10889. * @static
  10890. */
  10891. public static function channel($name = null)
  10892. {
  10893. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10894. return $instance->channel($name);
  10895. }
  10896. /**
  10897. * Get the default channel driver name.
  10898. *
  10899. * @return string
  10900. * @static
  10901. */
  10902. public static function getDefaultDriver()
  10903. {
  10904. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10905. return $instance->getDefaultDriver();
  10906. }
  10907. /**
  10908. * Get the default channel driver name.
  10909. *
  10910. * @return string
  10911. * @static
  10912. */
  10913. public static function deliversVia()
  10914. {
  10915. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10916. return $instance->deliversVia();
  10917. }
  10918. /**
  10919. * Set the default channel driver name.
  10920. *
  10921. * @param string $channel
  10922. * @return void
  10923. * @static
  10924. */
  10925. public static function deliverVia($channel)
  10926. {
  10927. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10928. $instance->deliverVia($channel);
  10929. }
  10930. /**
  10931. * Set the locale of notifications.
  10932. *
  10933. * @param string $locale
  10934. * @return \Illuminate\Notifications\ChannelManager
  10935. * @static
  10936. */
  10937. public static function locale($locale)
  10938. {
  10939. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10940. return $instance->locale($locale);
  10941. }
  10942. /**
  10943. * Get a driver instance.
  10944. *
  10945. * @param string|null $driver
  10946. * @return mixed
  10947. * @throws \InvalidArgumentException
  10948. * @static
  10949. */
  10950. public static function driver($driver = null)
  10951. {
  10952. //Method inherited from \Illuminate\Support\Manager
  10953. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10954. return $instance->driver($driver);
  10955. }
  10956. /**
  10957. * Register a custom driver creator Closure.
  10958. *
  10959. * @param string $driver
  10960. * @param \Closure $callback
  10961. * @return \Illuminate\Notifications\ChannelManager
  10962. * @static
  10963. */
  10964. public static function extend($driver, $callback)
  10965. {
  10966. //Method inherited from \Illuminate\Support\Manager
  10967. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10968. return $instance->extend($driver, $callback);
  10969. }
  10970. /**
  10971. * Get all of the created "drivers".
  10972. *
  10973. * @return array
  10974. * @static
  10975. */
  10976. public static function getDrivers()
  10977. {
  10978. //Method inherited from \Illuminate\Support\Manager
  10979. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10980. return $instance->getDrivers();
  10981. }
  10982. /**
  10983. * Get the container instance used by the manager.
  10984. *
  10985. * @return \Illuminate\Contracts\Container\Container
  10986. * @static
  10987. */
  10988. public static function getContainer()
  10989. {
  10990. //Method inherited from \Illuminate\Support\Manager
  10991. /** @var \Illuminate\Notifications\ChannelManager $instance */
  10992. return $instance->getContainer();
  10993. }
  10994. /**
  10995. * Set the container instance used by the manager.
  10996. *
  10997. * @param \Illuminate\Contracts\Container\Container $container
  10998. * @return \Illuminate\Notifications\ChannelManager
  10999. * @static
  11000. */
  11001. public static function setContainer($container)
  11002. {
  11003. //Method inherited from \Illuminate\Support\Manager
  11004. /** @var \Illuminate\Notifications\ChannelManager $instance */
  11005. return $instance->setContainer($container);
  11006. }
  11007. /**
  11008. * Forget all of the resolved driver instances.
  11009. *
  11010. * @return \Illuminate\Notifications\ChannelManager
  11011. * @static
  11012. */
  11013. public static function forgetDrivers()
  11014. {
  11015. //Method inherited from \Illuminate\Support\Manager
  11016. /** @var \Illuminate\Notifications\ChannelManager $instance */
  11017. return $instance->forgetDrivers();
  11018. }
  11019. /**
  11020. * Assert if a notification was sent on-demand based on a truth-test callback.
  11021. *
  11022. * @param string|\Closure $notification
  11023. * @param callable|null $callback
  11024. * @return void
  11025. * @throws \Exception
  11026. * @static
  11027. */
  11028. public static function assertSentOnDemand($notification, $callback = null)
  11029. {
  11030. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11031. $instance->assertSentOnDemand($notification, $callback);
  11032. }
  11033. /**
  11034. * Assert if a notification was sent based on a truth-test callback.
  11035. *
  11036. * @param mixed $notifiable
  11037. * @param string|\Closure $notification
  11038. * @param callable|null $callback
  11039. * @return void
  11040. * @throws \Exception
  11041. * @static
  11042. */
  11043. public static function assertSentTo($notifiable, $notification, $callback = null)
  11044. {
  11045. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11046. $instance->assertSentTo($notifiable, $notification, $callback);
  11047. }
  11048. /**
  11049. * Assert if a notification was sent on-demand a number of times.
  11050. *
  11051. * @param string $notification
  11052. * @param int $times
  11053. * @return void
  11054. * @static
  11055. */
  11056. public static function assertSentOnDemandTimes($notification, $times = 1)
  11057. {
  11058. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11059. $instance->assertSentOnDemandTimes($notification, $times);
  11060. }
  11061. /**
  11062. * Assert if a notification was sent a number of times.
  11063. *
  11064. * @param mixed $notifiable
  11065. * @param string $notification
  11066. * @param int $times
  11067. * @return void
  11068. * @static
  11069. */
  11070. public static function assertSentToTimes($notifiable, $notification, $times = 1)
  11071. {
  11072. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11073. $instance->assertSentToTimes($notifiable, $notification, $times);
  11074. }
  11075. /**
  11076. * Determine if a notification was sent based on a truth-test callback.
  11077. *
  11078. * @param mixed $notifiable
  11079. * @param string|\Closure $notification
  11080. * @param callable|null $callback
  11081. * @return void
  11082. * @throws \Exception
  11083. * @static
  11084. */
  11085. public static function assertNotSentTo($notifiable, $notification, $callback = null)
  11086. {
  11087. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11088. $instance->assertNotSentTo($notifiable, $notification, $callback);
  11089. }
  11090. /**
  11091. * Assert that no notifications were sent.
  11092. *
  11093. * @return void
  11094. * @static
  11095. */
  11096. public static function assertNothingSent()
  11097. {
  11098. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11099. $instance->assertNothingSent();
  11100. }
  11101. /**
  11102. * Assert that no notifications were sent to the given notifiable.
  11103. *
  11104. * @param mixed $notifiable
  11105. * @return void
  11106. * @throws \Exception
  11107. * @static
  11108. */
  11109. public static function assertNothingSentTo($notifiable)
  11110. {
  11111. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11112. $instance->assertNothingSentTo($notifiable);
  11113. }
  11114. /**
  11115. * Assert the total amount of times a notification was sent.
  11116. *
  11117. * @param string $notification
  11118. * @param int $expectedCount
  11119. * @return void
  11120. * @static
  11121. */
  11122. public static function assertSentTimes($notification, $expectedCount)
  11123. {
  11124. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11125. $instance->assertSentTimes($notification, $expectedCount);
  11126. }
  11127. /**
  11128. * Assert the total count of notification that were sent.
  11129. *
  11130. * @param int $expectedCount
  11131. * @return void
  11132. * @static
  11133. */
  11134. public static function assertCount($expectedCount)
  11135. {
  11136. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11137. $instance->assertCount($expectedCount);
  11138. }
  11139. /**
  11140. * Get all of the notifications matching a truth-test callback.
  11141. *
  11142. * @param mixed $notifiable
  11143. * @param string $notification
  11144. * @param callable|null $callback
  11145. * @return \Illuminate\Support\Collection
  11146. * @static
  11147. */
  11148. public static function sent($notifiable, $notification, $callback = null)
  11149. {
  11150. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11151. return $instance->sent($notifiable, $notification, $callback);
  11152. }
  11153. /**
  11154. * Determine if there are more notifications left to inspect.
  11155. *
  11156. * @param mixed $notifiable
  11157. * @param string $notification
  11158. * @return bool
  11159. * @static
  11160. */
  11161. public static function hasSent($notifiable, $notification)
  11162. {
  11163. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11164. return $instance->hasSent($notifiable, $notification);
  11165. }
  11166. /**
  11167. * Specify if notification should be serialized and restored when being "pushed" to the queue.
  11168. *
  11169. * @param bool $serializeAndRestore
  11170. * @return \Illuminate\Support\Testing\Fakes\NotificationFake
  11171. * @static
  11172. */
  11173. public static function serializeAndRestore($serializeAndRestore = true)
  11174. {
  11175. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11176. return $instance->serializeAndRestore($serializeAndRestore);
  11177. }
  11178. /**
  11179. * Get the notifications that have been sent.
  11180. *
  11181. * @return array
  11182. * @static
  11183. */
  11184. public static function sentNotifications()
  11185. {
  11186. /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */
  11187. return $instance->sentNotifications();
  11188. }
  11189. /**
  11190. * Register a custom macro.
  11191. *
  11192. * @param string $name
  11193. * @param object|callable $macro
  11194. * @param-closure-this static $macro
  11195. * @return void
  11196. * @static
  11197. */
  11198. public static function macro($name, $macro)
  11199. {
  11200. \Illuminate\Support\Testing\Fakes\NotificationFake::macro($name, $macro);
  11201. }
  11202. /**
  11203. * Mix another object into the class.
  11204. *
  11205. * @param object $mixin
  11206. * @param bool $replace
  11207. * @return void
  11208. * @throws \ReflectionException
  11209. * @static
  11210. */
  11211. public static function mixin($mixin, $replace = true)
  11212. {
  11213. \Illuminate\Support\Testing\Fakes\NotificationFake::mixin($mixin, $replace);
  11214. }
  11215. /**
  11216. * Checks if macro is registered.
  11217. *
  11218. * @param string $name
  11219. * @return bool
  11220. * @static
  11221. */
  11222. public static function hasMacro($name)
  11223. {
  11224. return \Illuminate\Support\Testing\Fakes\NotificationFake::hasMacro($name);
  11225. }
  11226. /**
  11227. * Flush the existing macros.
  11228. *
  11229. * @return void
  11230. * @static
  11231. */
  11232. public static function flushMacros()
  11233. {
  11234. \Illuminate\Support\Testing\Fakes\NotificationFake::flushMacros();
  11235. }
  11236. }
  11237. /**
  11238. * @method static string sendResetLink(array $credentials, \Closure|null $callback = null)
  11239. * @method static mixed reset(array $credentials, \Closure $callback)
  11240. * @method static \Illuminate\Contracts\Auth\CanResetPassword|null getUser(array $credentials)
  11241. * @method static string createToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  11242. * @method static void deleteToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  11243. * @method static bool tokenExists(\Illuminate\Contracts\Auth\CanResetPassword $user, string $token)
  11244. * @method static \Illuminate\Auth\Passwords\TokenRepositoryInterface getRepository()
  11245. * @method static \Illuminate\Support\Timebox getTimebox()
  11246. * @see \Illuminate\Auth\Passwords\PasswordBrokerManager
  11247. * @see \Illuminate\Auth\Passwords\PasswordBroker
  11248. */
  11249. class Password {
  11250. /**
  11251. * Attempt to get the broker from the local cache.
  11252. *
  11253. * @param string|null $name
  11254. * @return \Illuminate\Contracts\Auth\PasswordBroker
  11255. * @static
  11256. */
  11257. public static function broker($name = null)
  11258. {
  11259. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11260. return $instance->broker($name);
  11261. }
  11262. /**
  11263. * Get the default password broker name.
  11264. *
  11265. * @return string
  11266. * @static
  11267. */
  11268. public static function getDefaultDriver()
  11269. {
  11270. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11271. return $instance->getDefaultDriver();
  11272. }
  11273. /**
  11274. * Set the default password broker name.
  11275. *
  11276. * @param string $name
  11277. * @return void
  11278. * @static
  11279. */
  11280. public static function setDefaultDriver($name)
  11281. {
  11282. /** @var \Illuminate\Auth\Passwords\PasswordBrokerManager $instance */
  11283. $instance->setDefaultDriver($name);
  11284. }
  11285. }
  11286. /**
  11287. * @method static \Illuminate\Process\PendingProcess command(array|string $command)
  11288. * @method static \Illuminate\Process\PendingProcess path(string $path)
  11289. * @method static \Illuminate\Process\PendingProcess timeout(int $timeout)
  11290. * @method static \Illuminate\Process\PendingProcess idleTimeout(int $timeout)
  11291. * @method static \Illuminate\Process\PendingProcess forever()
  11292. * @method static \Illuminate\Process\PendingProcess env(array $environment)
  11293. * @method static \Illuminate\Process\PendingProcess input(\Traversable|resource|string|int|float|bool|null $input)
  11294. * @method static \Illuminate\Process\PendingProcess quietly()
  11295. * @method static \Illuminate\Process\PendingProcess tty(bool $tty = true)
  11296. * @method static \Illuminate\Process\PendingProcess options(array $options)
  11297. * @method static \Illuminate\Contracts\Process\ProcessResult run(array|string|null $command = null, callable|null $output = null)
  11298. * @method static \Illuminate\Process\InvokedProcess start(array|string|null $command = null, callable|null $output = null)
  11299. * @method static bool supportsTty()
  11300. * @method static \Illuminate\Process\PendingProcess withFakeHandlers(array $fakeHandlers)
  11301. * @method static \Illuminate\Process\PendingProcess|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  11302. * @method static \Illuminate\Process\PendingProcess|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
  11303. * @see \Illuminate\Process\PendingProcess
  11304. * @see \Illuminate\Process\Factory
  11305. */
  11306. class Process {
  11307. /**
  11308. * Create a new fake process response for testing purposes.
  11309. *
  11310. * @param array|string $output
  11311. * @param array|string $errorOutput
  11312. * @param int $exitCode
  11313. * @return \Illuminate\Process\FakeProcessResult
  11314. * @static
  11315. */
  11316. public static function result($output = '', $errorOutput = '', $exitCode = 0)
  11317. {
  11318. /** @var \Illuminate\Process\Factory $instance */
  11319. return $instance->result($output, $errorOutput, $exitCode);
  11320. }
  11321. /**
  11322. * Begin describing a fake process lifecycle.
  11323. *
  11324. * @return \Illuminate\Process\FakeProcessDescription
  11325. * @static
  11326. */
  11327. public static function describe()
  11328. {
  11329. /** @var \Illuminate\Process\Factory $instance */
  11330. return $instance->describe();
  11331. }
  11332. /**
  11333. * Begin describing a fake process sequence.
  11334. *
  11335. * @param array $processes
  11336. * @return \Illuminate\Process\FakeProcessSequence
  11337. * @static
  11338. */
  11339. public static function sequence($processes = [])
  11340. {
  11341. /** @var \Illuminate\Process\Factory $instance */
  11342. return $instance->sequence($processes);
  11343. }
  11344. /**
  11345. * Indicate that the process factory should fake processes.
  11346. *
  11347. * @param \Closure|array|null $callback
  11348. * @return \Illuminate\Process\Factory
  11349. * @static
  11350. */
  11351. public static function fake($callback = null)
  11352. {
  11353. /** @var \Illuminate\Process\Factory $instance */
  11354. return $instance->fake($callback);
  11355. }
  11356. /**
  11357. * Determine if the process factory has fake process handlers and is recording processes.
  11358. *
  11359. * @return bool
  11360. * @static
  11361. */
  11362. public static function isRecording()
  11363. {
  11364. /** @var \Illuminate\Process\Factory $instance */
  11365. return $instance->isRecording();
  11366. }
  11367. /**
  11368. * Record the given process if processes should be recorded.
  11369. *
  11370. * @param \Illuminate\Process\PendingProcess $process
  11371. * @param \Illuminate\Contracts\Process\ProcessResult $result
  11372. * @return \Illuminate\Process\Factory
  11373. * @static
  11374. */
  11375. public static function recordIfRecording($process, $result)
  11376. {
  11377. /** @var \Illuminate\Process\Factory $instance */
  11378. return $instance->recordIfRecording($process, $result);
  11379. }
  11380. /**
  11381. * Record the given process.
  11382. *
  11383. * @param \Illuminate\Process\PendingProcess $process
  11384. * @param \Illuminate\Contracts\Process\ProcessResult $result
  11385. * @return \Illuminate\Process\Factory
  11386. * @static
  11387. */
  11388. public static function record($process, $result)
  11389. {
  11390. /** @var \Illuminate\Process\Factory $instance */
  11391. return $instance->record($process, $result);
  11392. }
  11393. /**
  11394. * Indicate that an exception should be thrown if any process is not faked.
  11395. *
  11396. * @param bool $prevent
  11397. * @return \Illuminate\Process\Factory
  11398. * @static
  11399. */
  11400. public static function preventStrayProcesses($prevent = true)
  11401. {
  11402. /** @var \Illuminate\Process\Factory $instance */
  11403. return $instance->preventStrayProcesses($prevent);
  11404. }
  11405. /**
  11406. * Determine if stray processes are being prevented.
  11407. *
  11408. * @return bool
  11409. * @static
  11410. */
  11411. public static function preventingStrayProcesses()
  11412. {
  11413. /** @var \Illuminate\Process\Factory $instance */
  11414. return $instance->preventingStrayProcesses();
  11415. }
  11416. /**
  11417. * Assert that a process was recorded matching a given truth test.
  11418. *
  11419. * @param \Closure|string $callback
  11420. * @return \Illuminate\Process\Factory
  11421. * @static
  11422. */
  11423. public static function assertRan($callback)
  11424. {
  11425. /** @var \Illuminate\Process\Factory $instance */
  11426. return $instance->assertRan($callback);
  11427. }
  11428. /**
  11429. * Assert that a process was recorded a given number of times matching a given truth test.
  11430. *
  11431. * @param \Closure|string $callback
  11432. * @param int $times
  11433. * @return \Illuminate\Process\Factory
  11434. * @static
  11435. */
  11436. public static function assertRanTimes($callback, $times = 1)
  11437. {
  11438. /** @var \Illuminate\Process\Factory $instance */
  11439. return $instance->assertRanTimes($callback, $times);
  11440. }
  11441. /**
  11442. * Assert that a process was not recorded matching a given truth test.
  11443. *
  11444. * @param \Closure|string $callback
  11445. * @return \Illuminate\Process\Factory
  11446. * @static
  11447. */
  11448. public static function assertNotRan($callback)
  11449. {
  11450. /** @var \Illuminate\Process\Factory $instance */
  11451. return $instance->assertNotRan($callback);
  11452. }
  11453. /**
  11454. * Assert that a process was not recorded matching a given truth test.
  11455. *
  11456. * @param \Closure|string $callback
  11457. * @return \Illuminate\Process\Factory
  11458. * @static
  11459. */
  11460. public static function assertDidntRun($callback)
  11461. {
  11462. /** @var \Illuminate\Process\Factory $instance */
  11463. return $instance->assertDidntRun($callback);
  11464. }
  11465. /**
  11466. * Assert that no processes were recorded.
  11467. *
  11468. * @return \Illuminate\Process\Factory
  11469. * @static
  11470. */
  11471. public static function assertNothingRan()
  11472. {
  11473. /** @var \Illuminate\Process\Factory $instance */
  11474. return $instance->assertNothingRan();
  11475. }
  11476. /**
  11477. * Start defining a pool of processes.
  11478. *
  11479. * @param callable $callback
  11480. * @return \Illuminate\Process\Pool
  11481. * @static
  11482. */
  11483. public static function pool($callback)
  11484. {
  11485. /** @var \Illuminate\Process\Factory $instance */
  11486. return $instance->pool($callback);
  11487. }
  11488. /**
  11489. * Start defining a series of piped processes.
  11490. *
  11491. * @param callable|array $callback
  11492. * @return \Illuminate\Contracts\Process\ProcessResult
  11493. * @static
  11494. */
  11495. public static function pipe($callback, $output = null)
  11496. {
  11497. /** @var \Illuminate\Process\Factory $instance */
  11498. return $instance->pipe($callback, $output);
  11499. }
  11500. /**
  11501. * Run a pool of processes and wait for them to finish executing.
  11502. *
  11503. * @param callable $callback
  11504. * @param callable|null $output
  11505. * @return \Illuminate\Process\ProcessPoolResults
  11506. * @static
  11507. */
  11508. public static function concurrently($callback, $output = null)
  11509. {
  11510. /** @var \Illuminate\Process\Factory $instance */
  11511. return $instance->concurrently($callback, $output);
  11512. }
  11513. /**
  11514. * Create a new pending process associated with this factory.
  11515. *
  11516. * @return \Illuminate\Process\PendingProcess
  11517. * @static
  11518. */
  11519. public static function newPendingProcess()
  11520. {
  11521. /** @var \Illuminate\Process\Factory $instance */
  11522. return $instance->newPendingProcess();
  11523. }
  11524. /**
  11525. * Register a custom macro.
  11526. *
  11527. * @param string $name
  11528. * @param object|callable $macro
  11529. * @param-closure-this static $macro
  11530. * @return void
  11531. * @static
  11532. */
  11533. public static function macro($name, $macro)
  11534. {
  11535. \Illuminate\Process\Factory::macro($name, $macro);
  11536. }
  11537. /**
  11538. * Mix another object into the class.
  11539. *
  11540. * @param object $mixin
  11541. * @param bool $replace
  11542. * @return void
  11543. * @throws \ReflectionException
  11544. * @static
  11545. */
  11546. public static function mixin($mixin, $replace = true)
  11547. {
  11548. \Illuminate\Process\Factory::mixin($mixin, $replace);
  11549. }
  11550. /**
  11551. * Checks if macro is registered.
  11552. *
  11553. * @param string $name
  11554. * @return bool
  11555. * @static
  11556. */
  11557. public static function hasMacro($name)
  11558. {
  11559. return \Illuminate\Process\Factory::hasMacro($name);
  11560. }
  11561. /**
  11562. * Flush the existing macros.
  11563. *
  11564. * @return void
  11565. * @static
  11566. */
  11567. public static function flushMacros()
  11568. {
  11569. \Illuminate\Process\Factory::flushMacros();
  11570. }
  11571. /**
  11572. * Dynamically handle calls to the class.
  11573. *
  11574. * @param string $method
  11575. * @param array $parameters
  11576. * @return mixed
  11577. * @throws \BadMethodCallException
  11578. * @static
  11579. */
  11580. public static function macroCall($method, $parameters)
  11581. {
  11582. /** @var \Illuminate\Process\Factory $instance */
  11583. return $instance->macroCall($method, $parameters);
  11584. }
  11585. }
  11586. /**
  11587. * @see \Illuminate\Queue\QueueManager
  11588. * @see \Illuminate\Queue\Queue
  11589. * @see \Illuminate\Support\Testing\Fakes\QueueFake
  11590. */
  11591. class Queue {
  11592. /**
  11593. * Register an event listener for the before job event.
  11594. *
  11595. * @param mixed $callback
  11596. * @return void
  11597. * @static
  11598. */
  11599. public static function before($callback)
  11600. {
  11601. /** @var \Illuminate\Queue\QueueManager $instance */
  11602. $instance->before($callback);
  11603. }
  11604. /**
  11605. * Register an event listener for the after job event.
  11606. *
  11607. * @param mixed $callback
  11608. * @return void
  11609. * @static
  11610. */
  11611. public static function after($callback)
  11612. {
  11613. /** @var \Illuminate\Queue\QueueManager $instance */
  11614. $instance->after($callback);
  11615. }
  11616. /**
  11617. * Register an event listener for the exception occurred job event.
  11618. *
  11619. * @param mixed $callback
  11620. * @return void
  11621. * @static
  11622. */
  11623. public static function exceptionOccurred($callback)
  11624. {
  11625. /** @var \Illuminate\Queue\QueueManager $instance */
  11626. $instance->exceptionOccurred($callback);
  11627. }
  11628. /**
  11629. * Register an event listener for the daemon queue loop.
  11630. *
  11631. * @param mixed $callback
  11632. * @return void
  11633. * @static
  11634. */
  11635. public static function looping($callback)
  11636. {
  11637. /** @var \Illuminate\Queue\QueueManager $instance */
  11638. $instance->looping($callback);
  11639. }
  11640. /**
  11641. * Register an event listener for the failed job event.
  11642. *
  11643. * @param mixed $callback
  11644. * @return void
  11645. * @static
  11646. */
  11647. public static function failing($callback)
  11648. {
  11649. /** @var \Illuminate\Queue\QueueManager $instance */
  11650. $instance->failing($callback);
  11651. }
  11652. /**
  11653. * Register an event listener for the daemon queue starting.
  11654. *
  11655. * @param mixed $callback
  11656. * @return void
  11657. * @static
  11658. */
  11659. public static function starting($callback)
  11660. {
  11661. /** @var \Illuminate\Queue\QueueManager $instance */
  11662. $instance->starting($callback);
  11663. }
  11664. /**
  11665. * Register an event listener for the daemon queue stopping.
  11666. *
  11667. * @param mixed $callback
  11668. * @return void
  11669. * @static
  11670. */
  11671. public static function stopping($callback)
  11672. {
  11673. /** @var \Illuminate\Queue\QueueManager $instance */
  11674. $instance->stopping($callback);
  11675. }
  11676. /**
  11677. * Determine if the driver is connected.
  11678. *
  11679. * @param string|null $name
  11680. * @return bool
  11681. * @static
  11682. */
  11683. public static function connected($name = null)
  11684. {
  11685. /** @var \Illuminate\Queue\QueueManager $instance */
  11686. return $instance->connected($name);
  11687. }
  11688. /**
  11689. * Resolve a queue connection instance.
  11690. *
  11691. * @param string|null $name
  11692. * @return \Illuminate\Contracts\Queue\Queue
  11693. * @static
  11694. */
  11695. public static function connection($name = null)
  11696. {
  11697. /** @var \Illuminate\Queue\QueueManager $instance */
  11698. return $instance->connection($name);
  11699. }
  11700. /**
  11701. * Add a queue connection resolver.
  11702. *
  11703. * @param string $driver
  11704. * @param \Closure $resolver
  11705. * @return void
  11706. * @static
  11707. */
  11708. public static function extend($driver, $resolver)
  11709. {
  11710. /** @var \Illuminate\Queue\QueueManager $instance */
  11711. $instance->extend($driver, $resolver);
  11712. }
  11713. /**
  11714. * Add a queue connection resolver.
  11715. *
  11716. * @param string $driver
  11717. * @param \Closure $resolver
  11718. * @return void
  11719. * @static
  11720. */
  11721. public static function addConnector($driver, $resolver)
  11722. {
  11723. /** @var \Illuminate\Queue\QueueManager $instance */
  11724. $instance->addConnector($driver, $resolver);
  11725. }
  11726. /**
  11727. * Get the name of the default queue connection.
  11728. *
  11729. * @return string
  11730. * @static
  11731. */
  11732. public static function getDefaultDriver()
  11733. {
  11734. /** @var \Illuminate\Queue\QueueManager $instance */
  11735. return $instance->getDefaultDriver();
  11736. }
  11737. /**
  11738. * Set the name of the default queue connection.
  11739. *
  11740. * @param string $name
  11741. * @return void
  11742. * @static
  11743. */
  11744. public static function setDefaultDriver($name)
  11745. {
  11746. /** @var \Illuminate\Queue\QueueManager $instance */
  11747. $instance->setDefaultDriver($name);
  11748. }
  11749. /**
  11750. * Get the full name for the given connection.
  11751. *
  11752. * @param string|null $connection
  11753. * @return string
  11754. * @static
  11755. */
  11756. public static function getName($connection = null)
  11757. {
  11758. /** @var \Illuminate\Queue\QueueManager $instance */
  11759. return $instance->getName($connection);
  11760. }
  11761. /**
  11762. * Get the application instance used by the manager.
  11763. *
  11764. * @return \Illuminate\Contracts\Foundation\Application
  11765. * @static
  11766. */
  11767. public static function getApplication()
  11768. {
  11769. /** @var \Illuminate\Queue\QueueManager $instance */
  11770. return $instance->getApplication();
  11771. }
  11772. /**
  11773. * Set the application instance used by the manager.
  11774. *
  11775. * @param \Illuminate\Contracts\Foundation\Application $app
  11776. * @return \Illuminate\Queue\QueueManager
  11777. * @static
  11778. */
  11779. public static function setApplication($app)
  11780. {
  11781. /** @var \Illuminate\Queue\QueueManager $instance */
  11782. return $instance->setApplication($app);
  11783. }
  11784. /**
  11785. * Specify the jobs that should be queued instead of faked.
  11786. *
  11787. * @param array|string $jobsToBeQueued
  11788. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  11789. * @static
  11790. */
  11791. public static function except($jobsToBeQueued)
  11792. {
  11793. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11794. return $instance->except($jobsToBeQueued);
  11795. }
  11796. /**
  11797. * Assert if a job was pushed based on a truth-test callback.
  11798. *
  11799. * @param string|\Closure $job
  11800. * @param callable|int|null $callback
  11801. * @return void
  11802. * @static
  11803. */
  11804. public static function assertPushed($job, $callback = null)
  11805. {
  11806. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11807. $instance->assertPushed($job, $callback);
  11808. }
  11809. /**
  11810. * Assert if a job was pushed based on a truth-test callback.
  11811. *
  11812. * @param string $queue
  11813. * @param string|\Closure $job
  11814. * @param callable|null $callback
  11815. * @return void
  11816. * @static
  11817. */
  11818. public static function assertPushedOn($queue, $job, $callback = null)
  11819. {
  11820. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11821. $instance->assertPushedOn($queue, $job, $callback);
  11822. }
  11823. /**
  11824. * Assert if a job was pushed with chained jobs based on a truth-test callback.
  11825. *
  11826. * @param string $job
  11827. * @param array $expectedChain
  11828. * @param callable|null $callback
  11829. * @return void
  11830. * @static
  11831. */
  11832. public static function assertPushedWithChain($job, $expectedChain = [], $callback = null)
  11833. {
  11834. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11835. $instance->assertPushedWithChain($job, $expectedChain, $callback);
  11836. }
  11837. /**
  11838. * Assert if a job was pushed with an empty chain based on a truth-test callback.
  11839. *
  11840. * @param string $job
  11841. * @param callable|null $callback
  11842. * @return void
  11843. * @static
  11844. */
  11845. public static function assertPushedWithoutChain($job, $callback = null)
  11846. {
  11847. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11848. $instance->assertPushedWithoutChain($job, $callback);
  11849. }
  11850. /**
  11851. * Assert if a closure was pushed based on a truth-test callback.
  11852. *
  11853. * @param callable|int|null $callback
  11854. * @return void
  11855. * @static
  11856. */
  11857. public static function assertClosurePushed($callback = null)
  11858. {
  11859. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11860. $instance->assertClosurePushed($callback);
  11861. }
  11862. /**
  11863. * Assert that a closure was not pushed based on a truth-test callback.
  11864. *
  11865. * @param callable|null $callback
  11866. * @return void
  11867. * @static
  11868. */
  11869. public static function assertClosureNotPushed($callback = null)
  11870. {
  11871. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11872. $instance->assertClosureNotPushed($callback);
  11873. }
  11874. /**
  11875. * Determine if a job was pushed based on a truth-test callback.
  11876. *
  11877. * @param string|\Closure $job
  11878. * @param callable|null $callback
  11879. * @return void
  11880. * @static
  11881. */
  11882. public static function assertNotPushed($job, $callback = null)
  11883. {
  11884. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11885. $instance->assertNotPushed($job, $callback);
  11886. }
  11887. /**
  11888. * Assert the total count of jobs that were pushed.
  11889. *
  11890. * @param int $expectedCount
  11891. * @return void
  11892. * @static
  11893. */
  11894. public static function assertCount($expectedCount)
  11895. {
  11896. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11897. $instance->assertCount($expectedCount);
  11898. }
  11899. /**
  11900. * Assert that no jobs were pushed.
  11901. *
  11902. * @return void
  11903. * @static
  11904. */
  11905. public static function assertNothingPushed()
  11906. {
  11907. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11908. $instance->assertNothingPushed();
  11909. }
  11910. /**
  11911. * Get all of the jobs matching a truth-test callback.
  11912. *
  11913. * @param string $job
  11914. * @param callable|null $callback
  11915. * @return \Illuminate\Support\Collection
  11916. * @static
  11917. */
  11918. public static function pushed($job, $callback = null)
  11919. {
  11920. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11921. return $instance->pushed($job, $callback);
  11922. }
  11923. /**
  11924. * Get all of the raw pushes matching a truth-test callback.
  11925. *
  11926. * @param null|\Closure(string, ?string, array): bool $callback
  11927. * @return \Illuminate\Support\Collection<int, RawPushType>
  11928. * @static
  11929. */
  11930. public static function pushedRaw($callback = null)
  11931. {
  11932. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11933. return $instance->pushedRaw($callback);
  11934. }
  11935. /**
  11936. * Get all of the jobs by listener class, passing an optional truth-test callback.
  11937. *
  11938. * @param class-string $listenerClass
  11939. * @param (\Closure(mixed, \Illuminate\Events\CallQueuedListener, string|null, mixed): bool)|null $callback
  11940. * @return \Illuminate\Support\Collection<int, \Illuminate\Events\CallQueuedListener>
  11941. * @static
  11942. */
  11943. public static function listenersPushed($listenerClass, $callback = null)
  11944. {
  11945. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11946. return $instance->listenersPushed($listenerClass, $callback);
  11947. }
  11948. /**
  11949. * Determine if there are any stored jobs for a given class.
  11950. *
  11951. * @param string $job
  11952. * @return bool
  11953. * @static
  11954. */
  11955. public static function hasPushed($job)
  11956. {
  11957. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11958. return $instance->hasPushed($job);
  11959. }
  11960. /**
  11961. * Get the size of the queue.
  11962. *
  11963. * @param string|null $queue
  11964. * @return int
  11965. * @static
  11966. */
  11967. public static function size($queue = null)
  11968. {
  11969. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11970. return $instance->size($queue);
  11971. }
  11972. /**
  11973. * Get the number of pending jobs.
  11974. *
  11975. * @param string|null $queue
  11976. * @return int
  11977. * @static
  11978. */
  11979. public static function pendingSize($queue = null)
  11980. {
  11981. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11982. return $instance->pendingSize($queue);
  11983. }
  11984. /**
  11985. * Get the number of delayed jobs.
  11986. *
  11987. * @param string|null $queue
  11988. * @return int
  11989. * @static
  11990. */
  11991. public static function delayedSize($queue = null)
  11992. {
  11993. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  11994. return $instance->delayedSize($queue);
  11995. }
  11996. /**
  11997. * Get the number of reserved jobs.
  11998. *
  11999. * @param string|null $queue
  12000. * @return int
  12001. * @static
  12002. */
  12003. public static function reservedSize($queue = null)
  12004. {
  12005. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12006. return $instance->reservedSize($queue);
  12007. }
  12008. /**
  12009. * Get the creation timestamp of the oldest pending job, excluding delayed jobs.
  12010. *
  12011. * @param string|null $queue
  12012. * @return int|null
  12013. * @static
  12014. */
  12015. public static function creationTimeOfOldestPendingJob($queue = null)
  12016. {
  12017. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12018. return $instance->creationTimeOfOldestPendingJob($queue);
  12019. }
  12020. /**
  12021. * Push a new job onto the queue.
  12022. *
  12023. * @param string|object $job
  12024. * @param mixed $data
  12025. * @param string|null $queue
  12026. * @return mixed
  12027. * @static
  12028. */
  12029. public static function push($job, $data = '', $queue = null)
  12030. {
  12031. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12032. return $instance->push($job, $data, $queue);
  12033. }
  12034. /**
  12035. * Determine if a job should be faked or actually dispatched.
  12036. *
  12037. * @param object $job
  12038. * @return bool
  12039. * @static
  12040. */
  12041. public static function shouldFakeJob($job)
  12042. {
  12043. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12044. return $instance->shouldFakeJob($job);
  12045. }
  12046. /**
  12047. * Push a raw payload onto the queue.
  12048. *
  12049. * @param string $payload
  12050. * @param string|null $queue
  12051. * @param array $options
  12052. * @return mixed
  12053. * @static
  12054. */
  12055. public static function pushRaw($payload, $queue = null, $options = [])
  12056. {
  12057. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12058. return $instance->pushRaw($payload, $queue, $options);
  12059. }
  12060. /**
  12061. * Push a new job onto the queue after (n) seconds.
  12062. *
  12063. * @param \DateTimeInterface|\DateInterval|int $delay
  12064. * @param string|object $job
  12065. * @param mixed $data
  12066. * @param string|null $queue
  12067. * @return mixed
  12068. * @static
  12069. */
  12070. public static function later($delay, $job, $data = '', $queue = null)
  12071. {
  12072. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12073. return $instance->later($delay, $job, $data, $queue);
  12074. }
  12075. /**
  12076. * Push a new job onto the queue.
  12077. *
  12078. * @param string $queue
  12079. * @param string|object $job
  12080. * @param mixed $data
  12081. * @return mixed
  12082. * @static
  12083. */
  12084. public static function pushOn($queue, $job, $data = '')
  12085. {
  12086. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12087. return $instance->pushOn($queue, $job, $data);
  12088. }
  12089. /**
  12090. * Push a new job onto a specific queue after (n) seconds.
  12091. *
  12092. * @param string $queue
  12093. * @param \DateTimeInterface|\DateInterval|int $delay
  12094. * @param string|object $job
  12095. * @param mixed $data
  12096. * @return mixed
  12097. * @static
  12098. */
  12099. public static function laterOn($queue, $delay, $job, $data = '')
  12100. {
  12101. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12102. return $instance->laterOn($queue, $delay, $job, $data);
  12103. }
  12104. /**
  12105. * Pop the next job off of the queue.
  12106. *
  12107. * @param string|null $queue
  12108. * @return \Illuminate\Contracts\Queue\Job|null
  12109. * @static
  12110. */
  12111. public static function pop($queue = null)
  12112. {
  12113. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12114. return $instance->pop($queue);
  12115. }
  12116. /**
  12117. * Push an array of jobs onto the queue.
  12118. *
  12119. * @param array $jobs
  12120. * @param mixed $data
  12121. * @param string|null $queue
  12122. * @return mixed
  12123. * @static
  12124. */
  12125. public static function bulk($jobs, $data = '', $queue = null)
  12126. {
  12127. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12128. return $instance->bulk($jobs, $data, $queue);
  12129. }
  12130. /**
  12131. * Get the jobs that have been pushed.
  12132. *
  12133. * @return array
  12134. * @static
  12135. */
  12136. public static function pushedJobs()
  12137. {
  12138. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12139. return $instance->pushedJobs();
  12140. }
  12141. /**
  12142. * Get the payloads that were pushed raw.
  12143. *
  12144. * @return list<RawPushType>
  12145. * @static
  12146. */
  12147. public static function rawPushes()
  12148. {
  12149. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12150. return $instance->rawPushes();
  12151. }
  12152. /**
  12153. * Specify if jobs should be serialized and restored when being "pushed" to the queue.
  12154. *
  12155. * @param bool $serializeAndRestore
  12156. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  12157. * @static
  12158. */
  12159. public static function serializeAndRestore($serializeAndRestore = true)
  12160. {
  12161. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12162. return $instance->serializeAndRestore($serializeAndRestore);
  12163. }
  12164. /**
  12165. * Get the connection name for the queue.
  12166. *
  12167. * @return string
  12168. * @static
  12169. */
  12170. public static function getConnectionName()
  12171. {
  12172. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12173. return $instance->getConnectionName();
  12174. }
  12175. /**
  12176. * Set the connection name for the queue.
  12177. *
  12178. * @param string $name
  12179. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  12180. * @static
  12181. */
  12182. public static function setConnectionName($name)
  12183. {
  12184. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  12185. return $instance->setConnectionName($name);
  12186. }
  12187. /**
  12188. * Migrate the delayed jobs that are ready to the regular queue.
  12189. *
  12190. * @param string $from
  12191. * @param string $to
  12192. * @return array
  12193. * @static
  12194. */
  12195. public static function migrateExpiredJobs($from, $to)
  12196. {
  12197. /** @var \Illuminate\Queue\RedisQueue $instance */
  12198. return $instance->migrateExpiredJobs($from, $to);
  12199. }
  12200. /**
  12201. * Delete a reserved job from the queue.
  12202. *
  12203. * @param string $queue
  12204. * @param \Illuminate\Queue\Jobs\RedisJob $job
  12205. * @return void
  12206. * @static
  12207. */
  12208. public static function deleteReserved($queue, $job)
  12209. {
  12210. /** @var \Illuminate\Queue\RedisQueue $instance */
  12211. $instance->deleteReserved($queue, $job);
  12212. }
  12213. /**
  12214. * Delete a reserved job from the reserved queue and release it.
  12215. *
  12216. * @param string $queue
  12217. * @param \Illuminate\Queue\Jobs\RedisJob $job
  12218. * @param int $delay
  12219. * @return void
  12220. * @static
  12221. */
  12222. public static function deleteAndRelease($queue, $job, $delay)
  12223. {
  12224. /** @var \Illuminate\Queue\RedisQueue $instance */
  12225. $instance->deleteAndRelease($queue, $job, $delay);
  12226. }
  12227. /**
  12228. * Delete all of the jobs from the queue.
  12229. *
  12230. * @param string $queue
  12231. * @return int
  12232. * @static
  12233. */
  12234. public static function clear($queue)
  12235. {
  12236. /** @var \Illuminate\Queue\RedisQueue $instance */
  12237. return $instance->clear($queue);
  12238. }
  12239. /**
  12240. * Get the queue or return the default.
  12241. *
  12242. * @param string|null $queue
  12243. * @return string
  12244. * @static
  12245. */
  12246. public static function getQueue($queue)
  12247. {
  12248. /** @var \Illuminate\Queue\RedisQueue $instance */
  12249. return $instance->getQueue($queue);
  12250. }
  12251. /**
  12252. * Get the connection for the queue.
  12253. *
  12254. * @return \Illuminate\Redis\Connections\Connection
  12255. * @static
  12256. */
  12257. public static function getConnection()
  12258. {
  12259. /** @var \Illuminate\Queue\RedisQueue $instance */
  12260. return $instance->getConnection();
  12261. }
  12262. /**
  12263. * Get the underlying Redis instance.
  12264. *
  12265. * @return \Illuminate\Contracts\Redis\Factory
  12266. * @static
  12267. */
  12268. public static function getRedis()
  12269. {
  12270. /** @var \Illuminate\Queue\RedisQueue $instance */
  12271. return $instance->getRedis();
  12272. }
  12273. /**
  12274. * Get the maximum number of attempts for an object-based queue handler.
  12275. *
  12276. * @param mixed $job
  12277. * @return mixed
  12278. * @static
  12279. */
  12280. public static function getJobTries($job)
  12281. {
  12282. //Method inherited from \Illuminate\Queue\Queue
  12283. /** @var \Illuminate\Queue\RedisQueue $instance */
  12284. return $instance->getJobTries($job);
  12285. }
  12286. /**
  12287. * Get the backoff for an object-based queue handler.
  12288. *
  12289. * @param mixed $job
  12290. * @return mixed
  12291. * @static
  12292. */
  12293. public static function getJobBackoff($job)
  12294. {
  12295. //Method inherited from \Illuminate\Queue\Queue
  12296. /** @var \Illuminate\Queue\RedisQueue $instance */
  12297. return $instance->getJobBackoff($job);
  12298. }
  12299. /**
  12300. * Get the expiration timestamp for an object-based queue handler.
  12301. *
  12302. * @param mixed $job
  12303. * @return mixed
  12304. * @static
  12305. */
  12306. public static function getJobExpiration($job)
  12307. {
  12308. //Method inherited from \Illuminate\Queue\Queue
  12309. /** @var \Illuminate\Queue\RedisQueue $instance */
  12310. return $instance->getJobExpiration($job);
  12311. }
  12312. /**
  12313. * Register a callback to be executed when creating job payloads.
  12314. *
  12315. * @param callable|null $callback
  12316. * @return void
  12317. * @static
  12318. */
  12319. public static function createPayloadUsing($callback)
  12320. {
  12321. //Method inherited from \Illuminate\Queue\Queue
  12322. \Illuminate\Queue\RedisQueue::createPayloadUsing($callback);
  12323. }
  12324. /**
  12325. * Get the container instance being used by the connection.
  12326. *
  12327. * @return \Illuminate\Container\Container
  12328. * @static
  12329. */
  12330. public static function getContainer()
  12331. {
  12332. //Method inherited from \Illuminate\Queue\Queue
  12333. /** @var \Illuminate\Queue\RedisQueue $instance */
  12334. return $instance->getContainer();
  12335. }
  12336. /**
  12337. * Set the IoC container instance.
  12338. *
  12339. * @param \Illuminate\Container\Container $container
  12340. * @return void
  12341. * @static
  12342. */
  12343. public static function setContainer($container)
  12344. {
  12345. //Method inherited from \Illuminate\Queue\Queue
  12346. /** @var \Illuminate\Queue\RedisQueue $instance */
  12347. $instance->setContainer($container);
  12348. }
  12349. }
  12350. /**
  12351. * @see \Illuminate\Cache\RateLimiter
  12352. */
  12353. class RateLimiter {
  12354. /**
  12355. * Register a named limiter configuration.
  12356. *
  12357. * @param \BackedEnum|\UnitEnum|string $name
  12358. * @param \Closure $callback
  12359. * @return \Illuminate\Cache\RateLimiter
  12360. * @static
  12361. */
  12362. public static function for($name, $callback)
  12363. {
  12364. /** @var \Illuminate\Cache\RateLimiter $instance */
  12365. return $instance->for($name, $callback);
  12366. }
  12367. /**
  12368. * Get the given named rate limiter.
  12369. *
  12370. * @param \BackedEnum|\UnitEnum|string $name
  12371. * @return \Closure|null
  12372. * @static
  12373. */
  12374. public static function limiter($name)
  12375. {
  12376. /** @var \Illuminate\Cache\RateLimiter $instance */
  12377. return $instance->limiter($name);
  12378. }
  12379. /**
  12380. * Attempts to execute a callback if it's not limited.
  12381. *
  12382. * @param string $key
  12383. * @param int $maxAttempts
  12384. * @param \Closure $callback
  12385. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12386. * @return mixed
  12387. * @static
  12388. */
  12389. public static function attempt($key, $maxAttempts, $callback, $decaySeconds = 60)
  12390. {
  12391. /** @var \Illuminate\Cache\RateLimiter $instance */
  12392. return $instance->attempt($key, $maxAttempts, $callback, $decaySeconds);
  12393. }
  12394. /**
  12395. * Determine if the given key has been "accessed" too many times.
  12396. *
  12397. * @param string $key
  12398. * @param int $maxAttempts
  12399. * @return bool
  12400. * @static
  12401. */
  12402. public static function tooManyAttempts($key, $maxAttempts)
  12403. {
  12404. /** @var \Illuminate\Cache\RateLimiter $instance */
  12405. return $instance->tooManyAttempts($key, $maxAttempts);
  12406. }
  12407. /**
  12408. * Increment (by 1) the counter for a given key for a given decay time.
  12409. *
  12410. * @param string $key
  12411. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12412. * @return int
  12413. * @static
  12414. */
  12415. public static function hit($key, $decaySeconds = 60)
  12416. {
  12417. /** @var \Illuminate\Cache\RateLimiter $instance */
  12418. return $instance->hit($key, $decaySeconds);
  12419. }
  12420. /**
  12421. * Increment the counter for a given key for a given decay time by a given amount.
  12422. *
  12423. * @param string $key
  12424. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12425. * @param int $amount
  12426. * @return int
  12427. * @static
  12428. */
  12429. public static function increment($key, $decaySeconds = 60, $amount = 1)
  12430. {
  12431. /** @var \Illuminate\Cache\RateLimiter $instance */
  12432. return $instance->increment($key, $decaySeconds, $amount);
  12433. }
  12434. /**
  12435. * Decrement the counter for a given key for a given decay time by a given amount.
  12436. *
  12437. * @param string $key
  12438. * @param \DateTimeInterface|\DateInterval|int $decaySeconds
  12439. * @param int $amount
  12440. * @return int
  12441. * @static
  12442. */
  12443. public static function decrement($key, $decaySeconds = 60, $amount = 1)
  12444. {
  12445. /** @var \Illuminate\Cache\RateLimiter $instance */
  12446. return $instance->decrement($key, $decaySeconds, $amount);
  12447. }
  12448. /**
  12449. * Get the number of attempts for the given key.
  12450. *
  12451. * @param string $key
  12452. * @return mixed
  12453. * @static
  12454. */
  12455. public static function attempts($key)
  12456. {
  12457. /** @var \Illuminate\Cache\RateLimiter $instance */
  12458. return $instance->attempts($key);
  12459. }
  12460. /**
  12461. * Reset the number of attempts for the given key.
  12462. *
  12463. * @param string $key
  12464. * @return mixed
  12465. * @static
  12466. */
  12467. public static function resetAttempts($key)
  12468. {
  12469. /** @var \Illuminate\Cache\RateLimiter $instance */
  12470. return $instance->resetAttempts($key);
  12471. }
  12472. /**
  12473. * Get the number of retries left for the given key.
  12474. *
  12475. * @param string $key
  12476. * @param int $maxAttempts
  12477. * @return int
  12478. * @static
  12479. */
  12480. public static function remaining($key, $maxAttempts)
  12481. {
  12482. /** @var \Illuminate\Cache\RateLimiter $instance */
  12483. return $instance->remaining($key, $maxAttempts);
  12484. }
  12485. /**
  12486. * Get the number of retries left for the given key.
  12487. *
  12488. * @param string $key
  12489. * @param int $maxAttempts
  12490. * @return int
  12491. * @static
  12492. */
  12493. public static function retriesLeft($key, $maxAttempts)
  12494. {
  12495. /** @var \Illuminate\Cache\RateLimiter $instance */
  12496. return $instance->retriesLeft($key, $maxAttempts);
  12497. }
  12498. /**
  12499. * Clear the hits and lockout timer for the given key.
  12500. *
  12501. * @param string $key
  12502. * @return void
  12503. * @static
  12504. */
  12505. public static function clear($key)
  12506. {
  12507. /** @var \Illuminate\Cache\RateLimiter $instance */
  12508. $instance->clear($key);
  12509. }
  12510. /**
  12511. * Get the number of seconds until the "key" is accessible again.
  12512. *
  12513. * @param string $key
  12514. * @return int
  12515. * @static
  12516. */
  12517. public static function availableIn($key)
  12518. {
  12519. /** @var \Illuminate\Cache\RateLimiter $instance */
  12520. return $instance->availableIn($key);
  12521. }
  12522. /**
  12523. * Clean the rate limiter key from unicode characters.
  12524. *
  12525. * @param string $key
  12526. * @return string
  12527. * @static
  12528. */
  12529. public static function cleanRateLimiterKey($key)
  12530. {
  12531. /** @var \Illuminate\Cache\RateLimiter $instance */
  12532. return $instance->cleanRateLimiterKey($key);
  12533. }
  12534. }
  12535. /**
  12536. * @see \Illuminate\Routing\Redirector
  12537. */
  12538. class Redirect {
  12539. /**
  12540. * Create a new redirect response to the previous location.
  12541. *
  12542. * @param int $status
  12543. * @param array $headers
  12544. * @param mixed $fallback
  12545. * @return \Illuminate\Http\RedirectResponse
  12546. * @static
  12547. */
  12548. public static function back($status = 302, $headers = [], $fallback = false)
  12549. {
  12550. /** @var \Illuminate\Routing\Redirector $instance */
  12551. return $instance->back($status, $headers, $fallback);
  12552. }
  12553. /**
  12554. * Create a new redirect response to the current URI.
  12555. *
  12556. * @param int $status
  12557. * @param array $headers
  12558. * @return \Illuminate\Http\RedirectResponse
  12559. * @static
  12560. */
  12561. public static function refresh($status = 302, $headers = [])
  12562. {
  12563. /** @var \Illuminate\Routing\Redirector $instance */
  12564. return $instance->refresh($status, $headers);
  12565. }
  12566. /**
  12567. * Create a new redirect response, while putting the current URL in the session.
  12568. *
  12569. * @param string $path
  12570. * @param int $status
  12571. * @param array $headers
  12572. * @param bool|null $secure
  12573. * @return \Illuminate\Http\RedirectResponse
  12574. * @static
  12575. */
  12576. public static function guest($path, $status = 302, $headers = [], $secure = null)
  12577. {
  12578. /** @var \Illuminate\Routing\Redirector $instance */
  12579. return $instance->guest($path, $status, $headers, $secure);
  12580. }
  12581. /**
  12582. * Create a new redirect response to the previously intended location.
  12583. *
  12584. * @param mixed $default
  12585. * @param int $status
  12586. * @param array $headers
  12587. * @param bool|null $secure
  12588. * @return \Illuminate\Http\RedirectResponse
  12589. * @static
  12590. */
  12591. public static function intended($default = '/', $status = 302, $headers = [], $secure = null)
  12592. {
  12593. /** @var \Illuminate\Routing\Redirector $instance */
  12594. return $instance->intended($default, $status, $headers, $secure);
  12595. }
  12596. /**
  12597. * Create a new redirect response to the given path.
  12598. *
  12599. * @param string $path
  12600. * @param int $status
  12601. * @param array $headers
  12602. * @param bool|null $secure
  12603. * @return \Illuminate\Http\RedirectResponse
  12604. * @static
  12605. */
  12606. public static function to($path, $status = 302, $headers = [], $secure = null)
  12607. {
  12608. /** @var \Illuminate\Routing\Redirector $instance */
  12609. return $instance->to($path, $status, $headers, $secure);
  12610. }
  12611. /**
  12612. * Create a new redirect response to an external URL (no validation).
  12613. *
  12614. * @param string $path
  12615. * @param int $status
  12616. * @param array $headers
  12617. * @return \Illuminate\Http\RedirectResponse
  12618. * @static
  12619. */
  12620. public static function away($path, $status = 302, $headers = [])
  12621. {
  12622. /** @var \Illuminate\Routing\Redirector $instance */
  12623. return $instance->away($path, $status, $headers);
  12624. }
  12625. /**
  12626. * Create a new redirect response to the given HTTPS path.
  12627. *
  12628. * @param string $path
  12629. * @param int $status
  12630. * @param array $headers
  12631. * @return \Illuminate\Http\RedirectResponse
  12632. * @static
  12633. */
  12634. public static function secure($path, $status = 302, $headers = [])
  12635. {
  12636. /** @var \Illuminate\Routing\Redirector $instance */
  12637. return $instance->secure($path, $status, $headers);
  12638. }
  12639. /**
  12640. * Create a new redirect response to a named route.
  12641. *
  12642. * @param \BackedEnum|string $route
  12643. * @param mixed $parameters
  12644. * @param int $status
  12645. * @param array $headers
  12646. * @return \Illuminate\Http\RedirectResponse
  12647. * @static
  12648. */
  12649. public static function route($route, $parameters = [], $status = 302, $headers = [])
  12650. {
  12651. /** @var \Illuminate\Routing\Redirector $instance */
  12652. return $instance->route($route, $parameters, $status, $headers);
  12653. }
  12654. /**
  12655. * Create a new redirect response to a signed named route.
  12656. *
  12657. * @param \BackedEnum|string $route
  12658. * @param mixed $parameters
  12659. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  12660. * @param int $status
  12661. * @param array $headers
  12662. * @return \Illuminate\Http\RedirectResponse
  12663. * @static
  12664. */
  12665. public static function signedRoute($route, $parameters = [], $expiration = null, $status = 302, $headers = [])
  12666. {
  12667. /** @var \Illuminate\Routing\Redirector $instance */
  12668. return $instance->signedRoute($route, $parameters, $expiration, $status, $headers);
  12669. }
  12670. /**
  12671. * Create a new redirect response to a signed named route.
  12672. *
  12673. * @param \BackedEnum|string $route
  12674. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  12675. * @param mixed $parameters
  12676. * @param int $status
  12677. * @param array $headers
  12678. * @return \Illuminate\Http\RedirectResponse
  12679. * @static
  12680. */
  12681. public static function temporarySignedRoute($route, $expiration, $parameters = [], $status = 302, $headers = [])
  12682. {
  12683. /** @var \Illuminate\Routing\Redirector $instance */
  12684. return $instance->temporarySignedRoute($route, $expiration, $parameters, $status, $headers);
  12685. }
  12686. /**
  12687. * Create a new redirect response to a controller action.
  12688. *
  12689. * @param string|array $action
  12690. * @param mixed $parameters
  12691. * @param int $status
  12692. * @param array $headers
  12693. * @return \Illuminate\Http\RedirectResponse
  12694. * @static
  12695. */
  12696. public static function action($action, $parameters = [], $status = 302, $headers = [])
  12697. {
  12698. /** @var \Illuminate\Routing\Redirector $instance */
  12699. return $instance->action($action, $parameters, $status, $headers);
  12700. }
  12701. /**
  12702. * Get the URL generator instance.
  12703. *
  12704. * @return \Illuminate\Routing\UrlGenerator
  12705. * @static
  12706. */
  12707. public static function getUrlGenerator()
  12708. {
  12709. /** @var \Illuminate\Routing\Redirector $instance */
  12710. return $instance->getUrlGenerator();
  12711. }
  12712. /**
  12713. * Set the active session store.
  12714. *
  12715. * @param \Illuminate\Session\Store $session
  12716. * @return void
  12717. * @static
  12718. */
  12719. public static function setSession($session)
  12720. {
  12721. /** @var \Illuminate\Routing\Redirector $instance */
  12722. $instance->setSession($session);
  12723. }
  12724. /**
  12725. * Get the "intended" URL from the session.
  12726. *
  12727. * @return string|null
  12728. * @static
  12729. */
  12730. public static function getIntendedUrl()
  12731. {
  12732. /** @var \Illuminate\Routing\Redirector $instance */
  12733. return $instance->getIntendedUrl();
  12734. }
  12735. /**
  12736. * Set the "intended" URL in the session.
  12737. *
  12738. * @param string $url
  12739. * @return \Illuminate\Routing\Redirector
  12740. * @static
  12741. */
  12742. public static function setIntendedUrl($url)
  12743. {
  12744. /** @var \Illuminate\Routing\Redirector $instance */
  12745. return $instance->setIntendedUrl($url);
  12746. }
  12747. /**
  12748. * Register a custom macro.
  12749. *
  12750. * @param string $name
  12751. * @param object|callable $macro
  12752. * @param-closure-this static $macro
  12753. * @return void
  12754. * @static
  12755. */
  12756. public static function macro($name, $macro)
  12757. {
  12758. \Illuminate\Routing\Redirector::macro($name, $macro);
  12759. }
  12760. /**
  12761. * Mix another object into the class.
  12762. *
  12763. * @param object $mixin
  12764. * @param bool $replace
  12765. * @return void
  12766. * @throws \ReflectionException
  12767. * @static
  12768. */
  12769. public static function mixin($mixin, $replace = true)
  12770. {
  12771. \Illuminate\Routing\Redirector::mixin($mixin, $replace);
  12772. }
  12773. /**
  12774. * Checks if macro is registered.
  12775. *
  12776. * @param string $name
  12777. * @return bool
  12778. * @static
  12779. */
  12780. public static function hasMacro($name)
  12781. {
  12782. return \Illuminate\Routing\Redirector::hasMacro($name);
  12783. }
  12784. /**
  12785. * Flush the existing macros.
  12786. *
  12787. * @return void
  12788. * @static
  12789. */
  12790. public static function flushMacros()
  12791. {
  12792. \Illuminate\Routing\Redirector::flushMacros();
  12793. }
  12794. }
  12795. /**
  12796. * @see \Illuminate\Http\Request
  12797. */
  12798. class Request {
  12799. /**
  12800. * Create a new Illuminate HTTP request from server variables.
  12801. *
  12802. * @return static
  12803. * @static
  12804. */
  12805. public static function capture()
  12806. {
  12807. return \Illuminate\Http\Request::capture();
  12808. }
  12809. /**
  12810. * Return the Request instance.
  12811. *
  12812. * @return \Illuminate\Http\Request
  12813. * @static
  12814. */
  12815. public static function instance()
  12816. {
  12817. /** @var \Illuminate\Http\Request $instance */
  12818. return $instance->instance();
  12819. }
  12820. /**
  12821. * Get the request method.
  12822. *
  12823. * @return string
  12824. * @static
  12825. */
  12826. public static function method()
  12827. {
  12828. /** @var \Illuminate\Http\Request $instance */
  12829. return $instance->method();
  12830. }
  12831. /**
  12832. * Get a URI instance for the request.
  12833. *
  12834. * @return \Illuminate\Support\Uri
  12835. * @static
  12836. */
  12837. public static function uri()
  12838. {
  12839. /** @var \Illuminate\Http\Request $instance */
  12840. return $instance->uri();
  12841. }
  12842. /**
  12843. * Get the root URL for the application.
  12844. *
  12845. * @return string
  12846. * @static
  12847. */
  12848. public static function root()
  12849. {
  12850. /** @var \Illuminate\Http\Request $instance */
  12851. return $instance->root();
  12852. }
  12853. /**
  12854. * Get the URL (no query string) for the request.
  12855. *
  12856. * @return string
  12857. * @static
  12858. */
  12859. public static function url()
  12860. {
  12861. /** @var \Illuminate\Http\Request $instance */
  12862. return $instance->url();
  12863. }
  12864. /**
  12865. * Get the full URL for the request.
  12866. *
  12867. * @return string
  12868. * @static
  12869. */
  12870. public static function fullUrl()
  12871. {
  12872. /** @var \Illuminate\Http\Request $instance */
  12873. return $instance->fullUrl();
  12874. }
  12875. /**
  12876. * Get the full URL for the request with the added query string parameters.
  12877. *
  12878. * @param array $query
  12879. * @return string
  12880. * @static
  12881. */
  12882. public static function fullUrlWithQuery($query)
  12883. {
  12884. /** @var \Illuminate\Http\Request $instance */
  12885. return $instance->fullUrlWithQuery($query);
  12886. }
  12887. /**
  12888. * Get the full URL for the request without the given query string parameters.
  12889. *
  12890. * @param array|string $keys
  12891. * @return string
  12892. * @static
  12893. */
  12894. public static function fullUrlWithoutQuery($keys)
  12895. {
  12896. /** @var \Illuminate\Http\Request $instance */
  12897. return $instance->fullUrlWithoutQuery($keys);
  12898. }
  12899. /**
  12900. * Get the current path info for the request.
  12901. *
  12902. * @return string
  12903. * @static
  12904. */
  12905. public static function path()
  12906. {
  12907. /** @var \Illuminate\Http\Request $instance */
  12908. return $instance->path();
  12909. }
  12910. /**
  12911. * Get the current decoded path info for the request.
  12912. *
  12913. * @return string
  12914. * @static
  12915. */
  12916. public static function decodedPath()
  12917. {
  12918. /** @var \Illuminate\Http\Request $instance */
  12919. return $instance->decodedPath();
  12920. }
  12921. /**
  12922. * Get a segment from the URI (1 based index).
  12923. *
  12924. * @param int $index
  12925. * @param string|null $default
  12926. * @return string|null
  12927. * @static
  12928. */
  12929. public static function segment($index, $default = null)
  12930. {
  12931. /** @var \Illuminate\Http\Request $instance */
  12932. return $instance->segment($index, $default);
  12933. }
  12934. /**
  12935. * Get all of the segments for the request path.
  12936. *
  12937. * @return array
  12938. * @static
  12939. */
  12940. public static function segments()
  12941. {
  12942. /** @var \Illuminate\Http\Request $instance */
  12943. return $instance->segments();
  12944. }
  12945. /**
  12946. * Determine if the current request URI matches a pattern.
  12947. *
  12948. * @param mixed $patterns
  12949. * @return bool
  12950. * @static
  12951. */
  12952. public static function is(...$patterns)
  12953. {
  12954. /** @var \Illuminate\Http\Request $instance */
  12955. return $instance->is(...$patterns);
  12956. }
  12957. /**
  12958. * Determine if the route name matches a given pattern.
  12959. *
  12960. * @param mixed $patterns
  12961. * @return bool
  12962. * @static
  12963. */
  12964. public static function routeIs(...$patterns)
  12965. {
  12966. /** @var \Illuminate\Http\Request $instance */
  12967. return $instance->routeIs(...$patterns);
  12968. }
  12969. /**
  12970. * Determine if the current request URL and query string match a pattern.
  12971. *
  12972. * @param mixed $patterns
  12973. * @return bool
  12974. * @static
  12975. */
  12976. public static function fullUrlIs(...$patterns)
  12977. {
  12978. /** @var \Illuminate\Http\Request $instance */
  12979. return $instance->fullUrlIs(...$patterns);
  12980. }
  12981. /**
  12982. * Get the host name.
  12983. *
  12984. * @return string
  12985. * @static
  12986. */
  12987. public static function host()
  12988. {
  12989. /** @var \Illuminate\Http\Request $instance */
  12990. return $instance->host();
  12991. }
  12992. /**
  12993. * Get the HTTP host being requested.
  12994. *
  12995. * @return string
  12996. * @static
  12997. */
  12998. public static function httpHost()
  12999. {
  13000. /** @var \Illuminate\Http\Request $instance */
  13001. return $instance->httpHost();
  13002. }
  13003. /**
  13004. * Get the scheme and HTTP host.
  13005. *
  13006. * @return string
  13007. * @static
  13008. */
  13009. public static function schemeAndHttpHost()
  13010. {
  13011. /** @var \Illuminate\Http\Request $instance */
  13012. return $instance->schemeAndHttpHost();
  13013. }
  13014. /**
  13015. * Determine if the request is the result of an AJAX call.
  13016. *
  13017. * @return bool
  13018. * @static
  13019. */
  13020. public static function ajax()
  13021. {
  13022. /** @var \Illuminate\Http\Request $instance */
  13023. return $instance->ajax();
  13024. }
  13025. /**
  13026. * Determine if the request is the result of a PJAX call.
  13027. *
  13028. * @return bool
  13029. * @static
  13030. */
  13031. public static function pjax()
  13032. {
  13033. /** @var \Illuminate\Http\Request $instance */
  13034. return $instance->pjax();
  13035. }
  13036. /**
  13037. * Determine if the request is the result of a prefetch call.
  13038. *
  13039. * @return bool
  13040. * @static
  13041. */
  13042. public static function prefetch()
  13043. {
  13044. /** @var \Illuminate\Http\Request $instance */
  13045. return $instance->prefetch();
  13046. }
  13047. /**
  13048. * Determine if the request is over HTTPS.
  13049. *
  13050. * @return bool
  13051. * @static
  13052. */
  13053. public static function secure()
  13054. {
  13055. /** @var \Illuminate\Http\Request $instance */
  13056. return $instance->secure();
  13057. }
  13058. /**
  13059. * Get the client IP address.
  13060. *
  13061. * @return string|null
  13062. * @static
  13063. */
  13064. public static function ip()
  13065. {
  13066. /** @var \Illuminate\Http\Request $instance */
  13067. return $instance->ip();
  13068. }
  13069. /**
  13070. * Get the client IP addresses.
  13071. *
  13072. * @return array
  13073. * @static
  13074. */
  13075. public static function ips()
  13076. {
  13077. /** @var \Illuminate\Http\Request $instance */
  13078. return $instance->ips();
  13079. }
  13080. /**
  13081. * Get the client user agent.
  13082. *
  13083. * @return string|null
  13084. * @static
  13085. */
  13086. public static function userAgent()
  13087. {
  13088. /** @var \Illuminate\Http\Request $instance */
  13089. return $instance->userAgent();
  13090. }
  13091. /**
  13092. * Merge new input into the current request's input array.
  13093. *
  13094. * @param array $input
  13095. * @return \Illuminate\Http\Request
  13096. * @static
  13097. */
  13098. public static function merge($input)
  13099. {
  13100. /** @var \Illuminate\Http\Request $instance */
  13101. return $instance->merge($input);
  13102. }
  13103. /**
  13104. * Merge new input into the request's input, but only when that key is missing from the request.
  13105. *
  13106. * @param array $input
  13107. * @return \Illuminate\Http\Request
  13108. * @static
  13109. */
  13110. public static function mergeIfMissing($input)
  13111. {
  13112. /** @var \Illuminate\Http\Request $instance */
  13113. return $instance->mergeIfMissing($input);
  13114. }
  13115. /**
  13116. * Replace the input values for the current request.
  13117. *
  13118. * @param array $input
  13119. * @return \Illuminate\Http\Request
  13120. * @static
  13121. */
  13122. public static function replace($input)
  13123. {
  13124. /** @var \Illuminate\Http\Request $instance */
  13125. return $instance->replace($input);
  13126. }
  13127. /**
  13128. * This method belongs to Symfony HttpFoundation and is not usually needed when using Laravel.
  13129. *
  13130. * Instead, you may use the "input" method.
  13131. *
  13132. * @param string $key
  13133. * @param mixed $default
  13134. * @return mixed
  13135. * @static
  13136. */
  13137. public static function get($key, $default = null)
  13138. {
  13139. /** @var \Illuminate\Http\Request $instance */
  13140. return $instance->get($key, $default);
  13141. }
  13142. /**
  13143. * Get the JSON payload for the request.
  13144. *
  13145. * @param string|null $key
  13146. * @param mixed $default
  13147. * @return ($key is null ? \Symfony\Component\HttpFoundation\InputBag : mixed)
  13148. * @static
  13149. */
  13150. public static function json($key = null, $default = null)
  13151. {
  13152. /** @var \Illuminate\Http\Request $instance */
  13153. return $instance->json($key, $default);
  13154. }
  13155. /**
  13156. * Create a new request instance from the given Laravel request.
  13157. *
  13158. * @param \Illuminate\Http\Request $from
  13159. * @param \Illuminate\Http\Request|null $to
  13160. * @return static
  13161. * @static
  13162. */
  13163. public static function createFrom($from, $to = null)
  13164. {
  13165. return \Illuminate\Http\Request::createFrom($from, $to);
  13166. }
  13167. /**
  13168. * Create an Illuminate request from a Symfony instance.
  13169. *
  13170. * @param \Symfony\Component\HttpFoundation\Request $request
  13171. * @return static
  13172. * @static
  13173. */
  13174. public static function createFromBase($request)
  13175. {
  13176. return \Illuminate\Http\Request::createFromBase($request);
  13177. }
  13178. /**
  13179. * Clones a request and overrides some of its parameters.
  13180. *
  13181. * @return static
  13182. * @param array|null $query The GET parameters
  13183. * @param array|null $request The POST parameters
  13184. * @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  13185. * @param array|null $cookies The COOKIE parameters
  13186. * @param array|null $files The FILES parameters
  13187. * @param array|null $server The SERVER parameters
  13188. * @static
  13189. */
  13190. public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null)
  13191. {
  13192. /** @var \Illuminate\Http\Request $instance */
  13193. return $instance->duplicate($query, $request, $attributes, $cookies, $files, $server);
  13194. }
  13195. /**
  13196. * Whether the request contains a Session object.
  13197. *
  13198. * This method does not give any information about the state of the session object,
  13199. * like whether the session is started or not. It is just a way to check if this Request
  13200. * is associated with a Session instance.
  13201. *
  13202. * @param bool $skipIfUninitialized When true, ignores factories injected by `setSessionFactory`
  13203. * @static
  13204. */
  13205. public static function hasSession($skipIfUninitialized = false)
  13206. {
  13207. /** @var \Illuminate\Http\Request $instance */
  13208. return $instance->hasSession($skipIfUninitialized);
  13209. }
  13210. /**
  13211. * Gets the Session.
  13212. *
  13213. * @throws SessionNotFoundException When session is not set properly
  13214. * @static
  13215. */
  13216. public static function getSession()
  13217. {
  13218. /** @var \Illuminate\Http\Request $instance */
  13219. return $instance->getSession();
  13220. }
  13221. /**
  13222. * Get the session associated with the request.
  13223. *
  13224. * @return \Illuminate\Contracts\Session\Session
  13225. * @throws \RuntimeException
  13226. * @static
  13227. */
  13228. public static function session()
  13229. {
  13230. /** @var \Illuminate\Http\Request $instance */
  13231. return $instance->session();
  13232. }
  13233. /**
  13234. * Set the session instance on the request.
  13235. *
  13236. * @param \Illuminate\Contracts\Session\Session $session
  13237. * @return void
  13238. * @static
  13239. */
  13240. public static function setLaravelSession($session)
  13241. {
  13242. /** @var \Illuminate\Http\Request $instance */
  13243. $instance->setLaravelSession($session);
  13244. }
  13245. /**
  13246. * Set the locale for the request instance.
  13247. *
  13248. * @param string $locale
  13249. * @return void
  13250. * @static
  13251. */
  13252. public static function setRequestLocale($locale)
  13253. {
  13254. /** @var \Illuminate\Http\Request $instance */
  13255. $instance->setRequestLocale($locale);
  13256. }
  13257. /**
  13258. * Set the default locale for the request instance.
  13259. *
  13260. * @param string $locale
  13261. * @return void
  13262. * @static
  13263. */
  13264. public static function setDefaultRequestLocale($locale)
  13265. {
  13266. /** @var \Illuminate\Http\Request $instance */
  13267. $instance->setDefaultRequestLocale($locale);
  13268. }
  13269. /**
  13270. * Get the user making the request.
  13271. *
  13272. * @param string|null $guard
  13273. * @return mixed
  13274. * @static
  13275. */
  13276. public static function user($guard = null)
  13277. {
  13278. /** @var \Illuminate\Http\Request $instance */
  13279. return $instance->user($guard);
  13280. }
  13281. /**
  13282. * Get the route handling the request.
  13283. *
  13284. * @param string|null $param
  13285. * @param mixed $default
  13286. * @return ($param is null ? \Illuminate\Routing\Route : object|string|null)
  13287. * @static
  13288. */
  13289. public static function route($param = null, $default = null)
  13290. {
  13291. /** @var \Illuminate\Http\Request $instance */
  13292. return $instance->route($param, $default);
  13293. }
  13294. /**
  13295. * Get a unique fingerprint for the request / route / IP address.
  13296. *
  13297. * @return string
  13298. * @throws \RuntimeException
  13299. * @static
  13300. */
  13301. public static function fingerprint()
  13302. {
  13303. /** @var \Illuminate\Http\Request $instance */
  13304. return $instance->fingerprint();
  13305. }
  13306. /**
  13307. * Set the JSON payload for the request.
  13308. *
  13309. * @param \Symfony\Component\HttpFoundation\InputBag $json
  13310. * @return \Illuminate\Http\Request
  13311. * @static
  13312. */
  13313. public static function setJson($json)
  13314. {
  13315. /** @var \Illuminate\Http\Request $instance */
  13316. return $instance->setJson($json);
  13317. }
  13318. /**
  13319. * Get the user resolver callback.
  13320. *
  13321. * @return \Closure
  13322. * @static
  13323. */
  13324. public static function getUserResolver()
  13325. {
  13326. /** @var \Illuminate\Http\Request $instance */
  13327. return $instance->getUserResolver();
  13328. }
  13329. /**
  13330. * Set the user resolver callback.
  13331. *
  13332. * @param \Closure $callback
  13333. * @return \Illuminate\Http\Request
  13334. * @static
  13335. */
  13336. public static function setUserResolver($callback)
  13337. {
  13338. /** @var \Illuminate\Http\Request $instance */
  13339. return $instance->setUserResolver($callback);
  13340. }
  13341. /**
  13342. * Get the route resolver callback.
  13343. *
  13344. * @return \Closure
  13345. * @static
  13346. */
  13347. public static function getRouteResolver()
  13348. {
  13349. /** @var \Illuminate\Http\Request $instance */
  13350. return $instance->getRouteResolver();
  13351. }
  13352. /**
  13353. * Set the route resolver callback.
  13354. *
  13355. * @param \Closure $callback
  13356. * @return \Illuminate\Http\Request
  13357. * @static
  13358. */
  13359. public static function setRouteResolver($callback)
  13360. {
  13361. /** @var \Illuminate\Http\Request $instance */
  13362. return $instance->setRouteResolver($callback);
  13363. }
  13364. /**
  13365. * Get all of the input and files for the request.
  13366. *
  13367. * @return array
  13368. * @static
  13369. */
  13370. public static function toArray()
  13371. {
  13372. /** @var \Illuminate\Http\Request $instance */
  13373. return $instance->toArray();
  13374. }
  13375. /**
  13376. * Determine if the given offset exists.
  13377. *
  13378. * @param string $offset
  13379. * @return bool
  13380. * @static
  13381. */
  13382. public static function offsetExists($offset)
  13383. {
  13384. /** @var \Illuminate\Http\Request $instance */
  13385. return $instance->offsetExists($offset);
  13386. }
  13387. /**
  13388. * Get the value at the given offset.
  13389. *
  13390. * @param string $offset
  13391. * @return mixed
  13392. * @static
  13393. */
  13394. public static function offsetGet($offset)
  13395. {
  13396. /** @var \Illuminate\Http\Request $instance */
  13397. return $instance->offsetGet($offset);
  13398. }
  13399. /**
  13400. * Set the value at the given offset.
  13401. *
  13402. * @param string $offset
  13403. * @param mixed $value
  13404. * @return void
  13405. * @static
  13406. */
  13407. public static function offsetSet($offset, $value)
  13408. {
  13409. /** @var \Illuminate\Http\Request $instance */
  13410. $instance->offsetSet($offset, $value);
  13411. }
  13412. /**
  13413. * Remove the value at the given offset.
  13414. *
  13415. * @param string $offset
  13416. * @return void
  13417. * @static
  13418. */
  13419. public static function offsetUnset($offset)
  13420. {
  13421. /** @var \Illuminate\Http\Request $instance */
  13422. $instance->offsetUnset($offset);
  13423. }
  13424. /**
  13425. * Sets the parameters for this request.
  13426. *
  13427. * This method also re-initializes all properties.
  13428. *
  13429. * @param array $query The GET parameters
  13430. * @param array $request The POST parameters
  13431. * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  13432. * @param array $cookies The COOKIE parameters
  13433. * @param array $files The FILES parameters
  13434. * @param array $server The SERVER parameters
  13435. * @param string|resource|null $content The raw body data
  13436. * @static
  13437. */
  13438. public static function initialize($query = [], $request = [], $attributes = [], $cookies = [], $files = [], $server = [], $content = null)
  13439. {
  13440. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13441. /** @var \Illuminate\Http\Request $instance */
  13442. return $instance->initialize($query, $request, $attributes, $cookies, $files, $server, $content);
  13443. }
  13444. /**
  13445. * Creates a new request with values from PHP's super globals.
  13446. *
  13447. * @static
  13448. */
  13449. public static function createFromGlobals()
  13450. {
  13451. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13452. return \Illuminate\Http\Request::createFromGlobals();
  13453. }
  13454. /**
  13455. * Creates a Request based on a given URI and configuration.
  13456. *
  13457. * The information contained in the URI always take precedence
  13458. * over the other information (server and parameters).
  13459. *
  13460. * @param string $uri The URI
  13461. * @param string $method The HTTP method
  13462. * @param array $parameters The query (GET) or request (POST) parameters
  13463. * @param array $cookies The request cookies ($_COOKIE)
  13464. * @param array $files The request files ($_FILES)
  13465. * @param array $server The server parameters ($_SERVER)
  13466. * @param string|resource|null $content The raw body data
  13467. * @throws BadRequestException When the URI is invalid
  13468. * @static
  13469. */
  13470. public static function create($uri, $method = 'GET', $parameters = [], $cookies = [], $files = [], $server = [], $content = null)
  13471. {
  13472. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13473. return \Illuminate\Http\Request::create($uri, $method, $parameters, $cookies, $files, $server, $content);
  13474. }
  13475. /**
  13476. * Sets a callable able to create a Request instance.
  13477. *
  13478. * This is mainly useful when you need to override the Request class
  13479. * to keep BC with an existing system. It should not be used for any
  13480. * other purpose.
  13481. *
  13482. * @static
  13483. */
  13484. public static function setFactory($callable)
  13485. {
  13486. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13487. return \Illuminate\Http\Request::setFactory($callable);
  13488. }
  13489. /**
  13490. * Overrides the PHP global variables according to this request instance.
  13491. *
  13492. * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE.
  13493. * $_FILES is never overridden, see rfc1867
  13494. *
  13495. * @static
  13496. */
  13497. public static function overrideGlobals()
  13498. {
  13499. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13500. /** @var \Illuminate\Http\Request $instance */
  13501. return $instance->overrideGlobals();
  13502. }
  13503. /**
  13504. * Sets a list of trusted proxies.
  13505. *
  13506. * You should only list the reverse proxies that you manage directly.
  13507. *
  13508. * @param array $proxies A list of trusted proxies, the string 'REMOTE_ADDR' will be replaced with $_SERVER['REMOTE_ADDR'] and 'PRIVATE_SUBNETS' by IpUtils::PRIVATE_SUBNETS
  13509. * @param int-mask-of<Request::HEADER_*> $trustedHeaderSet A bit field to set which headers to trust from your proxies
  13510. * @static
  13511. */
  13512. public static function setTrustedProxies($proxies, $trustedHeaderSet)
  13513. {
  13514. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13515. return \Illuminate\Http\Request::setTrustedProxies($proxies, $trustedHeaderSet);
  13516. }
  13517. /**
  13518. * Gets the list of trusted proxies.
  13519. *
  13520. * @return string[]
  13521. * @static
  13522. */
  13523. public static function getTrustedProxies()
  13524. {
  13525. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13526. return \Illuminate\Http\Request::getTrustedProxies();
  13527. }
  13528. /**
  13529. * Gets the set of trusted headers from trusted proxies.
  13530. *
  13531. * @return int A bit field of Request::HEADER_* that defines which headers are trusted from your proxies
  13532. * @static
  13533. */
  13534. public static function getTrustedHeaderSet()
  13535. {
  13536. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13537. return \Illuminate\Http\Request::getTrustedHeaderSet();
  13538. }
  13539. /**
  13540. * Sets a list of trusted host patterns.
  13541. *
  13542. * You should only list the hosts you manage using regexs.
  13543. *
  13544. * @param array $hostPatterns A list of trusted host patterns
  13545. * @static
  13546. */
  13547. public static function setTrustedHosts($hostPatterns)
  13548. {
  13549. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13550. return \Illuminate\Http\Request::setTrustedHosts($hostPatterns);
  13551. }
  13552. /**
  13553. * Gets the list of trusted host patterns.
  13554. *
  13555. * @return string[]
  13556. * @static
  13557. */
  13558. public static function getTrustedHosts()
  13559. {
  13560. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13561. return \Illuminate\Http\Request::getTrustedHosts();
  13562. }
  13563. /**
  13564. * Normalizes a query string.
  13565. *
  13566. * It builds a normalized query string, where keys/value pairs are alphabetized,
  13567. * have consistent escaping and unneeded delimiters are removed.
  13568. *
  13569. * @static
  13570. */
  13571. public static function normalizeQueryString($qs)
  13572. {
  13573. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13574. return \Illuminate\Http\Request::normalizeQueryString($qs);
  13575. }
  13576. /**
  13577. * Enables support for the _method request parameter to determine the intended HTTP method.
  13578. *
  13579. * Be warned that enabling this feature might lead to CSRF issues in your code.
  13580. * Check that you are using CSRF tokens when required.
  13581. * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered
  13582. * and used to send a "PUT" or "DELETE" request via the _method request parameter.
  13583. * If these methods are not protected against CSRF, this presents a possible vulnerability.
  13584. *
  13585. * The HTTP method can only be overridden when the real HTTP method is POST.
  13586. *
  13587. * @static
  13588. */
  13589. public static function enableHttpMethodParameterOverride()
  13590. {
  13591. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13592. return \Illuminate\Http\Request::enableHttpMethodParameterOverride();
  13593. }
  13594. /**
  13595. * Checks whether support for the _method request parameter is enabled.
  13596. *
  13597. * @static
  13598. */
  13599. public static function getHttpMethodParameterOverride()
  13600. {
  13601. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13602. return \Illuminate\Http\Request::getHttpMethodParameterOverride();
  13603. }
  13604. /**
  13605. * Whether the request contains a Session which was started in one of the
  13606. * previous requests.
  13607. *
  13608. * @static
  13609. */
  13610. public static function hasPreviousSession()
  13611. {
  13612. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13613. /** @var \Illuminate\Http\Request $instance */
  13614. return $instance->hasPreviousSession();
  13615. }
  13616. /**
  13617. * @static
  13618. */
  13619. public static function setSession($session)
  13620. {
  13621. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13622. /** @var \Illuminate\Http\Request $instance */
  13623. return $instance->setSession($session);
  13624. }
  13625. /**
  13626. * @internal
  13627. * @param callable(): SessionInterface $factory
  13628. * @static
  13629. */
  13630. public static function setSessionFactory($factory)
  13631. {
  13632. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13633. /** @var \Illuminate\Http\Request $instance */
  13634. return $instance->setSessionFactory($factory);
  13635. }
  13636. /**
  13637. * Returns the client IP addresses.
  13638. *
  13639. * In the returned array the most trusted IP address is first, and the
  13640. * least trusted one last. The "real" client IP address is the last one,
  13641. * but this is also the least trusted one. Trusted proxies are stripped.
  13642. *
  13643. * Use this method carefully; you should use getClientIp() instead.
  13644. *
  13645. * @see getClientIp()
  13646. * @static
  13647. */
  13648. public static function getClientIps()
  13649. {
  13650. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13651. /** @var \Illuminate\Http\Request $instance */
  13652. return $instance->getClientIps();
  13653. }
  13654. /**
  13655. * Returns the client IP address.
  13656. *
  13657. * This method can read the client IP address from the "X-Forwarded-For" header
  13658. * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For"
  13659. * header value is a comma+space separated list of IP addresses, the left-most
  13660. * being the original client, and each successive proxy that passed the request
  13661. * adding the IP address where it received the request from.
  13662. *
  13663. * If your reverse proxy uses a different header name than "X-Forwarded-For",
  13664. * ("Client-Ip" for instance), configure it via the $trustedHeaderSet
  13665. * argument of the Request::setTrustedProxies() method instead.
  13666. *
  13667. * @see getClientIps()
  13668. * @see https://wikipedia.org/wiki/X-Forwarded-For
  13669. * @static
  13670. */
  13671. public static function getClientIp()
  13672. {
  13673. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13674. /** @var \Illuminate\Http\Request $instance */
  13675. return $instance->getClientIp();
  13676. }
  13677. /**
  13678. * Returns current script name.
  13679. *
  13680. * @static
  13681. */
  13682. public static function getScriptName()
  13683. {
  13684. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13685. /** @var \Illuminate\Http\Request $instance */
  13686. return $instance->getScriptName();
  13687. }
  13688. /**
  13689. * Returns the path being requested relative to the executed script.
  13690. *
  13691. * The path info always starts with a /.
  13692. *
  13693. * Suppose this request is instantiated from /mysite on localhost:
  13694. *
  13695. * * http://localhost/mysite returns an empty string
  13696. * * http://localhost/mysite/about returns '/about'
  13697. * * http://localhost/mysite/enco%20ded returns '/enco%20ded'
  13698. * * http://localhost/mysite/about?var=1 returns '/about'
  13699. *
  13700. * @return string The raw path (i.e. not urldecoded)
  13701. * @static
  13702. */
  13703. public static function getPathInfo()
  13704. {
  13705. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13706. /** @var \Illuminate\Http\Request $instance */
  13707. return $instance->getPathInfo();
  13708. }
  13709. /**
  13710. * Returns the root path from which this request is executed.
  13711. *
  13712. * Suppose that an index.php file instantiates this request object:
  13713. *
  13714. * * http://localhost/index.php returns an empty string
  13715. * * http://localhost/index.php/page returns an empty string
  13716. * * http://localhost/web/index.php returns '/web'
  13717. * * http://localhost/we%20b/index.php returns '/we%20b'
  13718. *
  13719. * @return string The raw path (i.e. not urldecoded)
  13720. * @static
  13721. */
  13722. public static function getBasePath()
  13723. {
  13724. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13725. /** @var \Illuminate\Http\Request $instance */
  13726. return $instance->getBasePath();
  13727. }
  13728. /**
  13729. * Returns the root URL from which this request is executed.
  13730. *
  13731. * The base URL never ends with a /.
  13732. *
  13733. * This is similar to getBasePath(), except that it also includes the
  13734. * script filename (e.g. index.php) if one exists.
  13735. *
  13736. * @return string The raw URL (i.e. not urldecoded)
  13737. * @static
  13738. */
  13739. public static function getBaseUrl()
  13740. {
  13741. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13742. /** @var \Illuminate\Http\Request $instance */
  13743. return $instance->getBaseUrl();
  13744. }
  13745. /**
  13746. * Gets the request's scheme.
  13747. *
  13748. * @static
  13749. */
  13750. public static function getScheme()
  13751. {
  13752. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13753. /** @var \Illuminate\Http\Request $instance */
  13754. return $instance->getScheme();
  13755. }
  13756. /**
  13757. * Returns the port on which the request is made.
  13758. *
  13759. * This method can read the client port from the "X-Forwarded-Port" header
  13760. * when trusted proxies were set via "setTrustedProxies()".
  13761. *
  13762. * The "X-Forwarded-Port" header must contain the client port.
  13763. *
  13764. * @return int|string|null Can be a string if fetched from the server bag
  13765. * @static
  13766. */
  13767. public static function getPort()
  13768. {
  13769. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13770. /** @var \Illuminate\Http\Request $instance */
  13771. return $instance->getPort();
  13772. }
  13773. /**
  13774. * Returns the user.
  13775. *
  13776. * @static
  13777. */
  13778. public static function getUser()
  13779. {
  13780. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13781. /** @var \Illuminate\Http\Request $instance */
  13782. return $instance->getUser();
  13783. }
  13784. /**
  13785. * Returns the password.
  13786. *
  13787. * @static
  13788. */
  13789. public static function getPassword()
  13790. {
  13791. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13792. /** @var \Illuminate\Http\Request $instance */
  13793. return $instance->getPassword();
  13794. }
  13795. /**
  13796. * Gets the user info.
  13797. *
  13798. * @return string|null A user name if any and, optionally, scheme-specific information about how to gain authorization to access the server
  13799. * @static
  13800. */
  13801. public static function getUserInfo()
  13802. {
  13803. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13804. /** @var \Illuminate\Http\Request $instance */
  13805. return $instance->getUserInfo();
  13806. }
  13807. /**
  13808. * Returns the HTTP host being requested.
  13809. *
  13810. * The port name will be appended to the host if it's non-standard.
  13811. *
  13812. * @static
  13813. */
  13814. public static function getHttpHost()
  13815. {
  13816. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13817. /** @var \Illuminate\Http\Request $instance */
  13818. return $instance->getHttpHost();
  13819. }
  13820. /**
  13821. * Returns the requested URI (path and query string).
  13822. *
  13823. * @return string The raw URI (i.e. not URI decoded)
  13824. * @static
  13825. */
  13826. public static function getRequestUri()
  13827. {
  13828. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13829. /** @var \Illuminate\Http\Request $instance */
  13830. return $instance->getRequestUri();
  13831. }
  13832. /**
  13833. * Gets the scheme and HTTP host.
  13834. *
  13835. * If the URL was called with basic authentication, the user
  13836. * and the password are not added to the generated string.
  13837. *
  13838. * @static
  13839. */
  13840. public static function getSchemeAndHttpHost()
  13841. {
  13842. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13843. /** @var \Illuminate\Http\Request $instance */
  13844. return $instance->getSchemeAndHttpHost();
  13845. }
  13846. /**
  13847. * Generates a normalized URI (URL) for the Request.
  13848. *
  13849. * @see getQueryString()
  13850. * @static
  13851. */
  13852. public static function getUri()
  13853. {
  13854. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13855. /** @var \Illuminate\Http\Request $instance */
  13856. return $instance->getUri();
  13857. }
  13858. /**
  13859. * Generates a normalized URI for the given path.
  13860. *
  13861. * @param string $path A path to use instead of the current one
  13862. * @static
  13863. */
  13864. public static function getUriForPath($path)
  13865. {
  13866. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13867. /** @var \Illuminate\Http\Request $instance */
  13868. return $instance->getUriForPath($path);
  13869. }
  13870. /**
  13871. * Returns the path as relative reference from the current Request path.
  13872. *
  13873. * Only the URIs path component (no schema, host etc.) is relevant and must be given.
  13874. * Both paths must be absolute and not contain relative parts.
  13875. * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives.
  13876. * Furthermore, they can be used to reduce the link size in documents.
  13877. *
  13878. * Example target paths, given a base path of "/a/b/c/d":
  13879. * - "/a/b/c/d" -> ""
  13880. * - "/a/b/c/" -> "./"
  13881. * - "/a/b/" -> "../"
  13882. * - "/a/b/c/other" -> "other"
  13883. * - "/a/x/y" -> "../../x/y"
  13884. *
  13885. * @static
  13886. */
  13887. public static function getRelativeUriForPath($path)
  13888. {
  13889. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13890. /** @var \Illuminate\Http\Request $instance */
  13891. return $instance->getRelativeUriForPath($path);
  13892. }
  13893. /**
  13894. * Generates the normalized query string for the Request.
  13895. *
  13896. * It builds a normalized query string, where keys/value pairs are alphabetized
  13897. * and have consistent escaping.
  13898. *
  13899. * @static
  13900. */
  13901. public static function getQueryString()
  13902. {
  13903. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13904. /** @var \Illuminate\Http\Request $instance */
  13905. return $instance->getQueryString();
  13906. }
  13907. /**
  13908. * Checks whether the request is secure or not.
  13909. *
  13910. * This method can read the client protocol from the "X-Forwarded-Proto" header
  13911. * when trusted proxies were set via "setTrustedProxies()".
  13912. *
  13913. * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".
  13914. *
  13915. * @static
  13916. */
  13917. public static function isSecure()
  13918. {
  13919. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13920. /** @var \Illuminate\Http\Request $instance */
  13921. return $instance->isSecure();
  13922. }
  13923. /**
  13924. * Returns the host name.
  13925. *
  13926. * This method can read the client host name from the "X-Forwarded-Host" header
  13927. * when trusted proxies were set via "setTrustedProxies()".
  13928. *
  13929. * The "X-Forwarded-Host" header must contain the client host name.
  13930. *
  13931. * @throws SuspiciousOperationException when the host name is invalid or not trusted
  13932. * @static
  13933. */
  13934. public static function getHost()
  13935. {
  13936. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13937. /** @var \Illuminate\Http\Request $instance */
  13938. return $instance->getHost();
  13939. }
  13940. /**
  13941. * Sets the request method.
  13942. *
  13943. * @static
  13944. */
  13945. public static function setMethod($method)
  13946. {
  13947. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13948. /** @var \Illuminate\Http\Request $instance */
  13949. return $instance->setMethod($method);
  13950. }
  13951. /**
  13952. * Gets the request "intended" method.
  13953. *
  13954. * If the X-HTTP-Method-Override header is set, and if the method is a POST,
  13955. * then it is used to determine the "real" intended HTTP method.
  13956. *
  13957. * The _method request parameter can also be used to determine the HTTP method,
  13958. * but only if enableHttpMethodParameterOverride() has been called.
  13959. *
  13960. * The method is always an uppercased string.
  13961. *
  13962. * @see getRealMethod()
  13963. * @static
  13964. */
  13965. public static function getMethod()
  13966. {
  13967. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13968. /** @var \Illuminate\Http\Request $instance */
  13969. return $instance->getMethod();
  13970. }
  13971. /**
  13972. * Gets the "real" request method.
  13973. *
  13974. * @see getMethod()
  13975. * @static
  13976. */
  13977. public static function getRealMethod()
  13978. {
  13979. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13980. /** @var \Illuminate\Http\Request $instance */
  13981. return $instance->getRealMethod();
  13982. }
  13983. /**
  13984. * Gets the mime type associated with the format.
  13985. *
  13986. * @static
  13987. */
  13988. public static function getMimeType($format)
  13989. {
  13990. //Method inherited from \Symfony\Component\HttpFoundation\Request
  13991. /** @var \Illuminate\Http\Request $instance */
  13992. return $instance->getMimeType($format);
  13993. }
  13994. /**
  13995. * Gets the mime types associated with the format.
  13996. *
  13997. * @return string[]
  13998. * @static
  13999. */
  14000. public static function getMimeTypes($format)
  14001. {
  14002. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14003. return \Illuminate\Http\Request::getMimeTypes($format);
  14004. }
  14005. /**
  14006. * Gets the format associated with the mime type.
  14007. *
  14008. * @static
  14009. */
  14010. public static function getFormat($mimeType)
  14011. {
  14012. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14013. /** @var \Illuminate\Http\Request $instance */
  14014. return $instance->getFormat($mimeType);
  14015. }
  14016. /**
  14017. * Associates a format with mime types.
  14018. *
  14019. * @param string|string[] $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
  14020. * @static
  14021. */
  14022. public static function setFormat($format, $mimeTypes)
  14023. {
  14024. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14025. /** @var \Illuminate\Http\Request $instance */
  14026. return $instance->setFormat($format, $mimeTypes);
  14027. }
  14028. /**
  14029. * Gets the request format.
  14030. *
  14031. * Here is the process to determine the format:
  14032. *
  14033. * * format defined by the user (with setRequestFormat())
  14034. * * _format request attribute
  14035. * * $default
  14036. *
  14037. * @see getPreferredFormat
  14038. * @static
  14039. */
  14040. public static function getRequestFormat($default = 'html')
  14041. {
  14042. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14043. /** @var \Illuminate\Http\Request $instance */
  14044. return $instance->getRequestFormat($default);
  14045. }
  14046. /**
  14047. * Sets the request format.
  14048. *
  14049. * @static
  14050. */
  14051. public static function setRequestFormat($format)
  14052. {
  14053. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14054. /** @var \Illuminate\Http\Request $instance */
  14055. return $instance->setRequestFormat($format);
  14056. }
  14057. /**
  14058. * Gets the usual name of the format associated with the request's media type (provided in the Content-Type header).
  14059. *
  14060. * @see Request::$formats
  14061. * @static
  14062. */
  14063. public static function getContentTypeFormat()
  14064. {
  14065. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14066. /** @var \Illuminate\Http\Request $instance */
  14067. return $instance->getContentTypeFormat();
  14068. }
  14069. /**
  14070. * Sets the default locale.
  14071. *
  14072. * @static
  14073. */
  14074. public static function setDefaultLocale($locale)
  14075. {
  14076. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14077. /** @var \Illuminate\Http\Request $instance */
  14078. return $instance->setDefaultLocale($locale);
  14079. }
  14080. /**
  14081. * Get the default locale.
  14082. *
  14083. * @static
  14084. */
  14085. public static function getDefaultLocale()
  14086. {
  14087. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14088. /** @var \Illuminate\Http\Request $instance */
  14089. return $instance->getDefaultLocale();
  14090. }
  14091. /**
  14092. * Sets the locale.
  14093. *
  14094. * @static
  14095. */
  14096. public static function setLocale($locale)
  14097. {
  14098. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14099. /** @var \Illuminate\Http\Request $instance */
  14100. return $instance->setLocale($locale);
  14101. }
  14102. /**
  14103. * Get the locale.
  14104. *
  14105. * @static
  14106. */
  14107. public static function getLocale()
  14108. {
  14109. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14110. /** @var \Illuminate\Http\Request $instance */
  14111. return $instance->getLocale();
  14112. }
  14113. /**
  14114. * Checks if the request method is of specified type.
  14115. *
  14116. * @param string $method Uppercase request method (GET, POST etc)
  14117. * @static
  14118. */
  14119. public static function isMethod($method)
  14120. {
  14121. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14122. /** @var \Illuminate\Http\Request $instance */
  14123. return $instance->isMethod($method);
  14124. }
  14125. /**
  14126. * Checks whether or not the method is safe.
  14127. *
  14128. * @see https://tools.ietf.org/html/rfc7231#section-4.2.1
  14129. * @static
  14130. */
  14131. public static function isMethodSafe()
  14132. {
  14133. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14134. /** @var \Illuminate\Http\Request $instance */
  14135. return $instance->isMethodSafe();
  14136. }
  14137. /**
  14138. * Checks whether or not the method is idempotent.
  14139. *
  14140. * @static
  14141. */
  14142. public static function isMethodIdempotent()
  14143. {
  14144. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14145. /** @var \Illuminate\Http\Request $instance */
  14146. return $instance->isMethodIdempotent();
  14147. }
  14148. /**
  14149. * Checks whether the method is cacheable or not.
  14150. *
  14151. * @see https://tools.ietf.org/html/rfc7231#section-4.2.3
  14152. * @static
  14153. */
  14154. public static function isMethodCacheable()
  14155. {
  14156. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14157. /** @var \Illuminate\Http\Request $instance */
  14158. return $instance->isMethodCacheable();
  14159. }
  14160. /**
  14161. * Returns the protocol version.
  14162. *
  14163. * If the application is behind a proxy, the protocol version used in the
  14164. * requests between the client and the proxy and between the proxy and the
  14165. * server might be different. This returns the former (from the "Via" header)
  14166. * if the proxy is trusted (see "setTrustedProxies()"), otherwise it returns
  14167. * the latter (from the "SERVER_PROTOCOL" server parameter).
  14168. *
  14169. * @static
  14170. */
  14171. public static function getProtocolVersion()
  14172. {
  14173. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14174. /** @var \Illuminate\Http\Request $instance */
  14175. return $instance->getProtocolVersion();
  14176. }
  14177. /**
  14178. * Returns the request body content.
  14179. *
  14180. * @param bool $asResource If true, a resource will be returned
  14181. * @return string|resource
  14182. * @psalm-return ($asResource is true ? resource : string)
  14183. * @static
  14184. */
  14185. public static function getContent($asResource = false)
  14186. {
  14187. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14188. /** @var \Illuminate\Http\Request $instance */
  14189. return $instance->getContent($asResource);
  14190. }
  14191. /**
  14192. * Gets the decoded form or json request body.
  14193. *
  14194. * @throws JsonException When the body cannot be decoded to an array
  14195. * @static
  14196. */
  14197. public static function getPayload()
  14198. {
  14199. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14200. /** @var \Illuminate\Http\Request $instance */
  14201. return $instance->getPayload();
  14202. }
  14203. /**
  14204. * Gets the Etags.
  14205. *
  14206. * @static
  14207. */
  14208. public static function getETags()
  14209. {
  14210. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14211. /** @var \Illuminate\Http\Request $instance */
  14212. return $instance->getETags();
  14213. }
  14214. /**
  14215. * @static
  14216. */
  14217. public static function isNoCache()
  14218. {
  14219. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14220. /** @var \Illuminate\Http\Request $instance */
  14221. return $instance->isNoCache();
  14222. }
  14223. /**
  14224. * Gets the preferred format for the response by inspecting, in the following order:
  14225. * * the request format set using setRequestFormat;
  14226. * * the values of the Accept HTTP header.
  14227. *
  14228. * Note that if you use this method, you should send the "Vary: Accept" header
  14229. * in the response to prevent any issues with intermediary HTTP caches.
  14230. *
  14231. * @static
  14232. */
  14233. public static function getPreferredFormat($default = 'html')
  14234. {
  14235. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14236. /** @var \Illuminate\Http\Request $instance */
  14237. return $instance->getPreferredFormat($default);
  14238. }
  14239. /**
  14240. * Returns the preferred language.
  14241. *
  14242. * @param string[] $locales An array of ordered available locales
  14243. * @static
  14244. */
  14245. public static function getPreferredLanguage($locales = null)
  14246. {
  14247. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14248. /** @var \Illuminate\Http\Request $instance */
  14249. return $instance->getPreferredLanguage($locales);
  14250. }
  14251. /**
  14252. * Gets a list of languages acceptable by the client browser ordered in the user browser preferences.
  14253. *
  14254. * @return string[]
  14255. * @static
  14256. */
  14257. public static function getLanguages()
  14258. {
  14259. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14260. /** @var \Illuminate\Http\Request $instance */
  14261. return $instance->getLanguages();
  14262. }
  14263. /**
  14264. * Gets a list of charsets acceptable by the client browser in preferable order.
  14265. *
  14266. * @return string[]
  14267. * @static
  14268. */
  14269. public static function getCharsets()
  14270. {
  14271. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14272. /** @var \Illuminate\Http\Request $instance */
  14273. return $instance->getCharsets();
  14274. }
  14275. /**
  14276. * Gets a list of encodings acceptable by the client browser in preferable order.
  14277. *
  14278. * @return string[]
  14279. * @static
  14280. */
  14281. public static function getEncodings()
  14282. {
  14283. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14284. /** @var \Illuminate\Http\Request $instance */
  14285. return $instance->getEncodings();
  14286. }
  14287. /**
  14288. * Gets a list of content types acceptable by the client browser in preferable order.
  14289. *
  14290. * @return string[]
  14291. * @static
  14292. */
  14293. public static function getAcceptableContentTypes()
  14294. {
  14295. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14296. /** @var \Illuminate\Http\Request $instance */
  14297. return $instance->getAcceptableContentTypes();
  14298. }
  14299. /**
  14300. * Returns true if the request is an XMLHttpRequest.
  14301. *
  14302. * It works if your JavaScript library sets an X-Requested-With HTTP header.
  14303. * It is known to work with common JavaScript frameworks:
  14304. *
  14305. * @see https://wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
  14306. * @static
  14307. */
  14308. public static function isXmlHttpRequest()
  14309. {
  14310. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14311. /** @var \Illuminate\Http\Request $instance */
  14312. return $instance->isXmlHttpRequest();
  14313. }
  14314. /**
  14315. * Checks whether the client browser prefers safe content or not according to RFC8674.
  14316. *
  14317. * @see https://tools.ietf.org/html/rfc8674
  14318. * @static
  14319. */
  14320. public static function preferSafeContent()
  14321. {
  14322. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14323. /** @var \Illuminate\Http\Request $instance */
  14324. return $instance->preferSafeContent();
  14325. }
  14326. /**
  14327. * Indicates whether this request originated from a trusted proxy.
  14328. *
  14329. * This can be useful to determine whether or not to trust the
  14330. * contents of a proxy-specific header.
  14331. *
  14332. * @static
  14333. */
  14334. public static function isFromTrustedProxy()
  14335. {
  14336. //Method inherited from \Symfony\Component\HttpFoundation\Request
  14337. /** @var \Illuminate\Http\Request $instance */
  14338. return $instance->isFromTrustedProxy();
  14339. }
  14340. /**
  14341. * Filter the given array of rules into an array of rules that are included in precognitive headers.
  14342. *
  14343. * @param array $rules
  14344. * @return array
  14345. * @static
  14346. */
  14347. public static function filterPrecognitiveRules($rules)
  14348. {
  14349. /** @var \Illuminate\Http\Request $instance */
  14350. return $instance->filterPrecognitiveRules($rules);
  14351. }
  14352. /**
  14353. * Determine if the request is attempting to be precognitive.
  14354. *
  14355. * @return bool
  14356. * @static
  14357. */
  14358. public static function isAttemptingPrecognition()
  14359. {
  14360. /** @var \Illuminate\Http\Request $instance */
  14361. return $instance->isAttemptingPrecognition();
  14362. }
  14363. /**
  14364. * Determine if the request is precognitive.
  14365. *
  14366. * @return bool
  14367. * @static
  14368. */
  14369. public static function isPrecognitive()
  14370. {
  14371. /** @var \Illuminate\Http\Request $instance */
  14372. return $instance->isPrecognitive();
  14373. }
  14374. /**
  14375. * Determine if the request is sending JSON.
  14376. *
  14377. * @return bool
  14378. * @static
  14379. */
  14380. public static function isJson()
  14381. {
  14382. /** @var \Illuminate\Http\Request $instance */
  14383. return $instance->isJson();
  14384. }
  14385. /**
  14386. * Determine if the current request probably expects a JSON response.
  14387. *
  14388. * @return bool
  14389. * @static
  14390. */
  14391. public static function expectsJson()
  14392. {
  14393. /** @var \Illuminate\Http\Request $instance */
  14394. return $instance->expectsJson();
  14395. }
  14396. /**
  14397. * Determine if the current request is asking for JSON.
  14398. *
  14399. * @return bool
  14400. * @static
  14401. */
  14402. public static function wantsJson()
  14403. {
  14404. /** @var \Illuminate\Http\Request $instance */
  14405. return $instance->wantsJson();
  14406. }
  14407. /**
  14408. * Determines whether the current requests accepts a given content type.
  14409. *
  14410. * @param string|array $contentTypes
  14411. * @return bool
  14412. * @static
  14413. */
  14414. public static function accepts($contentTypes)
  14415. {
  14416. /** @var \Illuminate\Http\Request $instance */
  14417. return $instance->accepts($contentTypes);
  14418. }
  14419. /**
  14420. * Return the most suitable content type from the given array based on content negotiation.
  14421. *
  14422. * @param string|array $contentTypes
  14423. * @return string|null
  14424. * @static
  14425. */
  14426. public static function prefers($contentTypes)
  14427. {
  14428. /** @var \Illuminate\Http\Request $instance */
  14429. return $instance->prefers($contentTypes);
  14430. }
  14431. /**
  14432. * Determine if the current request accepts any content type.
  14433. *
  14434. * @return bool
  14435. * @static
  14436. */
  14437. public static function acceptsAnyContentType()
  14438. {
  14439. /** @var \Illuminate\Http\Request $instance */
  14440. return $instance->acceptsAnyContentType();
  14441. }
  14442. /**
  14443. * Determines whether a request accepts JSON.
  14444. *
  14445. * @return bool
  14446. * @static
  14447. */
  14448. public static function acceptsJson()
  14449. {
  14450. /** @var \Illuminate\Http\Request $instance */
  14451. return $instance->acceptsJson();
  14452. }
  14453. /**
  14454. * Determines whether a request accepts HTML.
  14455. *
  14456. * @return bool
  14457. * @static
  14458. */
  14459. public static function acceptsHtml()
  14460. {
  14461. /** @var \Illuminate\Http\Request $instance */
  14462. return $instance->acceptsHtml();
  14463. }
  14464. /**
  14465. * Determine if the given content types match.
  14466. *
  14467. * @param string $actual
  14468. * @param string $type
  14469. * @return bool
  14470. * @static
  14471. */
  14472. public static function matchesType($actual, $type)
  14473. {
  14474. return \Illuminate\Http\Request::matchesType($actual, $type);
  14475. }
  14476. /**
  14477. * Get the data format expected in the response.
  14478. *
  14479. * @param string $default
  14480. * @return string
  14481. * @static
  14482. */
  14483. public static function format($default = 'html')
  14484. {
  14485. /** @var \Illuminate\Http\Request $instance */
  14486. return $instance->format($default);
  14487. }
  14488. /**
  14489. * Retrieve an old input item.
  14490. *
  14491. * @param string|null $key
  14492. * @param \Illuminate\Database\Eloquent\Model|string|array|null $default
  14493. * @return string|array|null
  14494. * @static
  14495. */
  14496. public static function old($key = null, $default = null)
  14497. {
  14498. /** @var \Illuminate\Http\Request $instance */
  14499. return $instance->old($key, $default);
  14500. }
  14501. /**
  14502. * Flash the input for the current request to the session.
  14503. *
  14504. * @return void
  14505. * @static
  14506. */
  14507. public static function flash()
  14508. {
  14509. /** @var \Illuminate\Http\Request $instance */
  14510. $instance->flash();
  14511. }
  14512. /**
  14513. * Flash only some of the input to the session.
  14514. *
  14515. * @param array|mixed $keys
  14516. * @return void
  14517. * @static
  14518. */
  14519. public static function flashOnly($keys)
  14520. {
  14521. /** @var \Illuminate\Http\Request $instance */
  14522. $instance->flashOnly($keys);
  14523. }
  14524. /**
  14525. * Flash only some of the input to the session.
  14526. *
  14527. * @param array|mixed $keys
  14528. * @return void
  14529. * @static
  14530. */
  14531. public static function flashExcept($keys)
  14532. {
  14533. /** @var \Illuminate\Http\Request $instance */
  14534. $instance->flashExcept($keys);
  14535. }
  14536. /**
  14537. * Flush all of the old input from the session.
  14538. *
  14539. * @return void
  14540. * @static
  14541. */
  14542. public static function flush()
  14543. {
  14544. /** @var \Illuminate\Http\Request $instance */
  14545. $instance->flush();
  14546. }
  14547. /**
  14548. * Retrieve a server variable from the request.
  14549. *
  14550. * @param string|null $key
  14551. * @param string|array|null $default
  14552. * @return string|array|null
  14553. * @static
  14554. */
  14555. public static function server($key = null, $default = null)
  14556. {
  14557. /** @var \Illuminate\Http\Request $instance */
  14558. return $instance->server($key, $default);
  14559. }
  14560. /**
  14561. * Determine if a header is set on the request.
  14562. *
  14563. * @param string $key
  14564. * @return bool
  14565. * @static
  14566. */
  14567. public static function hasHeader($key)
  14568. {
  14569. /** @var \Illuminate\Http\Request $instance */
  14570. return $instance->hasHeader($key);
  14571. }
  14572. /**
  14573. * Retrieve a header from the request.
  14574. *
  14575. * @param string|null $key
  14576. * @param string|array|null $default
  14577. * @return string|array|null
  14578. * @static
  14579. */
  14580. public static function header($key = null, $default = null)
  14581. {
  14582. /** @var \Illuminate\Http\Request $instance */
  14583. return $instance->header($key, $default);
  14584. }
  14585. /**
  14586. * Get the bearer token from the request headers.
  14587. *
  14588. * @return string|null
  14589. * @static
  14590. */
  14591. public static function bearerToken()
  14592. {
  14593. /** @var \Illuminate\Http\Request $instance */
  14594. return $instance->bearerToken();
  14595. }
  14596. /**
  14597. * Get the keys for all of the input and files.
  14598. *
  14599. * @return array
  14600. * @static
  14601. */
  14602. public static function keys()
  14603. {
  14604. /** @var \Illuminate\Http\Request $instance */
  14605. return $instance->keys();
  14606. }
  14607. /**
  14608. * Get all of the input and files for the request.
  14609. *
  14610. * @param array|mixed|null $keys
  14611. * @return array
  14612. * @static
  14613. */
  14614. public static function all($keys = null)
  14615. {
  14616. /** @var \Illuminate\Http\Request $instance */
  14617. return $instance->all($keys);
  14618. }
  14619. /**
  14620. * Retrieve an input item from the request.
  14621. *
  14622. * @param string|null $key
  14623. * @param mixed $default
  14624. * @return mixed
  14625. * @static
  14626. */
  14627. public static function input($key = null, $default = null)
  14628. {
  14629. /** @var \Illuminate\Http\Request $instance */
  14630. return $instance->input($key, $default);
  14631. }
  14632. /**
  14633. * Retrieve input from the request as a Fluent object instance.
  14634. *
  14635. * @param array|string|null $key
  14636. * @return \Illuminate\Support\Fluent
  14637. * @static
  14638. */
  14639. public static function fluent($key = null)
  14640. {
  14641. /** @var \Illuminate\Http\Request $instance */
  14642. return $instance->fluent($key);
  14643. }
  14644. /**
  14645. * Retrieve a query string item from the request.
  14646. *
  14647. * @param string|null $key
  14648. * @param string|array|null $default
  14649. * @return string|array|null
  14650. * @static
  14651. */
  14652. public static function query($key = null, $default = null)
  14653. {
  14654. /** @var \Illuminate\Http\Request $instance */
  14655. return $instance->query($key, $default);
  14656. }
  14657. /**
  14658. * Retrieve a request payload item from the request.
  14659. *
  14660. * @param string|null $key
  14661. * @param string|array|null $default
  14662. * @return string|array|null
  14663. * @static
  14664. */
  14665. public static function post($key = null, $default = null)
  14666. {
  14667. /** @var \Illuminate\Http\Request $instance */
  14668. return $instance->post($key, $default);
  14669. }
  14670. /**
  14671. * Determine if a cookie is set on the request.
  14672. *
  14673. * @param string $key
  14674. * @return bool
  14675. * @static
  14676. */
  14677. public static function hasCookie($key)
  14678. {
  14679. /** @var \Illuminate\Http\Request $instance */
  14680. return $instance->hasCookie($key);
  14681. }
  14682. /**
  14683. * Retrieve a cookie from the request.
  14684. *
  14685. * @param string|null $key
  14686. * @param string|array|null $default
  14687. * @return string|array|null
  14688. * @static
  14689. */
  14690. public static function cookie($key = null, $default = null)
  14691. {
  14692. /** @var \Illuminate\Http\Request $instance */
  14693. return $instance->cookie($key, $default);
  14694. }
  14695. /**
  14696. * Get an array of all of the files on the request.
  14697. *
  14698. * @return array<string, \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]>
  14699. * @static
  14700. */
  14701. public static function allFiles()
  14702. {
  14703. /** @var \Illuminate\Http\Request $instance */
  14704. return $instance->allFiles();
  14705. }
  14706. /**
  14707. * Determine if the uploaded data contains a file.
  14708. *
  14709. * @param string $key
  14710. * @return bool
  14711. * @static
  14712. */
  14713. public static function hasFile($key)
  14714. {
  14715. /** @var \Illuminate\Http\Request $instance */
  14716. return $instance->hasFile($key);
  14717. }
  14718. /**
  14719. * Retrieve a file from the request.
  14720. *
  14721. * @param string|null $key
  14722. * @param mixed $default
  14723. * @return ($key is null ? array<string, \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]> : \Illuminate\Http\UploadedFile|\Illuminate\Http\UploadedFile[]|null)
  14724. * @static
  14725. */
  14726. public static function file($key = null, $default = null)
  14727. {
  14728. /** @var \Illuminate\Http\Request $instance */
  14729. return $instance->file($key, $default);
  14730. }
  14731. /**
  14732. * Dump the items.
  14733. *
  14734. * @param mixed $keys
  14735. * @return \Illuminate\Http\Request
  14736. * @static
  14737. */
  14738. public static function dump($keys = [])
  14739. {
  14740. /** @var \Illuminate\Http\Request $instance */
  14741. return $instance->dump($keys);
  14742. }
  14743. /**
  14744. * Dump the given arguments and terminate execution.
  14745. *
  14746. * @param mixed $args
  14747. * @return never
  14748. * @static
  14749. */
  14750. public static function dd(...$args)
  14751. {
  14752. /** @var \Illuminate\Http\Request $instance */
  14753. return $instance->dd(...$args);
  14754. }
  14755. /**
  14756. * Determine if the data contains a given key.
  14757. *
  14758. * @param string|array $key
  14759. * @return bool
  14760. * @static
  14761. */
  14762. public static function exists($key)
  14763. {
  14764. /** @var \Illuminate\Http\Request $instance */
  14765. return $instance->exists($key);
  14766. }
  14767. /**
  14768. * Determine if the data contains a given key.
  14769. *
  14770. * @param string|array $key
  14771. * @return bool
  14772. * @static
  14773. */
  14774. public static function has($key)
  14775. {
  14776. /** @var \Illuminate\Http\Request $instance */
  14777. return $instance->has($key);
  14778. }
  14779. /**
  14780. * Determine if the instance contains any of the given keys.
  14781. *
  14782. * @param string|array $keys
  14783. * @return bool
  14784. * @static
  14785. */
  14786. public static function hasAny($keys)
  14787. {
  14788. /** @var \Illuminate\Http\Request $instance */
  14789. return $instance->hasAny($keys);
  14790. }
  14791. /**
  14792. * Apply the callback if the instance contains the given key.
  14793. *
  14794. * @param string $key
  14795. * @param callable $callback
  14796. * @param callable|null $default
  14797. * @return $this|mixed
  14798. * @static
  14799. */
  14800. public static function whenHas($key, $callback, $default = null)
  14801. {
  14802. /** @var \Illuminate\Http\Request $instance */
  14803. return $instance->whenHas($key, $callback, $default);
  14804. }
  14805. /**
  14806. * Determine if the instance contains a non-empty value for the given key.
  14807. *
  14808. * @param string|array $key
  14809. * @return bool
  14810. * @static
  14811. */
  14812. public static function filled($key)
  14813. {
  14814. /** @var \Illuminate\Http\Request $instance */
  14815. return $instance->filled($key);
  14816. }
  14817. /**
  14818. * Determine if the instance contains an empty value for the given key.
  14819. *
  14820. * @param string|array $key
  14821. * @return bool
  14822. * @static
  14823. */
  14824. public static function isNotFilled($key)
  14825. {
  14826. /** @var \Illuminate\Http\Request $instance */
  14827. return $instance->isNotFilled($key);
  14828. }
  14829. /**
  14830. * Determine if the instance contains a non-empty value for any of the given keys.
  14831. *
  14832. * @param string|array $keys
  14833. * @return bool
  14834. * @static
  14835. */
  14836. public static function anyFilled($keys)
  14837. {
  14838. /** @var \Illuminate\Http\Request $instance */
  14839. return $instance->anyFilled($keys);
  14840. }
  14841. /**
  14842. * Apply the callback if the instance contains a non-empty value for the given key.
  14843. *
  14844. * @param string $key
  14845. * @param callable $callback
  14846. * @param callable|null $default
  14847. * @return $this|mixed
  14848. * @static
  14849. */
  14850. public static function whenFilled($key, $callback, $default = null)
  14851. {
  14852. /** @var \Illuminate\Http\Request $instance */
  14853. return $instance->whenFilled($key, $callback, $default);
  14854. }
  14855. /**
  14856. * Determine if the instance is missing a given key.
  14857. *
  14858. * @param string|array $key
  14859. * @return bool
  14860. * @static
  14861. */
  14862. public static function missing($key)
  14863. {
  14864. /** @var \Illuminate\Http\Request $instance */
  14865. return $instance->missing($key);
  14866. }
  14867. /**
  14868. * Apply the callback if the instance is missing the given key.
  14869. *
  14870. * @param string $key
  14871. * @param callable $callback
  14872. * @param callable|null $default
  14873. * @return $this|mixed
  14874. * @static
  14875. */
  14876. public static function whenMissing($key, $callback, $default = null)
  14877. {
  14878. /** @var \Illuminate\Http\Request $instance */
  14879. return $instance->whenMissing($key, $callback, $default);
  14880. }
  14881. /**
  14882. * Retrieve data from the instance as a Stringable instance.
  14883. *
  14884. * @param string $key
  14885. * @param mixed $default
  14886. * @return \Illuminate\Support\Stringable
  14887. * @static
  14888. */
  14889. public static function str($key, $default = null)
  14890. {
  14891. /** @var \Illuminate\Http\Request $instance */
  14892. return $instance->str($key, $default);
  14893. }
  14894. /**
  14895. * Retrieve data from the instance as a Stringable instance.
  14896. *
  14897. * @param string $key
  14898. * @param mixed $default
  14899. * @return \Illuminate\Support\Stringable
  14900. * @static
  14901. */
  14902. public static function string($key, $default = null)
  14903. {
  14904. /** @var \Illuminate\Http\Request $instance */
  14905. return $instance->string($key, $default);
  14906. }
  14907. /**
  14908. * Retrieve data as a boolean value.
  14909. *
  14910. * Returns true when value is "1", "true", "on", and "yes". Otherwise, returns false.
  14911. *
  14912. * @param string|null $key
  14913. * @param bool $default
  14914. * @return bool
  14915. * @static
  14916. */
  14917. public static function boolean($key = null, $default = false)
  14918. {
  14919. /** @var \Illuminate\Http\Request $instance */
  14920. return $instance->boolean($key, $default);
  14921. }
  14922. /**
  14923. * Retrieve data as an integer value.
  14924. *
  14925. * @param string $key
  14926. * @param int $default
  14927. * @return int
  14928. * @static
  14929. */
  14930. public static function integer($key, $default = 0)
  14931. {
  14932. /** @var \Illuminate\Http\Request $instance */
  14933. return $instance->integer($key, $default);
  14934. }
  14935. /**
  14936. * Retrieve data as a float value.
  14937. *
  14938. * @param string $key
  14939. * @param float $default
  14940. * @return float
  14941. * @static
  14942. */
  14943. public static function float($key, $default = 0.0)
  14944. {
  14945. /** @var \Illuminate\Http\Request $instance */
  14946. return $instance->float($key, $default);
  14947. }
  14948. /**
  14949. * Retrieve data from the instance as a Carbon instance.
  14950. *
  14951. * @param string $key
  14952. * @param string|null $format
  14953. * @param string|null $tz
  14954. * @return \Illuminate\Support\Carbon|null
  14955. * @throws \Carbon\Exceptions\InvalidFormatException
  14956. * @static
  14957. */
  14958. public static function date($key, $format = null, $tz = null)
  14959. {
  14960. /** @var \Illuminate\Http\Request $instance */
  14961. return $instance->date($key, $format, $tz);
  14962. }
  14963. /**
  14964. * Retrieve data from the instance as an enum.
  14965. *
  14966. * @template TEnum of \BackedEnum
  14967. * @param string $key
  14968. * @param class-string<TEnum> $enumClass
  14969. * @param TEnum|null $default
  14970. * @return TEnum|null
  14971. * @static
  14972. */
  14973. public static function enum($key, $enumClass, $default = null)
  14974. {
  14975. /** @var \Illuminate\Http\Request $instance */
  14976. return $instance->enum($key, $enumClass, $default);
  14977. }
  14978. /**
  14979. * Retrieve data from the instance as an array of enums.
  14980. *
  14981. * @template TEnum of \BackedEnum
  14982. * @param string $key
  14983. * @param class-string<TEnum> $enumClass
  14984. * @return TEnum[]
  14985. * @static
  14986. */
  14987. public static function enums($key, $enumClass)
  14988. {
  14989. /** @var \Illuminate\Http\Request $instance */
  14990. return $instance->enums($key, $enumClass);
  14991. }
  14992. /**
  14993. * Retrieve data from the instance as an array.
  14994. *
  14995. * @param array|string|null $key
  14996. * @return array
  14997. * @static
  14998. */
  14999. public static function array($key = null)
  15000. {
  15001. /** @var \Illuminate\Http\Request $instance */
  15002. return $instance->array($key);
  15003. }
  15004. /**
  15005. * Retrieve data from the instance as a collection.
  15006. *
  15007. * @param array|string|null $key
  15008. * @return \Illuminate\Support\Collection
  15009. * @static
  15010. */
  15011. public static function collect($key = null)
  15012. {
  15013. /** @var \Illuminate\Http\Request $instance */
  15014. return $instance->collect($key);
  15015. }
  15016. /**
  15017. * Get a subset containing the provided keys with values from the instance data.
  15018. *
  15019. * @param array|mixed $keys
  15020. * @return array
  15021. * @static
  15022. */
  15023. public static function only($keys)
  15024. {
  15025. /** @var \Illuminate\Http\Request $instance */
  15026. return $instance->only($keys);
  15027. }
  15028. /**
  15029. * Get all of the data except for a specified array of items.
  15030. *
  15031. * @param array|mixed $keys
  15032. * @return array
  15033. * @static
  15034. */
  15035. public static function except($keys)
  15036. {
  15037. /** @var \Illuminate\Http\Request $instance */
  15038. return $instance->except($keys);
  15039. }
  15040. /**
  15041. * Apply the callback if the given "value" is (or resolves to) truthy.
  15042. *
  15043. * @template TWhenParameter
  15044. * @template TWhenReturnType
  15045. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  15046. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  15047. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  15048. * @return $this|TWhenReturnType
  15049. * @static
  15050. */
  15051. public static function when($value = null, $callback = null, $default = null)
  15052. {
  15053. /** @var \Illuminate\Http\Request $instance */
  15054. return $instance->when($value, $callback, $default);
  15055. }
  15056. /**
  15057. * Apply the callback if the given "value" is (or resolves to) falsy.
  15058. *
  15059. * @template TUnlessParameter
  15060. * @template TUnlessReturnType
  15061. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  15062. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  15063. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  15064. * @return $this|TUnlessReturnType
  15065. * @static
  15066. */
  15067. public static function unless($value = null, $callback = null, $default = null)
  15068. {
  15069. /** @var \Illuminate\Http\Request $instance */
  15070. return $instance->unless($value, $callback, $default);
  15071. }
  15072. /**
  15073. * Register a custom macro.
  15074. *
  15075. * @param string $name
  15076. * @param object|callable $macro
  15077. * @param-closure-this static $macro
  15078. * @return void
  15079. * @static
  15080. */
  15081. public static function macro($name, $macro)
  15082. {
  15083. \Illuminate\Http\Request::macro($name, $macro);
  15084. }
  15085. /**
  15086. * Mix another object into the class.
  15087. *
  15088. * @param object $mixin
  15089. * @param bool $replace
  15090. * @return void
  15091. * @throws \ReflectionException
  15092. * @static
  15093. */
  15094. public static function mixin($mixin, $replace = true)
  15095. {
  15096. \Illuminate\Http\Request::mixin($mixin, $replace);
  15097. }
  15098. /**
  15099. * Checks if macro is registered.
  15100. *
  15101. * @param string $name
  15102. * @return bool
  15103. * @static
  15104. */
  15105. public static function hasMacro($name)
  15106. {
  15107. return \Illuminate\Http\Request::hasMacro($name);
  15108. }
  15109. /**
  15110. * Flush the existing macros.
  15111. *
  15112. * @return void
  15113. * @static
  15114. */
  15115. public static function flushMacros()
  15116. {
  15117. \Illuminate\Http\Request::flushMacros();
  15118. }
  15119. /**
  15120. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  15121. * @param array $rules
  15122. * @param mixed $params
  15123. * @static
  15124. */
  15125. public static function validate($rules, ...$params)
  15126. {
  15127. return \Illuminate\Http\Request::validate($rules, ...$params);
  15128. }
  15129. /**
  15130. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  15131. * @param string $errorBag
  15132. * @param array $rules
  15133. * @param mixed $params
  15134. * @static
  15135. */
  15136. public static function validateWithBag($errorBag, $rules, ...$params)
  15137. {
  15138. return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params);
  15139. }
  15140. /**
  15141. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15142. * @param mixed $absolute
  15143. * @static
  15144. */
  15145. public static function hasValidSignature($absolute = true)
  15146. {
  15147. return \Illuminate\Http\Request::hasValidSignature($absolute);
  15148. }
  15149. /**
  15150. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15151. * @static
  15152. */
  15153. public static function hasValidRelativeSignature()
  15154. {
  15155. return \Illuminate\Http\Request::hasValidRelativeSignature();
  15156. }
  15157. /**
  15158. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15159. * @param mixed $ignoreQuery
  15160. * @param mixed $absolute
  15161. * @static
  15162. */
  15163. public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)
  15164. {
  15165. return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute);
  15166. }
  15167. /**
  15168. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  15169. * @param mixed $ignoreQuery
  15170. * @static
  15171. */
  15172. public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])
  15173. {
  15174. return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery);
  15175. }
  15176. }
  15177. /**
  15178. * @see \Illuminate\Routing\ResponseFactory
  15179. */
  15180. class Response {
  15181. /**
  15182. * Create a new response instance.
  15183. *
  15184. * @param mixed $content
  15185. * @param int $status
  15186. * @param array $headers
  15187. * @return \Illuminate\Http\Response
  15188. * @static
  15189. */
  15190. public static function make($content = '', $status = 200, $headers = [])
  15191. {
  15192. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15193. return $instance->make($content, $status, $headers);
  15194. }
  15195. /**
  15196. * Create a new "no content" response.
  15197. *
  15198. * @param int $status
  15199. * @param array $headers
  15200. * @return \Illuminate\Http\Response
  15201. * @static
  15202. */
  15203. public static function noContent($status = 204, $headers = [])
  15204. {
  15205. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15206. return $instance->noContent($status, $headers);
  15207. }
  15208. /**
  15209. * Create a new response for a given view.
  15210. *
  15211. * @param string|array $view
  15212. * @param array $data
  15213. * @param int $status
  15214. * @param array $headers
  15215. * @return \Illuminate\Http\Response
  15216. * @static
  15217. */
  15218. public static function view($view, $data = [], $status = 200, $headers = [])
  15219. {
  15220. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15221. return $instance->view($view, $data, $status, $headers);
  15222. }
  15223. /**
  15224. * Create a new JSON response instance.
  15225. *
  15226. * @param mixed $data
  15227. * @param int $status
  15228. * @param array $headers
  15229. * @param int $options
  15230. * @return \Illuminate\Http\JsonResponse
  15231. * @static
  15232. */
  15233. public static function json($data = [], $status = 200, $headers = [], $options = 0)
  15234. {
  15235. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15236. return $instance->json($data, $status, $headers, $options);
  15237. }
  15238. /**
  15239. * Create a new JSONP response instance.
  15240. *
  15241. * @param string $callback
  15242. * @param mixed $data
  15243. * @param int $status
  15244. * @param array $headers
  15245. * @param int $options
  15246. * @return \Illuminate\Http\JsonResponse
  15247. * @static
  15248. */
  15249. public static function jsonp($callback, $data = [], $status = 200, $headers = [], $options = 0)
  15250. {
  15251. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15252. return $instance->jsonp($callback, $data, $status, $headers, $options);
  15253. }
  15254. /**
  15255. * Create a new event stream response.
  15256. *
  15257. * @param \Closure $callback
  15258. * @param array $headers
  15259. * @param \Illuminate\Http\StreamedEvent|string|null $endStreamWith
  15260. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15261. * @static
  15262. */
  15263. public static function eventStream($callback, $headers = [], $endStreamWith = '</stream>')
  15264. {
  15265. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15266. return $instance->eventStream($callback, $headers, $endStreamWith);
  15267. }
  15268. /**
  15269. * Create a new streamed response instance.
  15270. *
  15271. * @param callable|null $callback
  15272. * @param int $status
  15273. * @param array $headers
  15274. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15275. * @static
  15276. */
  15277. public static function stream($callback, $status = 200, $headers = [])
  15278. {
  15279. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15280. return $instance->stream($callback, $status, $headers);
  15281. }
  15282. /**
  15283. * Create a new streamed JSON response instance.
  15284. *
  15285. * @param array $data
  15286. * @param int $status
  15287. * @param array $headers
  15288. * @param int $encodingOptions
  15289. * @return \Symfony\Component\HttpFoundation\StreamedJsonResponse
  15290. * @static
  15291. */
  15292. public static function streamJson($data, $status = 200, $headers = [], $encodingOptions = 15)
  15293. {
  15294. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15295. return $instance->streamJson($data, $status, $headers, $encodingOptions);
  15296. }
  15297. /**
  15298. * Create a new streamed response instance as a file download.
  15299. *
  15300. * @param callable $callback
  15301. * @param string|null $name
  15302. * @param array $headers
  15303. * @param string|null $disposition
  15304. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  15305. * @throws \Illuminate\Routing\Exceptions\StreamedResponseException
  15306. * @static
  15307. */
  15308. public static function streamDownload($callback, $name = null, $headers = [], $disposition = 'attachment')
  15309. {
  15310. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15311. return $instance->streamDownload($callback, $name, $headers, $disposition);
  15312. }
  15313. /**
  15314. * Create a new file download response.
  15315. *
  15316. * @param \SplFileInfo|string $file
  15317. * @param string|null $name
  15318. * @param array $headers
  15319. * @param string|null $disposition
  15320. * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
  15321. * @static
  15322. */
  15323. public static function download($file, $name = null, $headers = [], $disposition = 'attachment')
  15324. {
  15325. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15326. return $instance->download($file, $name, $headers, $disposition);
  15327. }
  15328. /**
  15329. * Return the raw contents of a binary file.
  15330. *
  15331. * @param \SplFileInfo|string $file
  15332. * @param array $headers
  15333. * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
  15334. * @static
  15335. */
  15336. public static function file($file, $headers = [])
  15337. {
  15338. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15339. return $instance->file($file, $headers);
  15340. }
  15341. /**
  15342. * Create a new redirect response to the given path.
  15343. *
  15344. * @param string $path
  15345. * @param int $status
  15346. * @param array $headers
  15347. * @param bool|null $secure
  15348. * @return \Illuminate\Http\RedirectResponse
  15349. * @static
  15350. */
  15351. public static function redirectTo($path, $status = 302, $headers = [], $secure = null)
  15352. {
  15353. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15354. return $instance->redirectTo($path, $status, $headers, $secure);
  15355. }
  15356. /**
  15357. * Create a new redirect response to a named route.
  15358. *
  15359. * @param \BackedEnum|string $route
  15360. * @param mixed $parameters
  15361. * @param int $status
  15362. * @param array $headers
  15363. * @return \Illuminate\Http\RedirectResponse
  15364. * @static
  15365. */
  15366. public static function redirectToRoute($route, $parameters = [], $status = 302, $headers = [])
  15367. {
  15368. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15369. return $instance->redirectToRoute($route, $parameters, $status, $headers);
  15370. }
  15371. /**
  15372. * Create a new redirect response to a controller action.
  15373. *
  15374. * @param array|string $action
  15375. * @param mixed $parameters
  15376. * @param int $status
  15377. * @param array $headers
  15378. * @return \Illuminate\Http\RedirectResponse
  15379. * @static
  15380. */
  15381. public static function redirectToAction($action, $parameters = [], $status = 302, $headers = [])
  15382. {
  15383. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15384. return $instance->redirectToAction($action, $parameters, $status, $headers);
  15385. }
  15386. /**
  15387. * Create a new redirect response, while putting the current URL in the session.
  15388. *
  15389. * @param string $path
  15390. * @param int $status
  15391. * @param array $headers
  15392. * @param bool|null $secure
  15393. * @return \Illuminate\Http\RedirectResponse
  15394. * @static
  15395. */
  15396. public static function redirectGuest($path, $status = 302, $headers = [], $secure = null)
  15397. {
  15398. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15399. return $instance->redirectGuest($path, $status, $headers, $secure);
  15400. }
  15401. /**
  15402. * Create a new redirect response to the previously intended location.
  15403. *
  15404. * @param string $default
  15405. * @param int $status
  15406. * @param array $headers
  15407. * @param bool|null $secure
  15408. * @return \Illuminate\Http\RedirectResponse
  15409. * @static
  15410. */
  15411. public static function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null)
  15412. {
  15413. /** @var \Illuminate\Routing\ResponseFactory $instance */
  15414. return $instance->redirectToIntended($default, $status, $headers, $secure);
  15415. }
  15416. /**
  15417. * Register a custom macro.
  15418. *
  15419. * @param string $name
  15420. * @param object|callable $macro
  15421. * @param-closure-this static $macro
  15422. * @return void
  15423. * @static
  15424. */
  15425. public static function macro($name, $macro)
  15426. {
  15427. \Illuminate\Routing\ResponseFactory::macro($name, $macro);
  15428. }
  15429. /**
  15430. * Mix another object into the class.
  15431. *
  15432. * @param object $mixin
  15433. * @param bool $replace
  15434. * @return void
  15435. * @throws \ReflectionException
  15436. * @static
  15437. */
  15438. public static function mixin($mixin, $replace = true)
  15439. {
  15440. \Illuminate\Routing\ResponseFactory::mixin($mixin, $replace);
  15441. }
  15442. /**
  15443. * Checks if macro is registered.
  15444. *
  15445. * @param string $name
  15446. * @return bool
  15447. * @static
  15448. */
  15449. public static function hasMacro($name)
  15450. {
  15451. return \Illuminate\Routing\ResponseFactory::hasMacro($name);
  15452. }
  15453. /**
  15454. * Flush the existing macros.
  15455. *
  15456. * @return void
  15457. * @static
  15458. */
  15459. public static function flushMacros()
  15460. {
  15461. \Illuminate\Routing\ResponseFactory::flushMacros();
  15462. }
  15463. }
  15464. /**
  15465. * @method static \Illuminate\Routing\RouteRegistrar attribute(string $key, mixed $value)
  15466. * @method static \Illuminate\Routing\RouteRegistrar whereAlpha(array|string $parameters)
  15467. * @method static \Illuminate\Routing\RouteRegistrar whereAlphaNumeric(array|string $parameters)
  15468. * @method static \Illuminate\Routing\RouteRegistrar whereNumber(array|string $parameters)
  15469. * @method static \Illuminate\Routing\RouteRegistrar whereUlid(array|string $parameters)
  15470. * @method static \Illuminate\Routing\RouteRegistrar whereUuid(array|string $parameters)
  15471. * @method static \Illuminate\Routing\RouteRegistrar whereIn(array|string $parameters, array $values)
  15472. * @method static \Illuminate\Routing\RouteRegistrar as(string $value)
  15473. * @method static \Illuminate\Routing\RouteRegistrar can(\UnitEnum|string $ability, array|string $models = [])
  15474. * @method static \Illuminate\Routing\RouteRegistrar controller(string $controller)
  15475. * @method static \Illuminate\Routing\RouteRegistrar domain(\BackedEnum|string $value)
  15476. * @method static \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware)
  15477. * @method static \Illuminate\Routing\RouteRegistrar missing(\Closure $missing)
  15478. * @method static \Illuminate\Routing\RouteRegistrar name(\BackedEnum|string $value)
  15479. * @method static \Illuminate\Routing\RouteRegistrar namespace(string|null $value)
  15480. * @method static \Illuminate\Routing\RouteRegistrar prefix(string $prefix)
  15481. * @method static \Illuminate\Routing\RouteRegistrar scopeBindings()
  15482. * @method static \Illuminate\Routing\RouteRegistrar where(array $where)
  15483. * @method static \Illuminate\Routing\RouteRegistrar withoutMiddleware(array|string $middleware)
  15484. * @method static \Illuminate\Routing\RouteRegistrar withoutScopedBindings()
  15485. * @see \Illuminate\Routing\Router
  15486. */
  15487. class Route {
  15488. /**
  15489. * Register a new GET route with the router.
  15490. *
  15491. * @param string $uri
  15492. * @param array|string|callable|null $action
  15493. * @return \Illuminate\Routing\Route
  15494. * @static
  15495. */
  15496. public static function get($uri, $action = null)
  15497. {
  15498. /** @var \Illuminate\Routing\Router $instance */
  15499. return $instance->get($uri, $action);
  15500. }
  15501. /**
  15502. * Register a new POST route with the router.
  15503. *
  15504. * @param string $uri
  15505. * @param array|string|callable|null $action
  15506. * @return \Illuminate\Routing\Route
  15507. * @static
  15508. */
  15509. public static function post($uri, $action = null)
  15510. {
  15511. /** @var \Illuminate\Routing\Router $instance */
  15512. return $instance->post($uri, $action);
  15513. }
  15514. /**
  15515. * Register a new PUT route with the router.
  15516. *
  15517. * @param string $uri
  15518. * @param array|string|callable|null $action
  15519. * @return \Illuminate\Routing\Route
  15520. * @static
  15521. */
  15522. public static function put($uri, $action = null)
  15523. {
  15524. /** @var \Illuminate\Routing\Router $instance */
  15525. return $instance->put($uri, $action);
  15526. }
  15527. /**
  15528. * Register a new PATCH route with the router.
  15529. *
  15530. * @param string $uri
  15531. * @param array|string|callable|null $action
  15532. * @return \Illuminate\Routing\Route
  15533. * @static
  15534. */
  15535. public static function patch($uri, $action = null)
  15536. {
  15537. /** @var \Illuminate\Routing\Router $instance */
  15538. return $instance->patch($uri, $action);
  15539. }
  15540. /**
  15541. * Register a new DELETE route with the router.
  15542. *
  15543. * @param string $uri
  15544. * @param array|string|callable|null $action
  15545. * @return \Illuminate\Routing\Route
  15546. * @static
  15547. */
  15548. public static function delete($uri, $action = null)
  15549. {
  15550. /** @var \Illuminate\Routing\Router $instance */
  15551. return $instance->delete($uri, $action);
  15552. }
  15553. /**
  15554. * Register a new OPTIONS route with the router.
  15555. *
  15556. * @param string $uri
  15557. * @param array|string|callable|null $action
  15558. * @return \Illuminate\Routing\Route
  15559. * @static
  15560. */
  15561. public static function options($uri, $action = null)
  15562. {
  15563. /** @var \Illuminate\Routing\Router $instance */
  15564. return $instance->options($uri, $action);
  15565. }
  15566. /**
  15567. * Register a new route responding to all verbs.
  15568. *
  15569. * @param string $uri
  15570. * @param array|string|callable|null $action
  15571. * @return \Illuminate\Routing\Route
  15572. * @static
  15573. */
  15574. public static function any($uri, $action = null)
  15575. {
  15576. /** @var \Illuminate\Routing\Router $instance */
  15577. return $instance->any($uri, $action);
  15578. }
  15579. /**
  15580. * Register a new fallback route with the router.
  15581. *
  15582. * @param array|string|callable|null $action
  15583. * @return \Illuminate\Routing\Route
  15584. * @static
  15585. */
  15586. public static function fallback($action)
  15587. {
  15588. /** @var \Illuminate\Routing\Router $instance */
  15589. return $instance->fallback($action);
  15590. }
  15591. /**
  15592. * Create a redirect from one URI to another.
  15593. *
  15594. * @param string $uri
  15595. * @param string $destination
  15596. * @param int $status
  15597. * @return \Illuminate\Routing\Route
  15598. * @static
  15599. */
  15600. public static function redirect($uri, $destination, $status = 302)
  15601. {
  15602. /** @var \Illuminate\Routing\Router $instance */
  15603. return $instance->redirect($uri, $destination, $status);
  15604. }
  15605. /**
  15606. * Create a permanent redirect from one URI to another.
  15607. *
  15608. * @param string $uri
  15609. * @param string $destination
  15610. * @return \Illuminate\Routing\Route
  15611. * @static
  15612. */
  15613. public static function permanentRedirect($uri, $destination)
  15614. {
  15615. /** @var \Illuminate\Routing\Router $instance */
  15616. return $instance->permanentRedirect($uri, $destination);
  15617. }
  15618. /**
  15619. * Register a new route that returns a view.
  15620. *
  15621. * @param string $uri
  15622. * @param string $view
  15623. * @param array $data
  15624. * @param int|array $status
  15625. * @param array $headers
  15626. * @return \Illuminate\Routing\Route
  15627. * @static
  15628. */
  15629. public static function view($uri, $view, $data = [], $status = 200, $headers = [])
  15630. {
  15631. /** @var \Illuminate\Routing\Router $instance */
  15632. return $instance->view($uri, $view, $data, $status, $headers);
  15633. }
  15634. /**
  15635. * Register a new route with the given verbs.
  15636. *
  15637. * @param array|string $methods
  15638. * @param string $uri
  15639. * @param array|string|callable|null $action
  15640. * @return \Illuminate\Routing\Route
  15641. * @static
  15642. */
  15643. public static function match($methods, $uri, $action = null)
  15644. {
  15645. /** @var \Illuminate\Routing\Router $instance */
  15646. return $instance->match($methods, $uri, $action);
  15647. }
  15648. /**
  15649. * Register an array of resource controllers.
  15650. *
  15651. * @param array $resources
  15652. * @param array $options
  15653. * @return void
  15654. * @static
  15655. */
  15656. public static function resources($resources, $options = [])
  15657. {
  15658. /** @var \Illuminate\Routing\Router $instance */
  15659. $instance->resources($resources, $options);
  15660. }
  15661. /**
  15662. * Route a resource to a controller.
  15663. *
  15664. * @param string $name
  15665. * @param string $controller
  15666. * @param array $options
  15667. * @return \Illuminate\Routing\PendingResourceRegistration
  15668. * @static
  15669. */
  15670. public static function resource($name, $controller, $options = [])
  15671. {
  15672. /** @var \Illuminate\Routing\Router $instance */
  15673. return $instance->resource($name, $controller, $options);
  15674. }
  15675. /**
  15676. * Register an array of API resource controllers.
  15677. *
  15678. * @param array $resources
  15679. * @param array $options
  15680. * @return void
  15681. * @static
  15682. */
  15683. public static function apiResources($resources, $options = [])
  15684. {
  15685. /** @var \Illuminate\Routing\Router $instance */
  15686. $instance->apiResources($resources, $options);
  15687. }
  15688. /**
  15689. * Route an API resource to a controller.
  15690. *
  15691. * @param string $name
  15692. * @param string $controller
  15693. * @param array $options
  15694. * @return \Illuminate\Routing\PendingResourceRegistration
  15695. * @static
  15696. */
  15697. public static function apiResource($name, $controller, $options = [])
  15698. {
  15699. /** @var \Illuminate\Routing\Router $instance */
  15700. return $instance->apiResource($name, $controller, $options);
  15701. }
  15702. /**
  15703. * Register an array of singleton resource controllers.
  15704. *
  15705. * @param array $singletons
  15706. * @param array $options
  15707. * @return void
  15708. * @static
  15709. */
  15710. public static function singletons($singletons, $options = [])
  15711. {
  15712. /** @var \Illuminate\Routing\Router $instance */
  15713. $instance->singletons($singletons, $options);
  15714. }
  15715. /**
  15716. * Route a singleton resource to a controller.
  15717. *
  15718. * @param string $name
  15719. * @param string $controller
  15720. * @param array $options
  15721. * @return \Illuminate\Routing\PendingSingletonResourceRegistration
  15722. * @static
  15723. */
  15724. public static function singleton($name, $controller, $options = [])
  15725. {
  15726. /** @var \Illuminate\Routing\Router $instance */
  15727. return $instance->singleton($name, $controller, $options);
  15728. }
  15729. /**
  15730. * Register an array of API singleton resource controllers.
  15731. *
  15732. * @param array $singletons
  15733. * @param array $options
  15734. * @return void
  15735. * @static
  15736. */
  15737. public static function apiSingletons($singletons, $options = [])
  15738. {
  15739. /** @var \Illuminate\Routing\Router $instance */
  15740. $instance->apiSingletons($singletons, $options);
  15741. }
  15742. /**
  15743. * Route an API singleton resource to a controller.
  15744. *
  15745. * @param string $name
  15746. * @param string $controller
  15747. * @param array $options
  15748. * @return \Illuminate\Routing\PendingSingletonResourceRegistration
  15749. * @static
  15750. */
  15751. public static function apiSingleton($name, $controller, $options = [])
  15752. {
  15753. /** @var \Illuminate\Routing\Router $instance */
  15754. return $instance->apiSingleton($name, $controller, $options);
  15755. }
  15756. /**
  15757. * Create a route group with shared attributes.
  15758. *
  15759. * @param array $attributes
  15760. * @param \Closure|array|string $routes
  15761. * @return \Illuminate\Routing\Router
  15762. * @static
  15763. */
  15764. public static function group($attributes, $routes)
  15765. {
  15766. /** @var \Illuminate\Routing\Router $instance */
  15767. return $instance->group($attributes, $routes);
  15768. }
  15769. /**
  15770. * Merge the given array with the last group stack.
  15771. *
  15772. * @param array $new
  15773. * @param bool $prependExistingPrefix
  15774. * @return array
  15775. * @static
  15776. */
  15777. public static function mergeWithLastGroup($new, $prependExistingPrefix = true)
  15778. {
  15779. /** @var \Illuminate\Routing\Router $instance */
  15780. return $instance->mergeWithLastGroup($new, $prependExistingPrefix);
  15781. }
  15782. /**
  15783. * Get the prefix from the last group on the stack.
  15784. *
  15785. * @return string
  15786. * @static
  15787. */
  15788. public static function getLastGroupPrefix()
  15789. {
  15790. /** @var \Illuminate\Routing\Router $instance */
  15791. return $instance->getLastGroupPrefix();
  15792. }
  15793. /**
  15794. * Add a route to the underlying route collection.
  15795. *
  15796. * @param array|string $methods
  15797. * @param string $uri
  15798. * @param array|string|callable|null $action
  15799. * @return \Illuminate\Routing\Route
  15800. * @static
  15801. */
  15802. public static function addRoute($methods, $uri, $action)
  15803. {
  15804. /** @var \Illuminate\Routing\Router $instance */
  15805. return $instance->addRoute($methods, $uri, $action);
  15806. }
  15807. /**
  15808. * Create a new Route object.
  15809. *
  15810. * @param array|string $methods
  15811. * @param string $uri
  15812. * @param mixed $action
  15813. * @return \Illuminate\Routing\Route
  15814. * @static
  15815. */
  15816. public static function newRoute($methods, $uri, $action)
  15817. {
  15818. /** @var \Illuminate\Routing\Router $instance */
  15819. return $instance->newRoute($methods, $uri, $action);
  15820. }
  15821. /**
  15822. * Return the response returned by the given route.
  15823. *
  15824. * @param string $name
  15825. * @return \Symfony\Component\HttpFoundation\Response
  15826. * @static
  15827. */
  15828. public static function respondWithRoute($name)
  15829. {
  15830. /** @var \Illuminate\Routing\Router $instance */
  15831. return $instance->respondWithRoute($name);
  15832. }
  15833. /**
  15834. * Dispatch the request to the application.
  15835. *
  15836. * @param \Illuminate\Http\Request $request
  15837. * @return \Symfony\Component\HttpFoundation\Response
  15838. * @static
  15839. */
  15840. public static function dispatch($request)
  15841. {
  15842. /** @var \Illuminate\Routing\Router $instance */
  15843. return $instance->dispatch($request);
  15844. }
  15845. /**
  15846. * Dispatch the request to a route and return the response.
  15847. *
  15848. * @param \Illuminate\Http\Request $request
  15849. * @return \Symfony\Component\HttpFoundation\Response
  15850. * @static
  15851. */
  15852. public static function dispatchToRoute($request)
  15853. {
  15854. /** @var \Illuminate\Routing\Router $instance */
  15855. return $instance->dispatchToRoute($request);
  15856. }
  15857. /**
  15858. * Gather the middleware for the given route with resolved class names.
  15859. *
  15860. * @param \Illuminate\Routing\Route $route
  15861. * @return array
  15862. * @static
  15863. */
  15864. public static function gatherRouteMiddleware($route)
  15865. {
  15866. /** @var \Illuminate\Routing\Router $instance */
  15867. return $instance->gatherRouteMiddleware($route);
  15868. }
  15869. /**
  15870. * Resolve a flat array of middleware classes from the provided array.
  15871. *
  15872. * @param array $middleware
  15873. * @param array $excluded
  15874. * @return array
  15875. * @static
  15876. */
  15877. public static function resolveMiddleware($middleware, $excluded = [])
  15878. {
  15879. /** @var \Illuminate\Routing\Router $instance */
  15880. return $instance->resolveMiddleware($middleware, $excluded);
  15881. }
  15882. /**
  15883. * Create a response instance from the given value.
  15884. *
  15885. * @param \Symfony\Component\HttpFoundation\Request $request
  15886. * @param mixed $response
  15887. * @return \Symfony\Component\HttpFoundation\Response
  15888. * @static
  15889. */
  15890. public static function prepareResponse($request, $response)
  15891. {
  15892. /** @var \Illuminate\Routing\Router $instance */
  15893. return $instance->prepareResponse($request, $response);
  15894. }
  15895. /**
  15896. * Static version of prepareResponse.
  15897. *
  15898. * @param \Symfony\Component\HttpFoundation\Request $request
  15899. * @param mixed $response
  15900. * @return \Symfony\Component\HttpFoundation\Response
  15901. * @static
  15902. */
  15903. public static function toResponse($request, $response)
  15904. {
  15905. return \Illuminate\Routing\Router::toResponse($request, $response);
  15906. }
  15907. /**
  15908. * Substitute the route bindings onto the route.
  15909. *
  15910. * @param \Illuminate\Routing\Route $route
  15911. * @return \Illuminate\Routing\Route
  15912. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model>
  15913. * @throws \Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
  15914. * @static
  15915. */
  15916. public static function substituteBindings($route)
  15917. {
  15918. /** @var \Illuminate\Routing\Router $instance */
  15919. return $instance->substituteBindings($route);
  15920. }
  15921. /**
  15922. * Substitute the implicit route bindings for the given route.
  15923. *
  15924. * @param \Illuminate\Routing\Route $route
  15925. * @return void
  15926. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model>
  15927. * @throws \Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
  15928. * @static
  15929. */
  15930. public static function substituteImplicitBindings($route)
  15931. {
  15932. /** @var \Illuminate\Routing\Router $instance */
  15933. $instance->substituteImplicitBindings($route);
  15934. }
  15935. /**
  15936. * Register a callback to run after implicit bindings are substituted.
  15937. *
  15938. * @param callable $callback
  15939. * @return \Illuminate\Routing\Router
  15940. * @static
  15941. */
  15942. public static function substituteImplicitBindingsUsing($callback)
  15943. {
  15944. /** @var \Illuminate\Routing\Router $instance */
  15945. return $instance->substituteImplicitBindingsUsing($callback);
  15946. }
  15947. /**
  15948. * Register a route matched event listener.
  15949. *
  15950. * @param string|callable $callback
  15951. * @return void
  15952. * @static
  15953. */
  15954. public static function matched($callback)
  15955. {
  15956. /** @var \Illuminate\Routing\Router $instance */
  15957. $instance->matched($callback);
  15958. }
  15959. /**
  15960. * Get all of the defined middleware short-hand names.
  15961. *
  15962. * @return array
  15963. * @static
  15964. */
  15965. public static function getMiddleware()
  15966. {
  15967. /** @var \Illuminate\Routing\Router $instance */
  15968. return $instance->getMiddleware();
  15969. }
  15970. /**
  15971. * Register a short-hand name for a middleware.
  15972. *
  15973. * @param string $name
  15974. * @param string $class
  15975. * @return \Illuminate\Routing\Router
  15976. * @static
  15977. */
  15978. public static function aliasMiddleware($name, $class)
  15979. {
  15980. /** @var \Illuminate\Routing\Router $instance */
  15981. return $instance->aliasMiddleware($name, $class);
  15982. }
  15983. /**
  15984. * Check if a middlewareGroup with the given name exists.
  15985. *
  15986. * @param string $name
  15987. * @return bool
  15988. * @static
  15989. */
  15990. public static function hasMiddlewareGroup($name)
  15991. {
  15992. /** @var \Illuminate\Routing\Router $instance */
  15993. return $instance->hasMiddlewareGroup($name);
  15994. }
  15995. /**
  15996. * Get all of the defined middleware groups.
  15997. *
  15998. * @return array
  15999. * @static
  16000. */
  16001. public static function getMiddlewareGroups()
  16002. {
  16003. /** @var \Illuminate\Routing\Router $instance */
  16004. return $instance->getMiddlewareGroups();
  16005. }
  16006. /**
  16007. * Register a group of middleware.
  16008. *
  16009. * @param string $name
  16010. * @param array $middleware
  16011. * @return \Illuminate\Routing\Router
  16012. * @static
  16013. */
  16014. public static function middlewareGroup($name, $middleware)
  16015. {
  16016. /** @var \Illuminate\Routing\Router $instance */
  16017. return $instance->middlewareGroup($name, $middleware);
  16018. }
  16019. /**
  16020. * Add a middleware to the beginning of a middleware group.
  16021. *
  16022. * If the middleware is already in the group, it will not be added again.
  16023. *
  16024. * @param string $group
  16025. * @param string $middleware
  16026. * @return \Illuminate\Routing\Router
  16027. * @static
  16028. */
  16029. public static function prependMiddlewareToGroup($group, $middleware)
  16030. {
  16031. /** @var \Illuminate\Routing\Router $instance */
  16032. return $instance->prependMiddlewareToGroup($group, $middleware);
  16033. }
  16034. /**
  16035. * Add a middleware to the end of a middleware group.
  16036. *
  16037. * If the middleware is already in the group, it will not be added again.
  16038. *
  16039. * @param string $group
  16040. * @param string $middleware
  16041. * @return \Illuminate\Routing\Router
  16042. * @static
  16043. */
  16044. public static function pushMiddlewareToGroup($group, $middleware)
  16045. {
  16046. /** @var \Illuminate\Routing\Router $instance */
  16047. return $instance->pushMiddlewareToGroup($group, $middleware);
  16048. }
  16049. /**
  16050. * Remove the given middleware from the specified group.
  16051. *
  16052. * @param string $group
  16053. * @param string $middleware
  16054. * @return \Illuminate\Routing\Router
  16055. * @static
  16056. */
  16057. public static function removeMiddlewareFromGroup($group, $middleware)
  16058. {
  16059. /** @var \Illuminate\Routing\Router $instance */
  16060. return $instance->removeMiddlewareFromGroup($group, $middleware);
  16061. }
  16062. /**
  16063. * Flush the router's middleware groups.
  16064. *
  16065. * @return \Illuminate\Routing\Router
  16066. * @static
  16067. */
  16068. public static function flushMiddlewareGroups()
  16069. {
  16070. /** @var \Illuminate\Routing\Router $instance */
  16071. return $instance->flushMiddlewareGroups();
  16072. }
  16073. /**
  16074. * Add a new route parameter binder.
  16075. *
  16076. * @param string $key
  16077. * @param string|callable $binder
  16078. * @return void
  16079. * @static
  16080. */
  16081. public static function bind($key, $binder)
  16082. {
  16083. /** @var \Illuminate\Routing\Router $instance */
  16084. $instance->bind($key, $binder);
  16085. }
  16086. /**
  16087. * Register a model binder for a wildcard.
  16088. *
  16089. * @param string $key
  16090. * @param string $class
  16091. * @param \Closure|null $callback
  16092. * @return void
  16093. * @static
  16094. */
  16095. public static function model($key, $class, $callback = null)
  16096. {
  16097. /** @var \Illuminate\Routing\Router $instance */
  16098. $instance->model($key, $class, $callback);
  16099. }
  16100. /**
  16101. * Get the binding callback for a given binding.
  16102. *
  16103. * @param string $key
  16104. * @return \Closure|null
  16105. * @static
  16106. */
  16107. public static function getBindingCallback($key)
  16108. {
  16109. /** @var \Illuminate\Routing\Router $instance */
  16110. return $instance->getBindingCallback($key);
  16111. }
  16112. /**
  16113. * Get the global "where" patterns.
  16114. *
  16115. * @return array
  16116. * @static
  16117. */
  16118. public static function getPatterns()
  16119. {
  16120. /** @var \Illuminate\Routing\Router $instance */
  16121. return $instance->getPatterns();
  16122. }
  16123. /**
  16124. * Set a global where pattern on all routes.
  16125. *
  16126. * @param string $key
  16127. * @param string $pattern
  16128. * @return void
  16129. * @static
  16130. */
  16131. public static function pattern($key, $pattern)
  16132. {
  16133. /** @var \Illuminate\Routing\Router $instance */
  16134. $instance->pattern($key, $pattern);
  16135. }
  16136. /**
  16137. * Set a group of global where patterns on all routes.
  16138. *
  16139. * @param array $patterns
  16140. * @return void
  16141. * @static
  16142. */
  16143. public static function patterns($patterns)
  16144. {
  16145. /** @var \Illuminate\Routing\Router $instance */
  16146. $instance->patterns($patterns);
  16147. }
  16148. /**
  16149. * Determine if the router currently has a group stack.
  16150. *
  16151. * @return bool
  16152. * @static
  16153. */
  16154. public static function hasGroupStack()
  16155. {
  16156. /** @var \Illuminate\Routing\Router $instance */
  16157. return $instance->hasGroupStack();
  16158. }
  16159. /**
  16160. * Get the current group stack for the router.
  16161. *
  16162. * @return array
  16163. * @static
  16164. */
  16165. public static function getGroupStack()
  16166. {
  16167. /** @var \Illuminate\Routing\Router $instance */
  16168. return $instance->getGroupStack();
  16169. }
  16170. /**
  16171. * Get a route parameter for the current route.
  16172. *
  16173. * @param string $key
  16174. * @param string|null $default
  16175. * @return mixed
  16176. * @static
  16177. */
  16178. public static function input($key, $default = null)
  16179. {
  16180. /** @var \Illuminate\Routing\Router $instance */
  16181. return $instance->input($key, $default);
  16182. }
  16183. /**
  16184. * Get the request currently being dispatched.
  16185. *
  16186. * @return \Illuminate\Http\Request
  16187. * @static
  16188. */
  16189. public static function getCurrentRequest()
  16190. {
  16191. /** @var \Illuminate\Routing\Router $instance */
  16192. return $instance->getCurrentRequest();
  16193. }
  16194. /**
  16195. * Get the currently dispatched route instance.
  16196. *
  16197. * @return \Illuminate\Routing\Route|null
  16198. * @static
  16199. */
  16200. public static function getCurrentRoute()
  16201. {
  16202. /** @var \Illuminate\Routing\Router $instance */
  16203. return $instance->getCurrentRoute();
  16204. }
  16205. /**
  16206. * Get the currently dispatched route instance.
  16207. *
  16208. * @return \Illuminate\Routing\Route|null
  16209. * @static
  16210. */
  16211. public static function current()
  16212. {
  16213. /** @var \Illuminate\Routing\Router $instance */
  16214. return $instance->current();
  16215. }
  16216. /**
  16217. * Check if a route with the given name exists.
  16218. *
  16219. * @param string|array $name
  16220. * @return bool
  16221. * @static
  16222. */
  16223. public static function has($name)
  16224. {
  16225. /** @var \Illuminate\Routing\Router $instance */
  16226. return $instance->has($name);
  16227. }
  16228. /**
  16229. * Get the current route name.
  16230. *
  16231. * @return string|null
  16232. * @static
  16233. */
  16234. public static function currentRouteName()
  16235. {
  16236. /** @var \Illuminate\Routing\Router $instance */
  16237. return $instance->currentRouteName();
  16238. }
  16239. /**
  16240. * Alias for the "currentRouteNamed" method.
  16241. *
  16242. * @param mixed $patterns
  16243. * @return bool
  16244. * @static
  16245. */
  16246. public static function is(...$patterns)
  16247. {
  16248. /** @var \Illuminate\Routing\Router $instance */
  16249. return $instance->is(...$patterns);
  16250. }
  16251. /**
  16252. * Determine if the current route matches a pattern.
  16253. *
  16254. * @param mixed $patterns
  16255. * @return bool
  16256. * @static
  16257. */
  16258. public static function currentRouteNamed(...$patterns)
  16259. {
  16260. /** @var \Illuminate\Routing\Router $instance */
  16261. return $instance->currentRouteNamed(...$patterns);
  16262. }
  16263. /**
  16264. * Get the current route action.
  16265. *
  16266. * @return string|null
  16267. * @static
  16268. */
  16269. public static function currentRouteAction()
  16270. {
  16271. /** @var \Illuminate\Routing\Router $instance */
  16272. return $instance->currentRouteAction();
  16273. }
  16274. /**
  16275. * Alias for the "currentRouteUses" method.
  16276. *
  16277. * @param array|string $patterns
  16278. * @return bool
  16279. * @static
  16280. */
  16281. public static function uses(...$patterns)
  16282. {
  16283. /** @var \Illuminate\Routing\Router $instance */
  16284. return $instance->uses(...$patterns);
  16285. }
  16286. /**
  16287. * Determine if the current route action matches a given action.
  16288. *
  16289. * @param string $action
  16290. * @return bool
  16291. * @static
  16292. */
  16293. public static function currentRouteUses($action)
  16294. {
  16295. /** @var \Illuminate\Routing\Router $instance */
  16296. return $instance->currentRouteUses($action);
  16297. }
  16298. /**
  16299. * Set the unmapped global resource parameters to singular.
  16300. *
  16301. * @param bool $singular
  16302. * @return void
  16303. * @static
  16304. */
  16305. public static function singularResourceParameters($singular = true)
  16306. {
  16307. /** @var \Illuminate\Routing\Router $instance */
  16308. $instance->singularResourceParameters($singular);
  16309. }
  16310. /**
  16311. * Set the global resource parameter mapping.
  16312. *
  16313. * @param array $parameters
  16314. * @return void
  16315. * @static
  16316. */
  16317. public static function resourceParameters($parameters = [])
  16318. {
  16319. /** @var \Illuminate\Routing\Router $instance */
  16320. $instance->resourceParameters($parameters);
  16321. }
  16322. /**
  16323. * Get or set the verbs used in the resource URIs.
  16324. *
  16325. * @param array $verbs
  16326. * @return array|null
  16327. * @static
  16328. */
  16329. public static function resourceVerbs($verbs = [])
  16330. {
  16331. /** @var \Illuminate\Routing\Router $instance */
  16332. return $instance->resourceVerbs($verbs);
  16333. }
  16334. /**
  16335. * Get the underlying route collection.
  16336. *
  16337. * @return \Illuminate\Routing\RouteCollectionInterface
  16338. * @static
  16339. */
  16340. public static function getRoutes()
  16341. {
  16342. /** @var \Illuminate\Routing\Router $instance */
  16343. return $instance->getRoutes();
  16344. }
  16345. /**
  16346. * Set the route collection instance.
  16347. *
  16348. * @param \Illuminate\Routing\RouteCollection $routes
  16349. * @return void
  16350. * @static
  16351. */
  16352. public static function setRoutes($routes)
  16353. {
  16354. /** @var \Illuminate\Routing\Router $instance */
  16355. $instance->setRoutes($routes);
  16356. }
  16357. /**
  16358. * Set the compiled route collection instance.
  16359. *
  16360. * @param array $routes
  16361. * @return void
  16362. * @static
  16363. */
  16364. public static function setCompiledRoutes($routes)
  16365. {
  16366. /** @var \Illuminate\Routing\Router $instance */
  16367. $instance->setCompiledRoutes($routes);
  16368. }
  16369. /**
  16370. * Remove any duplicate middleware from the given array.
  16371. *
  16372. * @param array $middleware
  16373. * @return array
  16374. * @static
  16375. */
  16376. public static function uniqueMiddleware($middleware)
  16377. {
  16378. return \Illuminate\Routing\Router::uniqueMiddleware($middleware);
  16379. }
  16380. /**
  16381. * Set the container instance used by the router.
  16382. *
  16383. * @param \Illuminate\Container\Container $container
  16384. * @return \Illuminate\Routing\Router
  16385. * @static
  16386. */
  16387. public static function setContainer($container)
  16388. {
  16389. /** @var \Illuminate\Routing\Router $instance */
  16390. return $instance->setContainer($container);
  16391. }
  16392. /**
  16393. * Register a custom macro.
  16394. *
  16395. * @param string $name
  16396. * @param object|callable $macro
  16397. * @param-closure-this static $macro
  16398. * @return void
  16399. * @static
  16400. */
  16401. public static function macro($name, $macro)
  16402. {
  16403. \Illuminate\Routing\Router::macro($name, $macro);
  16404. }
  16405. /**
  16406. * Mix another object into the class.
  16407. *
  16408. * @param object $mixin
  16409. * @param bool $replace
  16410. * @return void
  16411. * @throws \ReflectionException
  16412. * @static
  16413. */
  16414. public static function mixin($mixin, $replace = true)
  16415. {
  16416. \Illuminate\Routing\Router::mixin($mixin, $replace);
  16417. }
  16418. /**
  16419. * Checks if macro is registered.
  16420. *
  16421. * @param string $name
  16422. * @return bool
  16423. * @static
  16424. */
  16425. public static function hasMacro($name)
  16426. {
  16427. return \Illuminate\Routing\Router::hasMacro($name);
  16428. }
  16429. /**
  16430. * Flush the existing macros.
  16431. *
  16432. * @return void
  16433. * @static
  16434. */
  16435. public static function flushMacros()
  16436. {
  16437. \Illuminate\Routing\Router::flushMacros();
  16438. }
  16439. /**
  16440. * Dynamically handle calls to the class.
  16441. *
  16442. * @param string $method
  16443. * @param array $parameters
  16444. * @return mixed
  16445. * @throws \BadMethodCallException
  16446. * @static
  16447. */
  16448. public static function macroCall($method, $parameters)
  16449. {
  16450. /** @var \Illuminate\Routing\Router $instance */
  16451. return $instance->macroCall($method, $parameters);
  16452. }
  16453. /**
  16454. * Call the given Closure with this instance then return the instance.
  16455. *
  16456. * @param (callable($this): mixed)|null $callback
  16457. * @return ($callback is null ? \Illuminate\Support\HigherOrderTapProxy : $this)
  16458. * @static
  16459. */
  16460. public static function tap($callback = null)
  16461. {
  16462. /** @var \Illuminate\Routing\Router $instance */
  16463. return $instance->tap($callback);
  16464. }
  16465. }
  16466. /**
  16467. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes withoutOverlapping(int $expiresAt = 1440)
  16468. * @method static void mergeAttributes(\Illuminate\Console\Scheduling\Event $event)
  16469. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes user(string $user)
  16470. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes environments(array|mixed $environments)
  16471. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes evenInMaintenanceMode()
  16472. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes onOneServer()
  16473. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes runInBackground()
  16474. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes when(\Closure|bool $callback)
  16475. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes skip(\Closure|bool $callback)
  16476. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes name(string $description)
  16477. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes description(string $description)
  16478. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes cron(string $expression)
  16479. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes between(string $startTime, string $endTime)
  16480. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes unlessBetween(string $startTime, string $endTime)
  16481. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everySecond()
  16482. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoSeconds()
  16483. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFiveSeconds()
  16484. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTenSeconds()
  16485. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFifteenSeconds()
  16486. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwentySeconds()
  16487. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThirtySeconds()
  16488. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyMinute()
  16489. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoMinutes()
  16490. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThreeMinutes()
  16491. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFourMinutes()
  16492. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFiveMinutes()
  16493. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTenMinutes()
  16494. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFifteenMinutes()
  16495. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThirtyMinutes()
  16496. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes hourly()
  16497. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes hourlyAt(array|string|int|int[] $offset)
  16498. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyOddHour(array|string|int $offset = 0)
  16499. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyTwoHours(array|string|int $offset = 0)
  16500. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyThreeHours(array|string|int $offset = 0)
  16501. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everyFourHours(array|string|int $offset = 0)
  16502. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes everySixHours(array|string|int $offset = 0)
  16503. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes daily()
  16504. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes at(string $time)
  16505. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes dailyAt(string $time)
  16506. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceDaily(int $first = 1, int $second = 13)
  16507. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceDailyAt(int $first = 1, int $second = 13, int $offset = 0)
  16508. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekdays()
  16509. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekends()
  16510. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes mondays()
  16511. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes tuesdays()
  16512. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes wednesdays()
  16513. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes thursdays()
  16514. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes fridays()
  16515. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes saturdays()
  16516. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes sundays()
  16517. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weekly()
  16518. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes weeklyOn(array|mixed $dayOfWeek, string $time = '0:0')
  16519. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes monthly()
  16520. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes monthlyOn(int $dayOfMonth = 1, string $time = '0:0')
  16521. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes twiceMonthly(int $first = 1, int $second = 16, string $time = '0:0')
  16522. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes lastDayOfMonth(string $time = '0:0')
  16523. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterly()
  16524. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes quarterlyOn(int $dayOfQuarter = 1, string $time = '0:0')
  16525. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes yearly()
  16526. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes yearlyOn(int $month = 1, int|string $dayOfMonth = 1, string $time = '0:0')
  16527. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes days(array|mixed $days)
  16528. * @method static \Illuminate\Console\Scheduling\PendingEventAttributes timezone(\DateTimeZone|string $timezone)
  16529. * @see \Illuminate\Console\Scheduling\Schedule
  16530. */
  16531. class Schedule {
  16532. /**
  16533. * Add a new callback event to the schedule.
  16534. *
  16535. * @param string|callable $callback
  16536. * @param array $parameters
  16537. * @return \Illuminate\Console\Scheduling\CallbackEvent
  16538. * @static
  16539. */
  16540. public static function call($callback, $parameters = [])
  16541. {
  16542. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16543. return $instance->call($callback, $parameters);
  16544. }
  16545. /**
  16546. * Add a new Artisan command event to the schedule.
  16547. *
  16548. * @param string $command
  16549. * @param array $parameters
  16550. * @return \Illuminate\Console\Scheduling\Event
  16551. * @static
  16552. */
  16553. public static function command($command, $parameters = [])
  16554. {
  16555. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16556. return $instance->command($command, $parameters);
  16557. }
  16558. /**
  16559. * Add a new job callback event to the schedule.
  16560. *
  16561. * @param object|string $job
  16562. * @param string|null $queue
  16563. * @param string|null $connection
  16564. * @return \Illuminate\Console\Scheduling\CallbackEvent
  16565. * @static
  16566. */
  16567. public static function job($job, $queue = null, $connection = null)
  16568. {
  16569. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16570. return $instance->job($job, $queue, $connection);
  16571. }
  16572. /**
  16573. * Add a new command event to the schedule.
  16574. *
  16575. * @param string $command
  16576. * @param array $parameters
  16577. * @return \Illuminate\Console\Scheduling\Event
  16578. * @static
  16579. */
  16580. public static function exec($command, $parameters = [])
  16581. {
  16582. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16583. return $instance->exec($command, $parameters);
  16584. }
  16585. /**
  16586. * Create new schedule group.
  16587. *
  16588. * @param \Illuminate\Console\Scheduling\Event $event
  16589. * @return void
  16590. * @throws \RuntimeException
  16591. * @static
  16592. */
  16593. public static function group($events)
  16594. {
  16595. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16596. $instance->group($events);
  16597. }
  16598. /**
  16599. * Compile array input for a command.
  16600. *
  16601. * @param string|int $key
  16602. * @param array $value
  16603. * @return string
  16604. * @static
  16605. */
  16606. public static function compileArrayInput($key, $value)
  16607. {
  16608. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16609. return $instance->compileArrayInput($key, $value);
  16610. }
  16611. /**
  16612. * Determine if the server is allowed to run this event.
  16613. *
  16614. * @param \Illuminate\Console\Scheduling\Event $event
  16615. * @param \DateTimeInterface $time
  16616. * @return bool
  16617. * @static
  16618. */
  16619. public static function serverShouldRun($event, $time)
  16620. {
  16621. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16622. return $instance->serverShouldRun($event, $time);
  16623. }
  16624. /**
  16625. * Get all of the events on the schedule that are due.
  16626. *
  16627. * @param \Illuminate\Contracts\Foundation\Application $app
  16628. * @return \Illuminate\Support\Collection
  16629. * @static
  16630. */
  16631. public static function dueEvents($app)
  16632. {
  16633. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16634. return $instance->dueEvents($app);
  16635. }
  16636. /**
  16637. * Get all of the events on the schedule.
  16638. *
  16639. * @return \Illuminate\Console\Scheduling\Event[]
  16640. * @static
  16641. */
  16642. public static function events()
  16643. {
  16644. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16645. return $instance->events();
  16646. }
  16647. /**
  16648. * Specify the cache store that should be used to store mutexes.
  16649. *
  16650. * @param string $store
  16651. * @return \Illuminate\Console\Scheduling\Schedule
  16652. * @static
  16653. */
  16654. public static function useCache($store)
  16655. {
  16656. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16657. return $instance->useCache($store);
  16658. }
  16659. /**
  16660. * Register a custom macro.
  16661. *
  16662. * @param string $name
  16663. * @param object|callable $macro
  16664. * @param-closure-this static $macro
  16665. * @return void
  16666. * @static
  16667. */
  16668. public static function macro($name, $macro)
  16669. {
  16670. \Illuminate\Console\Scheduling\Schedule::macro($name, $macro);
  16671. }
  16672. /**
  16673. * Mix another object into the class.
  16674. *
  16675. * @param object $mixin
  16676. * @param bool $replace
  16677. * @return void
  16678. * @throws \ReflectionException
  16679. * @static
  16680. */
  16681. public static function mixin($mixin, $replace = true)
  16682. {
  16683. \Illuminate\Console\Scheduling\Schedule::mixin($mixin, $replace);
  16684. }
  16685. /**
  16686. * Checks if macro is registered.
  16687. *
  16688. * @param string $name
  16689. * @return bool
  16690. * @static
  16691. */
  16692. public static function hasMacro($name)
  16693. {
  16694. return \Illuminate\Console\Scheduling\Schedule::hasMacro($name);
  16695. }
  16696. /**
  16697. * Flush the existing macros.
  16698. *
  16699. * @return void
  16700. * @static
  16701. */
  16702. public static function flushMacros()
  16703. {
  16704. \Illuminate\Console\Scheduling\Schedule::flushMacros();
  16705. }
  16706. /**
  16707. * Dynamically handle calls to the class.
  16708. *
  16709. * @param string $method
  16710. * @param array $parameters
  16711. * @return mixed
  16712. * @throws \BadMethodCallException
  16713. * @static
  16714. */
  16715. public static function macroCall($method, $parameters)
  16716. {
  16717. /** @var \Illuminate\Console\Scheduling\Schedule $instance */
  16718. return $instance->macroCall($method, $parameters);
  16719. }
  16720. }
  16721. /**
  16722. * @see \Illuminate\Database\Schema\Builder
  16723. */
  16724. class Schema {
  16725. /**
  16726. * Drop all tables from the database.
  16727. *
  16728. * @return void
  16729. * @static
  16730. */
  16731. public static function dropAllTables()
  16732. {
  16733. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16734. $instance->dropAllTables();
  16735. }
  16736. /**
  16737. * Drop all views from the database.
  16738. *
  16739. * @return void
  16740. * @static
  16741. */
  16742. public static function dropAllViews()
  16743. {
  16744. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16745. $instance->dropAllViews();
  16746. }
  16747. /**
  16748. * Drop all types from the database.
  16749. *
  16750. * @return void
  16751. * @static
  16752. */
  16753. public static function dropAllTypes()
  16754. {
  16755. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16756. $instance->dropAllTypes();
  16757. }
  16758. /**
  16759. * Get the current schemas for the connection.
  16760. *
  16761. * @return string[]
  16762. * @static
  16763. */
  16764. public static function getCurrentSchemaListing()
  16765. {
  16766. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16767. return $instance->getCurrentSchemaListing();
  16768. }
  16769. /**
  16770. * Set the default string length for migrations.
  16771. *
  16772. * @param int $length
  16773. * @return void
  16774. * @static
  16775. */
  16776. public static function defaultStringLength($length)
  16777. {
  16778. //Method inherited from \Illuminate\Database\Schema\Builder
  16779. \Illuminate\Database\Schema\PostgresBuilder::defaultStringLength($length);
  16780. }
  16781. /**
  16782. * Set the default time precision for migrations.
  16783. *
  16784. * @static
  16785. */
  16786. public static function defaultTimePrecision($precision)
  16787. {
  16788. //Method inherited from \Illuminate\Database\Schema\Builder
  16789. return \Illuminate\Database\Schema\PostgresBuilder::defaultTimePrecision($precision);
  16790. }
  16791. /**
  16792. * Set the default morph key type for migrations.
  16793. *
  16794. * @param string $type
  16795. * @return void
  16796. * @throws \InvalidArgumentException
  16797. * @static
  16798. */
  16799. public static function defaultMorphKeyType($type)
  16800. {
  16801. //Method inherited from \Illuminate\Database\Schema\Builder
  16802. \Illuminate\Database\Schema\PostgresBuilder::defaultMorphKeyType($type);
  16803. }
  16804. /**
  16805. * Set the default morph key type for migrations to UUIDs.
  16806. *
  16807. * @return void
  16808. * @static
  16809. */
  16810. public static function morphUsingUuids()
  16811. {
  16812. //Method inherited from \Illuminate\Database\Schema\Builder
  16813. \Illuminate\Database\Schema\PostgresBuilder::morphUsingUuids();
  16814. }
  16815. /**
  16816. * Set the default morph key type for migrations to ULIDs.
  16817. *
  16818. * @return void
  16819. * @static
  16820. */
  16821. public static function morphUsingUlids()
  16822. {
  16823. //Method inherited from \Illuminate\Database\Schema\Builder
  16824. \Illuminate\Database\Schema\PostgresBuilder::morphUsingUlids();
  16825. }
  16826. /**
  16827. * Create a database in the schema.
  16828. *
  16829. * @param string $name
  16830. * @return bool
  16831. * @static
  16832. */
  16833. public static function createDatabase($name)
  16834. {
  16835. //Method inherited from \Illuminate\Database\Schema\Builder
  16836. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16837. return $instance->createDatabase($name);
  16838. }
  16839. /**
  16840. * Drop a database from the schema if the database exists.
  16841. *
  16842. * @param string $name
  16843. * @return bool
  16844. * @static
  16845. */
  16846. public static function dropDatabaseIfExists($name)
  16847. {
  16848. //Method inherited from \Illuminate\Database\Schema\Builder
  16849. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16850. return $instance->dropDatabaseIfExists($name);
  16851. }
  16852. /**
  16853. * Get the schemas that belong to the connection.
  16854. *
  16855. * @return \Illuminate\Database\Schema\list<array{name: string, path: string|null, default: bool}>
  16856. * @static
  16857. */
  16858. public static function getSchemas()
  16859. {
  16860. //Method inherited from \Illuminate\Database\Schema\Builder
  16861. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16862. return $instance->getSchemas();
  16863. }
  16864. /**
  16865. * Determine if the given table exists.
  16866. *
  16867. * @param string $table
  16868. * @return bool
  16869. * @static
  16870. */
  16871. public static function hasTable($table)
  16872. {
  16873. //Method inherited from \Illuminate\Database\Schema\Builder
  16874. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16875. return $instance->hasTable($table);
  16876. }
  16877. /**
  16878. * Determine if the given view exists.
  16879. *
  16880. * @param string $view
  16881. * @return bool
  16882. * @static
  16883. */
  16884. public static function hasView($view)
  16885. {
  16886. //Method inherited from \Illuminate\Database\Schema\Builder
  16887. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16888. return $instance->hasView($view);
  16889. }
  16890. /**
  16891. * Get the tables that belong to the connection.
  16892. *
  16893. * @param string|string[]|null $schema
  16894. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string|null, schema_qualified_name: string, size: int|null, comment: string|null, collation: string|null, engine: string|null}>
  16895. * @static
  16896. */
  16897. public static function getTables($schema = null)
  16898. {
  16899. //Method inherited from \Illuminate\Database\Schema\Builder
  16900. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16901. return $instance->getTables($schema);
  16902. }
  16903. /**
  16904. * Get the names of the tables that belong to the connection.
  16905. *
  16906. * @param string|string[]|null $schema
  16907. * @param bool $schemaQualified
  16908. * @return list<string>
  16909. * @static
  16910. */
  16911. public static function getTableListing($schema = null, $schemaQualified = true)
  16912. {
  16913. //Method inherited from \Illuminate\Database\Schema\Builder
  16914. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16915. return $instance->getTableListing($schema, $schemaQualified);
  16916. }
  16917. /**
  16918. * Get the views that belong to the connection.
  16919. *
  16920. * @param string|string[]|null $schema
  16921. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string|null, schema_qualified_name: string, definition: string}>
  16922. * @static
  16923. */
  16924. public static function getViews($schema = null)
  16925. {
  16926. //Method inherited from \Illuminate\Database\Schema\Builder
  16927. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16928. return $instance->getViews($schema);
  16929. }
  16930. /**
  16931. * Get the user-defined types that belong to the connection.
  16932. *
  16933. * @param string|string[]|null $schema
  16934. * @return \Illuminate\Database\Schema\list<array{name: string, schema: string, type: string, type: string, category: string, implicit: bool}>
  16935. * @static
  16936. */
  16937. public static function getTypes($schema = null)
  16938. {
  16939. //Method inherited from \Illuminate\Database\Schema\Builder
  16940. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16941. return $instance->getTypes($schema);
  16942. }
  16943. /**
  16944. * Determine if the given table has a given column.
  16945. *
  16946. * @param string $table
  16947. * @param string $column
  16948. * @return bool
  16949. * @static
  16950. */
  16951. public static function hasColumn($table, $column)
  16952. {
  16953. //Method inherited from \Illuminate\Database\Schema\Builder
  16954. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16955. return $instance->hasColumn($table, $column);
  16956. }
  16957. /**
  16958. * Determine if the given table has given columns.
  16959. *
  16960. * @param string $table
  16961. * @param array<string> $columns
  16962. * @return bool
  16963. * @static
  16964. */
  16965. public static function hasColumns($table, $columns)
  16966. {
  16967. //Method inherited from \Illuminate\Database\Schema\Builder
  16968. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16969. return $instance->hasColumns($table, $columns);
  16970. }
  16971. /**
  16972. * Execute a table builder callback if the given table has a given column.
  16973. *
  16974. * @param string $table
  16975. * @param string $column
  16976. * @param \Closure $callback
  16977. * @return void
  16978. * @static
  16979. */
  16980. public static function whenTableHasColumn($table, $column, $callback)
  16981. {
  16982. //Method inherited from \Illuminate\Database\Schema\Builder
  16983. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16984. $instance->whenTableHasColumn($table, $column, $callback);
  16985. }
  16986. /**
  16987. * Execute a table builder callback if the given table doesn't have a given column.
  16988. *
  16989. * @param string $table
  16990. * @param string $column
  16991. * @param \Closure $callback
  16992. * @return void
  16993. * @static
  16994. */
  16995. public static function whenTableDoesntHaveColumn($table, $column, $callback)
  16996. {
  16997. //Method inherited from \Illuminate\Database\Schema\Builder
  16998. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  16999. $instance->whenTableDoesntHaveColumn($table, $column, $callback);
  17000. }
  17001. /**
  17002. * Get the data type for the given column name.
  17003. *
  17004. * @param string $table
  17005. * @param string $column
  17006. * @param bool $fullDefinition
  17007. * @return string
  17008. * @static
  17009. */
  17010. public static function getColumnType($table, $column, $fullDefinition = false)
  17011. {
  17012. //Method inherited from \Illuminate\Database\Schema\Builder
  17013. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17014. return $instance->getColumnType($table, $column, $fullDefinition);
  17015. }
  17016. /**
  17017. * Get the column listing for a given table.
  17018. *
  17019. * @param string $table
  17020. * @return list<string>
  17021. * @static
  17022. */
  17023. public static function getColumnListing($table)
  17024. {
  17025. //Method inherited from \Illuminate\Database\Schema\Builder
  17026. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17027. return $instance->getColumnListing($table);
  17028. }
  17029. /**
  17030. * Get the columns for a given table.
  17031. *
  17032. * @param string $table
  17033. * @return \Illuminate\Database\Schema\list<array{name: string, type: string, type_name: string, nullable: bool, default: mixed, auto_increment: bool, comment: string|null, generation: array{type: string, expression: string|null}|null}>
  17034. * @static
  17035. */
  17036. public static function getColumns($table)
  17037. {
  17038. //Method inherited from \Illuminate\Database\Schema\Builder
  17039. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17040. return $instance->getColumns($table);
  17041. }
  17042. /**
  17043. * Get the indexes for a given table.
  17044. *
  17045. * @param string $table
  17046. * @return \Illuminate\Database\Schema\list<array{name: string, columns: list<string>, type: string, unique: bool, primary: bool}>
  17047. * @static
  17048. */
  17049. public static function getIndexes($table)
  17050. {
  17051. //Method inherited from \Illuminate\Database\Schema\Builder
  17052. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17053. return $instance->getIndexes($table);
  17054. }
  17055. /**
  17056. * Get the names of the indexes for a given table.
  17057. *
  17058. * @param string $table
  17059. * @return list<string>
  17060. * @static
  17061. */
  17062. public static function getIndexListing($table)
  17063. {
  17064. //Method inherited from \Illuminate\Database\Schema\Builder
  17065. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17066. return $instance->getIndexListing($table);
  17067. }
  17068. /**
  17069. * Determine if the given table has a given index.
  17070. *
  17071. * @param string $table
  17072. * @param string|array $index
  17073. * @param string|null $type
  17074. * @return bool
  17075. * @static
  17076. */
  17077. public static function hasIndex($table, $index, $type = null)
  17078. {
  17079. //Method inherited from \Illuminate\Database\Schema\Builder
  17080. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17081. return $instance->hasIndex($table, $index, $type);
  17082. }
  17083. /**
  17084. * Get the foreign keys for a given table.
  17085. *
  17086. * @param string $table
  17087. * @return array
  17088. * @static
  17089. */
  17090. public static function getForeignKeys($table)
  17091. {
  17092. //Method inherited from \Illuminate\Database\Schema\Builder
  17093. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17094. return $instance->getForeignKeys($table);
  17095. }
  17096. /**
  17097. * Modify a table on the schema.
  17098. *
  17099. * @param string $table
  17100. * @param \Closure $callback
  17101. * @return void
  17102. * @static
  17103. */
  17104. public static function table($table, $callback)
  17105. {
  17106. //Method inherited from \Illuminate\Database\Schema\Builder
  17107. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17108. $instance->table($table, $callback);
  17109. }
  17110. /**
  17111. * Create a new table on the schema.
  17112. *
  17113. * @param string $table
  17114. * @param \Closure $callback
  17115. * @return void
  17116. * @static
  17117. */
  17118. public static function create($table, $callback)
  17119. {
  17120. //Method inherited from \Illuminate\Database\Schema\Builder
  17121. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17122. $instance->create($table, $callback);
  17123. }
  17124. /**
  17125. * Drop a table from the schema.
  17126. *
  17127. * @param string $table
  17128. * @return void
  17129. * @static
  17130. */
  17131. public static function drop($table)
  17132. {
  17133. //Method inherited from \Illuminate\Database\Schema\Builder
  17134. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17135. $instance->drop($table);
  17136. }
  17137. /**
  17138. * Drop a table from the schema if it exists.
  17139. *
  17140. * @param string $table
  17141. * @return void
  17142. * @static
  17143. */
  17144. public static function dropIfExists($table)
  17145. {
  17146. //Method inherited from \Illuminate\Database\Schema\Builder
  17147. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17148. $instance->dropIfExists($table);
  17149. }
  17150. /**
  17151. * Drop columns from a table schema.
  17152. *
  17153. * @param string $table
  17154. * @param string|array<string> $columns
  17155. * @return void
  17156. * @static
  17157. */
  17158. public static function dropColumns($table, $columns)
  17159. {
  17160. //Method inherited from \Illuminate\Database\Schema\Builder
  17161. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17162. $instance->dropColumns($table, $columns);
  17163. }
  17164. /**
  17165. * Rename a table on the schema.
  17166. *
  17167. * @param string $from
  17168. * @param string $to
  17169. * @return void
  17170. * @static
  17171. */
  17172. public static function rename($from, $to)
  17173. {
  17174. //Method inherited from \Illuminate\Database\Schema\Builder
  17175. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17176. $instance->rename($from, $to);
  17177. }
  17178. /**
  17179. * Enable foreign key constraints.
  17180. *
  17181. * @return bool
  17182. * @static
  17183. */
  17184. public static function enableForeignKeyConstraints()
  17185. {
  17186. //Method inherited from \Illuminate\Database\Schema\Builder
  17187. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17188. return $instance->enableForeignKeyConstraints();
  17189. }
  17190. /**
  17191. * Disable foreign key constraints.
  17192. *
  17193. * @return bool
  17194. * @static
  17195. */
  17196. public static function disableForeignKeyConstraints()
  17197. {
  17198. //Method inherited from \Illuminate\Database\Schema\Builder
  17199. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17200. return $instance->disableForeignKeyConstraints();
  17201. }
  17202. /**
  17203. * Disable foreign key constraints during the execution of a callback.
  17204. *
  17205. * @param \Closure $callback
  17206. * @return mixed
  17207. * @static
  17208. */
  17209. public static function withoutForeignKeyConstraints($callback)
  17210. {
  17211. //Method inherited from \Illuminate\Database\Schema\Builder
  17212. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17213. return $instance->withoutForeignKeyConstraints($callback);
  17214. }
  17215. /**
  17216. * Get the default schema name for the connection.
  17217. *
  17218. * @return string|null
  17219. * @static
  17220. */
  17221. public static function getCurrentSchemaName()
  17222. {
  17223. //Method inherited from \Illuminate\Database\Schema\Builder
  17224. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17225. return $instance->getCurrentSchemaName();
  17226. }
  17227. /**
  17228. * Parse the given database object reference and extract the schema and table.
  17229. *
  17230. * @param string $reference
  17231. * @param string|bool|null $withDefaultSchema
  17232. * @return array
  17233. * @static
  17234. */
  17235. public static function parseSchemaAndTable($reference, $withDefaultSchema = null)
  17236. {
  17237. //Method inherited from \Illuminate\Database\Schema\Builder
  17238. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17239. return $instance->parseSchemaAndTable($reference, $withDefaultSchema);
  17240. }
  17241. /**
  17242. * Get the database connection instance.
  17243. *
  17244. * @return \Illuminate\Database\Connection
  17245. * @static
  17246. */
  17247. public static function getConnection()
  17248. {
  17249. //Method inherited from \Illuminate\Database\Schema\Builder
  17250. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17251. return $instance->getConnection();
  17252. }
  17253. /**
  17254. * Set the Schema Blueprint resolver callback.
  17255. *
  17256. * @param \Closure(string, \Closure, string): \Illuminate\Database\Schema\Blueprint|null $resolver
  17257. * @return void
  17258. * @static
  17259. */
  17260. public static function blueprintResolver($resolver)
  17261. {
  17262. //Method inherited from \Illuminate\Database\Schema\Builder
  17263. /** @var \Illuminate\Database\Schema\PostgresBuilder $instance */
  17264. $instance->blueprintResolver($resolver);
  17265. }
  17266. /**
  17267. * Register a custom macro.
  17268. *
  17269. * @param string $name
  17270. * @param object|callable $macro
  17271. * @param-closure-this static $macro
  17272. * @return void
  17273. * @static
  17274. */
  17275. public static function macro($name, $macro)
  17276. {
  17277. //Method inherited from \Illuminate\Database\Schema\Builder
  17278. \Illuminate\Database\Schema\PostgresBuilder::macro($name, $macro);
  17279. }
  17280. /**
  17281. * Mix another object into the class.
  17282. *
  17283. * @param object $mixin
  17284. * @param bool $replace
  17285. * @return void
  17286. * @throws \ReflectionException
  17287. * @static
  17288. */
  17289. public static function mixin($mixin, $replace = true)
  17290. {
  17291. //Method inherited from \Illuminate\Database\Schema\Builder
  17292. \Illuminate\Database\Schema\PostgresBuilder::mixin($mixin, $replace);
  17293. }
  17294. /**
  17295. * Checks if macro is registered.
  17296. *
  17297. * @param string $name
  17298. * @return bool
  17299. * @static
  17300. */
  17301. public static function hasMacro($name)
  17302. {
  17303. //Method inherited from \Illuminate\Database\Schema\Builder
  17304. return \Illuminate\Database\Schema\PostgresBuilder::hasMacro($name);
  17305. }
  17306. /**
  17307. * Flush the existing macros.
  17308. *
  17309. * @return void
  17310. * @static
  17311. */
  17312. public static function flushMacros()
  17313. {
  17314. //Method inherited from \Illuminate\Database\Schema\Builder
  17315. \Illuminate\Database\Schema\PostgresBuilder::flushMacros();
  17316. }
  17317. }
  17318. /**
  17319. * @see \Illuminate\Session\SessionManager
  17320. */
  17321. class Session {
  17322. /**
  17323. * Determine if requests for the same session should wait for each to finish before executing.
  17324. *
  17325. * @return bool
  17326. * @static
  17327. */
  17328. public static function shouldBlock()
  17329. {
  17330. /** @var \Illuminate\Session\SessionManager $instance */
  17331. return $instance->shouldBlock();
  17332. }
  17333. /**
  17334. * Get the name of the cache store / driver that should be used to acquire session locks.
  17335. *
  17336. * @return string|null
  17337. * @static
  17338. */
  17339. public static function blockDriver()
  17340. {
  17341. /** @var \Illuminate\Session\SessionManager $instance */
  17342. return $instance->blockDriver();
  17343. }
  17344. /**
  17345. * Get the maximum number of seconds the session lock should be held for.
  17346. *
  17347. * @return int
  17348. * @static
  17349. */
  17350. public static function defaultRouteBlockLockSeconds()
  17351. {
  17352. /** @var \Illuminate\Session\SessionManager $instance */
  17353. return $instance->defaultRouteBlockLockSeconds();
  17354. }
  17355. /**
  17356. * Get the maximum number of seconds to wait while attempting to acquire a route block session lock.
  17357. *
  17358. * @return int
  17359. * @static
  17360. */
  17361. public static function defaultRouteBlockWaitSeconds()
  17362. {
  17363. /** @var \Illuminate\Session\SessionManager $instance */
  17364. return $instance->defaultRouteBlockWaitSeconds();
  17365. }
  17366. /**
  17367. * Get the session configuration.
  17368. *
  17369. * @return array
  17370. * @static
  17371. */
  17372. public static function getSessionConfig()
  17373. {
  17374. /** @var \Illuminate\Session\SessionManager $instance */
  17375. return $instance->getSessionConfig();
  17376. }
  17377. /**
  17378. * Get the default session driver name.
  17379. *
  17380. * @return string
  17381. * @static
  17382. */
  17383. public static function getDefaultDriver()
  17384. {
  17385. /** @var \Illuminate\Session\SessionManager $instance */
  17386. return $instance->getDefaultDriver();
  17387. }
  17388. /**
  17389. * Set the default session driver name.
  17390. *
  17391. * @param string $name
  17392. * @return void
  17393. * @static
  17394. */
  17395. public static function setDefaultDriver($name)
  17396. {
  17397. /** @var \Illuminate\Session\SessionManager $instance */
  17398. $instance->setDefaultDriver($name);
  17399. }
  17400. /**
  17401. * Get a driver instance.
  17402. *
  17403. * @param string|null $driver
  17404. * @return mixed
  17405. * @throws \InvalidArgumentException
  17406. * @static
  17407. */
  17408. public static function driver($driver = null)
  17409. {
  17410. //Method inherited from \Illuminate\Support\Manager
  17411. /** @var \Illuminate\Session\SessionManager $instance */
  17412. return $instance->driver($driver);
  17413. }
  17414. /**
  17415. * Register a custom driver creator Closure.
  17416. *
  17417. * @param string $driver
  17418. * @param \Closure $callback
  17419. * @return \Illuminate\Session\SessionManager
  17420. * @static
  17421. */
  17422. public static function extend($driver, $callback)
  17423. {
  17424. //Method inherited from \Illuminate\Support\Manager
  17425. /** @var \Illuminate\Session\SessionManager $instance */
  17426. return $instance->extend($driver, $callback);
  17427. }
  17428. /**
  17429. * Get all of the created "drivers".
  17430. *
  17431. * @return array
  17432. * @static
  17433. */
  17434. public static function getDrivers()
  17435. {
  17436. //Method inherited from \Illuminate\Support\Manager
  17437. /** @var \Illuminate\Session\SessionManager $instance */
  17438. return $instance->getDrivers();
  17439. }
  17440. /**
  17441. * Get the container instance used by the manager.
  17442. *
  17443. * @return \Illuminate\Contracts\Container\Container
  17444. * @static
  17445. */
  17446. public static function getContainer()
  17447. {
  17448. //Method inherited from \Illuminate\Support\Manager
  17449. /** @var \Illuminate\Session\SessionManager $instance */
  17450. return $instance->getContainer();
  17451. }
  17452. /**
  17453. * Set the container instance used by the manager.
  17454. *
  17455. * @param \Illuminate\Contracts\Container\Container $container
  17456. * @return \Illuminate\Session\SessionManager
  17457. * @static
  17458. */
  17459. public static function setContainer($container)
  17460. {
  17461. //Method inherited from \Illuminate\Support\Manager
  17462. /** @var \Illuminate\Session\SessionManager $instance */
  17463. return $instance->setContainer($container);
  17464. }
  17465. /**
  17466. * Forget all of the resolved driver instances.
  17467. *
  17468. * @return \Illuminate\Session\SessionManager
  17469. * @static
  17470. */
  17471. public static function forgetDrivers()
  17472. {
  17473. //Method inherited from \Illuminate\Support\Manager
  17474. /** @var \Illuminate\Session\SessionManager $instance */
  17475. return $instance->forgetDrivers();
  17476. }
  17477. /**
  17478. * Start the session, reading the data from a handler.
  17479. *
  17480. * @return bool
  17481. * @static
  17482. */
  17483. public static function start()
  17484. {
  17485. /** @var \Illuminate\Session\Store $instance */
  17486. return $instance->start();
  17487. }
  17488. /**
  17489. * Save the session data to storage.
  17490. *
  17491. * @return void
  17492. * @static
  17493. */
  17494. public static function save()
  17495. {
  17496. /** @var \Illuminate\Session\Store $instance */
  17497. $instance->save();
  17498. }
  17499. /**
  17500. * Age the flash data for the session.
  17501. *
  17502. * @return void
  17503. * @static
  17504. */
  17505. public static function ageFlashData()
  17506. {
  17507. /** @var \Illuminate\Session\Store $instance */
  17508. $instance->ageFlashData();
  17509. }
  17510. /**
  17511. * Get all of the session data.
  17512. *
  17513. * @return array
  17514. * @static
  17515. */
  17516. public static function all()
  17517. {
  17518. /** @var \Illuminate\Session\Store $instance */
  17519. return $instance->all();
  17520. }
  17521. /**
  17522. * Get a subset of the session data.
  17523. *
  17524. * @param array $keys
  17525. * @return array
  17526. * @static
  17527. */
  17528. public static function only($keys)
  17529. {
  17530. /** @var \Illuminate\Session\Store $instance */
  17531. return $instance->only($keys);
  17532. }
  17533. /**
  17534. * Get all the session data except for a specified array of items.
  17535. *
  17536. * @param array $keys
  17537. * @return array
  17538. * @static
  17539. */
  17540. public static function except($keys)
  17541. {
  17542. /** @var \Illuminate\Session\Store $instance */
  17543. return $instance->except($keys);
  17544. }
  17545. /**
  17546. * Checks if a key exists.
  17547. *
  17548. * @param string|array $key
  17549. * @return bool
  17550. * @static
  17551. */
  17552. public static function exists($key)
  17553. {
  17554. /** @var \Illuminate\Session\Store $instance */
  17555. return $instance->exists($key);
  17556. }
  17557. /**
  17558. * Determine if the given key is missing from the session data.
  17559. *
  17560. * @param string|array $key
  17561. * @return bool
  17562. * @static
  17563. */
  17564. public static function missing($key)
  17565. {
  17566. /** @var \Illuminate\Session\Store $instance */
  17567. return $instance->missing($key);
  17568. }
  17569. /**
  17570. * Determine if a key is present and not null.
  17571. *
  17572. * @param string|array $key
  17573. * @return bool
  17574. * @static
  17575. */
  17576. public static function has($key)
  17577. {
  17578. /** @var \Illuminate\Session\Store $instance */
  17579. return $instance->has($key);
  17580. }
  17581. /**
  17582. * Determine if any of the given keys are present and not null.
  17583. *
  17584. * @param string|array $key
  17585. * @return bool
  17586. * @static
  17587. */
  17588. public static function hasAny($key)
  17589. {
  17590. /** @var \Illuminate\Session\Store $instance */
  17591. return $instance->hasAny($key);
  17592. }
  17593. /**
  17594. * Get an item from the session.
  17595. *
  17596. * @param string $key
  17597. * @param mixed $default
  17598. * @return mixed
  17599. * @static
  17600. */
  17601. public static function get($key, $default = null)
  17602. {
  17603. /** @var \Illuminate\Session\Store $instance */
  17604. return $instance->get($key, $default);
  17605. }
  17606. /**
  17607. * Get the value of a given key and then forget it.
  17608. *
  17609. * @param string $key
  17610. * @param mixed $default
  17611. * @return mixed
  17612. * @static
  17613. */
  17614. public static function pull($key, $default = null)
  17615. {
  17616. /** @var \Illuminate\Session\Store $instance */
  17617. return $instance->pull($key, $default);
  17618. }
  17619. /**
  17620. * Determine if the session contains old input.
  17621. *
  17622. * @param string|null $key
  17623. * @return bool
  17624. * @static
  17625. */
  17626. public static function hasOldInput($key = null)
  17627. {
  17628. /** @var \Illuminate\Session\Store $instance */
  17629. return $instance->hasOldInput($key);
  17630. }
  17631. /**
  17632. * Get the requested item from the flashed input array.
  17633. *
  17634. * @param string|null $key
  17635. * @param mixed $default
  17636. * @return mixed
  17637. * @static
  17638. */
  17639. public static function getOldInput($key = null, $default = null)
  17640. {
  17641. /** @var \Illuminate\Session\Store $instance */
  17642. return $instance->getOldInput($key, $default);
  17643. }
  17644. /**
  17645. * Replace the given session attributes entirely.
  17646. *
  17647. * @param array $attributes
  17648. * @return void
  17649. * @static
  17650. */
  17651. public static function replace($attributes)
  17652. {
  17653. /** @var \Illuminate\Session\Store $instance */
  17654. $instance->replace($attributes);
  17655. }
  17656. /**
  17657. * Put a key / value pair or array of key / value pairs in the session.
  17658. *
  17659. * @param string|array $key
  17660. * @param mixed $value
  17661. * @return void
  17662. * @static
  17663. */
  17664. public static function put($key, $value = null)
  17665. {
  17666. /** @var \Illuminate\Session\Store $instance */
  17667. $instance->put($key, $value);
  17668. }
  17669. /**
  17670. * Get an item from the session, or store the default value.
  17671. *
  17672. * @param string $key
  17673. * @param \Closure $callback
  17674. * @return mixed
  17675. * @static
  17676. */
  17677. public static function remember($key, $callback)
  17678. {
  17679. /** @var \Illuminate\Session\Store $instance */
  17680. return $instance->remember($key, $callback);
  17681. }
  17682. /**
  17683. * Push a value onto a session array.
  17684. *
  17685. * @param string $key
  17686. * @param mixed $value
  17687. * @return void
  17688. * @static
  17689. */
  17690. public static function push($key, $value)
  17691. {
  17692. /** @var \Illuminate\Session\Store $instance */
  17693. $instance->push($key, $value);
  17694. }
  17695. /**
  17696. * Increment the value of an item in the session.
  17697. *
  17698. * @param string $key
  17699. * @param int $amount
  17700. * @return mixed
  17701. * @static
  17702. */
  17703. public static function increment($key, $amount = 1)
  17704. {
  17705. /** @var \Illuminate\Session\Store $instance */
  17706. return $instance->increment($key, $amount);
  17707. }
  17708. /**
  17709. * Decrement the value of an item in the session.
  17710. *
  17711. * @param string $key
  17712. * @param int $amount
  17713. * @return int
  17714. * @static
  17715. */
  17716. public static function decrement($key, $amount = 1)
  17717. {
  17718. /** @var \Illuminate\Session\Store $instance */
  17719. return $instance->decrement($key, $amount);
  17720. }
  17721. /**
  17722. * Flash a key / value pair to the session.
  17723. *
  17724. * @param string $key
  17725. * @param mixed $value
  17726. * @return void
  17727. * @static
  17728. */
  17729. public static function flash($key, $value = true)
  17730. {
  17731. /** @var \Illuminate\Session\Store $instance */
  17732. $instance->flash($key, $value);
  17733. }
  17734. /**
  17735. * Flash a key / value pair to the session for immediate use.
  17736. *
  17737. * @param string $key
  17738. * @param mixed $value
  17739. * @return void
  17740. * @static
  17741. */
  17742. public static function now($key, $value)
  17743. {
  17744. /** @var \Illuminate\Session\Store $instance */
  17745. $instance->now($key, $value);
  17746. }
  17747. /**
  17748. * Reflash all of the session flash data.
  17749. *
  17750. * @return void
  17751. * @static
  17752. */
  17753. public static function reflash()
  17754. {
  17755. /** @var \Illuminate\Session\Store $instance */
  17756. $instance->reflash();
  17757. }
  17758. /**
  17759. * Reflash a subset of the current flash data.
  17760. *
  17761. * @param array|mixed $keys
  17762. * @return void
  17763. * @static
  17764. */
  17765. public static function keep($keys = null)
  17766. {
  17767. /** @var \Illuminate\Session\Store $instance */
  17768. $instance->keep($keys);
  17769. }
  17770. /**
  17771. * Flash an input array to the session.
  17772. *
  17773. * @param array $value
  17774. * @return void
  17775. * @static
  17776. */
  17777. public static function flashInput($value)
  17778. {
  17779. /** @var \Illuminate\Session\Store $instance */
  17780. $instance->flashInput($value);
  17781. }
  17782. /**
  17783. * Remove an item from the session, returning its value.
  17784. *
  17785. * @param string $key
  17786. * @return mixed
  17787. * @static
  17788. */
  17789. public static function remove($key)
  17790. {
  17791. /** @var \Illuminate\Session\Store $instance */
  17792. return $instance->remove($key);
  17793. }
  17794. /**
  17795. * Remove one or many items from the session.
  17796. *
  17797. * @param string|array $keys
  17798. * @return void
  17799. * @static
  17800. */
  17801. public static function forget($keys)
  17802. {
  17803. /** @var \Illuminate\Session\Store $instance */
  17804. $instance->forget($keys);
  17805. }
  17806. /**
  17807. * Remove all of the items from the session.
  17808. *
  17809. * @return void
  17810. * @static
  17811. */
  17812. public static function flush()
  17813. {
  17814. /** @var \Illuminate\Session\Store $instance */
  17815. $instance->flush();
  17816. }
  17817. /**
  17818. * Flush the session data and regenerate the ID.
  17819. *
  17820. * @return bool
  17821. * @static
  17822. */
  17823. public static function invalidate()
  17824. {
  17825. /** @var \Illuminate\Session\Store $instance */
  17826. return $instance->invalidate();
  17827. }
  17828. /**
  17829. * Generate a new session identifier.
  17830. *
  17831. * @param bool $destroy
  17832. * @return bool
  17833. * @static
  17834. */
  17835. public static function regenerate($destroy = false)
  17836. {
  17837. /** @var \Illuminate\Session\Store $instance */
  17838. return $instance->regenerate($destroy);
  17839. }
  17840. /**
  17841. * Generate a new session ID for the session.
  17842. *
  17843. * @param bool $destroy
  17844. * @return bool
  17845. * @static
  17846. */
  17847. public static function migrate($destroy = false)
  17848. {
  17849. /** @var \Illuminate\Session\Store $instance */
  17850. return $instance->migrate($destroy);
  17851. }
  17852. /**
  17853. * Determine if the session has been started.
  17854. *
  17855. * @return bool
  17856. * @static
  17857. */
  17858. public static function isStarted()
  17859. {
  17860. /** @var \Illuminate\Session\Store $instance */
  17861. return $instance->isStarted();
  17862. }
  17863. /**
  17864. * Get the name of the session.
  17865. *
  17866. * @return string
  17867. * @static
  17868. */
  17869. public static function getName()
  17870. {
  17871. /** @var \Illuminate\Session\Store $instance */
  17872. return $instance->getName();
  17873. }
  17874. /**
  17875. * Set the name of the session.
  17876. *
  17877. * @param string $name
  17878. * @return void
  17879. * @static
  17880. */
  17881. public static function setName($name)
  17882. {
  17883. /** @var \Illuminate\Session\Store $instance */
  17884. $instance->setName($name);
  17885. }
  17886. /**
  17887. * Get the current session ID.
  17888. *
  17889. * @return string
  17890. * @static
  17891. */
  17892. public static function id()
  17893. {
  17894. /** @var \Illuminate\Session\Store $instance */
  17895. return $instance->id();
  17896. }
  17897. /**
  17898. * Get the current session ID.
  17899. *
  17900. * @return string
  17901. * @static
  17902. */
  17903. public static function getId()
  17904. {
  17905. /** @var \Illuminate\Session\Store $instance */
  17906. return $instance->getId();
  17907. }
  17908. /**
  17909. * Set the session ID.
  17910. *
  17911. * @param string|null $id
  17912. * @return void
  17913. * @static
  17914. */
  17915. public static function setId($id)
  17916. {
  17917. /** @var \Illuminate\Session\Store $instance */
  17918. $instance->setId($id);
  17919. }
  17920. /**
  17921. * Determine if this is a valid session ID.
  17922. *
  17923. * @param string|null $id
  17924. * @return bool
  17925. * @static
  17926. */
  17927. public static function isValidId($id)
  17928. {
  17929. /** @var \Illuminate\Session\Store $instance */
  17930. return $instance->isValidId($id);
  17931. }
  17932. /**
  17933. * Set the existence of the session on the handler if applicable.
  17934. *
  17935. * @param bool $value
  17936. * @return void
  17937. * @static
  17938. */
  17939. public static function setExists($value)
  17940. {
  17941. /** @var \Illuminate\Session\Store $instance */
  17942. $instance->setExists($value);
  17943. }
  17944. /**
  17945. * Get the CSRF token value.
  17946. *
  17947. * @return string
  17948. * @static
  17949. */
  17950. public static function token()
  17951. {
  17952. /** @var \Illuminate\Session\Store $instance */
  17953. return $instance->token();
  17954. }
  17955. /**
  17956. * Regenerate the CSRF token value.
  17957. *
  17958. * @return void
  17959. * @static
  17960. */
  17961. public static function regenerateToken()
  17962. {
  17963. /** @var \Illuminate\Session\Store $instance */
  17964. $instance->regenerateToken();
  17965. }
  17966. /**
  17967. * Determine if the previous URI is available.
  17968. *
  17969. * @return bool
  17970. * @static
  17971. */
  17972. public static function hasPreviousUri()
  17973. {
  17974. /** @var \Illuminate\Session\Store $instance */
  17975. return $instance->hasPreviousUri();
  17976. }
  17977. /**
  17978. * Get the previous URL from the session as a URI instance.
  17979. *
  17980. * @return \Illuminate\Support\Uri
  17981. * @throws \RuntimeException
  17982. * @static
  17983. */
  17984. public static function previousUri()
  17985. {
  17986. /** @var \Illuminate\Session\Store $instance */
  17987. return $instance->previousUri();
  17988. }
  17989. /**
  17990. * Get the previous URL from the session.
  17991. *
  17992. * @return string|null
  17993. * @static
  17994. */
  17995. public static function previousUrl()
  17996. {
  17997. /** @var \Illuminate\Session\Store $instance */
  17998. return $instance->previousUrl();
  17999. }
  18000. /**
  18001. * Set the "previous" URL in the session.
  18002. *
  18003. * @param string $url
  18004. * @return void
  18005. * @static
  18006. */
  18007. public static function setPreviousUrl($url)
  18008. {
  18009. /** @var \Illuminate\Session\Store $instance */
  18010. $instance->setPreviousUrl($url);
  18011. }
  18012. /**
  18013. * Specify that the user has confirmed their password.
  18014. *
  18015. * @return void
  18016. * @static
  18017. */
  18018. public static function passwordConfirmed()
  18019. {
  18020. /** @var \Illuminate\Session\Store $instance */
  18021. $instance->passwordConfirmed();
  18022. }
  18023. /**
  18024. * Get the underlying session handler implementation.
  18025. *
  18026. * @return \SessionHandlerInterface
  18027. * @static
  18028. */
  18029. public static function getHandler()
  18030. {
  18031. /** @var \Illuminate\Session\Store $instance */
  18032. return $instance->getHandler();
  18033. }
  18034. /**
  18035. * Set the underlying session handler implementation.
  18036. *
  18037. * @param \SessionHandlerInterface $handler
  18038. * @return \SessionHandlerInterface
  18039. * @static
  18040. */
  18041. public static function setHandler($handler)
  18042. {
  18043. /** @var \Illuminate\Session\Store $instance */
  18044. return $instance->setHandler($handler);
  18045. }
  18046. /**
  18047. * Determine if the session handler needs a request.
  18048. *
  18049. * @return bool
  18050. * @static
  18051. */
  18052. public static function handlerNeedsRequest()
  18053. {
  18054. /** @var \Illuminate\Session\Store $instance */
  18055. return $instance->handlerNeedsRequest();
  18056. }
  18057. /**
  18058. * Set the request on the handler instance.
  18059. *
  18060. * @param \Illuminate\Http\Request $request
  18061. * @return void
  18062. * @static
  18063. */
  18064. public static function setRequestOnHandler($request)
  18065. {
  18066. /** @var \Illuminate\Session\Store $instance */
  18067. $instance->setRequestOnHandler($request);
  18068. }
  18069. /**
  18070. * Register a custom macro.
  18071. *
  18072. * @param string $name
  18073. * @param object|callable $macro
  18074. * @param-closure-this static $macro
  18075. * @return void
  18076. * @static
  18077. */
  18078. public static function macro($name, $macro)
  18079. {
  18080. \Illuminate\Session\Store::macro($name, $macro);
  18081. }
  18082. /**
  18083. * Mix another object into the class.
  18084. *
  18085. * @param object $mixin
  18086. * @param bool $replace
  18087. * @return void
  18088. * @throws \ReflectionException
  18089. * @static
  18090. */
  18091. public static function mixin($mixin, $replace = true)
  18092. {
  18093. \Illuminate\Session\Store::mixin($mixin, $replace);
  18094. }
  18095. /**
  18096. * Checks if macro is registered.
  18097. *
  18098. * @param string $name
  18099. * @return bool
  18100. * @static
  18101. */
  18102. public static function hasMacro($name)
  18103. {
  18104. return \Illuminate\Session\Store::hasMacro($name);
  18105. }
  18106. /**
  18107. * Flush the existing macros.
  18108. *
  18109. * @return void
  18110. * @static
  18111. */
  18112. public static function flushMacros()
  18113. {
  18114. \Illuminate\Session\Store::flushMacros();
  18115. }
  18116. }
  18117. /**
  18118. * @method static bool has(string $location)
  18119. * @method static string read(string $location)
  18120. * @method static \League\Flysystem\DirectoryListing listContents(string $location, bool $deep = false)
  18121. * @method static int fileSize(string $path)
  18122. * @method static string visibility(string $path)
  18123. * @method static void write(string $location, string $contents, array $config = [])
  18124. * @method static void createDirectory(string $location, array $config = [])
  18125. * @see \Illuminate\Filesystem\FilesystemManager
  18126. */
  18127. class Storage {
  18128. /**
  18129. * Get a filesystem instance.
  18130. *
  18131. * @param string|null $name
  18132. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18133. * @static
  18134. */
  18135. public static function drive($name = null)
  18136. {
  18137. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18138. return $instance->drive($name);
  18139. }
  18140. /**
  18141. * Get a filesystem instance.
  18142. *
  18143. * @param string|null $name
  18144. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18145. * @static
  18146. */
  18147. public static function disk($name = null)
  18148. {
  18149. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18150. return $instance->disk($name);
  18151. }
  18152. /**
  18153. * Get a default cloud filesystem instance.
  18154. *
  18155. * @return \Illuminate\Contracts\Filesystem\Cloud
  18156. * @static
  18157. */
  18158. public static function cloud()
  18159. {
  18160. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18161. return $instance->cloud();
  18162. }
  18163. /**
  18164. * Build an on-demand disk.
  18165. *
  18166. * @param string|array $config
  18167. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18168. * @static
  18169. */
  18170. public static function build($config)
  18171. {
  18172. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18173. return $instance->build($config);
  18174. }
  18175. /**
  18176. * Create an instance of the local driver.
  18177. *
  18178. * @param array $config
  18179. * @param string $name
  18180. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18181. * @static
  18182. */
  18183. public static function createLocalDriver($config, $name = 'local')
  18184. {
  18185. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18186. return $instance->createLocalDriver($config, $name);
  18187. }
  18188. /**
  18189. * Create an instance of the ftp driver.
  18190. *
  18191. * @param array $config
  18192. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18193. * @static
  18194. */
  18195. public static function createFtpDriver($config)
  18196. {
  18197. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18198. return $instance->createFtpDriver($config);
  18199. }
  18200. /**
  18201. * Create an instance of the sftp driver.
  18202. *
  18203. * @param array $config
  18204. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18205. * @static
  18206. */
  18207. public static function createSftpDriver($config)
  18208. {
  18209. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18210. return $instance->createSftpDriver($config);
  18211. }
  18212. /**
  18213. * Create an instance of the Amazon S3 driver.
  18214. *
  18215. * @param array $config
  18216. * @return \Illuminate\Contracts\Filesystem\Cloud
  18217. * @static
  18218. */
  18219. public static function createS3Driver($config)
  18220. {
  18221. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18222. return $instance->createS3Driver($config);
  18223. }
  18224. /**
  18225. * Create a scoped driver.
  18226. *
  18227. * @param array $config
  18228. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18229. * @static
  18230. */
  18231. public static function createScopedDriver($config)
  18232. {
  18233. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18234. return $instance->createScopedDriver($config);
  18235. }
  18236. /**
  18237. * Set the given disk instance.
  18238. *
  18239. * @param string $name
  18240. * @param mixed $disk
  18241. * @return \Illuminate\Filesystem\FilesystemManager
  18242. * @static
  18243. */
  18244. public static function set($name, $disk)
  18245. {
  18246. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18247. return $instance->set($name, $disk);
  18248. }
  18249. /**
  18250. * Get the default driver name.
  18251. *
  18252. * @return string
  18253. * @static
  18254. */
  18255. public static function getDefaultDriver()
  18256. {
  18257. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18258. return $instance->getDefaultDriver();
  18259. }
  18260. /**
  18261. * Get the default cloud driver name.
  18262. *
  18263. * @return string
  18264. * @static
  18265. */
  18266. public static function getDefaultCloudDriver()
  18267. {
  18268. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18269. return $instance->getDefaultCloudDriver();
  18270. }
  18271. /**
  18272. * Unset the given disk instances.
  18273. *
  18274. * @param array|string $disk
  18275. * @return \Illuminate\Filesystem\FilesystemManager
  18276. * @static
  18277. */
  18278. public static function forgetDisk($disk)
  18279. {
  18280. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18281. return $instance->forgetDisk($disk);
  18282. }
  18283. /**
  18284. * Disconnect the given disk and remove from local cache.
  18285. *
  18286. * @param string|null $name
  18287. * @return void
  18288. * @static
  18289. */
  18290. public static function purge($name = null)
  18291. {
  18292. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18293. $instance->purge($name);
  18294. }
  18295. /**
  18296. * Register a custom driver creator Closure.
  18297. *
  18298. * @param string $driver
  18299. * @param \Closure $callback
  18300. * @return \Illuminate\Filesystem\FilesystemManager
  18301. * @static
  18302. */
  18303. public static function extend($driver, $callback)
  18304. {
  18305. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18306. return $instance->extend($driver, $callback);
  18307. }
  18308. /**
  18309. * Set the application instance used by the manager.
  18310. *
  18311. * @param \Illuminate\Contracts\Foundation\Application $app
  18312. * @return \Illuminate\Filesystem\FilesystemManager
  18313. * @static
  18314. */
  18315. public static function setApplication($app)
  18316. {
  18317. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  18318. return $instance->setApplication($app);
  18319. }
  18320. /**
  18321. * Determine if temporary URLs can be generated.
  18322. *
  18323. * @return bool
  18324. * @static
  18325. */
  18326. public static function providesTemporaryUrls()
  18327. {
  18328. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18329. return $instance->providesTemporaryUrls();
  18330. }
  18331. /**
  18332. * Get a temporary URL for the file at the given path.
  18333. *
  18334. * @param string $path
  18335. * @param \DateTimeInterface $expiration
  18336. * @param array $options
  18337. * @return string
  18338. * @static
  18339. */
  18340. public static function temporaryUrl($path, $expiration, $options = [])
  18341. {
  18342. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18343. return $instance->temporaryUrl($path, $expiration, $options);
  18344. }
  18345. /**
  18346. * Specify the name of the disk the adapter is managing.
  18347. *
  18348. * @param string $disk
  18349. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18350. * @static
  18351. */
  18352. public static function diskName($disk)
  18353. {
  18354. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18355. return $instance->diskName($disk);
  18356. }
  18357. /**
  18358. * Indicate that signed URLs should serve the corresponding files.
  18359. *
  18360. * @param bool $serve
  18361. * @param \Closure|null $urlGeneratorResolver
  18362. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18363. * @static
  18364. */
  18365. public static function shouldServeSignedUrls($serve = true, $urlGeneratorResolver = null)
  18366. {
  18367. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18368. return $instance->shouldServeSignedUrls($serve, $urlGeneratorResolver);
  18369. }
  18370. /**
  18371. * Assert that the given file or directory exists.
  18372. *
  18373. * @param string|array $path
  18374. * @param string|null $content
  18375. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18376. * @static
  18377. */
  18378. public static function assertExists($path, $content = null)
  18379. {
  18380. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18381. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18382. return $instance->assertExists($path, $content);
  18383. }
  18384. /**
  18385. * Assert that the number of files in path equals the expected count.
  18386. *
  18387. * @param string $path
  18388. * @param int $count
  18389. * @param bool $recursive
  18390. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18391. * @static
  18392. */
  18393. public static function assertCount($path, $count, $recursive = false)
  18394. {
  18395. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18396. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18397. return $instance->assertCount($path, $count, $recursive);
  18398. }
  18399. /**
  18400. * Assert that the given file or directory does not exist.
  18401. *
  18402. * @param string|array $path
  18403. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18404. * @static
  18405. */
  18406. public static function assertMissing($path)
  18407. {
  18408. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18409. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18410. return $instance->assertMissing($path);
  18411. }
  18412. /**
  18413. * Assert that the given directory is empty.
  18414. *
  18415. * @param string $path
  18416. * @return \Illuminate\Filesystem\LocalFilesystemAdapter
  18417. * @static
  18418. */
  18419. public static function assertDirectoryEmpty($path)
  18420. {
  18421. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18422. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18423. return $instance->assertDirectoryEmpty($path);
  18424. }
  18425. /**
  18426. * Determine if a file or directory exists.
  18427. *
  18428. * @param string $path
  18429. * @return bool
  18430. * @static
  18431. */
  18432. public static function exists($path)
  18433. {
  18434. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18435. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18436. return $instance->exists($path);
  18437. }
  18438. /**
  18439. * Determine if a file or directory is missing.
  18440. *
  18441. * @param string $path
  18442. * @return bool
  18443. * @static
  18444. */
  18445. public static function missing($path)
  18446. {
  18447. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18448. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18449. return $instance->missing($path);
  18450. }
  18451. /**
  18452. * Determine if a file exists.
  18453. *
  18454. * @param string $path
  18455. * @return bool
  18456. * @static
  18457. */
  18458. public static function fileExists($path)
  18459. {
  18460. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18461. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18462. return $instance->fileExists($path);
  18463. }
  18464. /**
  18465. * Determine if a file is missing.
  18466. *
  18467. * @param string $path
  18468. * @return bool
  18469. * @static
  18470. */
  18471. public static function fileMissing($path)
  18472. {
  18473. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18474. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18475. return $instance->fileMissing($path);
  18476. }
  18477. /**
  18478. * Determine if a directory exists.
  18479. *
  18480. * @param string $path
  18481. * @return bool
  18482. * @static
  18483. */
  18484. public static function directoryExists($path)
  18485. {
  18486. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18487. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18488. return $instance->directoryExists($path);
  18489. }
  18490. /**
  18491. * Determine if a directory is missing.
  18492. *
  18493. * @param string $path
  18494. * @return bool
  18495. * @static
  18496. */
  18497. public static function directoryMissing($path)
  18498. {
  18499. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18500. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18501. return $instance->directoryMissing($path);
  18502. }
  18503. /**
  18504. * Get the full path to the file that exists at the given relative path.
  18505. *
  18506. * @param string $path
  18507. * @return string
  18508. * @static
  18509. */
  18510. public static function path($path)
  18511. {
  18512. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18513. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18514. return $instance->path($path);
  18515. }
  18516. /**
  18517. * Get the contents of a file.
  18518. *
  18519. * @param string $path
  18520. * @return string|null
  18521. * @static
  18522. */
  18523. public static function get($path)
  18524. {
  18525. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18526. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18527. return $instance->get($path);
  18528. }
  18529. /**
  18530. * Get the contents of a file as decoded JSON.
  18531. *
  18532. * @param string $path
  18533. * @param int $flags
  18534. * @return array|null
  18535. * @static
  18536. */
  18537. public static function json($path, $flags = 0)
  18538. {
  18539. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18540. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18541. return $instance->json($path, $flags);
  18542. }
  18543. /**
  18544. * Create a streamed response for a given file.
  18545. *
  18546. * @param string $path
  18547. * @param string|null $name
  18548. * @param array $headers
  18549. * @param string|null $disposition
  18550. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18551. * @static
  18552. */
  18553. public static function response($path, $name = null, $headers = [], $disposition = 'inline')
  18554. {
  18555. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18556. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18557. return $instance->response($path, $name, $headers, $disposition);
  18558. }
  18559. /**
  18560. * Create a streamed download response for a given file.
  18561. *
  18562. * @param \Illuminate\Http\Request $request
  18563. * @param string $path
  18564. * @param string|null $name
  18565. * @param array $headers
  18566. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18567. * @static
  18568. */
  18569. public static function serve($request, $path, $name = null, $headers = [])
  18570. {
  18571. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18572. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18573. return $instance->serve($request, $path, $name, $headers);
  18574. }
  18575. /**
  18576. * Create a streamed download response for a given file.
  18577. *
  18578. * @param string $path
  18579. * @param string|null $name
  18580. * @param array $headers
  18581. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18582. * @static
  18583. */
  18584. public static function download($path, $name = null, $headers = [])
  18585. {
  18586. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18587. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18588. return $instance->download($path, $name, $headers);
  18589. }
  18590. /**
  18591. * Write the contents of a file.
  18592. *
  18593. * @param string $path
  18594. * @param \Psr\Http\Message\StreamInterface|\Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|resource $contents
  18595. * @param mixed $options
  18596. * @return string|bool
  18597. * @static
  18598. */
  18599. public static function put($path, $contents, $options = [])
  18600. {
  18601. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18602. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18603. return $instance->put($path, $contents, $options);
  18604. }
  18605. /**
  18606. * Store the uploaded file on the disk.
  18607. *
  18608. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18609. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18610. * @param mixed $options
  18611. * @return string|false
  18612. * @static
  18613. */
  18614. public static function putFile($path, $file = null, $options = [])
  18615. {
  18616. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18617. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18618. return $instance->putFile($path, $file, $options);
  18619. }
  18620. /**
  18621. * Store the uploaded file on the disk with a given name.
  18622. *
  18623. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18624. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18625. * @param string|array|null $name
  18626. * @param mixed $options
  18627. * @return string|false
  18628. * @static
  18629. */
  18630. public static function putFileAs($path, $file, $name = null, $options = [])
  18631. {
  18632. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18633. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18634. return $instance->putFileAs($path, $file, $name, $options);
  18635. }
  18636. /**
  18637. * Get the visibility for the given path.
  18638. *
  18639. * @param string $path
  18640. * @return string
  18641. * @static
  18642. */
  18643. public static function getVisibility($path)
  18644. {
  18645. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18646. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18647. return $instance->getVisibility($path);
  18648. }
  18649. /**
  18650. * Set the visibility for the given path.
  18651. *
  18652. * @param string $path
  18653. * @param string $visibility
  18654. * @return bool
  18655. * @static
  18656. */
  18657. public static function setVisibility($path, $visibility)
  18658. {
  18659. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18660. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18661. return $instance->setVisibility($path, $visibility);
  18662. }
  18663. /**
  18664. * Prepend to a file.
  18665. *
  18666. * @param string $path
  18667. * @param string $data
  18668. * @param string $separator
  18669. * @return bool
  18670. * @static
  18671. */
  18672. public static function prepend($path, $data, $separator = '
  18673. ')
  18674. {
  18675. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18676. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18677. return $instance->prepend($path, $data, $separator);
  18678. }
  18679. /**
  18680. * Append to a file.
  18681. *
  18682. * @param string $path
  18683. * @param string $data
  18684. * @param string $separator
  18685. * @return bool
  18686. * @static
  18687. */
  18688. public static function append($path, $data, $separator = '
  18689. ')
  18690. {
  18691. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18692. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18693. return $instance->append($path, $data, $separator);
  18694. }
  18695. /**
  18696. * Delete the file at a given path.
  18697. *
  18698. * @param string|array $paths
  18699. * @return bool
  18700. * @static
  18701. */
  18702. public static function delete($paths)
  18703. {
  18704. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18705. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18706. return $instance->delete($paths);
  18707. }
  18708. /**
  18709. * Copy a file to a new location.
  18710. *
  18711. * @param string $from
  18712. * @param string $to
  18713. * @return bool
  18714. * @static
  18715. */
  18716. public static function copy($from, $to)
  18717. {
  18718. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18719. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18720. return $instance->copy($from, $to);
  18721. }
  18722. /**
  18723. * Move a file to a new location.
  18724. *
  18725. * @param string $from
  18726. * @param string $to
  18727. * @return bool
  18728. * @static
  18729. */
  18730. public static function move($from, $to)
  18731. {
  18732. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18733. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18734. return $instance->move($from, $to);
  18735. }
  18736. /**
  18737. * Get the file size of a given file.
  18738. *
  18739. * @param string $path
  18740. * @return int
  18741. * @static
  18742. */
  18743. public static function size($path)
  18744. {
  18745. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18746. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18747. return $instance->size($path);
  18748. }
  18749. /**
  18750. * Get the checksum for a file.
  18751. *
  18752. * @return string|false
  18753. * @throws UnableToProvideChecksum
  18754. * @static
  18755. */
  18756. public static function checksum($path, $options = [])
  18757. {
  18758. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18759. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18760. return $instance->checksum($path, $options);
  18761. }
  18762. /**
  18763. * Get the mime-type of a given file.
  18764. *
  18765. * @param string $path
  18766. * @return string|false
  18767. * @static
  18768. */
  18769. public static function mimeType($path)
  18770. {
  18771. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18772. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18773. return $instance->mimeType($path);
  18774. }
  18775. /**
  18776. * Get the file's last modification time.
  18777. *
  18778. * @param string $path
  18779. * @return int
  18780. * @static
  18781. */
  18782. public static function lastModified($path)
  18783. {
  18784. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18785. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18786. return $instance->lastModified($path);
  18787. }
  18788. /**
  18789. * Get a resource to read the file.
  18790. *
  18791. * @param string $path
  18792. * @return resource|null The path resource or null on failure.
  18793. * @static
  18794. */
  18795. public static function readStream($path)
  18796. {
  18797. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18798. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18799. return $instance->readStream($path);
  18800. }
  18801. /**
  18802. * Write a new file using a stream.
  18803. *
  18804. * @param string $path
  18805. * @param resource $resource
  18806. * @param array $options
  18807. * @return bool
  18808. * @static
  18809. */
  18810. public static function writeStream($path, $resource, $options = [])
  18811. {
  18812. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18813. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18814. return $instance->writeStream($path, $resource, $options);
  18815. }
  18816. /**
  18817. * Get the URL for the file at the given path.
  18818. *
  18819. * @param string $path
  18820. * @return string
  18821. * @throws \RuntimeException
  18822. * @static
  18823. */
  18824. public static function url($path)
  18825. {
  18826. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18827. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18828. return $instance->url($path);
  18829. }
  18830. /**
  18831. * Get a temporary upload URL for the file at the given path.
  18832. *
  18833. * @param string $path
  18834. * @param \DateTimeInterface $expiration
  18835. * @param array $options
  18836. * @return array
  18837. * @throws \RuntimeException
  18838. * @static
  18839. */
  18840. public static function temporaryUploadUrl($path, $expiration, $options = [])
  18841. {
  18842. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18843. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18844. return $instance->temporaryUploadUrl($path, $expiration, $options);
  18845. }
  18846. /**
  18847. * Get an array of all files in a directory.
  18848. *
  18849. * @param string|null $directory
  18850. * @param bool $recursive
  18851. * @return array
  18852. * @static
  18853. */
  18854. public static function files($directory = null, $recursive = false)
  18855. {
  18856. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18857. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18858. return $instance->files($directory, $recursive);
  18859. }
  18860. /**
  18861. * Get all of the files from the given directory (recursive).
  18862. *
  18863. * @param string|null $directory
  18864. * @return array
  18865. * @static
  18866. */
  18867. public static function allFiles($directory = null)
  18868. {
  18869. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18870. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18871. return $instance->allFiles($directory);
  18872. }
  18873. /**
  18874. * Get all of the directories within a given directory.
  18875. *
  18876. * @param string|null $directory
  18877. * @param bool $recursive
  18878. * @return array
  18879. * @static
  18880. */
  18881. public static function directories($directory = null, $recursive = false)
  18882. {
  18883. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18884. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18885. return $instance->directories($directory, $recursive);
  18886. }
  18887. /**
  18888. * Get all the directories within a given directory (recursive).
  18889. *
  18890. * @param string|null $directory
  18891. * @return array
  18892. * @static
  18893. */
  18894. public static function allDirectories($directory = null)
  18895. {
  18896. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18897. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18898. return $instance->allDirectories($directory);
  18899. }
  18900. /**
  18901. * Create a directory.
  18902. *
  18903. * @param string $path
  18904. * @return bool
  18905. * @static
  18906. */
  18907. public static function makeDirectory($path)
  18908. {
  18909. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18910. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18911. return $instance->makeDirectory($path);
  18912. }
  18913. /**
  18914. * Recursively delete a directory.
  18915. *
  18916. * @param string $directory
  18917. * @return bool
  18918. * @static
  18919. */
  18920. public static function deleteDirectory($directory)
  18921. {
  18922. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18923. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18924. return $instance->deleteDirectory($directory);
  18925. }
  18926. /**
  18927. * Get the Flysystem driver.
  18928. *
  18929. * @return \League\Flysystem\FilesystemOperator
  18930. * @static
  18931. */
  18932. public static function getDriver()
  18933. {
  18934. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18935. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18936. return $instance->getDriver();
  18937. }
  18938. /**
  18939. * Get the Flysystem adapter.
  18940. *
  18941. * @return \League\Flysystem\FilesystemAdapter
  18942. * @static
  18943. */
  18944. public static function getAdapter()
  18945. {
  18946. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18947. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18948. return $instance->getAdapter();
  18949. }
  18950. /**
  18951. * Get the configuration values.
  18952. *
  18953. * @return array
  18954. * @static
  18955. */
  18956. public static function getConfig()
  18957. {
  18958. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18959. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18960. return $instance->getConfig();
  18961. }
  18962. /**
  18963. * Define a custom callback that generates file download responses.
  18964. *
  18965. * @param \Closure $callback
  18966. * @return void
  18967. * @static
  18968. */
  18969. public static function serveUsing($callback)
  18970. {
  18971. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18972. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18973. $instance->serveUsing($callback);
  18974. }
  18975. /**
  18976. * Define a custom temporary URL builder callback.
  18977. *
  18978. * @param \Closure $callback
  18979. * @return void
  18980. * @static
  18981. */
  18982. public static function buildTemporaryUrlsUsing($callback)
  18983. {
  18984. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18985. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  18986. $instance->buildTemporaryUrlsUsing($callback);
  18987. }
  18988. /**
  18989. * Apply the callback if the given "value" is (or resolves to) truthy.
  18990. *
  18991. * @template TWhenParameter
  18992. * @template TWhenReturnType
  18993. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  18994. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  18995. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  18996. * @return $this|TWhenReturnType
  18997. * @static
  18998. */
  18999. public static function when($value = null, $callback = null, $default = null)
  19000. {
  19001. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  19002. return $instance->when($value, $callback, $default);
  19003. }
  19004. /**
  19005. * Apply the callback if the given "value" is (or resolves to) falsy.
  19006. *
  19007. * @template TUnlessParameter
  19008. * @template TUnlessReturnType
  19009. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  19010. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  19011. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  19012. * @return $this|TUnlessReturnType
  19013. * @static
  19014. */
  19015. public static function unless($value = null, $callback = null, $default = null)
  19016. {
  19017. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  19018. return $instance->unless($value, $callback, $default);
  19019. }
  19020. /**
  19021. * Register a custom macro.
  19022. *
  19023. * @param string $name
  19024. * @param object|callable $macro
  19025. * @param-closure-this static $macro
  19026. * @return void
  19027. * @static
  19028. */
  19029. public static function macro($name, $macro)
  19030. {
  19031. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19032. \Illuminate\Filesystem\LocalFilesystemAdapter::macro($name, $macro);
  19033. }
  19034. /**
  19035. * Mix another object into the class.
  19036. *
  19037. * @param object $mixin
  19038. * @param bool $replace
  19039. * @return void
  19040. * @throws \ReflectionException
  19041. * @static
  19042. */
  19043. public static function mixin($mixin, $replace = true)
  19044. {
  19045. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19046. \Illuminate\Filesystem\LocalFilesystemAdapter::mixin($mixin, $replace);
  19047. }
  19048. /**
  19049. * Checks if macro is registered.
  19050. *
  19051. * @param string $name
  19052. * @return bool
  19053. * @static
  19054. */
  19055. public static function hasMacro($name)
  19056. {
  19057. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19058. return \Illuminate\Filesystem\LocalFilesystemAdapter::hasMacro($name);
  19059. }
  19060. /**
  19061. * Flush the existing macros.
  19062. *
  19063. * @return void
  19064. * @static
  19065. */
  19066. public static function flushMacros()
  19067. {
  19068. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19069. \Illuminate\Filesystem\LocalFilesystemAdapter::flushMacros();
  19070. }
  19071. /**
  19072. * Dynamically handle calls to the class.
  19073. *
  19074. * @param string $method
  19075. * @param array $parameters
  19076. * @return mixed
  19077. * @throws \BadMethodCallException
  19078. * @static
  19079. */
  19080. public static function macroCall($method, $parameters)
  19081. {
  19082. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19083. /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */
  19084. return $instance->macroCall($method, $parameters);
  19085. }
  19086. }
  19087. /**
  19088. * @see \Illuminate\Routing\UrlGenerator
  19089. */
  19090. class URL {
  19091. /**
  19092. * Get the full URL for the current request.
  19093. *
  19094. * @return string
  19095. * @static
  19096. */
  19097. public static function full()
  19098. {
  19099. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19100. return $instance->full();
  19101. }
  19102. /**
  19103. * Get the current URL for the request.
  19104. *
  19105. * @return string
  19106. * @static
  19107. */
  19108. public static function current()
  19109. {
  19110. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19111. return $instance->current();
  19112. }
  19113. /**
  19114. * Get the URL for the previous request.
  19115. *
  19116. * @param mixed $fallback
  19117. * @return string
  19118. * @static
  19119. */
  19120. public static function previous($fallback = false)
  19121. {
  19122. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19123. return $instance->previous($fallback);
  19124. }
  19125. /**
  19126. * Get the previous path info for the request.
  19127. *
  19128. * @param mixed $fallback
  19129. * @return string
  19130. * @static
  19131. */
  19132. public static function previousPath($fallback = false)
  19133. {
  19134. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19135. return $instance->previousPath($fallback);
  19136. }
  19137. /**
  19138. * Generate an absolute URL to the given path.
  19139. *
  19140. * @param string $path
  19141. * @param mixed $extra
  19142. * @param bool|null $secure
  19143. * @return string
  19144. * @static
  19145. */
  19146. public static function to($path, $extra = [], $secure = null)
  19147. {
  19148. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19149. return $instance->to($path, $extra, $secure);
  19150. }
  19151. /**
  19152. * Generate an absolute URL with the given query parameters.
  19153. *
  19154. * @param string $path
  19155. * @param array $query
  19156. * @param mixed $extra
  19157. * @param bool|null $secure
  19158. * @return string
  19159. * @static
  19160. */
  19161. public static function query($path, $query = [], $extra = [], $secure = null)
  19162. {
  19163. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19164. return $instance->query($path, $query, $extra, $secure);
  19165. }
  19166. /**
  19167. * Generate a secure, absolute URL to the given path.
  19168. *
  19169. * @param string $path
  19170. * @param array $parameters
  19171. * @return string
  19172. * @static
  19173. */
  19174. public static function secure($path, $parameters = [])
  19175. {
  19176. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19177. return $instance->secure($path, $parameters);
  19178. }
  19179. /**
  19180. * Generate the URL to an application asset.
  19181. *
  19182. * @param string $path
  19183. * @param bool|null $secure
  19184. * @return string
  19185. * @static
  19186. */
  19187. public static function asset($path, $secure = null)
  19188. {
  19189. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19190. return $instance->asset($path, $secure);
  19191. }
  19192. /**
  19193. * Generate the URL to a secure asset.
  19194. *
  19195. * @param string $path
  19196. * @return string
  19197. * @static
  19198. */
  19199. public static function secureAsset($path)
  19200. {
  19201. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19202. return $instance->secureAsset($path);
  19203. }
  19204. /**
  19205. * Generate the URL to an asset from a custom root domain such as CDN, etc.
  19206. *
  19207. * @param string $root
  19208. * @param string $path
  19209. * @param bool|null $secure
  19210. * @return string
  19211. * @static
  19212. */
  19213. public static function assetFrom($root, $path, $secure = null)
  19214. {
  19215. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19216. return $instance->assetFrom($root, $path, $secure);
  19217. }
  19218. /**
  19219. * Get the default scheme for a raw URL.
  19220. *
  19221. * @param bool|null $secure
  19222. * @return string
  19223. * @static
  19224. */
  19225. public static function formatScheme($secure = null)
  19226. {
  19227. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19228. return $instance->formatScheme($secure);
  19229. }
  19230. /**
  19231. * Create a signed route URL for a named route.
  19232. *
  19233. * @param \BackedEnum|string $name
  19234. * @param mixed $parameters
  19235. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  19236. * @param bool $absolute
  19237. * @return string
  19238. * @throws \InvalidArgumentException
  19239. * @static
  19240. */
  19241. public static function signedRoute($name, $parameters = [], $expiration = null, $absolute = true)
  19242. {
  19243. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19244. return $instance->signedRoute($name, $parameters, $expiration, $absolute);
  19245. }
  19246. /**
  19247. * Create a temporary signed route URL for a named route.
  19248. *
  19249. * @param \BackedEnum|string $name
  19250. * @param \DateTimeInterface|\DateInterval|int $expiration
  19251. * @param array $parameters
  19252. * @param bool $absolute
  19253. * @return string
  19254. * @static
  19255. */
  19256. public static function temporarySignedRoute($name, $expiration, $parameters = [], $absolute = true)
  19257. {
  19258. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19259. return $instance->temporarySignedRoute($name, $expiration, $parameters, $absolute);
  19260. }
  19261. /**
  19262. * Determine if the given request has a valid signature.
  19263. *
  19264. * @param \Illuminate\Http\Request $request
  19265. * @param bool $absolute
  19266. * @param \Closure|array $ignoreQuery
  19267. * @return bool
  19268. * @static
  19269. */
  19270. public static function hasValidSignature($request, $absolute = true, $ignoreQuery = [])
  19271. {
  19272. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19273. return $instance->hasValidSignature($request, $absolute, $ignoreQuery);
  19274. }
  19275. /**
  19276. * Determine if the given request has a valid signature for a relative URL.
  19277. *
  19278. * @param \Illuminate\Http\Request $request
  19279. * @param \Closure|array $ignoreQuery
  19280. * @return bool
  19281. * @static
  19282. */
  19283. public static function hasValidRelativeSignature($request, $ignoreQuery = [])
  19284. {
  19285. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19286. return $instance->hasValidRelativeSignature($request, $ignoreQuery);
  19287. }
  19288. /**
  19289. * Determine if the signature from the given request matches the URL.
  19290. *
  19291. * @param \Illuminate\Http\Request $request
  19292. * @param bool $absolute
  19293. * @param \Closure|array $ignoreQuery
  19294. * @return bool
  19295. * @static
  19296. */
  19297. public static function hasCorrectSignature($request, $absolute = true, $ignoreQuery = [])
  19298. {
  19299. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19300. return $instance->hasCorrectSignature($request, $absolute, $ignoreQuery);
  19301. }
  19302. /**
  19303. * Determine if the expires timestamp from the given request is not from the past.
  19304. *
  19305. * @param \Illuminate\Http\Request $request
  19306. * @return bool
  19307. * @static
  19308. */
  19309. public static function signatureHasNotExpired($request)
  19310. {
  19311. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19312. return $instance->signatureHasNotExpired($request);
  19313. }
  19314. /**
  19315. * Get the URL to a named route.
  19316. *
  19317. * @param \BackedEnum|string $name
  19318. * @param mixed $parameters
  19319. * @param bool $absolute
  19320. * @return string
  19321. * @throws \Symfony\Component\Routing\Exception\RouteNotFoundException|\InvalidArgumentException
  19322. * @static
  19323. */
  19324. public static function route($name, $parameters = [], $absolute = true)
  19325. {
  19326. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19327. return $instance->route($name, $parameters, $absolute);
  19328. }
  19329. /**
  19330. * Get the URL for a given route instance.
  19331. *
  19332. * @param \Illuminate\Routing\Route $route
  19333. * @param mixed $parameters
  19334. * @param bool $absolute
  19335. * @return string
  19336. * @throws \Illuminate\Routing\Exceptions\UrlGenerationException
  19337. * @static
  19338. */
  19339. public static function toRoute($route, $parameters, $absolute)
  19340. {
  19341. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19342. return $instance->toRoute($route, $parameters, $absolute);
  19343. }
  19344. /**
  19345. * Get the URL to a controller action.
  19346. *
  19347. * @param string|array $action
  19348. * @param mixed $parameters
  19349. * @param bool $absolute
  19350. * @return string
  19351. * @throws \InvalidArgumentException
  19352. * @static
  19353. */
  19354. public static function action($action, $parameters = [], $absolute = true)
  19355. {
  19356. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19357. return $instance->action($action, $parameters, $absolute);
  19358. }
  19359. /**
  19360. * Format the array of URL parameters.
  19361. *
  19362. * @param mixed $parameters
  19363. * @return array
  19364. * @static
  19365. */
  19366. public static function formatParameters($parameters)
  19367. {
  19368. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19369. return $instance->formatParameters($parameters);
  19370. }
  19371. /**
  19372. * Get the base URL for the request.
  19373. *
  19374. * @param string $scheme
  19375. * @param string|null $root
  19376. * @return string
  19377. * @static
  19378. */
  19379. public static function formatRoot($scheme, $root = null)
  19380. {
  19381. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19382. return $instance->formatRoot($scheme, $root);
  19383. }
  19384. /**
  19385. * Format the given URL segments into a single URL.
  19386. *
  19387. * @param string $root
  19388. * @param string $path
  19389. * @param \Illuminate\Routing\Route|null $route
  19390. * @return string
  19391. * @static
  19392. */
  19393. public static function format($root, $path, $route = null)
  19394. {
  19395. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19396. return $instance->format($root, $path, $route);
  19397. }
  19398. /**
  19399. * Determine if the given path is a valid URL.
  19400. *
  19401. * @param string $path
  19402. * @return bool
  19403. * @static
  19404. */
  19405. public static function isValidUrl($path)
  19406. {
  19407. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19408. return $instance->isValidUrl($path);
  19409. }
  19410. /**
  19411. * Set the default named parameters used by the URL generator.
  19412. *
  19413. * @param array $defaults
  19414. * @return void
  19415. * @static
  19416. */
  19417. public static function defaults($defaults)
  19418. {
  19419. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19420. $instance->defaults($defaults);
  19421. }
  19422. /**
  19423. * Get the default named parameters used by the URL generator.
  19424. *
  19425. * @return array
  19426. * @static
  19427. */
  19428. public static function getDefaultParameters()
  19429. {
  19430. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19431. return $instance->getDefaultParameters();
  19432. }
  19433. /**
  19434. * Force the scheme for URLs.
  19435. *
  19436. * @param string|null $scheme
  19437. * @return void
  19438. * @static
  19439. */
  19440. public static function forceScheme($scheme)
  19441. {
  19442. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19443. $instance->forceScheme($scheme);
  19444. }
  19445. /**
  19446. * Force the use of the HTTPS scheme for all generated URLs.
  19447. *
  19448. * @param bool $force
  19449. * @return void
  19450. * @static
  19451. */
  19452. public static function forceHttps($force = true)
  19453. {
  19454. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19455. $instance->forceHttps($force);
  19456. }
  19457. /**
  19458. * Set the URL origin for all generated URLs.
  19459. *
  19460. * @param string|null $root
  19461. * @return void
  19462. * @static
  19463. */
  19464. public static function useOrigin($root)
  19465. {
  19466. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19467. $instance->useOrigin($root);
  19468. }
  19469. /**
  19470. * Set the forced root URL.
  19471. *
  19472. * @param string|null $root
  19473. * @return void
  19474. * @deprecated Use useOrigin
  19475. * @static
  19476. */
  19477. public static function forceRootUrl($root)
  19478. {
  19479. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19480. $instance->forceRootUrl($root);
  19481. }
  19482. /**
  19483. * Set the URL origin for all generated asset URLs.
  19484. *
  19485. * @param string|null $root
  19486. * @return void
  19487. * @static
  19488. */
  19489. public static function useAssetOrigin($root)
  19490. {
  19491. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19492. $instance->useAssetOrigin($root);
  19493. }
  19494. /**
  19495. * Set a callback to be used to format the host of generated URLs.
  19496. *
  19497. * @param \Closure $callback
  19498. * @return \Illuminate\Routing\UrlGenerator
  19499. * @static
  19500. */
  19501. public static function formatHostUsing($callback)
  19502. {
  19503. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19504. return $instance->formatHostUsing($callback);
  19505. }
  19506. /**
  19507. * Set a callback to be used to format the path of generated URLs.
  19508. *
  19509. * @param \Closure $callback
  19510. * @return \Illuminate\Routing\UrlGenerator
  19511. * @static
  19512. */
  19513. public static function formatPathUsing($callback)
  19514. {
  19515. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19516. return $instance->formatPathUsing($callback);
  19517. }
  19518. /**
  19519. * Get the path formatter being used by the URL generator.
  19520. *
  19521. * @return \Closure
  19522. * @static
  19523. */
  19524. public static function pathFormatter()
  19525. {
  19526. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19527. return $instance->pathFormatter();
  19528. }
  19529. /**
  19530. * Get the request instance.
  19531. *
  19532. * @return \Illuminate\Http\Request
  19533. * @static
  19534. */
  19535. public static function getRequest()
  19536. {
  19537. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19538. return $instance->getRequest();
  19539. }
  19540. /**
  19541. * Set the current request instance.
  19542. *
  19543. * @param \Illuminate\Http\Request $request
  19544. * @return void
  19545. * @static
  19546. */
  19547. public static function setRequest($request)
  19548. {
  19549. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19550. $instance->setRequest($request);
  19551. }
  19552. /**
  19553. * Set the route collection.
  19554. *
  19555. * @param \Illuminate\Routing\RouteCollectionInterface $routes
  19556. * @return \Illuminate\Routing\UrlGenerator
  19557. * @static
  19558. */
  19559. public static function setRoutes($routes)
  19560. {
  19561. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19562. return $instance->setRoutes($routes);
  19563. }
  19564. /**
  19565. * Set the session resolver for the generator.
  19566. *
  19567. * @param callable $sessionResolver
  19568. * @return \Illuminate\Routing\UrlGenerator
  19569. * @static
  19570. */
  19571. public static function setSessionResolver($sessionResolver)
  19572. {
  19573. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19574. return $instance->setSessionResolver($sessionResolver);
  19575. }
  19576. /**
  19577. * Set the encryption key resolver.
  19578. *
  19579. * @param callable $keyResolver
  19580. * @return \Illuminate\Routing\UrlGenerator
  19581. * @static
  19582. */
  19583. public static function setKeyResolver($keyResolver)
  19584. {
  19585. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19586. return $instance->setKeyResolver($keyResolver);
  19587. }
  19588. /**
  19589. * Clone a new instance of the URL generator with a different encryption key resolver.
  19590. *
  19591. * @param callable $keyResolver
  19592. * @return \Illuminate\Routing\UrlGenerator
  19593. * @static
  19594. */
  19595. public static function withKeyResolver($keyResolver)
  19596. {
  19597. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19598. return $instance->withKeyResolver($keyResolver);
  19599. }
  19600. /**
  19601. * Set the callback that should be used to attempt to resolve missing named routes.
  19602. *
  19603. * @param callable $missingNamedRouteResolver
  19604. * @return \Illuminate\Routing\UrlGenerator
  19605. * @static
  19606. */
  19607. public static function resolveMissingNamedRoutesUsing($missingNamedRouteResolver)
  19608. {
  19609. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19610. return $instance->resolveMissingNamedRoutesUsing($missingNamedRouteResolver);
  19611. }
  19612. /**
  19613. * Get the root controller namespace.
  19614. *
  19615. * @return string
  19616. * @static
  19617. */
  19618. public static function getRootControllerNamespace()
  19619. {
  19620. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19621. return $instance->getRootControllerNamespace();
  19622. }
  19623. /**
  19624. * Set the root controller namespace.
  19625. *
  19626. * @param string $rootNamespace
  19627. * @return \Illuminate\Routing\UrlGenerator
  19628. * @static
  19629. */
  19630. public static function setRootControllerNamespace($rootNamespace)
  19631. {
  19632. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19633. return $instance->setRootControllerNamespace($rootNamespace);
  19634. }
  19635. /**
  19636. * Register a custom macro.
  19637. *
  19638. * @param string $name
  19639. * @param object|callable $macro
  19640. * @param-closure-this static $macro
  19641. * @return void
  19642. * @static
  19643. */
  19644. public static function macro($name, $macro)
  19645. {
  19646. \Illuminate\Routing\UrlGenerator::macro($name, $macro);
  19647. }
  19648. /**
  19649. * Mix another object into the class.
  19650. *
  19651. * @param object $mixin
  19652. * @param bool $replace
  19653. * @return void
  19654. * @throws \ReflectionException
  19655. * @static
  19656. */
  19657. public static function mixin($mixin, $replace = true)
  19658. {
  19659. \Illuminate\Routing\UrlGenerator::mixin($mixin, $replace);
  19660. }
  19661. /**
  19662. * Checks if macro is registered.
  19663. *
  19664. * @param string $name
  19665. * @return bool
  19666. * @static
  19667. */
  19668. public static function hasMacro($name)
  19669. {
  19670. return \Illuminate\Routing\UrlGenerator::hasMacro($name);
  19671. }
  19672. /**
  19673. * Flush the existing macros.
  19674. *
  19675. * @return void
  19676. * @static
  19677. */
  19678. public static function flushMacros()
  19679. {
  19680. \Illuminate\Routing\UrlGenerator::flushMacros();
  19681. }
  19682. }
  19683. /**
  19684. * @see \Illuminate\Validation\Factory
  19685. */
  19686. class Validator {
  19687. /**
  19688. * Create a new Validator instance.
  19689. *
  19690. * @param array $data
  19691. * @param array $rules
  19692. * @param array $messages
  19693. * @param array $attributes
  19694. * @return \Illuminate\Validation\Validator
  19695. * @static
  19696. */
  19697. public static function make($data, $rules, $messages = [], $attributes = [])
  19698. {
  19699. /** @var \Illuminate\Validation\Factory $instance */
  19700. return $instance->make($data, $rules, $messages, $attributes);
  19701. }
  19702. /**
  19703. * Validate the given data against the provided rules.
  19704. *
  19705. * @param array $data
  19706. * @param array $rules
  19707. * @param array $messages
  19708. * @param array $attributes
  19709. * @return array
  19710. * @throws \Illuminate\Validation\ValidationException
  19711. * @static
  19712. */
  19713. public static function validate($data, $rules, $messages = [], $attributes = [])
  19714. {
  19715. /** @var \Illuminate\Validation\Factory $instance */
  19716. return $instance->validate($data, $rules, $messages, $attributes);
  19717. }
  19718. /**
  19719. * Register a custom validator extension.
  19720. *
  19721. * @param string $rule
  19722. * @param \Closure|string $extension
  19723. * @param string|null $message
  19724. * @return void
  19725. * @static
  19726. */
  19727. public static function extend($rule, $extension, $message = null)
  19728. {
  19729. /** @var \Illuminate\Validation\Factory $instance */
  19730. $instance->extend($rule, $extension, $message);
  19731. }
  19732. /**
  19733. * Register a custom implicit validator extension.
  19734. *
  19735. * @param string $rule
  19736. * @param \Closure|string $extension
  19737. * @param string|null $message
  19738. * @return void
  19739. * @static
  19740. */
  19741. public static function extendImplicit($rule, $extension, $message = null)
  19742. {
  19743. /** @var \Illuminate\Validation\Factory $instance */
  19744. $instance->extendImplicit($rule, $extension, $message);
  19745. }
  19746. /**
  19747. * Register a custom dependent validator extension.
  19748. *
  19749. * @param string $rule
  19750. * @param \Closure|string $extension
  19751. * @param string|null $message
  19752. * @return void
  19753. * @static
  19754. */
  19755. public static function extendDependent($rule, $extension, $message = null)
  19756. {
  19757. /** @var \Illuminate\Validation\Factory $instance */
  19758. $instance->extendDependent($rule, $extension, $message);
  19759. }
  19760. /**
  19761. * Register a custom validator message replacer.
  19762. *
  19763. * @param string $rule
  19764. * @param \Closure|string $replacer
  19765. * @return void
  19766. * @static
  19767. */
  19768. public static function replacer($rule, $replacer)
  19769. {
  19770. /** @var \Illuminate\Validation\Factory $instance */
  19771. $instance->replacer($rule, $replacer);
  19772. }
  19773. /**
  19774. * Indicate that unvalidated array keys should be included in validated data when the parent array is validated.
  19775. *
  19776. * @return void
  19777. * @static
  19778. */
  19779. public static function includeUnvalidatedArrayKeys()
  19780. {
  19781. /** @var \Illuminate\Validation\Factory $instance */
  19782. $instance->includeUnvalidatedArrayKeys();
  19783. }
  19784. /**
  19785. * Indicate that unvalidated array keys should be excluded from the validated data, even if the parent array was validated.
  19786. *
  19787. * @return void
  19788. * @static
  19789. */
  19790. public static function excludeUnvalidatedArrayKeys()
  19791. {
  19792. /** @var \Illuminate\Validation\Factory $instance */
  19793. $instance->excludeUnvalidatedArrayKeys();
  19794. }
  19795. /**
  19796. * Set the Validator instance resolver.
  19797. *
  19798. * @param \Closure $resolver
  19799. * @return void
  19800. * @static
  19801. */
  19802. public static function resolver($resolver)
  19803. {
  19804. /** @var \Illuminate\Validation\Factory $instance */
  19805. $instance->resolver($resolver);
  19806. }
  19807. /**
  19808. * Get the Translator implementation.
  19809. *
  19810. * @return \Illuminate\Contracts\Translation\Translator
  19811. * @static
  19812. */
  19813. public static function getTranslator()
  19814. {
  19815. /** @var \Illuminate\Validation\Factory $instance */
  19816. return $instance->getTranslator();
  19817. }
  19818. /**
  19819. * Get the Presence Verifier implementation.
  19820. *
  19821. * @return \Illuminate\Validation\PresenceVerifierInterface
  19822. * @static
  19823. */
  19824. public static function getPresenceVerifier()
  19825. {
  19826. /** @var \Illuminate\Validation\Factory $instance */
  19827. return $instance->getPresenceVerifier();
  19828. }
  19829. /**
  19830. * Set the Presence Verifier implementation.
  19831. *
  19832. * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier
  19833. * @return void
  19834. * @static
  19835. */
  19836. public static function setPresenceVerifier($presenceVerifier)
  19837. {
  19838. /** @var \Illuminate\Validation\Factory $instance */
  19839. $instance->setPresenceVerifier($presenceVerifier);
  19840. }
  19841. /**
  19842. * Get the container instance used by the validation factory.
  19843. *
  19844. * @return \Illuminate\Contracts\Container\Container|null
  19845. * @static
  19846. */
  19847. public static function getContainer()
  19848. {
  19849. /** @var \Illuminate\Validation\Factory $instance */
  19850. return $instance->getContainer();
  19851. }
  19852. /**
  19853. * Set the container instance used by the validation factory.
  19854. *
  19855. * @param \Illuminate\Contracts\Container\Container $container
  19856. * @return \Illuminate\Validation\Factory
  19857. * @static
  19858. */
  19859. public static function setContainer($container)
  19860. {
  19861. /** @var \Illuminate\Validation\Factory $instance */
  19862. return $instance->setContainer($container);
  19863. }
  19864. }
  19865. /**
  19866. * @see \Illuminate\View\Factory
  19867. */
  19868. class View {
  19869. /**
  19870. * Get the evaluated view contents for the given view.
  19871. *
  19872. * @param string $path
  19873. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19874. * @param array $mergeData
  19875. * @return \Illuminate\Contracts\View\View
  19876. * @static
  19877. */
  19878. public static function file($path, $data = [], $mergeData = [])
  19879. {
  19880. /** @var \Illuminate\View\Factory $instance */
  19881. return $instance->file($path, $data, $mergeData);
  19882. }
  19883. /**
  19884. * Get the evaluated view contents for the given view.
  19885. *
  19886. * @param string $view
  19887. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19888. * @param array $mergeData
  19889. * @return \Illuminate\Contracts\View\View
  19890. * @static
  19891. */
  19892. public static function make($view, $data = [], $mergeData = [])
  19893. {
  19894. /** @var \Illuminate\View\Factory $instance */
  19895. return $instance->make($view, $data, $mergeData);
  19896. }
  19897. /**
  19898. * Get the first view that actually exists from the given list.
  19899. *
  19900. * @param array $views
  19901. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19902. * @param array $mergeData
  19903. * @return \Illuminate\Contracts\View\View
  19904. * @throws \InvalidArgumentException
  19905. * @static
  19906. */
  19907. public static function first($views, $data = [], $mergeData = [])
  19908. {
  19909. /** @var \Illuminate\View\Factory $instance */
  19910. return $instance->first($views, $data, $mergeData);
  19911. }
  19912. /**
  19913. * Get the rendered content of the view based on a given condition.
  19914. *
  19915. * @param bool $condition
  19916. * @param string $view
  19917. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19918. * @param array $mergeData
  19919. * @return string
  19920. * @static
  19921. */
  19922. public static function renderWhen($condition, $view, $data = [], $mergeData = [])
  19923. {
  19924. /** @var \Illuminate\View\Factory $instance */
  19925. return $instance->renderWhen($condition, $view, $data, $mergeData);
  19926. }
  19927. /**
  19928. * Get the rendered content of the view based on the negation of a given condition.
  19929. *
  19930. * @param bool $condition
  19931. * @param string $view
  19932. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19933. * @param array $mergeData
  19934. * @return string
  19935. * @static
  19936. */
  19937. public static function renderUnless($condition, $view, $data = [], $mergeData = [])
  19938. {
  19939. /** @var \Illuminate\View\Factory $instance */
  19940. return $instance->renderUnless($condition, $view, $data, $mergeData);
  19941. }
  19942. /**
  19943. * Get the rendered contents of a partial from a loop.
  19944. *
  19945. * @param string $view
  19946. * @param array $data
  19947. * @param string $iterator
  19948. * @param string $empty
  19949. * @return string
  19950. * @static
  19951. */
  19952. public static function renderEach($view, $data, $iterator, $empty = 'raw|')
  19953. {
  19954. /** @var \Illuminate\View\Factory $instance */
  19955. return $instance->renderEach($view, $data, $iterator, $empty);
  19956. }
  19957. /**
  19958. * Determine if a given view exists.
  19959. *
  19960. * @param string $view
  19961. * @return bool
  19962. * @static
  19963. */
  19964. public static function exists($view)
  19965. {
  19966. /** @var \Illuminate\View\Factory $instance */
  19967. return $instance->exists($view);
  19968. }
  19969. /**
  19970. * Get the appropriate view engine for the given path.
  19971. *
  19972. * @param string $path
  19973. * @return \Illuminate\Contracts\View\Engine
  19974. * @throws \InvalidArgumentException
  19975. * @static
  19976. */
  19977. public static function getEngineFromPath($path)
  19978. {
  19979. /** @var \Illuminate\View\Factory $instance */
  19980. return $instance->getEngineFromPath($path);
  19981. }
  19982. /**
  19983. * Add a piece of shared data to the environment.
  19984. *
  19985. * @param array|string $key
  19986. * @param mixed|null $value
  19987. * @return mixed
  19988. * @static
  19989. */
  19990. public static function share($key, $value = null)
  19991. {
  19992. /** @var \Illuminate\View\Factory $instance */
  19993. return $instance->share($key, $value);
  19994. }
  19995. /**
  19996. * Increment the rendering counter.
  19997. *
  19998. * @return void
  19999. * @static
  20000. */
  20001. public static function incrementRender()
  20002. {
  20003. /** @var \Illuminate\View\Factory $instance */
  20004. $instance->incrementRender();
  20005. }
  20006. /**
  20007. * Decrement the rendering counter.
  20008. *
  20009. * @return void
  20010. * @static
  20011. */
  20012. public static function decrementRender()
  20013. {
  20014. /** @var \Illuminate\View\Factory $instance */
  20015. $instance->decrementRender();
  20016. }
  20017. /**
  20018. * Check if there are no active render operations.
  20019. *
  20020. * @return bool
  20021. * @static
  20022. */
  20023. public static function doneRendering()
  20024. {
  20025. /** @var \Illuminate\View\Factory $instance */
  20026. return $instance->doneRendering();
  20027. }
  20028. /**
  20029. * Determine if the given once token has been rendered.
  20030. *
  20031. * @param string $id
  20032. * @return bool
  20033. * @static
  20034. */
  20035. public static function hasRenderedOnce($id)
  20036. {
  20037. /** @var \Illuminate\View\Factory $instance */
  20038. return $instance->hasRenderedOnce($id);
  20039. }
  20040. /**
  20041. * Mark the given once token as having been rendered.
  20042. *
  20043. * @param string $id
  20044. * @return void
  20045. * @static
  20046. */
  20047. public static function markAsRenderedOnce($id)
  20048. {
  20049. /** @var \Illuminate\View\Factory $instance */
  20050. $instance->markAsRenderedOnce($id);
  20051. }
  20052. /**
  20053. * Add a location to the array of view locations.
  20054. *
  20055. * @param string $location
  20056. * @return void
  20057. * @static
  20058. */
  20059. public static function addLocation($location)
  20060. {
  20061. /** @var \Illuminate\View\Factory $instance */
  20062. $instance->addLocation($location);
  20063. }
  20064. /**
  20065. * Prepend a location to the array of view locations.
  20066. *
  20067. * @param string $location
  20068. * @return void
  20069. * @static
  20070. */
  20071. public static function prependLocation($location)
  20072. {
  20073. /** @var \Illuminate\View\Factory $instance */
  20074. $instance->prependLocation($location);
  20075. }
  20076. /**
  20077. * Add a new namespace to the loader.
  20078. *
  20079. * @param string $namespace
  20080. * @param string|array $hints
  20081. * @return \Illuminate\View\Factory
  20082. * @static
  20083. */
  20084. public static function addNamespace($namespace, $hints)
  20085. {
  20086. /** @var \Illuminate\View\Factory $instance */
  20087. return $instance->addNamespace($namespace, $hints);
  20088. }
  20089. /**
  20090. * Prepend a new namespace to the loader.
  20091. *
  20092. * @param string $namespace
  20093. * @param string|array $hints
  20094. * @return \Illuminate\View\Factory
  20095. * @static
  20096. */
  20097. public static function prependNamespace($namespace, $hints)
  20098. {
  20099. /** @var \Illuminate\View\Factory $instance */
  20100. return $instance->prependNamespace($namespace, $hints);
  20101. }
  20102. /**
  20103. * Replace the namespace hints for the given namespace.
  20104. *
  20105. * @param string $namespace
  20106. * @param string|array $hints
  20107. * @return \Illuminate\View\Factory
  20108. * @static
  20109. */
  20110. public static function replaceNamespace($namespace, $hints)
  20111. {
  20112. /** @var \Illuminate\View\Factory $instance */
  20113. return $instance->replaceNamespace($namespace, $hints);
  20114. }
  20115. /**
  20116. * Register a valid view extension and its engine.
  20117. *
  20118. * @param string $extension
  20119. * @param string $engine
  20120. * @param \Closure|null $resolver
  20121. * @return void
  20122. * @static
  20123. */
  20124. public static function addExtension($extension, $engine, $resolver = null)
  20125. {
  20126. /** @var \Illuminate\View\Factory $instance */
  20127. $instance->addExtension($extension, $engine, $resolver);
  20128. }
  20129. /**
  20130. * Flush all of the factory state like sections and stacks.
  20131. *
  20132. * @return void
  20133. * @static
  20134. */
  20135. public static function flushState()
  20136. {
  20137. /** @var \Illuminate\View\Factory $instance */
  20138. $instance->flushState();
  20139. }
  20140. /**
  20141. * Flush all of the section contents if done rendering.
  20142. *
  20143. * @return void
  20144. * @static
  20145. */
  20146. public static function flushStateIfDoneRendering()
  20147. {
  20148. /** @var \Illuminate\View\Factory $instance */
  20149. $instance->flushStateIfDoneRendering();
  20150. }
  20151. /**
  20152. * Get the extension to engine bindings.
  20153. *
  20154. * @return array
  20155. * @static
  20156. */
  20157. public static function getExtensions()
  20158. {
  20159. /** @var \Illuminate\View\Factory $instance */
  20160. return $instance->getExtensions();
  20161. }
  20162. /**
  20163. * Get the engine resolver instance.
  20164. *
  20165. * @return \Illuminate\View\Engines\EngineResolver
  20166. * @static
  20167. */
  20168. public static function getEngineResolver()
  20169. {
  20170. /** @var \Illuminate\View\Factory $instance */
  20171. return $instance->getEngineResolver();
  20172. }
  20173. /**
  20174. * Get the view finder instance.
  20175. *
  20176. * @return \Illuminate\View\ViewFinderInterface
  20177. * @static
  20178. */
  20179. public static function getFinder()
  20180. {
  20181. /** @var \Illuminate\View\Factory $instance */
  20182. return $instance->getFinder();
  20183. }
  20184. /**
  20185. * Set the view finder instance.
  20186. *
  20187. * @param \Illuminate\View\ViewFinderInterface $finder
  20188. * @return void
  20189. * @static
  20190. */
  20191. public static function setFinder($finder)
  20192. {
  20193. /** @var \Illuminate\View\Factory $instance */
  20194. $instance->setFinder($finder);
  20195. }
  20196. /**
  20197. * Flush the cache of views located by the finder.
  20198. *
  20199. * @return void
  20200. * @static
  20201. */
  20202. public static function flushFinderCache()
  20203. {
  20204. /** @var \Illuminate\View\Factory $instance */
  20205. $instance->flushFinderCache();
  20206. }
  20207. /**
  20208. * Get the event dispatcher instance.
  20209. *
  20210. * @return \Illuminate\Contracts\Events\Dispatcher
  20211. * @static
  20212. */
  20213. public static function getDispatcher()
  20214. {
  20215. /** @var \Illuminate\View\Factory $instance */
  20216. return $instance->getDispatcher();
  20217. }
  20218. /**
  20219. * Set the event dispatcher instance.
  20220. *
  20221. * @param \Illuminate\Contracts\Events\Dispatcher $events
  20222. * @return void
  20223. * @static
  20224. */
  20225. public static function setDispatcher($events)
  20226. {
  20227. /** @var \Illuminate\View\Factory $instance */
  20228. $instance->setDispatcher($events);
  20229. }
  20230. /**
  20231. * Get the IoC container instance.
  20232. *
  20233. * @return \Illuminate\Contracts\Container\Container
  20234. * @static
  20235. */
  20236. public static function getContainer()
  20237. {
  20238. /** @var \Illuminate\View\Factory $instance */
  20239. return $instance->getContainer();
  20240. }
  20241. /**
  20242. * Set the IoC container instance.
  20243. *
  20244. * @param \Illuminate\Contracts\Container\Container $container
  20245. * @return void
  20246. * @static
  20247. */
  20248. public static function setContainer($container)
  20249. {
  20250. /** @var \Illuminate\View\Factory $instance */
  20251. $instance->setContainer($container);
  20252. }
  20253. /**
  20254. * Get an item from the shared data.
  20255. *
  20256. * @param string $key
  20257. * @param mixed $default
  20258. * @return mixed
  20259. * @static
  20260. */
  20261. public static function shared($key, $default = null)
  20262. {
  20263. /** @var \Illuminate\View\Factory $instance */
  20264. return $instance->shared($key, $default);
  20265. }
  20266. /**
  20267. * Get all of the shared data for the environment.
  20268. *
  20269. * @return array
  20270. * @static
  20271. */
  20272. public static function getShared()
  20273. {
  20274. /** @var \Illuminate\View\Factory $instance */
  20275. return $instance->getShared();
  20276. }
  20277. /**
  20278. * Register a custom macro.
  20279. *
  20280. * @param string $name
  20281. * @param object|callable $macro
  20282. * @param-closure-this static $macro
  20283. * @return void
  20284. * @static
  20285. */
  20286. public static function macro($name, $macro)
  20287. {
  20288. \Illuminate\View\Factory::macro($name, $macro);
  20289. }
  20290. /**
  20291. * Mix another object into the class.
  20292. *
  20293. * @param object $mixin
  20294. * @param bool $replace
  20295. * @return void
  20296. * @throws \ReflectionException
  20297. * @static
  20298. */
  20299. public static function mixin($mixin, $replace = true)
  20300. {
  20301. \Illuminate\View\Factory::mixin($mixin, $replace);
  20302. }
  20303. /**
  20304. * Checks if macro is registered.
  20305. *
  20306. * @param string $name
  20307. * @return bool
  20308. * @static
  20309. */
  20310. public static function hasMacro($name)
  20311. {
  20312. return \Illuminate\View\Factory::hasMacro($name);
  20313. }
  20314. /**
  20315. * Flush the existing macros.
  20316. *
  20317. * @return void
  20318. * @static
  20319. */
  20320. public static function flushMacros()
  20321. {
  20322. \Illuminate\View\Factory::flushMacros();
  20323. }
  20324. /**
  20325. * Start a component rendering process.
  20326. *
  20327. * @param \Illuminate\Contracts\View\View|\Illuminate\Contracts\Support\Htmlable|\Closure|string $view
  20328. * @param array $data
  20329. * @return void
  20330. * @static
  20331. */
  20332. public static function startComponent($view, $data = [])
  20333. {
  20334. /** @var \Illuminate\View\Factory $instance */
  20335. $instance->startComponent($view, $data);
  20336. }
  20337. /**
  20338. * Get the first view that actually exists from the given list, and start a component.
  20339. *
  20340. * @param array $names
  20341. * @param array $data
  20342. * @return void
  20343. * @static
  20344. */
  20345. public static function startComponentFirst($names, $data = [])
  20346. {
  20347. /** @var \Illuminate\View\Factory $instance */
  20348. $instance->startComponentFirst($names, $data);
  20349. }
  20350. /**
  20351. * Render the current component.
  20352. *
  20353. * @return string
  20354. * @static
  20355. */
  20356. public static function renderComponent()
  20357. {
  20358. /** @var \Illuminate\View\Factory $instance */
  20359. return $instance->renderComponent();
  20360. }
  20361. /**
  20362. * Get an item from the component data that exists above the current component.
  20363. *
  20364. * @param string $key
  20365. * @param mixed $default
  20366. * @return mixed|null
  20367. * @static
  20368. */
  20369. public static function getConsumableComponentData($key, $default = null)
  20370. {
  20371. /** @var \Illuminate\View\Factory $instance */
  20372. return $instance->getConsumableComponentData($key, $default);
  20373. }
  20374. /**
  20375. * Start the slot rendering process.
  20376. *
  20377. * @param string $name
  20378. * @param string|null $content
  20379. * @param array $attributes
  20380. * @return void
  20381. * @static
  20382. */
  20383. public static function slot($name, $content = null, $attributes = [])
  20384. {
  20385. /** @var \Illuminate\View\Factory $instance */
  20386. $instance->slot($name, $content, $attributes);
  20387. }
  20388. /**
  20389. * Save the slot content for rendering.
  20390. *
  20391. * @return void
  20392. * @static
  20393. */
  20394. public static function endSlot()
  20395. {
  20396. /** @var \Illuminate\View\Factory $instance */
  20397. $instance->endSlot();
  20398. }
  20399. /**
  20400. * Register a view creator event.
  20401. *
  20402. * @param array|string $views
  20403. * @param \Closure|string $callback
  20404. * @return array
  20405. * @static
  20406. */
  20407. public static function creator($views, $callback)
  20408. {
  20409. /** @var \Illuminate\View\Factory $instance */
  20410. return $instance->creator($views, $callback);
  20411. }
  20412. /**
  20413. * Register multiple view composers via an array.
  20414. *
  20415. * @param array $composers
  20416. * @return array
  20417. * @static
  20418. */
  20419. public static function composers($composers)
  20420. {
  20421. /** @var \Illuminate\View\Factory $instance */
  20422. return $instance->composers($composers);
  20423. }
  20424. /**
  20425. * Register a view composer event.
  20426. *
  20427. * @param array|string $views
  20428. * @param \Closure|string $callback
  20429. * @return array
  20430. * @static
  20431. */
  20432. public static function composer($views, $callback)
  20433. {
  20434. /** @var \Illuminate\View\Factory $instance */
  20435. return $instance->composer($views, $callback);
  20436. }
  20437. /**
  20438. * Call the composer for a given view.
  20439. *
  20440. * @param \Illuminate\Contracts\View\View $view
  20441. * @return void
  20442. * @static
  20443. */
  20444. public static function callComposer($view)
  20445. {
  20446. /** @var \Illuminate\View\Factory $instance */
  20447. $instance->callComposer($view);
  20448. }
  20449. /**
  20450. * Call the creator for a given view.
  20451. *
  20452. * @param \Illuminate\Contracts\View\View $view
  20453. * @return void
  20454. * @static
  20455. */
  20456. public static function callCreator($view)
  20457. {
  20458. /** @var \Illuminate\View\Factory $instance */
  20459. $instance->callCreator($view);
  20460. }
  20461. /**
  20462. * Start injecting content into a fragment.
  20463. *
  20464. * @param string $fragment
  20465. * @return void
  20466. * @static
  20467. */
  20468. public static function startFragment($fragment)
  20469. {
  20470. /** @var \Illuminate\View\Factory $instance */
  20471. $instance->startFragment($fragment);
  20472. }
  20473. /**
  20474. * Stop injecting content into a fragment.
  20475. *
  20476. * @return string
  20477. * @throws \InvalidArgumentException
  20478. * @static
  20479. */
  20480. public static function stopFragment()
  20481. {
  20482. /** @var \Illuminate\View\Factory $instance */
  20483. return $instance->stopFragment();
  20484. }
  20485. /**
  20486. * Get the contents of a fragment.
  20487. *
  20488. * @param string $name
  20489. * @param string|null $default
  20490. * @return mixed
  20491. * @static
  20492. */
  20493. public static function getFragment($name, $default = null)
  20494. {
  20495. /** @var \Illuminate\View\Factory $instance */
  20496. return $instance->getFragment($name, $default);
  20497. }
  20498. /**
  20499. * Get the entire array of rendered fragments.
  20500. *
  20501. * @return array
  20502. * @static
  20503. */
  20504. public static function getFragments()
  20505. {
  20506. /** @var \Illuminate\View\Factory $instance */
  20507. return $instance->getFragments();
  20508. }
  20509. /**
  20510. * Flush all of the fragments.
  20511. *
  20512. * @return void
  20513. * @static
  20514. */
  20515. public static function flushFragments()
  20516. {
  20517. /** @var \Illuminate\View\Factory $instance */
  20518. $instance->flushFragments();
  20519. }
  20520. /**
  20521. * Start injecting content into a section.
  20522. *
  20523. * @param string $section
  20524. * @param string|null $content
  20525. * @return void
  20526. * @static
  20527. */
  20528. public static function startSection($section, $content = null)
  20529. {
  20530. /** @var \Illuminate\View\Factory $instance */
  20531. $instance->startSection($section, $content);
  20532. }
  20533. /**
  20534. * Inject inline content into a section.
  20535. *
  20536. * @param string $section
  20537. * @param string $content
  20538. * @return void
  20539. * @static
  20540. */
  20541. public static function inject($section, $content)
  20542. {
  20543. /** @var \Illuminate\View\Factory $instance */
  20544. $instance->inject($section, $content);
  20545. }
  20546. /**
  20547. * Stop injecting content into a section and return its contents.
  20548. *
  20549. * @return string
  20550. * @static
  20551. */
  20552. public static function yieldSection()
  20553. {
  20554. /** @var \Illuminate\View\Factory $instance */
  20555. return $instance->yieldSection();
  20556. }
  20557. /**
  20558. * Stop injecting content into a section.
  20559. *
  20560. * @param bool $overwrite
  20561. * @return string
  20562. * @throws \InvalidArgumentException
  20563. * @static
  20564. */
  20565. public static function stopSection($overwrite = false)
  20566. {
  20567. /** @var \Illuminate\View\Factory $instance */
  20568. return $instance->stopSection($overwrite);
  20569. }
  20570. /**
  20571. * Stop injecting content into a section and append it.
  20572. *
  20573. * @return string
  20574. * @throws \InvalidArgumentException
  20575. * @static
  20576. */
  20577. public static function appendSection()
  20578. {
  20579. /** @var \Illuminate\View\Factory $instance */
  20580. return $instance->appendSection();
  20581. }
  20582. /**
  20583. * Get the string contents of a section.
  20584. *
  20585. * @param string $section
  20586. * @param string $default
  20587. * @return string
  20588. * @static
  20589. */
  20590. public static function yieldContent($section, $default = '')
  20591. {
  20592. /** @var \Illuminate\View\Factory $instance */
  20593. return $instance->yieldContent($section, $default);
  20594. }
  20595. /**
  20596. * Get the parent placeholder for the current request.
  20597. *
  20598. * @param string $section
  20599. * @return string
  20600. * @static
  20601. */
  20602. public static function parentPlaceholder($section = '')
  20603. {
  20604. return \Illuminate\View\Factory::parentPlaceholder($section);
  20605. }
  20606. /**
  20607. * Check if section exists.
  20608. *
  20609. * @param string $name
  20610. * @return bool
  20611. * @static
  20612. */
  20613. public static function hasSection($name)
  20614. {
  20615. /** @var \Illuminate\View\Factory $instance */
  20616. return $instance->hasSection($name);
  20617. }
  20618. /**
  20619. * Check if section does not exist.
  20620. *
  20621. * @param string $name
  20622. * @return bool
  20623. * @static
  20624. */
  20625. public static function sectionMissing($name)
  20626. {
  20627. /** @var \Illuminate\View\Factory $instance */
  20628. return $instance->sectionMissing($name);
  20629. }
  20630. /**
  20631. * Get the contents of a section.
  20632. *
  20633. * @param string $name
  20634. * @param string|null $default
  20635. * @return mixed
  20636. * @static
  20637. */
  20638. public static function getSection($name, $default = null)
  20639. {
  20640. /** @var \Illuminate\View\Factory $instance */
  20641. return $instance->getSection($name, $default);
  20642. }
  20643. /**
  20644. * Get the entire array of sections.
  20645. *
  20646. * @return array
  20647. * @static
  20648. */
  20649. public static function getSections()
  20650. {
  20651. /** @var \Illuminate\View\Factory $instance */
  20652. return $instance->getSections();
  20653. }
  20654. /**
  20655. * Flush all of the sections.
  20656. *
  20657. * @return void
  20658. * @static
  20659. */
  20660. public static function flushSections()
  20661. {
  20662. /** @var \Illuminate\View\Factory $instance */
  20663. $instance->flushSections();
  20664. }
  20665. /**
  20666. * Add new loop to the stack.
  20667. *
  20668. * @param \Countable|array $data
  20669. * @return void
  20670. * @static
  20671. */
  20672. public static function addLoop($data)
  20673. {
  20674. /** @var \Illuminate\View\Factory $instance */
  20675. $instance->addLoop($data);
  20676. }
  20677. /**
  20678. * Increment the top loop's indices.
  20679. *
  20680. * @return void
  20681. * @static
  20682. */
  20683. public static function incrementLoopIndices()
  20684. {
  20685. /** @var \Illuminate\View\Factory $instance */
  20686. $instance->incrementLoopIndices();
  20687. }
  20688. /**
  20689. * Pop a loop from the top of the loop stack.
  20690. *
  20691. * @return void
  20692. * @static
  20693. */
  20694. public static function popLoop()
  20695. {
  20696. /** @var \Illuminate\View\Factory $instance */
  20697. $instance->popLoop();
  20698. }
  20699. /**
  20700. * Get an instance of the last loop in the stack.
  20701. *
  20702. * @return \stdClass|null
  20703. * @static
  20704. */
  20705. public static function getLastLoop()
  20706. {
  20707. /** @var \Illuminate\View\Factory $instance */
  20708. return $instance->getLastLoop();
  20709. }
  20710. /**
  20711. * Get the entire loop stack.
  20712. *
  20713. * @return array
  20714. * @static
  20715. */
  20716. public static function getLoopStack()
  20717. {
  20718. /** @var \Illuminate\View\Factory $instance */
  20719. return $instance->getLoopStack();
  20720. }
  20721. /**
  20722. * Start injecting content into a push section.
  20723. *
  20724. * @param string $section
  20725. * @param string $content
  20726. * @return void
  20727. * @static
  20728. */
  20729. public static function startPush($section, $content = '')
  20730. {
  20731. /** @var \Illuminate\View\Factory $instance */
  20732. $instance->startPush($section, $content);
  20733. }
  20734. /**
  20735. * Stop injecting content into a push section.
  20736. *
  20737. * @return string
  20738. * @throws \InvalidArgumentException
  20739. * @static
  20740. */
  20741. public static function stopPush()
  20742. {
  20743. /** @var \Illuminate\View\Factory $instance */
  20744. return $instance->stopPush();
  20745. }
  20746. /**
  20747. * Start prepending content into a push section.
  20748. *
  20749. * @param string $section
  20750. * @param string $content
  20751. * @return void
  20752. * @static
  20753. */
  20754. public static function startPrepend($section, $content = '')
  20755. {
  20756. /** @var \Illuminate\View\Factory $instance */
  20757. $instance->startPrepend($section, $content);
  20758. }
  20759. /**
  20760. * Stop prepending content into a push section.
  20761. *
  20762. * @return string
  20763. * @throws \InvalidArgumentException
  20764. * @static
  20765. */
  20766. public static function stopPrepend()
  20767. {
  20768. /** @var \Illuminate\View\Factory $instance */
  20769. return $instance->stopPrepend();
  20770. }
  20771. /**
  20772. * Get the string contents of a push section.
  20773. *
  20774. * @param string $section
  20775. * @param string $default
  20776. * @return string
  20777. * @static
  20778. */
  20779. public static function yieldPushContent($section, $default = '')
  20780. {
  20781. /** @var \Illuminate\View\Factory $instance */
  20782. return $instance->yieldPushContent($section, $default);
  20783. }
  20784. /**
  20785. * Flush all of the stacks.
  20786. *
  20787. * @return void
  20788. * @static
  20789. */
  20790. public static function flushStacks()
  20791. {
  20792. /** @var \Illuminate\View\Factory $instance */
  20793. $instance->flushStacks();
  20794. }
  20795. /**
  20796. * Start a translation block.
  20797. *
  20798. * @param array $replacements
  20799. * @return void
  20800. * @static
  20801. */
  20802. public static function startTranslation($replacements = [])
  20803. {
  20804. /** @var \Illuminate\View\Factory $instance */
  20805. $instance->startTranslation($replacements);
  20806. }
  20807. /**
  20808. * Render the current translation.
  20809. *
  20810. * @return string
  20811. * @static
  20812. */
  20813. public static function renderTranslation()
  20814. {
  20815. /** @var \Illuminate\View\Factory $instance */
  20816. return $instance->renderTranslation();
  20817. }
  20818. }
  20819. /**
  20820. * @see \Illuminate\Foundation\Vite
  20821. */
  20822. class Vite {
  20823. /**
  20824. * Get the preloaded assets.
  20825. *
  20826. * @return array
  20827. * @static
  20828. */
  20829. public static function preloadedAssets()
  20830. {
  20831. /** @var \Illuminate\Foundation\Vite $instance */
  20832. return $instance->preloadedAssets();
  20833. }
  20834. /**
  20835. * Get the Content Security Policy nonce applied to all generated tags.
  20836. *
  20837. * @return string|null
  20838. * @static
  20839. */
  20840. public static function cspNonce()
  20841. {
  20842. /** @var \Illuminate\Foundation\Vite $instance */
  20843. return $instance->cspNonce();
  20844. }
  20845. /**
  20846. * Generate or set a Content Security Policy nonce to apply to all generated tags.
  20847. *
  20848. * @param string|null $nonce
  20849. * @return string
  20850. * @static
  20851. */
  20852. public static function useCspNonce($nonce = null)
  20853. {
  20854. /** @var \Illuminate\Foundation\Vite $instance */
  20855. return $instance->useCspNonce($nonce);
  20856. }
  20857. /**
  20858. * Use the given key to detect integrity hashes in the manifest.
  20859. *
  20860. * @param string|false $key
  20861. * @return \Illuminate\Foundation\Vite
  20862. * @static
  20863. */
  20864. public static function useIntegrityKey($key)
  20865. {
  20866. /** @var \Illuminate\Foundation\Vite $instance */
  20867. return $instance->useIntegrityKey($key);
  20868. }
  20869. /**
  20870. * Set the Vite entry points.
  20871. *
  20872. * @param array $entryPoints
  20873. * @return \Illuminate\Foundation\Vite
  20874. * @static
  20875. */
  20876. public static function withEntryPoints($entryPoints)
  20877. {
  20878. /** @var \Illuminate\Foundation\Vite $instance */
  20879. return $instance->withEntryPoints($entryPoints);
  20880. }
  20881. /**
  20882. * Merge additional Vite entry points with the current set.
  20883. *
  20884. * @param array $entryPoints
  20885. * @return \Illuminate\Foundation\Vite
  20886. * @static
  20887. */
  20888. public static function mergeEntryPoints($entryPoints)
  20889. {
  20890. /** @var \Illuminate\Foundation\Vite $instance */
  20891. return $instance->mergeEntryPoints($entryPoints);
  20892. }
  20893. /**
  20894. * Set the filename for the manifest file.
  20895. *
  20896. * @param string $filename
  20897. * @return \Illuminate\Foundation\Vite
  20898. * @static
  20899. */
  20900. public static function useManifestFilename($filename)
  20901. {
  20902. /** @var \Illuminate\Foundation\Vite $instance */
  20903. return $instance->useManifestFilename($filename);
  20904. }
  20905. /**
  20906. * Resolve asset paths using the provided resolver.
  20907. *
  20908. * @param callable|null $resolver
  20909. * @return \Illuminate\Foundation\Vite
  20910. * @static
  20911. */
  20912. public static function createAssetPathsUsing($resolver)
  20913. {
  20914. /** @var \Illuminate\Foundation\Vite $instance */
  20915. return $instance->createAssetPathsUsing($resolver);
  20916. }
  20917. /**
  20918. * Get the Vite "hot" file path.
  20919. *
  20920. * @return string
  20921. * @static
  20922. */
  20923. public static function hotFile()
  20924. {
  20925. /** @var \Illuminate\Foundation\Vite $instance */
  20926. return $instance->hotFile();
  20927. }
  20928. /**
  20929. * Set the Vite "hot" file path.
  20930. *
  20931. * @param string $path
  20932. * @return \Illuminate\Foundation\Vite
  20933. * @static
  20934. */
  20935. public static function useHotFile($path)
  20936. {
  20937. /** @var \Illuminate\Foundation\Vite $instance */
  20938. return $instance->useHotFile($path);
  20939. }
  20940. /**
  20941. * Set the Vite build directory.
  20942. *
  20943. * @param string $path
  20944. * @return \Illuminate\Foundation\Vite
  20945. * @static
  20946. */
  20947. public static function useBuildDirectory($path)
  20948. {
  20949. /** @var \Illuminate\Foundation\Vite $instance */
  20950. return $instance->useBuildDirectory($path);
  20951. }
  20952. /**
  20953. * Use the given callback to resolve attributes for script tags.
  20954. *
  20955. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20956. * @return \Illuminate\Foundation\Vite
  20957. * @static
  20958. */
  20959. public static function useScriptTagAttributes($attributes)
  20960. {
  20961. /** @var \Illuminate\Foundation\Vite $instance */
  20962. return $instance->useScriptTagAttributes($attributes);
  20963. }
  20964. /**
  20965. * Use the given callback to resolve attributes for style tags.
  20966. *
  20967. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20968. * @return \Illuminate\Foundation\Vite
  20969. * @static
  20970. */
  20971. public static function useStyleTagAttributes($attributes)
  20972. {
  20973. /** @var \Illuminate\Foundation\Vite $instance */
  20974. return $instance->useStyleTagAttributes($attributes);
  20975. }
  20976. /**
  20977. * Use the given callback to resolve attributes for preload tags.
  20978. *
  20979. * @param (callable(string, string, ?array, ?array): (array|false))|array|false $attributes
  20980. * @return \Illuminate\Foundation\Vite
  20981. * @static
  20982. */
  20983. public static function usePreloadTagAttributes($attributes)
  20984. {
  20985. /** @var \Illuminate\Foundation\Vite $instance */
  20986. return $instance->usePreloadTagAttributes($attributes);
  20987. }
  20988. /**
  20989. * Eagerly prefetch assets.
  20990. *
  20991. * @param int|null $concurrency
  20992. * @param string $event
  20993. * @return \Illuminate\Foundation\Vite
  20994. * @static
  20995. */
  20996. public static function prefetch($concurrency = null, $event = 'load')
  20997. {
  20998. /** @var \Illuminate\Foundation\Vite $instance */
  20999. return $instance->prefetch($concurrency, $event);
  21000. }
  21001. /**
  21002. * Use the "waterfall" prefetching strategy.
  21003. *
  21004. * @return \Illuminate\Foundation\Vite
  21005. * @static
  21006. */
  21007. public static function useWaterfallPrefetching($concurrency = null)
  21008. {
  21009. /** @var \Illuminate\Foundation\Vite $instance */
  21010. return $instance->useWaterfallPrefetching($concurrency);
  21011. }
  21012. /**
  21013. * Use the "aggressive" prefetching strategy.
  21014. *
  21015. * @return \Illuminate\Foundation\Vite
  21016. * @static
  21017. */
  21018. public static function useAggressivePrefetching()
  21019. {
  21020. /** @var \Illuminate\Foundation\Vite $instance */
  21021. return $instance->useAggressivePrefetching();
  21022. }
  21023. /**
  21024. * Set the prefetching strategy.
  21025. *
  21026. * @param 'waterfall'|'aggressive'|null $strategy
  21027. * @param array $config
  21028. * @return \Illuminate\Foundation\Vite
  21029. * @static
  21030. */
  21031. public static function usePrefetchStrategy($strategy, $config = [])
  21032. {
  21033. /** @var \Illuminate\Foundation\Vite $instance */
  21034. return $instance->usePrefetchStrategy($strategy, $config);
  21035. }
  21036. /**
  21037. * Generate React refresh runtime script.
  21038. *
  21039. * @return \Illuminate\Support\HtmlString|void
  21040. * @static
  21041. */
  21042. public static function reactRefresh()
  21043. {
  21044. /** @var \Illuminate\Foundation\Vite $instance */
  21045. return $instance->reactRefresh();
  21046. }
  21047. /**
  21048. * Get the URL for an asset.
  21049. *
  21050. * @param string $asset
  21051. * @param string|null $buildDirectory
  21052. * @return string
  21053. * @static
  21054. */
  21055. public static function asset($asset, $buildDirectory = null)
  21056. {
  21057. /** @var \Illuminate\Foundation\Vite $instance */
  21058. return $instance->asset($asset, $buildDirectory);
  21059. }
  21060. /**
  21061. * Get the content of a given asset.
  21062. *
  21063. * @param string $asset
  21064. * @param string|null $buildDirectory
  21065. * @return string
  21066. * @throws \Illuminate\Foundation\ViteException
  21067. * @static
  21068. */
  21069. public static function content($asset, $buildDirectory = null)
  21070. {
  21071. /** @var \Illuminate\Foundation\Vite $instance */
  21072. return $instance->content($asset, $buildDirectory);
  21073. }
  21074. /**
  21075. * Get a unique hash representing the current manifest, or null if there is no manifest.
  21076. *
  21077. * @param string|null $buildDirectory
  21078. * @return string|null
  21079. * @static
  21080. */
  21081. public static function manifestHash($buildDirectory = null)
  21082. {
  21083. /** @var \Illuminate\Foundation\Vite $instance */
  21084. return $instance->manifestHash($buildDirectory);
  21085. }
  21086. /**
  21087. * Determine if the HMR server is running.
  21088. *
  21089. * @return bool
  21090. * @static
  21091. */
  21092. public static function isRunningHot()
  21093. {
  21094. /** @var \Illuminate\Foundation\Vite $instance */
  21095. return $instance->isRunningHot();
  21096. }
  21097. /**
  21098. * Get the Vite tag content as a string of HTML.
  21099. *
  21100. * @return string
  21101. * @static
  21102. */
  21103. public static function toHtml()
  21104. {
  21105. /** @var \Illuminate\Foundation\Vite $instance */
  21106. return $instance->toHtml();
  21107. }
  21108. /**
  21109. * Flush state.
  21110. *
  21111. * @return void
  21112. * @static
  21113. */
  21114. public static function flush()
  21115. {
  21116. /** @var \Illuminate\Foundation\Vite $instance */
  21117. $instance->flush();
  21118. }
  21119. /**
  21120. * Register a custom macro.
  21121. *
  21122. * @param string $name
  21123. * @param object|callable $macro
  21124. * @param-closure-this static $macro
  21125. * @return void
  21126. * @static
  21127. */
  21128. public static function macro($name, $macro)
  21129. {
  21130. \Illuminate\Foundation\Vite::macro($name, $macro);
  21131. }
  21132. /**
  21133. * Mix another object into the class.
  21134. *
  21135. * @param object $mixin
  21136. * @param bool $replace
  21137. * @return void
  21138. * @throws \ReflectionException
  21139. * @static
  21140. */
  21141. public static function mixin($mixin, $replace = true)
  21142. {
  21143. \Illuminate\Foundation\Vite::mixin($mixin, $replace);
  21144. }
  21145. /**
  21146. * Checks if macro is registered.
  21147. *
  21148. * @param string $name
  21149. * @return bool
  21150. * @static
  21151. */
  21152. public static function hasMacro($name)
  21153. {
  21154. return \Illuminate\Foundation\Vite::hasMacro($name);
  21155. }
  21156. /**
  21157. * Flush the existing macros.
  21158. *
  21159. * @return void
  21160. * @static
  21161. */
  21162. public static function flushMacros()
  21163. {
  21164. \Illuminate\Foundation\Vite::flushMacros();
  21165. }
  21166. }
  21167. }
  21168. namespace Illuminate\Http {
  21169. /**
  21170. */
  21171. class Request extends \Symfony\Component\HttpFoundation\Request {
  21172. /**
  21173. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21174. * @param array $rules
  21175. * @param mixed $params
  21176. * @static
  21177. */
  21178. public static function validate($rules, ...$params)
  21179. {
  21180. return \Illuminate\Http\Request::validate($rules, ...$params);
  21181. }
  21182. /**
  21183. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21184. * @param string $errorBag
  21185. * @param array $rules
  21186. * @param mixed $params
  21187. * @static
  21188. */
  21189. public static function validateWithBag($errorBag, $rules, ...$params)
  21190. {
  21191. return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params);
  21192. }
  21193. /**
  21194. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21195. * @param mixed $absolute
  21196. * @static
  21197. */
  21198. public static function hasValidSignature($absolute = true)
  21199. {
  21200. return \Illuminate\Http\Request::hasValidSignature($absolute);
  21201. }
  21202. /**
  21203. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21204. * @static
  21205. */
  21206. public static function hasValidRelativeSignature()
  21207. {
  21208. return \Illuminate\Http\Request::hasValidRelativeSignature();
  21209. }
  21210. /**
  21211. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21212. * @param mixed $ignoreQuery
  21213. * @param mixed $absolute
  21214. * @static
  21215. */
  21216. public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)
  21217. {
  21218. return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute);
  21219. }
  21220. /**
  21221. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21222. * @param mixed $ignoreQuery
  21223. * @static
  21224. */
  21225. public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])
  21226. {
  21227. return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery);
  21228. }
  21229. }
  21230. }
  21231. namespace Illuminate\Database\Schema {
  21232. /**
  21233. */
  21234. class Blueprint {
  21235. /**
  21236. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21237. * @static
  21238. */
  21239. public static function nestedSet()
  21240. {
  21241. return \Illuminate\Database\Schema\Blueprint::nestedSet();
  21242. }
  21243. /**
  21244. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21245. * @static
  21246. */
  21247. public static function dropNestedSet()
  21248. {
  21249. return \Illuminate\Database\Schema\Blueprint::dropNestedSet();
  21250. }
  21251. /**
  21252. * @see \Pgvector\Laravel\Schema::register()
  21253. * @param string $column
  21254. * @param mixed|null $dimensions
  21255. * @return \Illuminate\Database\Schema\ColumnDefinition
  21256. * @static
  21257. */
  21258. public static function halfvec($column, $dimensions = null)
  21259. {
  21260. return \Illuminate\Database\Schema\Blueprint::halfvec($column, $dimensions);
  21261. }
  21262. /**
  21263. * @see \Pgvector\Laravel\Schema::register()
  21264. * @param string $column
  21265. * @param mixed|null $length
  21266. * @return \Illuminate\Database\Schema\ColumnDefinition
  21267. * @static
  21268. */
  21269. public static function bit($column, $length = null)
  21270. {
  21271. return \Illuminate\Database\Schema\Blueprint::bit($column, $length);
  21272. }
  21273. /**
  21274. * @see \Pgvector\Laravel\Schema::register()
  21275. * @param string $column
  21276. * @param mixed|null $dimensions
  21277. * @return \Illuminate\Database\Schema\ColumnDefinition
  21278. * @static
  21279. */
  21280. public static function sparsevec($column, $dimensions = null)
  21281. {
  21282. return \Illuminate\Database\Schema\Blueprint::sparsevec($column, $dimensions);
  21283. }
  21284. }
  21285. }
  21286. namespace Illuminate\Database\Schema\Grammars {
  21287. /**
  21288. */
  21289. class PostgresGrammar extends \Illuminate\Database\Schema\Grammars\Grammar {
  21290. }
  21291. /**
  21292. */
  21293. class Grammar extends \Illuminate\Database\Grammar {
  21294. }
  21295. }
  21296. namespace Illuminate\Database {
  21297. /**
  21298. */
  21299. class Grammar {
  21300. /**
  21301. * @see \Pgvector\Laravel\Schema::register()
  21302. * @param \Illuminate\Database\Schema\ColumnDefinition $column
  21303. * @return string
  21304. * @static
  21305. */
  21306. public static function typeVector($column)
  21307. {
  21308. return \Illuminate\Database\Grammar::typeVector($column);
  21309. }
  21310. /**
  21311. * @see \Pgvector\Laravel\Schema::register()
  21312. * @param \Illuminate\Database\Schema\ColumnDefinition $column
  21313. * @return string
  21314. * @static
  21315. */
  21316. public static function typeHalfvec($column)
  21317. {
  21318. return \Illuminate\Database\Grammar::typeHalfvec($column);
  21319. }
  21320. /**
  21321. * @see \Pgvector\Laravel\Schema::register()
  21322. * @param \Illuminate\Database\Schema\ColumnDefinition $column
  21323. * @return string
  21324. * @static
  21325. */
  21326. public static function typeBit($column)
  21327. {
  21328. return \Illuminate\Database\Grammar::typeBit($column);
  21329. }
  21330. /**
  21331. * @see \Pgvector\Laravel\Schema::register()
  21332. * @param \Illuminate\Database\Schema\ColumnDefinition $column
  21333. * @return string
  21334. * @static
  21335. */
  21336. public static function typeSparsevec($column)
  21337. {
  21338. return \Illuminate\Database\Grammar::typeSparsevec($column);
  21339. }
  21340. }
  21341. }
  21342. namespace Illuminate\Database\Query\Grammars {
  21343. /**
  21344. */
  21345. class PostgresGrammar extends \Illuminate\Database\Query\Grammars\Grammar {
  21346. }
  21347. /**
  21348. */
  21349. class Grammar extends \Illuminate\Database\Grammar {
  21350. }
  21351. }
  21352. namespace {
  21353. class App extends \Illuminate\Support\Facades\App {}
  21354. class Arr extends \Illuminate\Support\Arr {}
  21355. class Artisan extends \Illuminate\Support\Facades\Artisan {}
  21356. class Auth extends \Illuminate\Support\Facades\Auth {}
  21357. class Blade extends \Illuminate\Support\Facades\Blade {}
  21358. class Broadcast extends \Illuminate\Support\Facades\Broadcast {}
  21359. class Bus extends \Illuminate\Support\Facades\Bus {}
  21360. class Cache extends \Illuminate\Support\Facades\Cache {}
  21361. class Concurrency extends \Illuminate\Support\Facades\Concurrency {}
  21362. class Config extends \Illuminate\Support\Facades\Config {}
  21363. class Context extends \Illuminate\Support\Facades\Context {}
  21364. class Cookie extends \Illuminate\Support\Facades\Cookie {}
  21365. class Crypt extends \Illuminate\Support\Facades\Crypt {}
  21366. class Date extends \Illuminate\Support\Facades\Date {}
  21367. class DB extends \Illuminate\Support\Facades\DB {}
  21368. /**
  21369. * @template TCollection of static
  21370. * @template TModel of static
  21371. * @template TValue of static
  21372. * @template TValue of static
  21373. */
  21374. class Eloquent extends \Illuminate\Database\Eloquent\Model { /**
  21375. * Create and return an un-saved model instance.
  21376. *
  21377. * @param array $attributes
  21378. * @return TModel
  21379. * @static
  21380. */
  21381. public static function make($attributes = [])
  21382. {
  21383. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21384. return $instance->make($attributes);
  21385. }
  21386. /**
  21387. * Register a new global scope.
  21388. *
  21389. * @param string $identifier
  21390. * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope
  21391. * @return \Illuminate\Database\Eloquent\Builder<static>
  21392. * @static
  21393. */
  21394. public static function withGlobalScope($identifier, $scope)
  21395. {
  21396. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21397. return $instance->withGlobalScope($identifier, $scope);
  21398. }
  21399. /**
  21400. * Remove a registered global scope.
  21401. *
  21402. * @param \Illuminate\Database\Eloquent\Scope|string $scope
  21403. * @return \Illuminate\Database\Eloquent\Builder<static>
  21404. * @static
  21405. */
  21406. public static function withoutGlobalScope($scope)
  21407. {
  21408. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21409. return $instance->withoutGlobalScope($scope);
  21410. }
  21411. /**
  21412. * Remove all or passed registered global scopes.
  21413. *
  21414. * @param array|null $scopes
  21415. * @return \Illuminate\Database\Eloquent\Builder<static>
  21416. * @static
  21417. */
  21418. public static function withoutGlobalScopes($scopes = null)
  21419. {
  21420. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21421. return $instance->withoutGlobalScopes($scopes);
  21422. }
  21423. /**
  21424. * Get an array of global scopes that were removed from the query.
  21425. *
  21426. * @return array
  21427. * @static
  21428. */
  21429. public static function removedScopes()
  21430. {
  21431. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21432. return $instance->removedScopes();
  21433. }
  21434. /**
  21435. * Add a where clause on the primary key to the query.
  21436. *
  21437. * @param mixed $id
  21438. * @return \Illuminate\Database\Eloquent\Builder<static>
  21439. * @static
  21440. */
  21441. public static function whereKey($id)
  21442. {
  21443. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21444. return $instance->whereKey($id);
  21445. }
  21446. /**
  21447. * Add a where clause on the primary key to the query.
  21448. *
  21449. * @param mixed $id
  21450. * @return \Illuminate\Database\Eloquent\Builder<static>
  21451. * @static
  21452. */
  21453. public static function whereKeyNot($id)
  21454. {
  21455. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21456. return $instance->whereKeyNot($id);
  21457. }
  21458. /**
  21459. * Add a basic where clause to the query.
  21460. *
  21461. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21462. * @param mixed $operator
  21463. * @param mixed $value
  21464. * @param string $boolean
  21465. * @return \Illuminate\Database\Eloquent\Builder<static>
  21466. * @static
  21467. */
  21468. public static function where($column, $operator = null, $value = null, $boolean = 'and')
  21469. {
  21470. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21471. return $instance->where($column, $operator, $value, $boolean);
  21472. }
  21473. /**
  21474. * Add a basic where clause to the query, and return the first result.
  21475. *
  21476. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21477. * @param mixed $operator
  21478. * @param mixed $value
  21479. * @param string $boolean
  21480. * @return TModel|null
  21481. * @static
  21482. */
  21483. public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
  21484. {
  21485. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21486. return $instance->firstWhere($column, $operator, $value, $boolean);
  21487. }
  21488. /**
  21489. * Add an "or where" clause to the query.
  21490. *
  21491. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21492. * @param mixed $operator
  21493. * @param mixed $value
  21494. * @return \Illuminate\Database\Eloquent\Builder<static>
  21495. * @static
  21496. */
  21497. public static function orWhere($column, $operator = null, $value = null)
  21498. {
  21499. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21500. return $instance->orWhere($column, $operator, $value);
  21501. }
  21502. /**
  21503. * Add a basic "where not" clause to the query.
  21504. *
  21505. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21506. * @param mixed $operator
  21507. * @param mixed $value
  21508. * @param string $boolean
  21509. * @return \Illuminate\Database\Eloquent\Builder<static>
  21510. * @static
  21511. */
  21512. public static function whereNot($column, $operator = null, $value = null, $boolean = 'and')
  21513. {
  21514. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21515. return $instance->whereNot($column, $operator, $value, $boolean);
  21516. }
  21517. /**
  21518. * Add an "or where not" clause to the query.
  21519. *
  21520. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21521. * @param mixed $operator
  21522. * @param mixed $value
  21523. * @return \Illuminate\Database\Eloquent\Builder<static>
  21524. * @static
  21525. */
  21526. public static function orWhereNot($column, $operator = null, $value = null)
  21527. {
  21528. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21529. return $instance->orWhereNot($column, $operator, $value);
  21530. }
  21531. /**
  21532. * Add an "order by" clause for a timestamp to the query.
  21533. *
  21534. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21535. * @return \Illuminate\Database\Eloquent\Builder<static>
  21536. * @static
  21537. */
  21538. public static function latest($column = null)
  21539. {
  21540. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21541. return $instance->latest($column);
  21542. }
  21543. /**
  21544. * Add an "order by" clause for a timestamp to the query.
  21545. *
  21546. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21547. * @return \Illuminate\Database\Eloquent\Builder<static>
  21548. * @static
  21549. */
  21550. public static function oldest($column = null)
  21551. {
  21552. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21553. return $instance->oldest($column);
  21554. }
  21555. /**
  21556. * Create a collection of models from plain arrays.
  21557. *
  21558. * @param array $items
  21559. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21560. * @static
  21561. */
  21562. public static function hydrate($items)
  21563. {
  21564. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21565. return $instance->hydrate($items);
  21566. }
  21567. /**
  21568. * Insert into the database after merging the model's default attributes, setting timestamps, and casting values.
  21569. *
  21570. * @param array<int, array<string, mixed>> $values
  21571. * @return bool
  21572. * @static
  21573. */
  21574. public static function fillAndInsert($values)
  21575. {
  21576. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21577. return $instance->fillAndInsert($values);
  21578. }
  21579. /**
  21580. * Insert (ignoring errors) into the database after merging the model's default attributes, setting timestamps, and casting values.
  21581. *
  21582. * @param array<int, array<string, mixed>> $values
  21583. * @return int
  21584. * @static
  21585. */
  21586. public static function fillAndInsertOrIgnore($values)
  21587. {
  21588. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21589. return $instance->fillAndInsertOrIgnore($values);
  21590. }
  21591. /**
  21592. * Insert a record into the database and get its ID after merging the model's default attributes, setting timestamps, and casting values.
  21593. *
  21594. * @param array<string, mixed> $values
  21595. * @return int
  21596. * @static
  21597. */
  21598. public static function fillAndInsertGetId($values)
  21599. {
  21600. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21601. return $instance->fillAndInsertGetId($values);
  21602. }
  21603. /**
  21604. * Enrich the given values by merging in the model's default attributes, adding timestamps, and casting values.
  21605. *
  21606. * @param array<int, array<string, mixed>> $values
  21607. * @return array<int, array<string, mixed>>
  21608. * @static
  21609. */
  21610. public static function fillForInsert($values)
  21611. {
  21612. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21613. return $instance->fillForInsert($values);
  21614. }
  21615. /**
  21616. * Create a collection of models from a raw query.
  21617. *
  21618. * @param string $query
  21619. * @param array $bindings
  21620. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21621. * @static
  21622. */
  21623. public static function fromQuery($query, $bindings = [])
  21624. {
  21625. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21626. return $instance->fromQuery($query, $bindings);
  21627. }
  21628. /**
  21629. * Find a model by its primary key.
  21630. *
  21631. * @param mixed $id
  21632. * @param array|string $columns
  21633. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel|null)
  21634. * @static
  21635. */
  21636. public static function find($id, $columns = [])
  21637. {
  21638. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21639. return $instance->find($id, $columns);
  21640. }
  21641. /**
  21642. * Find a sole model by its primary key.
  21643. *
  21644. * @param mixed $id
  21645. * @param array|string $columns
  21646. * @return TModel
  21647. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21648. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21649. * @static
  21650. */
  21651. public static function findSole($id, $columns = [])
  21652. {
  21653. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21654. return $instance->findSole($id, $columns);
  21655. }
  21656. /**
  21657. * Find multiple models by their primary keys.
  21658. *
  21659. * @param \Illuminate\Contracts\Support\Arrayable|array $ids
  21660. * @param array|string $columns
  21661. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21662. * @static
  21663. */
  21664. public static function findMany($ids, $columns = [])
  21665. {
  21666. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21667. return $instance->findMany($ids, $columns);
  21668. }
  21669. /**
  21670. * Find a model by its primary key or throw an exception.
  21671. *
  21672. * @param mixed $id
  21673. * @param array|string $columns
  21674. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21675. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21676. * @static
  21677. */
  21678. public static function findOrFail($id, $columns = [])
  21679. {
  21680. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21681. return $instance->findOrFail($id, $columns);
  21682. }
  21683. /**
  21684. * Find a model by its primary key or return fresh model instance.
  21685. *
  21686. * @param mixed $id
  21687. * @param array|string $columns
  21688. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21689. * @static
  21690. */
  21691. public static function findOrNew($id, $columns = [])
  21692. {
  21693. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21694. return $instance->findOrNew($id, $columns);
  21695. }
  21696. /**
  21697. * Find a model by its primary key or call a callback.
  21698. *
  21699. * @template TValue
  21700. * @param mixed $id
  21701. * @param (\Closure(): TValue)|list<string>|string $columns
  21702. * @param (\Closure(): TValue)|null $callback
  21703. * @return ( $id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>)
  21704. * ? \Illuminate\Database\Eloquent\Collection<int, TModel>
  21705. * : TModel|TValue
  21706. * )
  21707. * @static
  21708. */
  21709. public static function findOr($id, $columns = [], $callback = null)
  21710. {
  21711. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21712. return $instance->findOr($id, $columns, $callback);
  21713. }
  21714. /**
  21715. * Get the first record matching the attributes or instantiate it.
  21716. *
  21717. * @param array $attributes
  21718. * @param array $values
  21719. * @return TModel
  21720. * @static
  21721. */
  21722. public static function firstOrNew($attributes = [], $values = [])
  21723. {
  21724. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21725. return $instance->firstOrNew($attributes, $values);
  21726. }
  21727. /**
  21728. * Get the first record matching the attributes. If the record is not found, create it.
  21729. *
  21730. * @param array $attributes
  21731. * @param array $values
  21732. * @return TModel
  21733. * @static
  21734. */
  21735. public static function firstOrCreate($attributes = [], $values = [])
  21736. {
  21737. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21738. return $instance->firstOrCreate($attributes, $values);
  21739. }
  21740. /**
  21741. * Attempt to create the record. If a unique constraint violation occurs, attempt to find the matching record.
  21742. *
  21743. * @param array $attributes
  21744. * @param array $values
  21745. * @return TModel
  21746. * @static
  21747. */
  21748. public static function createOrFirst($attributes = [], $values = [])
  21749. {
  21750. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21751. return $instance->createOrFirst($attributes, $values);
  21752. }
  21753. /**
  21754. * Create or update a record matching the attributes, and fill it with values.
  21755. *
  21756. * @param array $attributes
  21757. * @param array $values
  21758. * @return TModel
  21759. * @static
  21760. */
  21761. public static function updateOrCreate($attributes, $values = [])
  21762. {
  21763. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21764. return $instance->updateOrCreate($attributes, $values);
  21765. }
  21766. /**
  21767. * Create a record matching the attributes, or increment the existing record.
  21768. *
  21769. * @param array $attributes
  21770. * @param string $column
  21771. * @param int|float $default
  21772. * @param int|float $step
  21773. * @param array $extra
  21774. * @return TModel
  21775. * @static
  21776. */
  21777. public static function incrementOrCreate($attributes, $column = 'count', $default = 1, $step = 1, $extra = [])
  21778. {
  21779. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21780. return $instance->incrementOrCreate($attributes, $column, $default, $step, $extra);
  21781. }
  21782. /**
  21783. * Execute the query and get the first result or throw an exception.
  21784. *
  21785. * @param array|string $columns
  21786. * @return TModel
  21787. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21788. * @static
  21789. */
  21790. public static function firstOrFail($columns = [])
  21791. {
  21792. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21793. return $instance->firstOrFail($columns);
  21794. }
  21795. /**
  21796. * Execute the query and get the first result or call a callback.
  21797. *
  21798. * @template TValue
  21799. * @param (\Closure(): TValue)|list<string> $columns
  21800. * @param (\Closure(): TValue)|null $callback
  21801. * @return TModel|TValue
  21802. * @static
  21803. */
  21804. public static function firstOr($columns = [], $callback = null)
  21805. {
  21806. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21807. return $instance->firstOr($columns, $callback);
  21808. }
  21809. /**
  21810. * Execute the query and get the first result if it's the sole matching record.
  21811. *
  21812. * @param array|string $columns
  21813. * @return TModel
  21814. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21815. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21816. * @static
  21817. */
  21818. public static function sole($columns = [])
  21819. {
  21820. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21821. return $instance->sole($columns);
  21822. }
  21823. /**
  21824. * Get a single column's value from the first result of a query.
  21825. *
  21826. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21827. * @return mixed
  21828. * @static
  21829. */
  21830. public static function value($column)
  21831. {
  21832. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21833. return $instance->value($column);
  21834. }
  21835. /**
  21836. * Get a single column's value from the first result of a query if it's the sole matching record.
  21837. *
  21838. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21839. * @return mixed
  21840. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21841. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21842. * @static
  21843. */
  21844. public static function soleValue($column)
  21845. {
  21846. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21847. return $instance->soleValue($column);
  21848. }
  21849. /**
  21850. * Get a single column's value from the first result of the query or throw an exception.
  21851. *
  21852. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21853. * @return mixed
  21854. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21855. * @static
  21856. */
  21857. public static function valueOrFail($column)
  21858. {
  21859. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21860. return $instance->valueOrFail($column);
  21861. }
  21862. /**
  21863. * Execute the query as a "select" statement.
  21864. *
  21865. * @param array|string $columns
  21866. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21867. * @static
  21868. */
  21869. public static function get($columns = [])
  21870. {
  21871. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21872. return $instance->get($columns);
  21873. }
  21874. /**
  21875. * Get the hydrated models without eager loading.
  21876. *
  21877. * @param array|string $columns
  21878. * @return array<int, TModel>
  21879. * @static
  21880. */
  21881. public static function getModels($columns = [])
  21882. {
  21883. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21884. return $instance->getModels($columns);
  21885. }
  21886. /**
  21887. * Eager load the relationships for the models.
  21888. *
  21889. * @param array<int, TModel> $models
  21890. * @return array<int, TModel>
  21891. * @static
  21892. */
  21893. public static function eagerLoadRelations($models)
  21894. {
  21895. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21896. return $instance->eagerLoadRelations($models);
  21897. }
  21898. /**
  21899. * Register a closure to be invoked after the query is executed.
  21900. *
  21901. * @param \Closure $callback
  21902. * @return \Illuminate\Database\Eloquent\Builder<static>
  21903. * @static
  21904. */
  21905. public static function afterQuery($callback)
  21906. {
  21907. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21908. return $instance->afterQuery($callback);
  21909. }
  21910. /**
  21911. * Invoke the "after query" modification callbacks.
  21912. *
  21913. * @param mixed $result
  21914. * @return mixed
  21915. * @static
  21916. */
  21917. public static function applyAfterQueryCallbacks($result)
  21918. {
  21919. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21920. return $instance->applyAfterQueryCallbacks($result);
  21921. }
  21922. /**
  21923. * Get a lazy collection for the given query.
  21924. *
  21925. * @return \Illuminate\Support\LazyCollection<int, TModel>
  21926. * @static
  21927. */
  21928. public static function cursor()
  21929. {
  21930. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21931. return $instance->cursor();
  21932. }
  21933. /**
  21934. * Get a collection with the values of a given column.
  21935. *
  21936. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21937. * @param string|null $key
  21938. * @return \Illuminate\Support\Collection<array-key, mixed>
  21939. * @static
  21940. */
  21941. public static function pluck($column, $key = null)
  21942. {
  21943. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21944. return $instance->pluck($column, $key);
  21945. }
  21946. /**
  21947. * Paginate the given query.
  21948. *
  21949. * @param int|null|\Closure $perPage
  21950. * @param array|string $columns
  21951. * @param string $pageName
  21952. * @param int|null $page
  21953. * @param \Closure|int|null $total
  21954. * @return \Illuminate\Pagination\LengthAwarePaginator
  21955. * @throws \InvalidArgumentException
  21956. * @static
  21957. */
  21958. public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null, $total = null)
  21959. {
  21960. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21961. return $instance->paginate($perPage, $columns, $pageName, $page, $total);
  21962. }
  21963. /**
  21964. * Paginate the given query into a simple paginator.
  21965. *
  21966. * @param int|null $perPage
  21967. * @param array|string $columns
  21968. * @param string $pageName
  21969. * @param int|null $page
  21970. * @return \Illuminate\Contracts\Pagination\Paginator
  21971. * @static
  21972. */
  21973. public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null)
  21974. {
  21975. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21976. return $instance->simplePaginate($perPage, $columns, $pageName, $page);
  21977. }
  21978. /**
  21979. * Paginate the given query into a cursor paginator.
  21980. *
  21981. * @param int|null $perPage
  21982. * @param array|string $columns
  21983. * @param string $cursorName
  21984. * @param \Illuminate\Pagination\Cursor|string|null $cursor
  21985. * @return \Illuminate\Contracts\Pagination\CursorPaginator
  21986. * @static
  21987. */
  21988. public static function cursorPaginate($perPage = null, $columns = [], $cursorName = 'cursor', $cursor = null)
  21989. {
  21990. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21991. return $instance->cursorPaginate($perPage, $columns, $cursorName, $cursor);
  21992. }
  21993. /**
  21994. * Save a new model and return the instance.
  21995. *
  21996. * @param array $attributes
  21997. * @return TModel
  21998. * @static
  21999. */
  22000. public static function create($attributes = [])
  22001. {
  22002. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22003. return $instance->create($attributes);
  22004. }
  22005. /**
  22006. * Save a new model and return the instance without raising model events.
  22007. *
  22008. * @param array $attributes
  22009. * @return TModel
  22010. * @static
  22011. */
  22012. public static function createQuietly($attributes = [])
  22013. {
  22014. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22015. return $instance->createQuietly($attributes);
  22016. }
  22017. /**
  22018. * Save a new model and return the instance. Allow mass-assignment.
  22019. *
  22020. * @param array $attributes
  22021. * @return TModel
  22022. * @static
  22023. */
  22024. public static function forceCreate($attributes)
  22025. {
  22026. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22027. return $instance->forceCreate($attributes);
  22028. }
  22029. /**
  22030. * Save a new model instance with mass assignment without raising model events.
  22031. *
  22032. * @param array $attributes
  22033. * @return TModel
  22034. * @static
  22035. */
  22036. public static function forceCreateQuietly($attributes = [])
  22037. {
  22038. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22039. return $instance->forceCreateQuietly($attributes);
  22040. }
  22041. /**
  22042. * Insert new records or update the existing ones.
  22043. *
  22044. * @param array $values
  22045. * @param array|string $uniqueBy
  22046. * @param array|null $update
  22047. * @return int
  22048. * @static
  22049. */
  22050. public static function upsert($values, $uniqueBy, $update = null)
  22051. {
  22052. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22053. return $instance->upsert($values, $uniqueBy, $update);
  22054. }
  22055. /**
  22056. * Register a replacement for the default delete function.
  22057. *
  22058. * @param \Closure $callback
  22059. * @return void
  22060. * @static
  22061. */
  22062. public static function onDelete($callback)
  22063. {
  22064. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22065. $instance->onDelete($callback);
  22066. }
  22067. /**
  22068. * Call the given local model scopes.
  22069. *
  22070. * @param array|string $scopes
  22071. * @return static|mixed
  22072. * @static
  22073. */
  22074. public static function scopes($scopes)
  22075. {
  22076. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22077. return $instance->scopes($scopes);
  22078. }
  22079. /**
  22080. * Apply the scopes to the Eloquent builder instance and return it.
  22081. *
  22082. * @return static
  22083. * @static
  22084. */
  22085. public static function applyScopes()
  22086. {
  22087. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22088. return $instance->applyScopes();
  22089. }
  22090. /**
  22091. * Prevent the specified relations from being eager loaded.
  22092. *
  22093. * @param mixed $relations
  22094. * @return \Illuminate\Database\Eloquent\Builder<static>
  22095. * @static
  22096. */
  22097. public static function without($relations)
  22098. {
  22099. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22100. return $instance->without($relations);
  22101. }
  22102. /**
  22103. * Set the relationships that should be eager loaded while removing any previously added eager loading specifications.
  22104. *
  22105. * @param array<array-key, array|(\Closure(\Illuminate\Database\Eloquent\Relations\Relation<*,*,*>): mixed)|string>|string $relations
  22106. * @return \Illuminate\Database\Eloquent\Builder<static>
  22107. * @static
  22108. */
  22109. public static function withOnly($relations)
  22110. {
  22111. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22112. return $instance->withOnly($relations);
  22113. }
  22114. /**
  22115. * Create a new instance of the model being queried.
  22116. *
  22117. * @param array $attributes
  22118. * @return TModel
  22119. * @static
  22120. */
  22121. public static function newModelInstance($attributes = [])
  22122. {
  22123. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22124. return $instance->newModelInstance($attributes);
  22125. }
  22126. /**
  22127. * Specify attributes that should be added to any new models created by this builder.
  22128. *
  22129. * The given key / value pairs will also be added as where conditions to the query.
  22130. *
  22131. * @param \Illuminate\Contracts\Database\Query\Expression|array|string $attributes
  22132. * @param mixed $value
  22133. * @param bool $asConditions
  22134. * @return \Illuminate\Database\Eloquent\Builder<static>
  22135. * @static
  22136. */
  22137. public static function withAttributes($attributes, $value = null, $asConditions = true)
  22138. {
  22139. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22140. return $instance->withAttributes($attributes, $value, $asConditions);
  22141. }
  22142. /**
  22143. * Apply query-time casts to the model instance.
  22144. *
  22145. * @param array $casts
  22146. * @return \Illuminate\Database\Eloquent\Builder<static>
  22147. * @static
  22148. */
  22149. public static function withCasts($casts)
  22150. {
  22151. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22152. return $instance->withCasts($casts);
  22153. }
  22154. /**
  22155. * Execute the given Closure within a transaction savepoint if needed.
  22156. *
  22157. * @template TModelValue
  22158. * @param \Closure(): TModelValue $scope
  22159. * @return TModelValue
  22160. * @static
  22161. */
  22162. public static function withSavepointIfNeeded($scope)
  22163. {
  22164. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22165. return $instance->withSavepointIfNeeded($scope);
  22166. }
  22167. /**
  22168. * Get the underlying query builder instance.
  22169. *
  22170. * @return \Illuminate\Database\Query\Builder
  22171. * @static
  22172. */
  22173. public static function getQuery()
  22174. {
  22175. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22176. return $instance->getQuery();
  22177. }
  22178. /**
  22179. * Set the underlying query builder instance.
  22180. *
  22181. * @param \Illuminate\Database\Query\Builder $query
  22182. * @return \Illuminate\Database\Eloquent\Builder<static>
  22183. * @static
  22184. */
  22185. public static function setQuery($query)
  22186. {
  22187. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22188. return $instance->setQuery($query);
  22189. }
  22190. /**
  22191. * Get a base query builder instance.
  22192. *
  22193. * @return \Illuminate\Database\Query\Builder
  22194. * @static
  22195. */
  22196. public static function toBase()
  22197. {
  22198. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22199. return $instance->toBase();
  22200. }
  22201. /**
  22202. * Get the relationships being eagerly loaded.
  22203. *
  22204. * @return array
  22205. * @static
  22206. */
  22207. public static function getEagerLoads()
  22208. {
  22209. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22210. return $instance->getEagerLoads();
  22211. }
  22212. /**
  22213. * Set the relationships being eagerly loaded.
  22214. *
  22215. * @param array $eagerLoad
  22216. * @return \Illuminate\Database\Eloquent\Builder<static>
  22217. * @static
  22218. */
  22219. public static function setEagerLoads($eagerLoad)
  22220. {
  22221. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22222. return $instance->setEagerLoads($eagerLoad);
  22223. }
  22224. /**
  22225. * Indicate that the given relationships should not be eagerly loaded.
  22226. *
  22227. * @param array $relations
  22228. * @return \Illuminate\Database\Eloquent\Builder<static>
  22229. * @static
  22230. */
  22231. public static function withoutEagerLoad($relations)
  22232. {
  22233. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22234. return $instance->withoutEagerLoad($relations);
  22235. }
  22236. /**
  22237. * Flush the relationships being eagerly loaded.
  22238. *
  22239. * @return \Illuminate\Database\Eloquent\Builder<static>
  22240. * @static
  22241. */
  22242. public static function withoutEagerLoads()
  22243. {
  22244. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22245. return $instance->withoutEagerLoads();
  22246. }
  22247. /**
  22248. * Get the "limit" value from the query or null if it's not set.
  22249. *
  22250. * @return mixed
  22251. * @static
  22252. */
  22253. public static function getLimit()
  22254. {
  22255. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22256. return $instance->getLimit();
  22257. }
  22258. /**
  22259. * Get the "offset" value from the query or null if it's not set.
  22260. *
  22261. * @return mixed
  22262. * @static
  22263. */
  22264. public static function getOffset()
  22265. {
  22266. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22267. return $instance->getOffset();
  22268. }
  22269. /**
  22270. * Get the model instance being queried.
  22271. *
  22272. * @return TModel
  22273. * @static
  22274. */
  22275. public static function getModel()
  22276. {
  22277. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22278. return $instance->getModel();
  22279. }
  22280. /**
  22281. * Set a model instance for the model being queried.
  22282. *
  22283. * @template TModelNew of \Illuminate\Database\Eloquent\Model
  22284. * @param TModelNew $model
  22285. * @return static<TModelNew>
  22286. * @static
  22287. */
  22288. public static function setModel($model)
  22289. {
  22290. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22291. return $instance->setModel($model);
  22292. }
  22293. /**
  22294. * Get the given macro by name.
  22295. *
  22296. * @param string $name
  22297. * @return \Closure
  22298. * @static
  22299. */
  22300. public static function getMacro($name)
  22301. {
  22302. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22303. return $instance->getMacro($name);
  22304. }
  22305. /**
  22306. * Checks if a macro is registered.
  22307. *
  22308. * @param string $name
  22309. * @return bool
  22310. * @static
  22311. */
  22312. public static function hasMacro($name)
  22313. {
  22314. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22315. return $instance->hasMacro($name);
  22316. }
  22317. /**
  22318. * Get the given global macro by name.
  22319. *
  22320. * @param string $name
  22321. * @return \Closure
  22322. * @static
  22323. */
  22324. public static function getGlobalMacro($name)
  22325. {
  22326. return \Illuminate\Database\Eloquent\Builder::getGlobalMacro($name);
  22327. }
  22328. /**
  22329. * Checks if a global macro is registered.
  22330. *
  22331. * @param string $name
  22332. * @return bool
  22333. * @static
  22334. */
  22335. public static function hasGlobalMacro($name)
  22336. {
  22337. return \Illuminate\Database\Eloquent\Builder::hasGlobalMacro($name);
  22338. }
  22339. /**
  22340. * Clone the Eloquent query builder.
  22341. *
  22342. * @return static
  22343. * @static
  22344. */
  22345. public static function clone()
  22346. {
  22347. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22348. return $instance->clone();
  22349. }
  22350. /**
  22351. * Register a closure to be invoked on a clone.
  22352. *
  22353. * @param \Closure $callback
  22354. * @return \Illuminate\Database\Eloquent\Builder<static>
  22355. * @static
  22356. */
  22357. public static function onClone($callback)
  22358. {
  22359. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22360. return $instance->onClone($callback);
  22361. }
  22362. /**
  22363. * Chunk the results of the query.
  22364. *
  22365. * @param int $count
  22366. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22367. * @return bool
  22368. * @static
  22369. */
  22370. public static function chunk($count, $callback)
  22371. {
  22372. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22373. return $instance->chunk($count, $callback);
  22374. }
  22375. /**
  22376. * Run a map over each item while chunking.
  22377. *
  22378. * @template TReturn
  22379. * @param callable(TValue): TReturn $callback
  22380. * @param int $count
  22381. * @return \Illuminate\Support\Collection<int, TReturn>
  22382. * @static
  22383. */
  22384. public static function chunkMap($callback, $count = 1000)
  22385. {
  22386. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22387. return $instance->chunkMap($callback, $count);
  22388. }
  22389. /**
  22390. * Execute a callback over each item while chunking.
  22391. *
  22392. * @param callable(TValue, int): mixed $callback
  22393. * @param int $count
  22394. * @return bool
  22395. * @throws \RuntimeException
  22396. * @static
  22397. */
  22398. public static function each($callback, $count = 1000)
  22399. {
  22400. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22401. return $instance->each($callback, $count);
  22402. }
  22403. /**
  22404. * Chunk the results of a query by comparing IDs.
  22405. *
  22406. * @param int $count
  22407. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22408. * @param string|null $column
  22409. * @param string|null $alias
  22410. * @return bool
  22411. * @static
  22412. */
  22413. public static function chunkById($count, $callback, $column = null, $alias = null)
  22414. {
  22415. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22416. return $instance->chunkById($count, $callback, $column, $alias);
  22417. }
  22418. /**
  22419. * Chunk the results of a query by comparing IDs in descending order.
  22420. *
  22421. * @param int $count
  22422. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22423. * @param string|null $column
  22424. * @param string|null $alias
  22425. * @return bool
  22426. * @static
  22427. */
  22428. public static function chunkByIdDesc($count, $callback, $column = null, $alias = null)
  22429. {
  22430. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22431. return $instance->chunkByIdDesc($count, $callback, $column, $alias);
  22432. }
  22433. /**
  22434. * Chunk the results of a query by comparing IDs in a given order.
  22435. *
  22436. * @param int $count
  22437. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22438. * @param string|null $column
  22439. * @param string|null $alias
  22440. * @param bool $descending
  22441. * @return bool
  22442. * @throws \RuntimeException
  22443. * @static
  22444. */
  22445. public static function orderedChunkById($count, $callback, $column = null, $alias = null, $descending = false)
  22446. {
  22447. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22448. return $instance->orderedChunkById($count, $callback, $column, $alias, $descending);
  22449. }
  22450. /**
  22451. * Execute a callback over each item while chunking by ID.
  22452. *
  22453. * @param callable(TValue, int): mixed $callback
  22454. * @param int $count
  22455. * @param string|null $column
  22456. * @param string|null $alias
  22457. * @return bool
  22458. * @static
  22459. */
  22460. public static function eachById($callback, $count = 1000, $column = null, $alias = null)
  22461. {
  22462. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22463. return $instance->eachById($callback, $count, $column, $alias);
  22464. }
  22465. /**
  22466. * Query lazily, by chunks of the given size.
  22467. *
  22468. * @param int $chunkSize
  22469. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22470. * @throws \InvalidArgumentException
  22471. * @static
  22472. */
  22473. public static function lazy($chunkSize = 1000)
  22474. {
  22475. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22476. return $instance->lazy($chunkSize);
  22477. }
  22478. /**
  22479. * Query lazily, by chunking the results of a query by comparing IDs.
  22480. *
  22481. * @param int $chunkSize
  22482. * @param string|null $column
  22483. * @param string|null $alias
  22484. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22485. * @throws \InvalidArgumentException
  22486. * @static
  22487. */
  22488. public static function lazyById($chunkSize = 1000, $column = null, $alias = null)
  22489. {
  22490. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22491. return $instance->lazyById($chunkSize, $column, $alias);
  22492. }
  22493. /**
  22494. * Query lazily, by chunking the results of a query by comparing IDs in descending order.
  22495. *
  22496. * @param int $chunkSize
  22497. * @param string|null $column
  22498. * @param string|null $alias
  22499. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22500. * @throws \InvalidArgumentException
  22501. * @static
  22502. */
  22503. public static function lazyByIdDesc($chunkSize = 1000, $column = null, $alias = null)
  22504. {
  22505. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22506. return $instance->lazyByIdDesc($chunkSize, $column, $alias);
  22507. }
  22508. /**
  22509. * Execute the query and get the first result.
  22510. *
  22511. * @param array|string $columns
  22512. * @return TValue|null
  22513. * @static
  22514. */
  22515. public static function first($columns = [])
  22516. {
  22517. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22518. return $instance->first($columns);
  22519. }
  22520. /**
  22521. * Execute the query and get the first result if it's the sole matching record.
  22522. *
  22523. * @param array|string $columns
  22524. * @return TValue
  22525. * @throws \Illuminate\Database\RecordsNotFoundException
  22526. * @throws \Illuminate\Database\MultipleRecordsFoundException
  22527. * @static
  22528. */
  22529. public static function baseSole($columns = [])
  22530. {
  22531. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22532. return $instance->baseSole($columns);
  22533. }
  22534. /**
  22535. * Pass the query to a given callback and then return it.
  22536. *
  22537. * @param callable($this): mixed $callback
  22538. * @return \Illuminate\Database\Eloquent\Builder<static>
  22539. * @static
  22540. */
  22541. public static function tap($callback)
  22542. {
  22543. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22544. return $instance->tap($callback);
  22545. }
  22546. /**
  22547. * Pass the query to a given callback and return the result.
  22548. *
  22549. * @template TReturn
  22550. * @param (callable($this): TReturn) $callback
  22551. * @return (TReturn is null|void ? $this : TReturn)
  22552. * @static
  22553. */
  22554. public static function pipe($callback)
  22555. {
  22556. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22557. return $instance->pipe($callback);
  22558. }
  22559. /**
  22560. * Apply the callback if the given "value" is (or resolves to) truthy.
  22561. *
  22562. * @template TWhenParameter
  22563. * @template TWhenReturnType
  22564. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  22565. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  22566. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  22567. * @return $this|TWhenReturnType
  22568. * @static
  22569. */
  22570. public static function when($value = null, $callback = null, $default = null)
  22571. {
  22572. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22573. return $instance->when($value, $callback, $default);
  22574. }
  22575. /**
  22576. * Apply the callback if the given "value" is (or resolves to) falsy.
  22577. *
  22578. * @template TUnlessParameter
  22579. * @template TUnlessReturnType
  22580. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  22581. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  22582. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  22583. * @return $this|TUnlessReturnType
  22584. * @static
  22585. */
  22586. public static function unless($value = null, $callback = null, $default = null)
  22587. {
  22588. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22589. return $instance->unless($value, $callback, $default);
  22590. }
  22591. /**
  22592. * Add a relationship count / exists condition to the query.
  22593. *
  22594. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22595. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22596. * @param string $operator
  22597. * @param int $count
  22598. * @param string $boolean
  22599. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22600. * @return \Illuminate\Database\Eloquent\Builder<static>
  22601. * @throws \RuntimeException
  22602. * @static
  22603. */
  22604. public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22605. {
  22606. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22607. return $instance->has($relation, $operator, $count, $boolean, $callback);
  22608. }
  22609. /**
  22610. * Add a relationship count / exists condition to the query with an "or".
  22611. *
  22612. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22613. * @param string $operator
  22614. * @param int $count
  22615. * @return \Illuminate\Database\Eloquent\Builder<static>
  22616. * @static
  22617. */
  22618. public static function orHas($relation, $operator = '>=', $count = 1)
  22619. {
  22620. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22621. return $instance->orHas($relation, $operator, $count);
  22622. }
  22623. /**
  22624. * Add a relationship count / exists condition to the query.
  22625. *
  22626. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22627. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22628. * @param string $boolean
  22629. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22630. * @return \Illuminate\Database\Eloquent\Builder<static>
  22631. * @static
  22632. */
  22633. public static function doesntHave($relation, $boolean = 'and', $callback = null)
  22634. {
  22635. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22636. return $instance->doesntHave($relation, $boolean, $callback);
  22637. }
  22638. /**
  22639. * Add a relationship count / exists condition to the query with an "or".
  22640. *
  22641. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22642. * @return \Illuminate\Database\Eloquent\Builder<static>
  22643. * @static
  22644. */
  22645. public static function orDoesntHave($relation)
  22646. {
  22647. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22648. return $instance->orDoesntHave($relation);
  22649. }
  22650. /**
  22651. * Add a relationship count / exists condition to the query with where clauses.
  22652. *
  22653. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22654. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22655. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22656. * @param string $operator
  22657. * @param int $count
  22658. * @return \Illuminate\Database\Eloquent\Builder<static>
  22659. * @static
  22660. */
  22661. public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22662. {
  22663. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22664. return $instance->whereHas($relation, $callback, $operator, $count);
  22665. }
  22666. /**
  22667. * Add a relationship count / exists condition to the query with where clauses.
  22668. *
  22669. * Also load the relationship with the same condition.
  22670. *
  22671. * @param string $relation
  22672. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Database\Eloquent\Relations\Relation<*, *, *>): mixed)|null $callback
  22673. * @param string $operator
  22674. * @param int $count
  22675. * @return \Illuminate\Database\Eloquent\Builder<static>
  22676. * @static
  22677. */
  22678. public static function withWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22679. {
  22680. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22681. return $instance->withWhereHas($relation, $callback, $operator, $count);
  22682. }
  22683. /**
  22684. * Add a relationship count / exists condition to the query with where clauses and an "or".
  22685. *
  22686. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22687. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22688. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22689. * @param string $operator
  22690. * @param int $count
  22691. * @return \Illuminate\Database\Eloquent\Builder<static>
  22692. * @static
  22693. */
  22694. public static function orWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22695. {
  22696. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22697. return $instance->orWhereHas($relation, $callback, $operator, $count);
  22698. }
  22699. /**
  22700. * Add a relationship count / exists condition to the query with where clauses.
  22701. *
  22702. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22703. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22704. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22705. * @return \Illuminate\Database\Eloquent\Builder<static>
  22706. * @static
  22707. */
  22708. public static function whereDoesntHave($relation, $callback = null)
  22709. {
  22710. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22711. return $instance->whereDoesntHave($relation, $callback);
  22712. }
  22713. /**
  22714. * Add a relationship count / exists condition to the query with where clauses and an "or".
  22715. *
  22716. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22717. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22718. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22719. * @return \Illuminate\Database\Eloquent\Builder<static>
  22720. * @static
  22721. */
  22722. public static function orWhereDoesntHave($relation, $callback = null)
  22723. {
  22724. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22725. return $instance->orWhereDoesntHave($relation, $callback);
  22726. }
  22727. /**
  22728. * Add a polymorphic relationship count / exists condition to the query.
  22729. *
  22730. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22731. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22732. * @param string|array<int, string> $types
  22733. * @param string $operator
  22734. * @param int $count
  22735. * @param string $boolean
  22736. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22737. * @return \Illuminate\Database\Eloquent\Builder<static>
  22738. * @static
  22739. */
  22740. public static function hasMorph($relation, $types, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22741. {
  22742. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22743. return $instance->hasMorph($relation, $types, $operator, $count, $boolean, $callback);
  22744. }
  22745. /**
  22746. * Add a polymorphic relationship count / exists condition to the query with an "or".
  22747. *
  22748. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22749. * @param string|array<int, string> $types
  22750. * @param string $operator
  22751. * @param int $count
  22752. * @return \Illuminate\Database\Eloquent\Builder<static>
  22753. * @static
  22754. */
  22755. public static function orHasMorph($relation, $types, $operator = '>=', $count = 1)
  22756. {
  22757. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22758. return $instance->orHasMorph($relation, $types, $operator, $count);
  22759. }
  22760. /**
  22761. * Add a polymorphic relationship count / exists condition to the query.
  22762. *
  22763. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22764. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22765. * @param string|array<int, string> $types
  22766. * @param string $boolean
  22767. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22768. * @return \Illuminate\Database\Eloquent\Builder<static>
  22769. * @static
  22770. */
  22771. public static function doesntHaveMorph($relation, $types, $boolean = 'and', $callback = null)
  22772. {
  22773. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22774. return $instance->doesntHaveMorph($relation, $types, $boolean, $callback);
  22775. }
  22776. /**
  22777. * Add a polymorphic relationship count / exists condition to the query with an "or".
  22778. *
  22779. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22780. * @param string|array<int, string> $types
  22781. * @return \Illuminate\Database\Eloquent\Builder<static>
  22782. * @static
  22783. */
  22784. public static function orDoesntHaveMorph($relation, $types)
  22785. {
  22786. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22787. return $instance->orDoesntHaveMorph($relation, $types);
  22788. }
  22789. /**
  22790. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  22791. *
  22792. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22793. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22794. * @param string|array<int, string> $types
  22795. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22796. * @param string $operator
  22797. * @param int $count
  22798. * @return \Illuminate\Database\Eloquent\Builder<static>
  22799. * @static
  22800. */
  22801. public static function whereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  22802. {
  22803. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22804. return $instance->whereHasMorph($relation, $types, $callback, $operator, $count);
  22805. }
  22806. /**
  22807. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  22808. *
  22809. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22810. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22811. * @param string|array<int, string> $types
  22812. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22813. * @param string $operator
  22814. * @param int $count
  22815. * @return \Illuminate\Database\Eloquent\Builder<static>
  22816. * @static
  22817. */
  22818. public static function orWhereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  22819. {
  22820. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22821. return $instance->orWhereHasMorph($relation, $types, $callback, $operator, $count);
  22822. }
  22823. /**
  22824. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  22825. *
  22826. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22827. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22828. * @param string|array<int, string> $types
  22829. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22830. * @return \Illuminate\Database\Eloquent\Builder<static>
  22831. * @static
  22832. */
  22833. public static function whereDoesntHaveMorph($relation, $types, $callback = null)
  22834. {
  22835. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22836. return $instance->whereDoesntHaveMorph($relation, $types, $callback);
  22837. }
  22838. /**
  22839. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  22840. *
  22841. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22842. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22843. * @param string|array<int, string> $types
  22844. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22845. * @return \Illuminate\Database\Eloquent\Builder<static>
  22846. * @static
  22847. */
  22848. public static function orWhereDoesntHaveMorph($relation, $types, $callback = null)
  22849. {
  22850. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22851. return $instance->orWhereDoesntHaveMorph($relation, $types, $callback);
  22852. }
  22853. /**
  22854. * Add a basic where clause to a relationship query.
  22855. *
  22856. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22857. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22858. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22859. * @param mixed $operator
  22860. * @param mixed $value
  22861. * @return \Illuminate\Database\Eloquent\Builder<static>
  22862. * @static
  22863. */
  22864. public static function whereRelation($relation, $column, $operator = null, $value = null)
  22865. {
  22866. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22867. return $instance->whereRelation($relation, $column, $operator, $value);
  22868. }
  22869. /**
  22870. * Add a basic where clause to a relationship query and eager-load the relationship with the same conditions.
  22871. *
  22872. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22873. * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22874. * @param mixed $operator
  22875. * @param mixed $value
  22876. * @return \Illuminate\Database\Eloquent\Builder<static>
  22877. * @static
  22878. */
  22879. public static function withWhereRelation($relation, $column, $operator = null, $value = null)
  22880. {
  22881. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22882. return $instance->withWhereRelation($relation, $column, $operator, $value);
  22883. }
  22884. /**
  22885. * Add an "or where" clause to a relationship query.
  22886. *
  22887. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22888. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22889. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22890. * @param mixed $operator
  22891. * @param mixed $value
  22892. * @return \Illuminate\Database\Eloquent\Builder<static>
  22893. * @static
  22894. */
  22895. public static function orWhereRelation($relation, $column, $operator = null, $value = null)
  22896. {
  22897. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22898. return $instance->orWhereRelation($relation, $column, $operator, $value);
  22899. }
  22900. /**
  22901. * Add a basic count / exists condition to a relationship query.
  22902. *
  22903. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22904. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22905. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22906. * @param mixed $operator
  22907. * @param mixed $value
  22908. * @return \Illuminate\Database\Eloquent\Builder<static>
  22909. * @static
  22910. */
  22911. public static function whereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  22912. {
  22913. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22914. return $instance->whereDoesntHaveRelation($relation, $column, $operator, $value);
  22915. }
  22916. /**
  22917. * Add an "or where" clause to a relationship query.
  22918. *
  22919. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22920. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22921. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22922. * @param mixed $operator
  22923. * @param mixed $value
  22924. * @return \Illuminate\Database\Eloquent\Builder<static>
  22925. * @static
  22926. */
  22927. public static function orWhereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  22928. {
  22929. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22930. return $instance->orWhereDoesntHaveRelation($relation, $column, $operator, $value);
  22931. }
  22932. /**
  22933. * Add a polymorphic relationship condition to the query with a where clause.
  22934. *
  22935. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22936. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22937. * @param string|array<int, string> $types
  22938. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22939. * @param mixed $operator
  22940. * @param mixed $value
  22941. * @return \Illuminate\Database\Eloquent\Builder<static>
  22942. * @static
  22943. */
  22944. public static function whereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  22945. {
  22946. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22947. return $instance->whereMorphRelation($relation, $types, $column, $operator, $value);
  22948. }
  22949. /**
  22950. * Add a polymorphic relationship condition to the query with an "or where" clause.
  22951. *
  22952. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22953. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22954. * @param string|array<int, string> $types
  22955. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22956. * @param mixed $operator
  22957. * @param mixed $value
  22958. * @return \Illuminate\Database\Eloquent\Builder<static>
  22959. * @static
  22960. */
  22961. public static function orWhereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  22962. {
  22963. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22964. return $instance->orWhereMorphRelation($relation, $types, $column, $operator, $value);
  22965. }
  22966. /**
  22967. * Add a polymorphic relationship condition to the query with a doesn't have clause.
  22968. *
  22969. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22970. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22971. * @param string|array<int, string> $types
  22972. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22973. * @param mixed $operator
  22974. * @param mixed $value
  22975. * @return \Illuminate\Database\Eloquent\Builder<static>
  22976. * @static
  22977. */
  22978. public static function whereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  22979. {
  22980. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22981. return $instance->whereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  22982. }
  22983. /**
  22984. * Add a polymorphic relationship condition to the query with an "or doesn't have" clause.
  22985. *
  22986. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22987. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22988. * @param string|array<int, string> $types
  22989. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  22990. * @param mixed $operator
  22991. * @param mixed $value
  22992. * @return \Illuminate\Database\Eloquent\Builder<static>
  22993. * @static
  22994. */
  22995. public static function orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  22996. {
  22997. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22998. return $instance->orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  22999. }
  23000. /**
  23001. * Add a morph-to relationship condition to the query.
  23002. *
  23003. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  23004. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  23005. * @return \Illuminate\Database\Eloquent\Builder<static>
  23006. * @static
  23007. */
  23008. public static function whereMorphedTo($relation, $model, $boolean = 'and')
  23009. {
  23010. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23011. return $instance->whereMorphedTo($relation, $model, $boolean);
  23012. }
  23013. /**
  23014. * Add a not morph-to relationship condition to the query.
  23015. *
  23016. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  23017. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  23018. * @return \Illuminate\Database\Eloquent\Builder<static>
  23019. * @static
  23020. */
  23021. public static function whereNotMorphedTo($relation, $model, $boolean = 'and')
  23022. {
  23023. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23024. return $instance->whereNotMorphedTo($relation, $model, $boolean);
  23025. }
  23026. /**
  23027. * Add a morph-to relationship condition to the query with an "or where" clause.
  23028. *
  23029. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  23030. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  23031. * @return \Illuminate\Database\Eloquent\Builder<static>
  23032. * @static
  23033. */
  23034. public static function orWhereMorphedTo($relation, $model)
  23035. {
  23036. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23037. return $instance->orWhereMorphedTo($relation, $model);
  23038. }
  23039. /**
  23040. * Add a not morph-to relationship condition to the query with an "or where" clause.
  23041. *
  23042. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  23043. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  23044. * @return \Illuminate\Database\Eloquent\Builder<static>
  23045. * @static
  23046. */
  23047. public static function orWhereNotMorphedTo($relation, $model)
  23048. {
  23049. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23050. return $instance->orWhereNotMorphedTo($relation, $model);
  23051. }
  23052. /**
  23053. * Add a "belongs to" relationship where clause to the query.
  23054. *
  23055. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  23056. * @param string|null $relationshipName
  23057. * @param string $boolean
  23058. * @return \Illuminate\Database\Eloquent\Builder<static>
  23059. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  23060. * @static
  23061. */
  23062. public static function whereBelongsTo($related, $relationshipName = null, $boolean = 'and')
  23063. {
  23064. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23065. return $instance->whereBelongsTo($related, $relationshipName, $boolean);
  23066. }
  23067. /**
  23068. * Add a "BelongsTo" relationship with an "or where" clause to the query.
  23069. *
  23070. * @param \Illuminate\Database\Eloquent\Model $related
  23071. * @param string|null $relationshipName
  23072. * @return \Illuminate\Database\Eloquent\Builder<static>
  23073. * @throws \RuntimeException
  23074. * @static
  23075. */
  23076. public static function orWhereBelongsTo($related, $relationshipName = null)
  23077. {
  23078. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23079. return $instance->orWhereBelongsTo($related, $relationshipName);
  23080. }
  23081. /**
  23082. * Add a "belongs to many" relationship where clause to the query.
  23083. *
  23084. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  23085. * @param string|null $relationshipName
  23086. * @param string $boolean
  23087. * @return \Illuminate\Database\Eloquent\Builder<static>
  23088. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  23089. * @static
  23090. */
  23091. public static function whereAttachedTo($related, $relationshipName = null, $boolean = 'and')
  23092. {
  23093. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23094. return $instance->whereAttachedTo($related, $relationshipName, $boolean);
  23095. }
  23096. /**
  23097. * Add a "belongs to many" relationship with an "or where" clause to the query.
  23098. *
  23099. * @param \Illuminate\Database\Eloquent\Model $related
  23100. * @param string|null $relationshipName
  23101. * @return \Illuminate\Database\Eloquent\Builder<static>
  23102. * @throws \RuntimeException
  23103. * @static
  23104. */
  23105. public static function orWhereAttachedTo($related, $relationshipName = null)
  23106. {
  23107. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23108. return $instance->orWhereAttachedTo($related, $relationshipName);
  23109. }
  23110. /**
  23111. * Add subselect queries to include an aggregate value for a relationship.
  23112. *
  23113. * @param mixed $relations
  23114. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23115. * @param string $function
  23116. * @return \Illuminate\Database\Eloquent\Builder<static>
  23117. * @static
  23118. */
  23119. public static function withAggregate($relations, $column, $function = null)
  23120. {
  23121. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23122. return $instance->withAggregate($relations, $column, $function);
  23123. }
  23124. /**
  23125. * Add subselect queries to count the relations.
  23126. *
  23127. * @param mixed $relations
  23128. * @return \Illuminate\Database\Eloquent\Builder<static>
  23129. * @static
  23130. */
  23131. public static function withCount($relations)
  23132. {
  23133. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23134. return $instance->withCount($relations);
  23135. }
  23136. /**
  23137. * Add subselect queries to include the max of the relation's column.
  23138. *
  23139. * @param string|array $relation
  23140. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23141. * @return \Illuminate\Database\Eloquent\Builder<static>
  23142. * @static
  23143. */
  23144. public static function withMax($relation, $column)
  23145. {
  23146. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23147. return $instance->withMax($relation, $column);
  23148. }
  23149. /**
  23150. * Add subselect queries to include the min of the relation's column.
  23151. *
  23152. * @param string|array $relation
  23153. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23154. * @return \Illuminate\Database\Eloquent\Builder<static>
  23155. * @static
  23156. */
  23157. public static function withMin($relation, $column)
  23158. {
  23159. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23160. return $instance->withMin($relation, $column);
  23161. }
  23162. /**
  23163. * Add subselect queries to include the sum of the relation's column.
  23164. *
  23165. * @param string|array $relation
  23166. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23167. * @return \Illuminate\Database\Eloquent\Builder<static>
  23168. * @static
  23169. */
  23170. public static function withSum($relation, $column)
  23171. {
  23172. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23173. return $instance->withSum($relation, $column);
  23174. }
  23175. /**
  23176. * Add subselect queries to include the average of the relation's column.
  23177. *
  23178. * @param string|array $relation
  23179. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23180. * @return \Illuminate\Database\Eloquent\Builder<static>
  23181. * @static
  23182. */
  23183. public static function withAvg($relation, $column)
  23184. {
  23185. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23186. return $instance->withAvg($relation, $column);
  23187. }
  23188. /**
  23189. * Add subselect queries to include the existence of related models.
  23190. *
  23191. * @param string|array $relation
  23192. * @return \Illuminate\Database\Eloquent\Builder<static>
  23193. * @static
  23194. */
  23195. public static function withExists($relation)
  23196. {
  23197. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23198. return $instance->withExists($relation);
  23199. }
  23200. /**
  23201. * Merge the where constraints from another query to the current query.
  23202. *
  23203. * @param \Illuminate\Database\Eloquent\Builder<*> $from
  23204. * @return \Illuminate\Database\Eloquent\Builder<static>
  23205. * @static
  23206. */
  23207. public static function mergeConstraintsFrom($from)
  23208. {
  23209. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23210. return $instance->mergeConstraintsFrom($from);
  23211. }
  23212. /**
  23213. * Set the columns to be selected.
  23214. *
  23215. * @param mixed $columns
  23216. * @return \Illuminate\Database\Eloquent\Builder<static>
  23217. * @static
  23218. */
  23219. public static function select($columns = [])
  23220. {
  23221. /** @var \Illuminate\Database\Query\Builder $instance */
  23222. return $instance->select($columns);
  23223. }
  23224. /**
  23225. * Add a subselect expression to the query.
  23226. *
  23227. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23228. * @param string $as
  23229. * @return \Illuminate\Database\Eloquent\Builder<static>
  23230. * @throws \InvalidArgumentException
  23231. * @static
  23232. */
  23233. public static function selectSub($query, $as)
  23234. {
  23235. /** @var \Illuminate\Database\Query\Builder $instance */
  23236. return $instance->selectSub($query, $as);
  23237. }
  23238. /**
  23239. * Add a new "raw" select expression to the query.
  23240. *
  23241. * @param string $expression
  23242. * @return \Illuminate\Database\Eloquent\Builder<static>
  23243. * @static
  23244. */
  23245. public static function selectRaw($expression, $bindings = [])
  23246. {
  23247. /** @var \Illuminate\Database\Query\Builder $instance */
  23248. return $instance->selectRaw($expression, $bindings);
  23249. }
  23250. /**
  23251. * Makes "from" fetch from a subquery.
  23252. *
  23253. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23254. * @param string $as
  23255. * @return \Illuminate\Database\Eloquent\Builder<static>
  23256. * @throws \InvalidArgumentException
  23257. * @static
  23258. */
  23259. public static function fromSub($query, $as)
  23260. {
  23261. /** @var \Illuminate\Database\Query\Builder $instance */
  23262. return $instance->fromSub($query, $as);
  23263. }
  23264. /**
  23265. * Add a raw from clause to the query.
  23266. *
  23267. * @param string $expression
  23268. * @param mixed $bindings
  23269. * @return \Illuminate\Database\Eloquent\Builder<static>
  23270. * @static
  23271. */
  23272. public static function fromRaw($expression, $bindings = [])
  23273. {
  23274. /** @var \Illuminate\Database\Query\Builder $instance */
  23275. return $instance->fromRaw($expression, $bindings);
  23276. }
  23277. /**
  23278. * Add a new select column to the query.
  23279. *
  23280. * @param mixed $column
  23281. * @return \Illuminate\Database\Eloquent\Builder<static>
  23282. * @static
  23283. */
  23284. public static function addSelect($column)
  23285. {
  23286. /** @var \Illuminate\Database\Query\Builder $instance */
  23287. return $instance->addSelect($column);
  23288. }
  23289. /**
  23290. * Force the query to only return distinct results.
  23291. *
  23292. * @return \Illuminate\Database\Eloquent\Builder<static>
  23293. * @static
  23294. */
  23295. public static function distinct()
  23296. {
  23297. /** @var \Illuminate\Database\Query\Builder $instance */
  23298. return $instance->distinct();
  23299. }
  23300. /**
  23301. * Set the table which the query is targeting.
  23302. *
  23303. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $table
  23304. * @param string|null $as
  23305. * @return \Illuminate\Database\Eloquent\Builder<static>
  23306. * @static
  23307. */
  23308. public static function from($table, $as = null)
  23309. {
  23310. /** @var \Illuminate\Database\Query\Builder $instance */
  23311. return $instance->from($table, $as);
  23312. }
  23313. /**
  23314. * Add an index hint to suggest a query index.
  23315. *
  23316. * @param string $index
  23317. * @return \Illuminate\Database\Eloquent\Builder<static>
  23318. * @static
  23319. */
  23320. public static function useIndex($index)
  23321. {
  23322. /** @var \Illuminate\Database\Query\Builder $instance */
  23323. return $instance->useIndex($index);
  23324. }
  23325. /**
  23326. * Add an index hint to force a query index.
  23327. *
  23328. * @param string $index
  23329. * @return \Illuminate\Database\Eloquent\Builder<static>
  23330. * @static
  23331. */
  23332. public static function forceIndex($index)
  23333. {
  23334. /** @var \Illuminate\Database\Query\Builder $instance */
  23335. return $instance->forceIndex($index);
  23336. }
  23337. /**
  23338. * Add an index hint to ignore a query index.
  23339. *
  23340. * @param string $index
  23341. * @return \Illuminate\Database\Eloquent\Builder<static>
  23342. * @static
  23343. */
  23344. public static function ignoreIndex($index)
  23345. {
  23346. /** @var \Illuminate\Database\Query\Builder $instance */
  23347. return $instance->ignoreIndex($index);
  23348. }
  23349. /**
  23350. * Add a join clause to the query.
  23351. *
  23352. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23353. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23354. * @param string|null $operator
  23355. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23356. * @param string $type
  23357. * @param bool $where
  23358. * @return \Illuminate\Database\Eloquent\Builder<static>
  23359. * @static
  23360. */
  23361. public static function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23362. {
  23363. /** @var \Illuminate\Database\Query\Builder $instance */
  23364. return $instance->join($table, $first, $operator, $second, $type, $where);
  23365. }
  23366. /**
  23367. * Add a "join where" clause to the query.
  23368. *
  23369. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23370. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23371. * @param string $operator
  23372. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23373. * @param string $type
  23374. * @return \Illuminate\Database\Eloquent\Builder<static>
  23375. * @static
  23376. */
  23377. public static function joinWhere($table, $first, $operator, $second, $type = 'inner')
  23378. {
  23379. /** @var \Illuminate\Database\Query\Builder $instance */
  23380. return $instance->joinWhere($table, $first, $operator, $second, $type);
  23381. }
  23382. /**
  23383. * Add a subquery join clause to the query.
  23384. *
  23385. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23386. * @param string $as
  23387. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23388. * @param string|null $operator
  23389. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23390. * @param string $type
  23391. * @param bool $where
  23392. * @return \Illuminate\Database\Eloquent\Builder<static>
  23393. * @throws \InvalidArgumentException
  23394. * @static
  23395. */
  23396. public static function joinSub($query, $as, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23397. {
  23398. /** @var \Illuminate\Database\Query\Builder $instance */
  23399. return $instance->joinSub($query, $as, $first, $operator, $second, $type, $where);
  23400. }
  23401. /**
  23402. * Add a lateral join clause to the query.
  23403. *
  23404. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23405. * @return \Illuminate\Database\Eloquent\Builder<static>
  23406. * @static
  23407. */
  23408. public static function joinLateral($query, $as, $type = 'inner')
  23409. {
  23410. /** @var \Illuminate\Database\Query\Builder $instance */
  23411. return $instance->joinLateral($query, $as, $type);
  23412. }
  23413. /**
  23414. * Add a lateral left join to the query.
  23415. *
  23416. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23417. * @return \Illuminate\Database\Eloquent\Builder<static>
  23418. * @static
  23419. */
  23420. public static function leftJoinLateral($query, $as)
  23421. {
  23422. /** @var \Illuminate\Database\Query\Builder $instance */
  23423. return $instance->leftJoinLateral($query, $as);
  23424. }
  23425. /**
  23426. * Add a left join to the query.
  23427. *
  23428. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23429. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23430. * @param string|null $operator
  23431. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23432. * @return \Illuminate\Database\Eloquent\Builder<static>
  23433. * @static
  23434. */
  23435. public static function leftJoin($table, $first, $operator = null, $second = null)
  23436. {
  23437. /** @var \Illuminate\Database\Query\Builder $instance */
  23438. return $instance->leftJoin($table, $first, $operator, $second);
  23439. }
  23440. /**
  23441. * Add a "join where" clause to the query.
  23442. *
  23443. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23444. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23445. * @param string $operator
  23446. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23447. * @return \Illuminate\Database\Eloquent\Builder<static>
  23448. * @static
  23449. */
  23450. public static function leftJoinWhere($table, $first, $operator, $second)
  23451. {
  23452. /** @var \Illuminate\Database\Query\Builder $instance */
  23453. return $instance->leftJoinWhere($table, $first, $operator, $second);
  23454. }
  23455. /**
  23456. * Add a subquery left join to the query.
  23457. *
  23458. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23459. * @param string $as
  23460. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23461. * @param string|null $operator
  23462. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23463. * @return \Illuminate\Database\Eloquent\Builder<static>
  23464. * @static
  23465. */
  23466. public static function leftJoinSub($query, $as, $first, $operator = null, $second = null)
  23467. {
  23468. /** @var \Illuminate\Database\Query\Builder $instance */
  23469. return $instance->leftJoinSub($query, $as, $first, $operator, $second);
  23470. }
  23471. /**
  23472. * Add a right join to the query.
  23473. *
  23474. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23475. * @param \Closure|string $first
  23476. * @param string|null $operator
  23477. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23478. * @return \Illuminate\Database\Eloquent\Builder<static>
  23479. * @static
  23480. */
  23481. public static function rightJoin($table, $first, $operator = null, $second = null)
  23482. {
  23483. /** @var \Illuminate\Database\Query\Builder $instance */
  23484. return $instance->rightJoin($table, $first, $operator, $second);
  23485. }
  23486. /**
  23487. * Add a "right join where" clause to the query.
  23488. *
  23489. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23490. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23491. * @param string $operator
  23492. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23493. * @return \Illuminate\Database\Eloquent\Builder<static>
  23494. * @static
  23495. */
  23496. public static function rightJoinWhere($table, $first, $operator, $second)
  23497. {
  23498. /** @var \Illuminate\Database\Query\Builder $instance */
  23499. return $instance->rightJoinWhere($table, $first, $operator, $second);
  23500. }
  23501. /**
  23502. * Add a subquery right join to the query.
  23503. *
  23504. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23505. * @param string $as
  23506. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23507. * @param string|null $operator
  23508. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23509. * @return \Illuminate\Database\Eloquent\Builder<static>
  23510. * @static
  23511. */
  23512. public static function rightJoinSub($query, $as, $first, $operator = null, $second = null)
  23513. {
  23514. /** @var \Illuminate\Database\Query\Builder $instance */
  23515. return $instance->rightJoinSub($query, $as, $first, $operator, $second);
  23516. }
  23517. /**
  23518. * Add a "cross join" clause to the query.
  23519. *
  23520. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23521. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string|null $first
  23522. * @param string|null $operator
  23523. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23524. * @return \Illuminate\Database\Eloquent\Builder<static>
  23525. * @static
  23526. */
  23527. public static function crossJoin($table, $first = null, $operator = null, $second = null)
  23528. {
  23529. /** @var \Illuminate\Database\Query\Builder $instance */
  23530. return $instance->crossJoin($table, $first, $operator, $second);
  23531. }
  23532. /**
  23533. * Add a subquery cross join to the query.
  23534. *
  23535. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23536. * @param string $as
  23537. * @return \Illuminate\Database\Eloquent\Builder<static>
  23538. * @static
  23539. */
  23540. public static function crossJoinSub($query, $as)
  23541. {
  23542. /** @var \Illuminate\Database\Query\Builder $instance */
  23543. return $instance->crossJoinSub($query, $as);
  23544. }
  23545. /**
  23546. * Merge an array of where clauses and bindings.
  23547. *
  23548. * @param array $wheres
  23549. * @param array $bindings
  23550. * @return \Illuminate\Database\Eloquent\Builder<static>
  23551. * @static
  23552. */
  23553. public static function mergeWheres($wheres, $bindings)
  23554. {
  23555. /** @var \Illuminate\Database\Query\Builder $instance */
  23556. return $instance->mergeWheres($wheres, $bindings);
  23557. }
  23558. /**
  23559. * Prepare the value and operator for a where clause.
  23560. *
  23561. * @param string $value
  23562. * @param string $operator
  23563. * @param bool $useDefault
  23564. * @return array
  23565. * @throws \InvalidArgumentException
  23566. * @static
  23567. */
  23568. public static function prepareValueAndOperator($value, $operator, $useDefault = false)
  23569. {
  23570. /** @var \Illuminate\Database\Query\Builder $instance */
  23571. return $instance->prepareValueAndOperator($value, $operator, $useDefault);
  23572. }
  23573. /**
  23574. * Add a "where" clause comparing two columns to the query.
  23575. *
  23576. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23577. * @param string|null $operator
  23578. * @param string|null $second
  23579. * @param string|null $boolean
  23580. * @return \Illuminate\Database\Eloquent\Builder<static>
  23581. * @static
  23582. */
  23583. public static function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
  23584. {
  23585. /** @var \Illuminate\Database\Query\Builder $instance */
  23586. return $instance->whereColumn($first, $operator, $second, $boolean);
  23587. }
  23588. /**
  23589. * Add an "or where" clause comparing two columns to the query.
  23590. *
  23591. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23592. * @param string|null $operator
  23593. * @param string|null $second
  23594. * @return \Illuminate\Database\Eloquent\Builder<static>
  23595. * @static
  23596. */
  23597. public static function orWhereColumn($first, $operator = null, $second = null)
  23598. {
  23599. /** @var \Illuminate\Database\Query\Builder $instance */
  23600. return $instance->orWhereColumn($first, $operator, $second);
  23601. }
  23602. /**
  23603. * Add a raw where clause to the query.
  23604. *
  23605. * @param \Illuminate\Contracts\Database\Query\Expression|string $sql
  23606. * @param mixed $bindings
  23607. * @param string $boolean
  23608. * @return \Illuminate\Database\Eloquent\Builder<static>
  23609. * @static
  23610. */
  23611. public static function whereRaw($sql, $bindings = [], $boolean = 'and')
  23612. {
  23613. /** @var \Illuminate\Database\Query\Builder $instance */
  23614. return $instance->whereRaw($sql, $bindings, $boolean);
  23615. }
  23616. /**
  23617. * Add a raw or where clause to the query.
  23618. *
  23619. * @param string $sql
  23620. * @param mixed $bindings
  23621. * @return \Illuminate\Database\Eloquent\Builder<static>
  23622. * @static
  23623. */
  23624. public static function orWhereRaw($sql, $bindings = [])
  23625. {
  23626. /** @var \Illuminate\Database\Query\Builder $instance */
  23627. return $instance->orWhereRaw($sql, $bindings);
  23628. }
  23629. /**
  23630. * Add a "where like" clause to the query.
  23631. *
  23632. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23633. * @param string $value
  23634. * @param bool $caseSensitive
  23635. * @param string $boolean
  23636. * @param bool $not
  23637. * @return \Illuminate\Database\Eloquent\Builder<static>
  23638. * @static
  23639. */
  23640. public static function whereLike($column, $value, $caseSensitive = false, $boolean = 'and', $not = false)
  23641. {
  23642. /** @var \Illuminate\Database\Query\Builder $instance */
  23643. return $instance->whereLike($column, $value, $caseSensitive, $boolean, $not);
  23644. }
  23645. /**
  23646. * Add an "or where like" clause to the query.
  23647. *
  23648. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23649. * @param string $value
  23650. * @param bool $caseSensitive
  23651. * @return \Illuminate\Database\Eloquent\Builder<static>
  23652. * @static
  23653. */
  23654. public static function orWhereLike($column, $value, $caseSensitive = false)
  23655. {
  23656. /** @var \Illuminate\Database\Query\Builder $instance */
  23657. return $instance->orWhereLike($column, $value, $caseSensitive);
  23658. }
  23659. /**
  23660. * Add a "where not like" clause to the query.
  23661. *
  23662. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23663. * @param string $value
  23664. * @param bool $caseSensitive
  23665. * @param string $boolean
  23666. * @return \Illuminate\Database\Eloquent\Builder<static>
  23667. * @static
  23668. */
  23669. public static function whereNotLike($column, $value, $caseSensitive = false, $boolean = 'and')
  23670. {
  23671. /** @var \Illuminate\Database\Query\Builder $instance */
  23672. return $instance->whereNotLike($column, $value, $caseSensitive, $boolean);
  23673. }
  23674. /**
  23675. * Add an "or where not like" clause to the query.
  23676. *
  23677. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23678. * @param string $value
  23679. * @param bool $caseSensitive
  23680. * @return \Illuminate\Database\Eloquent\Builder<static>
  23681. * @static
  23682. */
  23683. public static function orWhereNotLike($column, $value, $caseSensitive = false)
  23684. {
  23685. /** @var \Illuminate\Database\Query\Builder $instance */
  23686. return $instance->orWhereNotLike($column, $value, $caseSensitive);
  23687. }
  23688. /**
  23689. * Add a "where in" clause to the query.
  23690. *
  23691. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23692. * @param mixed $values
  23693. * @param string $boolean
  23694. * @param bool $not
  23695. * @return \Illuminate\Database\Eloquent\Builder<static>
  23696. * @static
  23697. */
  23698. public static function whereIn($column, $values, $boolean = 'and', $not = false)
  23699. {
  23700. /** @var \Illuminate\Database\Query\Builder $instance */
  23701. return $instance->whereIn($column, $values, $boolean, $not);
  23702. }
  23703. /**
  23704. * Add an "or where in" clause to the query.
  23705. *
  23706. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23707. * @param mixed $values
  23708. * @return \Illuminate\Database\Eloquent\Builder<static>
  23709. * @static
  23710. */
  23711. public static function orWhereIn($column, $values)
  23712. {
  23713. /** @var \Illuminate\Database\Query\Builder $instance */
  23714. return $instance->orWhereIn($column, $values);
  23715. }
  23716. /**
  23717. * Add a "where not in" clause to the query.
  23718. *
  23719. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23720. * @param mixed $values
  23721. * @param string $boolean
  23722. * @return \Illuminate\Database\Eloquent\Builder<static>
  23723. * @static
  23724. */
  23725. public static function whereNotIn($column, $values, $boolean = 'and')
  23726. {
  23727. /** @var \Illuminate\Database\Query\Builder $instance */
  23728. return $instance->whereNotIn($column, $values, $boolean);
  23729. }
  23730. /**
  23731. * Add an "or where not in" clause to the query.
  23732. *
  23733. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23734. * @param mixed $values
  23735. * @return \Illuminate\Database\Eloquent\Builder<static>
  23736. * @static
  23737. */
  23738. public static function orWhereNotIn($column, $values)
  23739. {
  23740. /** @var \Illuminate\Database\Query\Builder $instance */
  23741. return $instance->orWhereNotIn($column, $values);
  23742. }
  23743. /**
  23744. * Add a "where in raw" clause for integer values to the query.
  23745. *
  23746. * @param string $column
  23747. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23748. * @param string $boolean
  23749. * @param bool $not
  23750. * @return \Illuminate\Database\Eloquent\Builder<static>
  23751. * @static
  23752. */
  23753. public static function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false)
  23754. {
  23755. /** @var \Illuminate\Database\Query\Builder $instance */
  23756. return $instance->whereIntegerInRaw($column, $values, $boolean, $not);
  23757. }
  23758. /**
  23759. * Add an "or where in raw" clause for integer values to the query.
  23760. *
  23761. * @param string $column
  23762. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23763. * @return \Illuminate\Database\Eloquent\Builder<static>
  23764. * @static
  23765. */
  23766. public static function orWhereIntegerInRaw($column, $values)
  23767. {
  23768. /** @var \Illuminate\Database\Query\Builder $instance */
  23769. return $instance->orWhereIntegerInRaw($column, $values);
  23770. }
  23771. /**
  23772. * Add a "where not in raw" clause for integer values to the query.
  23773. *
  23774. * @param string $column
  23775. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23776. * @param string $boolean
  23777. * @return \Illuminate\Database\Eloquent\Builder<static>
  23778. * @static
  23779. */
  23780. public static function whereIntegerNotInRaw($column, $values, $boolean = 'and')
  23781. {
  23782. /** @var \Illuminate\Database\Query\Builder $instance */
  23783. return $instance->whereIntegerNotInRaw($column, $values, $boolean);
  23784. }
  23785. /**
  23786. * Add an "or where not in raw" clause for integer values to the query.
  23787. *
  23788. * @param string $column
  23789. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23790. * @return \Illuminate\Database\Eloquent\Builder<static>
  23791. * @static
  23792. */
  23793. public static function orWhereIntegerNotInRaw($column, $values)
  23794. {
  23795. /** @var \Illuminate\Database\Query\Builder $instance */
  23796. return $instance->orWhereIntegerNotInRaw($column, $values);
  23797. }
  23798. /**
  23799. * Add a "where null" clause to the query.
  23800. *
  23801. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  23802. * @param string $boolean
  23803. * @param bool $not
  23804. * @return \Illuminate\Database\Eloquent\Builder<static>
  23805. * @static
  23806. */
  23807. public static function whereNull($columns, $boolean = 'and', $not = false)
  23808. {
  23809. /** @var \Illuminate\Database\Query\Builder $instance */
  23810. return $instance->whereNull($columns, $boolean, $not);
  23811. }
  23812. /**
  23813. * Add an "or where null" clause to the query.
  23814. *
  23815. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23816. * @return \Illuminate\Database\Eloquent\Builder<static>
  23817. * @static
  23818. */
  23819. public static function orWhereNull($column)
  23820. {
  23821. /** @var \Illuminate\Database\Query\Builder $instance */
  23822. return $instance->orWhereNull($column);
  23823. }
  23824. /**
  23825. * Add a "where not null" clause to the query.
  23826. *
  23827. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  23828. * @param string $boolean
  23829. * @return \Illuminate\Database\Eloquent\Builder<static>
  23830. * @static
  23831. */
  23832. public static function whereNotNull($columns, $boolean = 'and')
  23833. {
  23834. /** @var \Illuminate\Database\Query\Builder $instance */
  23835. return $instance->whereNotNull($columns, $boolean);
  23836. }
  23837. /**
  23838. * Add a where between statement to the query.
  23839. *
  23840. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23841. * @param string $boolean
  23842. * @param bool $not
  23843. * @return \Illuminate\Database\Eloquent\Builder<static>
  23844. * @static
  23845. */
  23846. public static function whereBetween($column, $values, $boolean = 'and', $not = false)
  23847. {
  23848. /** @var \Illuminate\Database\Query\Builder $instance */
  23849. return $instance->whereBetween($column, $values, $boolean, $not);
  23850. }
  23851. /**
  23852. * Add a where between statement using columns to the query.
  23853. *
  23854. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23855. * @param string $boolean
  23856. * @param bool $not
  23857. * @return \Illuminate\Database\Eloquent\Builder<static>
  23858. * @static
  23859. */
  23860. public static function whereBetweenColumns($column, $values, $boolean = 'and', $not = false)
  23861. {
  23862. /** @var \Illuminate\Database\Query\Builder $instance */
  23863. return $instance->whereBetweenColumns($column, $values, $boolean, $not);
  23864. }
  23865. /**
  23866. * Add an or where between statement to the query.
  23867. *
  23868. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23869. * @return \Illuminate\Database\Eloquent\Builder<static>
  23870. * @static
  23871. */
  23872. public static function orWhereBetween($column, $values)
  23873. {
  23874. /** @var \Illuminate\Database\Query\Builder $instance */
  23875. return $instance->orWhereBetween($column, $values);
  23876. }
  23877. /**
  23878. * Add an or where between statement using columns to the query.
  23879. *
  23880. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23881. * @return \Illuminate\Database\Eloquent\Builder<static>
  23882. * @static
  23883. */
  23884. public static function orWhereBetweenColumns($column, $values)
  23885. {
  23886. /** @var \Illuminate\Database\Query\Builder $instance */
  23887. return $instance->orWhereBetweenColumns($column, $values);
  23888. }
  23889. /**
  23890. * Add a where not between statement to the query.
  23891. *
  23892. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23893. * @param string $boolean
  23894. * @return \Illuminate\Database\Eloquent\Builder<static>
  23895. * @static
  23896. */
  23897. public static function whereNotBetween($column, $values, $boolean = 'and')
  23898. {
  23899. /** @var \Illuminate\Database\Query\Builder $instance */
  23900. return $instance->whereNotBetween($column, $values, $boolean);
  23901. }
  23902. /**
  23903. * Add a where not between statement using columns to the query.
  23904. *
  23905. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23906. * @param string $boolean
  23907. * @return \Illuminate\Database\Eloquent\Builder<static>
  23908. * @static
  23909. */
  23910. public static function whereNotBetweenColumns($column, $values, $boolean = 'and')
  23911. {
  23912. /** @var \Illuminate\Database\Query\Builder $instance */
  23913. return $instance->whereNotBetweenColumns($column, $values, $boolean);
  23914. }
  23915. /**
  23916. * Add an or where not between statement to the query.
  23917. *
  23918. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23919. * @return \Illuminate\Database\Eloquent\Builder<static>
  23920. * @static
  23921. */
  23922. public static function orWhereNotBetween($column, $values)
  23923. {
  23924. /** @var \Illuminate\Database\Query\Builder $instance */
  23925. return $instance->orWhereNotBetween($column, $values);
  23926. }
  23927. /**
  23928. * Add an or where not between statement using columns to the query.
  23929. *
  23930. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23931. * @return \Illuminate\Database\Eloquent\Builder<static>
  23932. * @static
  23933. */
  23934. public static function orWhereNotBetweenColumns($column, $values)
  23935. {
  23936. /** @var \Illuminate\Database\Query\Builder $instance */
  23937. return $instance->orWhereNotBetweenColumns($column, $values);
  23938. }
  23939. /**
  23940. * Add an "or where not null" clause to the query.
  23941. *
  23942. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23943. * @return \Illuminate\Database\Eloquent\Builder<static>
  23944. * @static
  23945. */
  23946. public static function orWhereNotNull($column)
  23947. {
  23948. /** @var \Illuminate\Database\Query\Builder $instance */
  23949. return $instance->orWhereNotNull($column);
  23950. }
  23951. /**
  23952. * Add a "where date" statement to the query.
  23953. *
  23954. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23955. * @param \DateTimeInterface|string|null $operator
  23956. * @param \DateTimeInterface|string|null $value
  23957. * @param string $boolean
  23958. * @return \Illuminate\Database\Eloquent\Builder<static>
  23959. * @static
  23960. */
  23961. public static function whereDate($column, $operator, $value = null, $boolean = 'and')
  23962. {
  23963. /** @var \Illuminate\Database\Query\Builder $instance */
  23964. return $instance->whereDate($column, $operator, $value, $boolean);
  23965. }
  23966. /**
  23967. * Add an "or where date" statement to the query.
  23968. *
  23969. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23970. * @param \DateTimeInterface|string|null $operator
  23971. * @param \DateTimeInterface|string|null $value
  23972. * @return \Illuminate\Database\Eloquent\Builder<static>
  23973. * @static
  23974. */
  23975. public static function orWhereDate($column, $operator, $value = null)
  23976. {
  23977. /** @var \Illuminate\Database\Query\Builder $instance */
  23978. return $instance->orWhereDate($column, $operator, $value);
  23979. }
  23980. /**
  23981. * Add a "where time" statement to the query.
  23982. *
  23983. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23984. * @param \DateTimeInterface|string|null $operator
  23985. * @param \DateTimeInterface|string|null $value
  23986. * @param string $boolean
  23987. * @return \Illuminate\Database\Eloquent\Builder<static>
  23988. * @static
  23989. */
  23990. public static function whereTime($column, $operator, $value = null, $boolean = 'and')
  23991. {
  23992. /** @var \Illuminate\Database\Query\Builder $instance */
  23993. return $instance->whereTime($column, $operator, $value, $boolean);
  23994. }
  23995. /**
  23996. * Add an "or where time" statement to the query.
  23997. *
  23998. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23999. * @param \DateTimeInterface|string|null $operator
  24000. * @param \DateTimeInterface|string|null $value
  24001. * @return \Illuminate\Database\Eloquent\Builder<static>
  24002. * @static
  24003. */
  24004. public static function orWhereTime($column, $operator, $value = null)
  24005. {
  24006. /** @var \Illuminate\Database\Query\Builder $instance */
  24007. return $instance->orWhereTime($column, $operator, $value);
  24008. }
  24009. /**
  24010. * Add a "where day" statement to the query.
  24011. *
  24012. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24013. * @param \DateTimeInterface|string|int|null $operator
  24014. * @param \DateTimeInterface|string|int|null $value
  24015. * @param string $boolean
  24016. * @return \Illuminate\Database\Eloquent\Builder<static>
  24017. * @static
  24018. */
  24019. public static function whereDay($column, $operator, $value = null, $boolean = 'and')
  24020. {
  24021. /** @var \Illuminate\Database\Query\Builder $instance */
  24022. return $instance->whereDay($column, $operator, $value, $boolean);
  24023. }
  24024. /**
  24025. * Add an "or where day" statement to the query.
  24026. *
  24027. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24028. * @param \DateTimeInterface|string|int|null $operator
  24029. * @param \DateTimeInterface|string|int|null $value
  24030. * @return \Illuminate\Database\Eloquent\Builder<static>
  24031. * @static
  24032. */
  24033. public static function orWhereDay($column, $operator, $value = null)
  24034. {
  24035. /** @var \Illuminate\Database\Query\Builder $instance */
  24036. return $instance->orWhereDay($column, $operator, $value);
  24037. }
  24038. /**
  24039. * Add a "where month" statement to the query.
  24040. *
  24041. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24042. * @param \DateTimeInterface|string|int|null $operator
  24043. * @param \DateTimeInterface|string|int|null $value
  24044. * @param string $boolean
  24045. * @return \Illuminate\Database\Eloquent\Builder<static>
  24046. * @static
  24047. */
  24048. public static function whereMonth($column, $operator, $value = null, $boolean = 'and')
  24049. {
  24050. /** @var \Illuminate\Database\Query\Builder $instance */
  24051. return $instance->whereMonth($column, $operator, $value, $boolean);
  24052. }
  24053. /**
  24054. * Add an "or where month" statement to the query.
  24055. *
  24056. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24057. * @param \DateTimeInterface|string|int|null $operator
  24058. * @param \DateTimeInterface|string|int|null $value
  24059. * @return \Illuminate\Database\Eloquent\Builder<static>
  24060. * @static
  24061. */
  24062. public static function orWhereMonth($column, $operator, $value = null)
  24063. {
  24064. /** @var \Illuminate\Database\Query\Builder $instance */
  24065. return $instance->orWhereMonth($column, $operator, $value);
  24066. }
  24067. /**
  24068. * Add a "where year" statement to the query.
  24069. *
  24070. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24071. * @param \DateTimeInterface|string|int|null $operator
  24072. * @param \DateTimeInterface|string|int|null $value
  24073. * @param string $boolean
  24074. * @return \Illuminate\Database\Eloquent\Builder<static>
  24075. * @static
  24076. */
  24077. public static function whereYear($column, $operator, $value = null, $boolean = 'and')
  24078. {
  24079. /** @var \Illuminate\Database\Query\Builder $instance */
  24080. return $instance->whereYear($column, $operator, $value, $boolean);
  24081. }
  24082. /**
  24083. * Add an "or where year" statement to the query.
  24084. *
  24085. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24086. * @param \DateTimeInterface|string|int|null $operator
  24087. * @param \DateTimeInterface|string|int|null $value
  24088. * @return \Illuminate\Database\Eloquent\Builder<static>
  24089. * @static
  24090. */
  24091. public static function orWhereYear($column, $operator, $value = null)
  24092. {
  24093. /** @var \Illuminate\Database\Query\Builder $instance */
  24094. return $instance->orWhereYear($column, $operator, $value);
  24095. }
  24096. /**
  24097. * Add a nested where statement to the query.
  24098. *
  24099. * @param string $boolean
  24100. * @return \Illuminate\Database\Eloquent\Builder<static>
  24101. * @static
  24102. */
  24103. public static function whereNested($callback, $boolean = 'and')
  24104. {
  24105. /** @var \Illuminate\Database\Query\Builder $instance */
  24106. return $instance->whereNested($callback, $boolean);
  24107. }
  24108. /**
  24109. * Create a new query instance for nested where condition.
  24110. *
  24111. * @return \Illuminate\Database\Query\Builder
  24112. * @static
  24113. */
  24114. public static function forNestedWhere()
  24115. {
  24116. /** @var \Illuminate\Database\Query\Builder $instance */
  24117. return $instance->forNestedWhere();
  24118. }
  24119. /**
  24120. * Add another query builder as a nested where to the query builder.
  24121. *
  24122. * @param \Illuminate\Database\Query\Builder $query
  24123. * @param string $boolean
  24124. * @return \Illuminate\Database\Eloquent\Builder<static>
  24125. * @static
  24126. */
  24127. public static function addNestedWhereQuery($query, $boolean = 'and')
  24128. {
  24129. /** @var \Illuminate\Database\Query\Builder $instance */
  24130. return $instance->addNestedWhereQuery($query, $boolean);
  24131. }
  24132. /**
  24133. * Add an exists clause to the query.
  24134. *
  24135. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24136. * @param string $boolean
  24137. * @param bool $not
  24138. * @return \Illuminate\Database\Eloquent\Builder<static>
  24139. * @static
  24140. */
  24141. public static function whereExists($callback, $boolean = 'and', $not = false)
  24142. {
  24143. /** @var \Illuminate\Database\Query\Builder $instance */
  24144. return $instance->whereExists($callback, $boolean, $not);
  24145. }
  24146. /**
  24147. * Add an or exists clause to the query.
  24148. *
  24149. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24150. * @param bool $not
  24151. * @return \Illuminate\Database\Eloquent\Builder<static>
  24152. * @static
  24153. */
  24154. public static function orWhereExists($callback, $not = false)
  24155. {
  24156. /** @var \Illuminate\Database\Query\Builder $instance */
  24157. return $instance->orWhereExists($callback, $not);
  24158. }
  24159. /**
  24160. * Add a where not exists clause to the query.
  24161. *
  24162. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24163. * @param string $boolean
  24164. * @return \Illuminate\Database\Eloquent\Builder<static>
  24165. * @static
  24166. */
  24167. public static function whereNotExists($callback, $boolean = 'and')
  24168. {
  24169. /** @var \Illuminate\Database\Query\Builder $instance */
  24170. return $instance->whereNotExists($callback, $boolean);
  24171. }
  24172. /**
  24173. * Add a where not exists clause to the query.
  24174. *
  24175. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24176. * @return \Illuminate\Database\Eloquent\Builder<static>
  24177. * @static
  24178. */
  24179. public static function orWhereNotExists($callback)
  24180. {
  24181. /** @var \Illuminate\Database\Query\Builder $instance */
  24182. return $instance->orWhereNotExists($callback);
  24183. }
  24184. /**
  24185. * Add an exists clause to the query.
  24186. *
  24187. * @param string $boolean
  24188. * @param bool $not
  24189. * @return \Illuminate\Database\Eloquent\Builder<static>
  24190. * @static
  24191. */
  24192. public static function addWhereExistsQuery($query, $boolean = 'and', $not = false)
  24193. {
  24194. /** @var \Illuminate\Database\Query\Builder $instance */
  24195. return $instance->addWhereExistsQuery($query, $boolean, $not);
  24196. }
  24197. /**
  24198. * Adds a where condition using row values.
  24199. *
  24200. * @param array $columns
  24201. * @param string $operator
  24202. * @param array $values
  24203. * @param string $boolean
  24204. * @return \Illuminate\Database\Eloquent\Builder<static>
  24205. * @throws \InvalidArgumentException
  24206. * @static
  24207. */
  24208. public static function whereRowValues($columns, $operator, $values, $boolean = 'and')
  24209. {
  24210. /** @var \Illuminate\Database\Query\Builder $instance */
  24211. return $instance->whereRowValues($columns, $operator, $values, $boolean);
  24212. }
  24213. /**
  24214. * Adds an or where condition using row values.
  24215. *
  24216. * @param array $columns
  24217. * @param string $operator
  24218. * @param array $values
  24219. * @return \Illuminate\Database\Eloquent\Builder<static>
  24220. * @static
  24221. */
  24222. public static function orWhereRowValues($columns, $operator, $values)
  24223. {
  24224. /** @var \Illuminate\Database\Query\Builder $instance */
  24225. return $instance->orWhereRowValues($columns, $operator, $values);
  24226. }
  24227. /**
  24228. * Add a "where JSON contains" clause to the query.
  24229. *
  24230. * @param string $column
  24231. * @param mixed $value
  24232. * @param string $boolean
  24233. * @param bool $not
  24234. * @return \Illuminate\Database\Eloquent\Builder<static>
  24235. * @static
  24236. */
  24237. public static function whereJsonContains($column, $value, $boolean = 'and', $not = false)
  24238. {
  24239. /** @var \Illuminate\Database\Query\Builder $instance */
  24240. return $instance->whereJsonContains($column, $value, $boolean, $not);
  24241. }
  24242. /**
  24243. * Add an "or where JSON contains" clause to the query.
  24244. *
  24245. * @param string $column
  24246. * @param mixed $value
  24247. * @return \Illuminate\Database\Eloquent\Builder<static>
  24248. * @static
  24249. */
  24250. public static function orWhereJsonContains($column, $value)
  24251. {
  24252. /** @var \Illuminate\Database\Query\Builder $instance */
  24253. return $instance->orWhereJsonContains($column, $value);
  24254. }
  24255. /**
  24256. * Add a "where JSON not contains" clause to the query.
  24257. *
  24258. * @param string $column
  24259. * @param mixed $value
  24260. * @param string $boolean
  24261. * @return \Illuminate\Database\Eloquent\Builder<static>
  24262. * @static
  24263. */
  24264. public static function whereJsonDoesntContain($column, $value, $boolean = 'and')
  24265. {
  24266. /** @var \Illuminate\Database\Query\Builder $instance */
  24267. return $instance->whereJsonDoesntContain($column, $value, $boolean);
  24268. }
  24269. /**
  24270. * Add an "or where JSON not contains" clause to the query.
  24271. *
  24272. * @param string $column
  24273. * @param mixed $value
  24274. * @return \Illuminate\Database\Eloquent\Builder<static>
  24275. * @static
  24276. */
  24277. public static function orWhereJsonDoesntContain($column, $value)
  24278. {
  24279. /** @var \Illuminate\Database\Query\Builder $instance */
  24280. return $instance->orWhereJsonDoesntContain($column, $value);
  24281. }
  24282. /**
  24283. * Add a "where JSON overlaps" clause to the query.
  24284. *
  24285. * @param string $column
  24286. * @param mixed $value
  24287. * @param string $boolean
  24288. * @param bool $not
  24289. * @return \Illuminate\Database\Eloquent\Builder<static>
  24290. * @static
  24291. */
  24292. public static function whereJsonOverlaps($column, $value, $boolean = 'and', $not = false)
  24293. {
  24294. /** @var \Illuminate\Database\Query\Builder $instance */
  24295. return $instance->whereJsonOverlaps($column, $value, $boolean, $not);
  24296. }
  24297. /**
  24298. * Add an "or where JSON overlaps" clause to the query.
  24299. *
  24300. * @param string $column
  24301. * @param mixed $value
  24302. * @return \Illuminate\Database\Eloquent\Builder<static>
  24303. * @static
  24304. */
  24305. public static function orWhereJsonOverlaps($column, $value)
  24306. {
  24307. /** @var \Illuminate\Database\Query\Builder $instance */
  24308. return $instance->orWhereJsonOverlaps($column, $value);
  24309. }
  24310. /**
  24311. * Add a "where JSON not overlap" clause to the query.
  24312. *
  24313. * @param string $column
  24314. * @param mixed $value
  24315. * @param string $boolean
  24316. * @return \Illuminate\Database\Eloquent\Builder<static>
  24317. * @static
  24318. */
  24319. public static function whereJsonDoesntOverlap($column, $value, $boolean = 'and')
  24320. {
  24321. /** @var \Illuminate\Database\Query\Builder $instance */
  24322. return $instance->whereJsonDoesntOverlap($column, $value, $boolean);
  24323. }
  24324. /**
  24325. * Add an "or where JSON not overlap" clause to the query.
  24326. *
  24327. * @param string $column
  24328. * @param mixed $value
  24329. * @return \Illuminate\Database\Eloquent\Builder<static>
  24330. * @static
  24331. */
  24332. public static function orWhereJsonDoesntOverlap($column, $value)
  24333. {
  24334. /** @var \Illuminate\Database\Query\Builder $instance */
  24335. return $instance->orWhereJsonDoesntOverlap($column, $value);
  24336. }
  24337. /**
  24338. * Add a clause that determines if a JSON path exists to the query.
  24339. *
  24340. * @param string $column
  24341. * @param string $boolean
  24342. * @param bool $not
  24343. * @return \Illuminate\Database\Eloquent\Builder<static>
  24344. * @static
  24345. */
  24346. public static function whereJsonContainsKey($column, $boolean = 'and', $not = false)
  24347. {
  24348. /** @var \Illuminate\Database\Query\Builder $instance */
  24349. return $instance->whereJsonContainsKey($column, $boolean, $not);
  24350. }
  24351. /**
  24352. * Add an "or" clause that determines if a JSON path exists to the query.
  24353. *
  24354. * @param string $column
  24355. * @return \Illuminate\Database\Eloquent\Builder<static>
  24356. * @static
  24357. */
  24358. public static function orWhereJsonContainsKey($column)
  24359. {
  24360. /** @var \Illuminate\Database\Query\Builder $instance */
  24361. return $instance->orWhereJsonContainsKey($column);
  24362. }
  24363. /**
  24364. * Add a clause that determines if a JSON path does not exist to the query.
  24365. *
  24366. * @param string $column
  24367. * @param string $boolean
  24368. * @return \Illuminate\Database\Eloquent\Builder<static>
  24369. * @static
  24370. */
  24371. public static function whereJsonDoesntContainKey($column, $boolean = 'and')
  24372. {
  24373. /** @var \Illuminate\Database\Query\Builder $instance */
  24374. return $instance->whereJsonDoesntContainKey($column, $boolean);
  24375. }
  24376. /**
  24377. * Add an "or" clause that determines if a JSON path does not exist to the query.
  24378. *
  24379. * @param string $column
  24380. * @return \Illuminate\Database\Eloquent\Builder<static>
  24381. * @static
  24382. */
  24383. public static function orWhereJsonDoesntContainKey($column)
  24384. {
  24385. /** @var \Illuminate\Database\Query\Builder $instance */
  24386. return $instance->orWhereJsonDoesntContainKey($column);
  24387. }
  24388. /**
  24389. * Add a "where JSON length" clause to the query.
  24390. *
  24391. * @param string $column
  24392. * @param mixed $operator
  24393. * @param mixed $value
  24394. * @param string $boolean
  24395. * @return \Illuminate\Database\Eloquent\Builder<static>
  24396. * @static
  24397. */
  24398. public static function whereJsonLength($column, $operator, $value = null, $boolean = 'and')
  24399. {
  24400. /** @var \Illuminate\Database\Query\Builder $instance */
  24401. return $instance->whereJsonLength($column, $operator, $value, $boolean);
  24402. }
  24403. /**
  24404. * Add an "or where JSON length" clause to the query.
  24405. *
  24406. * @param string $column
  24407. * @param mixed $operator
  24408. * @param mixed $value
  24409. * @return \Illuminate\Database\Eloquent\Builder<static>
  24410. * @static
  24411. */
  24412. public static function orWhereJsonLength($column, $operator, $value = null)
  24413. {
  24414. /** @var \Illuminate\Database\Query\Builder $instance */
  24415. return $instance->orWhereJsonLength($column, $operator, $value);
  24416. }
  24417. /**
  24418. * Handles dynamic "where" clauses to the query.
  24419. *
  24420. * @param string $method
  24421. * @param array $parameters
  24422. * @return \Illuminate\Database\Eloquent\Builder<static>
  24423. * @static
  24424. */
  24425. public static function dynamicWhere($method, $parameters)
  24426. {
  24427. /** @var \Illuminate\Database\Query\Builder $instance */
  24428. return $instance->dynamicWhere($method, $parameters);
  24429. }
  24430. /**
  24431. * Add a "where fulltext" clause to the query.
  24432. *
  24433. * @param string|string[] $columns
  24434. * @param string $value
  24435. * @param string $boolean
  24436. * @return \Illuminate\Database\Eloquent\Builder<static>
  24437. * @static
  24438. */
  24439. public static function whereFullText($columns, $value, $options = [], $boolean = 'and')
  24440. {
  24441. /** @var \Illuminate\Database\Query\Builder $instance */
  24442. return $instance->whereFullText($columns, $value, $options, $boolean);
  24443. }
  24444. /**
  24445. * Add a "or where fulltext" clause to the query.
  24446. *
  24447. * @param string|string[] $columns
  24448. * @param string $value
  24449. * @return \Illuminate\Database\Eloquent\Builder<static>
  24450. * @static
  24451. */
  24452. public static function orWhereFullText($columns, $value, $options = [])
  24453. {
  24454. /** @var \Illuminate\Database\Query\Builder $instance */
  24455. return $instance->orWhereFullText($columns, $value, $options);
  24456. }
  24457. /**
  24458. * Add a "where" clause to the query for multiple columns with "and" conditions between them.
  24459. *
  24460. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24461. * @param mixed $operator
  24462. * @param mixed $value
  24463. * @param string $boolean
  24464. * @return \Illuminate\Database\Eloquent\Builder<static>
  24465. * @static
  24466. */
  24467. public static function whereAll($columns, $operator = null, $value = null, $boolean = 'and')
  24468. {
  24469. /** @var \Illuminate\Database\Query\Builder $instance */
  24470. return $instance->whereAll($columns, $operator, $value, $boolean);
  24471. }
  24472. /**
  24473. * Add an "or where" clause to the query for multiple columns with "and" conditions between them.
  24474. *
  24475. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24476. * @param mixed $operator
  24477. * @param mixed $value
  24478. * @return \Illuminate\Database\Eloquent\Builder<static>
  24479. * @static
  24480. */
  24481. public static function orWhereAll($columns, $operator = null, $value = null)
  24482. {
  24483. /** @var \Illuminate\Database\Query\Builder $instance */
  24484. return $instance->orWhereAll($columns, $operator, $value);
  24485. }
  24486. /**
  24487. * Add a "where" clause to the query for multiple columns with "or" conditions between them.
  24488. *
  24489. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24490. * @param mixed $operator
  24491. * @param mixed $value
  24492. * @param string $boolean
  24493. * @return \Illuminate\Database\Eloquent\Builder<static>
  24494. * @static
  24495. */
  24496. public static function whereAny($columns, $operator = null, $value = null, $boolean = 'and')
  24497. {
  24498. /** @var \Illuminate\Database\Query\Builder $instance */
  24499. return $instance->whereAny($columns, $operator, $value, $boolean);
  24500. }
  24501. /**
  24502. * Add an "or where" clause to the query for multiple columns with "or" conditions between them.
  24503. *
  24504. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24505. * @param mixed $operator
  24506. * @param mixed $value
  24507. * @return \Illuminate\Database\Eloquent\Builder<static>
  24508. * @static
  24509. */
  24510. public static function orWhereAny($columns, $operator = null, $value = null)
  24511. {
  24512. /** @var \Illuminate\Database\Query\Builder $instance */
  24513. return $instance->orWhereAny($columns, $operator, $value);
  24514. }
  24515. /**
  24516. * Add a "where not" clause to the query for multiple columns where none of the conditions should be true.
  24517. *
  24518. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24519. * @param mixed $operator
  24520. * @param mixed $value
  24521. * @param string $boolean
  24522. * @return \Illuminate\Database\Eloquent\Builder<static>
  24523. * @static
  24524. */
  24525. public static function whereNone($columns, $operator = null, $value = null, $boolean = 'and')
  24526. {
  24527. /** @var \Illuminate\Database\Query\Builder $instance */
  24528. return $instance->whereNone($columns, $operator, $value, $boolean);
  24529. }
  24530. /**
  24531. * Add an "or where not" clause to the query for multiple columns where none of the conditions should be true.
  24532. *
  24533. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24534. * @param mixed $operator
  24535. * @param mixed $value
  24536. * @return \Illuminate\Database\Eloquent\Builder<static>
  24537. * @static
  24538. */
  24539. public static function orWhereNone($columns, $operator = null, $value = null)
  24540. {
  24541. /** @var \Illuminate\Database\Query\Builder $instance */
  24542. return $instance->orWhereNone($columns, $operator, $value);
  24543. }
  24544. /**
  24545. * Add a "group by" clause to the query.
  24546. *
  24547. * @param array|\Illuminate\Contracts\Database\Query\Expression|string $groups
  24548. * @return \Illuminate\Database\Eloquent\Builder<static>
  24549. * @static
  24550. */
  24551. public static function groupBy(...$groups)
  24552. {
  24553. /** @var \Illuminate\Database\Query\Builder $instance */
  24554. return $instance->groupBy(...$groups);
  24555. }
  24556. /**
  24557. * Add a raw groupBy clause to the query.
  24558. *
  24559. * @param string $sql
  24560. * @return \Illuminate\Database\Eloquent\Builder<static>
  24561. * @static
  24562. */
  24563. public static function groupByRaw($sql, $bindings = [])
  24564. {
  24565. /** @var \Illuminate\Database\Query\Builder $instance */
  24566. return $instance->groupByRaw($sql, $bindings);
  24567. }
  24568. /**
  24569. * Add a "having" clause to the query.
  24570. *
  24571. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24572. * @param \DateTimeInterface|string|int|float|null $operator
  24573. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24574. * @param string $boolean
  24575. * @return \Illuminate\Database\Eloquent\Builder<static>
  24576. * @static
  24577. */
  24578. public static function having($column, $operator = null, $value = null, $boolean = 'and')
  24579. {
  24580. /** @var \Illuminate\Database\Query\Builder $instance */
  24581. return $instance->having($column, $operator, $value, $boolean);
  24582. }
  24583. /**
  24584. * Add an "or having" clause to the query.
  24585. *
  24586. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24587. * @param \DateTimeInterface|string|int|float|null $operator
  24588. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24589. * @return \Illuminate\Database\Eloquent\Builder<static>
  24590. * @static
  24591. */
  24592. public static function orHaving($column, $operator = null, $value = null)
  24593. {
  24594. /** @var \Illuminate\Database\Query\Builder $instance */
  24595. return $instance->orHaving($column, $operator, $value);
  24596. }
  24597. /**
  24598. * Add a nested having statement to the query.
  24599. *
  24600. * @param string $boolean
  24601. * @return \Illuminate\Database\Eloquent\Builder<static>
  24602. * @static
  24603. */
  24604. public static function havingNested($callback, $boolean = 'and')
  24605. {
  24606. /** @var \Illuminate\Database\Query\Builder $instance */
  24607. return $instance->havingNested($callback, $boolean);
  24608. }
  24609. /**
  24610. * Add another query builder as a nested having to the query builder.
  24611. *
  24612. * @param \Illuminate\Database\Query\Builder $query
  24613. * @param string $boolean
  24614. * @return \Illuminate\Database\Eloquent\Builder<static>
  24615. * @static
  24616. */
  24617. public static function addNestedHavingQuery($query, $boolean = 'and')
  24618. {
  24619. /** @var \Illuminate\Database\Query\Builder $instance */
  24620. return $instance->addNestedHavingQuery($query, $boolean);
  24621. }
  24622. /**
  24623. * Add a "having null" clause to the query.
  24624. *
  24625. * @param array|string $columns
  24626. * @param string $boolean
  24627. * @param bool $not
  24628. * @return \Illuminate\Database\Eloquent\Builder<static>
  24629. * @static
  24630. */
  24631. public static function havingNull($columns, $boolean = 'and', $not = false)
  24632. {
  24633. /** @var \Illuminate\Database\Query\Builder $instance */
  24634. return $instance->havingNull($columns, $boolean, $not);
  24635. }
  24636. /**
  24637. * Add an "or having null" clause to the query.
  24638. *
  24639. * @param string $column
  24640. * @return \Illuminate\Database\Eloquent\Builder<static>
  24641. * @static
  24642. */
  24643. public static function orHavingNull($column)
  24644. {
  24645. /** @var \Illuminate\Database\Query\Builder $instance */
  24646. return $instance->orHavingNull($column);
  24647. }
  24648. /**
  24649. * Add a "having not null" clause to the query.
  24650. *
  24651. * @param array|string $columns
  24652. * @param string $boolean
  24653. * @return \Illuminate\Database\Eloquent\Builder<static>
  24654. * @static
  24655. */
  24656. public static function havingNotNull($columns, $boolean = 'and')
  24657. {
  24658. /** @var \Illuminate\Database\Query\Builder $instance */
  24659. return $instance->havingNotNull($columns, $boolean);
  24660. }
  24661. /**
  24662. * Add an "or having not null" clause to the query.
  24663. *
  24664. * @param string $column
  24665. * @return \Illuminate\Database\Eloquent\Builder<static>
  24666. * @static
  24667. */
  24668. public static function orHavingNotNull($column)
  24669. {
  24670. /** @var \Illuminate\Database\Query\Builder $instance */
  24671. return $instance->orHavingNotNull($column);
  24672. }
  24673. /**
  24674. * Add a "having between " clause to the query.
  24675. *
  24676. * @param string $column
  24677. * @param string $boolean
  24678. * @param bool $not
  24679. * @return \Illuminate\Database\Eloquent\Builder<static>
  24680. * @static
  24681. */
  24682. public static function havingBetween($column, $values, $boolean = 'and', $not = false)
  24683. {
  24684. /** @var \Illuminate\Database\Query\Builder $instance */
  24685. return $instance->havingBetween($column, $values, $boolean, $not);
  24686. }
  24687. /**
  24688. * Add a raw having clause to the query.
  24689. *
  24690. * @param string $sql
  24691. * @param string $boolean
  24692. * @return \Illuminate\Database\Eloquent\Builder<static>
  24693. * @static
  24694. */
  24695. public static function havingRaw($sql, $bindings = [], $boolean = 'and')
  24696. {
  24697. /** @var \Illuminate\Database\Query\Builder $instance */
  24698. return $instance->havingRaw($sql, $bindings, $boolean);
  24699. }
  24700. /**
  24701. * Add a raw or having clause to the query.
  24702. *
  24703. * @param string $sql
  24704. * @return \Illuminate\Database\Eloquent\Builder<static>
  24705. * @static
  24706. */
  24707. public static function orHavingRaw($sql, $bindings = [])
  24708. {
  24709. /** @var \Illuminate\Database\Query\Builder $instance */
  24710. return $instance->orHavingRaw($sql, $bindings);
  24711. }
  24712. /**
  24713. * Add an "order by" clause to the query.
  24714. *
  24715. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24716. * @param string $direction
  24717. * @return \Illuminate\Database\Eloquent\Builder<static>
  24718. * @throws \InvalidArgumentException
  24719. * @static
  24720. */
  24721. public static function orderBy($column, $direction = 'asc')
  24722. {
  24723. /** @var \Illuminate\Database\Query\Builder $instance */
  24724. return $instance->orderBy($column, $direction);
  24725. }
  24726. /**
  24727. * Add a descending "order by" clause to the query.
  24728. *
  24729. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24730. * @return \Illuminate\Database\Eloquent\Builder<static>
  24731. * @static
  24732. */
  24733. public static function orderByDesc($column)
  24734. {
  24735. /** @var \Illuminate\Database\Query\Builder $instance */
  24736. return $instance->orderByDesc($column);
  24737. }
  24738. /**
  24739. * Put the query's results in random order.
  24740. *
  24741. * @param string|int $seed
  24742. * @return \Illuminate\Database\Eloquent\Builder<static>
  24743. * @static
  24744. */
  24745. public static function inRandomOrder($seed = '')
  24746. {
  24747. /** @var \Illuminate\Database\Query\Builder $instance */
  24748. return $instance->inRandomOrder($seed);
  24749. }
  24750. /**
  24751. * Add a raw "order by" clause to the query.
  24752. *
  24753. * @param string $sql
  24754. * @param array $bindings
  24755. * @return \Illuminate\Database\Eloquent\Builder<static>
  24756. * @static
  24757. */
  24758. public static function orderByRaw($sql, $bindings = [])
  24759. {
  24760. /** @var \Illuminate\Database\Query\Builder $instance */
  24761. return $instance->orderByRaw($sql, $bindings);
  24762. }
  24763. /**
  24764. * Alias to set the "offset" value of the query.
  24765. *
  24766. * @param int $value
  24767. * @return \Illuminate\Database\Eloquent\Builder<static>
  24768. * @static
  24769. */
  24770. public static function skip($value)
  24771. {
  24772. /** @var \Illuminate\Database\Query\Builder $instance */
  24773. return $instance->skip($value);
  24774. }
  24775. /**
  24776. * Set the "offset" value of the query.
  24777. *
  24778. * @param int $value
  24779. * @return \Illuminate\Database\Eloquent\Builder<static>
  24780. * @static
  24781. */
  24782. public static function offset($value)
  24783. {
  24784. /** @var \Illuminate\Database\Query\Builder $instance */
  24785. return $instance->offset($value);
  24786. }
  24787. /**
  24788. * Alias to set the "limit" value of the query.
  24789. *
  24790. * @param int $value
  24791. * @return \Illuminate\Database\Eloquent\Builder<static>
  24792. * @static
  24793. */
  24794. public static function take($value)
  24795. {
  24796. /** @var \Illuminate\Database\Query\Builder $instance */
  24797. return $instance->take($value);
  24798. }
  24799. /**
  24800. * Set the "limit" value of the query.
  24801. *
  24802. * @param int $value
  24803. * @return \Illuminate\Database\Eloquent\Builder<static>
  24804. * @static
  24805. */
  24806. public static function limit($value)
  24807. {
  24808. /** @var \Illuminate\Database\Query\Builder $instance */
  24809. return $instance->limit($value);
  24810. }
  24811. /**
  24812. * Add a "group limit" clause to the query.
  24813. *
  24814. * @param int $value
  24815. * @param string $column
  24816. * @return \Illuminate\Database\Eloquent\Builder<static>
  24817. * @static
  24818. */
  24819. public static function groupLimit($value, $column)
  24820. {
  24821. /** @var \Illuminate\Database\Query\Builder $instance */
  24822. return $instance->groupLimit($value, $column);
  24823. }
  24824. /**
  24825. * Set the limit and offset for a given page.
  24826. *
  24827. * @param int $page
  24828. * @param int $perPage
  24829. * @return \Illuminate\Database\Eloquent\Builder<static>
  24830. * @static
  24831. */
  24832. public static function forPage($page, $perPage = 15)
  24833. {
  24834. /** @var \Illuminate\Database\Query\Builder $instance */
  24835. return $instance->forPage($page, $perPage);
  24836. }
  24837. /**
  24838. * Constrain the query to the previous "page" of results before a given ID.
  24839. *
  24840. * @param int $perPage
  24841. * @param int|null $lastId
  24842. * @param string $column
  24843. * @return \Illuminate\Database\Eloquent\Builder<static>
  24844. * @static
  24845. */
  24846. public static function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id')
  24847. {
  24848. /** @var \Illuminate\Database\Query\Builder $instance */
  24849. return $instance->forPageBeforeId($perPage, $lastId, $column);
  24850. }
  24851. /**
  24852. * Constrain the query to the next "page" of results after a given ID.
  24853. *
  24854. * @param int $perPage
  24855. * @param int|null $lastId
  24856. * @param string $column
  24857. * @return \Illuminate\Database\Eloquent\Builder<static>
  24858. * @static
  24859. */
  24860. public static function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
  24861. {
  24862. /** @var \Illuminate\Database\Query\Builder $instance */
  24863. return $instance->forPageAfterId($perPage, $lastId, $column);
  24864. }
  24865. /**
  24866. * Remove all existing orders and optionally add a new order.
  24867. *
  24868. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  24869. * @param string $direction
  24870. * @return \Illuminate\Database\Eloquent\Builder<static>
  24871. * @static
  24872. */
  24873. public static function reorder($column = null, $direction = 'asc')
  24874. {
  24875. /** @var \Illuminate\Database\Query\Builder $instance */
  24876. return $instance->reorder($column, $direction);
  24877. }
  24878. /**
  24879. * Add descending "reorder" clause to the query.
  24880. *
  24881. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  24882. * @return \Illuminate\Database\Eloquent\Builder<static>
  24883. * @static
  24884. */
  24885. public static function reorderDesc($column)
  24886. {
  24887. /** @var \Illuminate\Database\Query\Builder $instance */
  24888. return $instance->reorderDesc($column);
  24889. }
  24890. /**
  24891. * Add a union statement to the query.
  24892. *
  24893. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  24894. * @param bool $all
  24895. * @return \Illuminate\Database\Eloquent\Builder<static>
  24896. * @static
  24897. */
  24898. public static function union($query, $all = false)
  24899. {
  24900. /** @var \Illuminate\Database\Query\Builder $instance */
  24901. return $instance->union($query, $all);
  24902. }
  24903. /**
  24904. * Add a union all statement to the query.
  24905. *
  24906. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  24907. * @return \Illuminate\Database\Eloquent\Builder<static>
  24908. * @static
  24909. */
  24910. public static function unionAll($query)
  24911. {
  24912. /** @var \Illuminate\Database\Query\Builder $instance */
  24913. return $instance->unionAll($query);
  24914. }
  24915. /**
  24916. * Lock the selected rows in the table.
  24917. *
  24918. * @param string|bool $value
  24919. * @return \Illuminate\Database\Eloquent\Builder<static>
  24920. * @static
  24921. */
  24922. public static function lock($value = true)
  24923. {
  24924. /** @var \Illuminate\Database\Query\Builder $instance */
  24925. return $instance->lock($value);
  24926. }
  24927. /**
  24928. * Lock the selected rows in the table for updating.
  24929. *
  24930. * @return \Illuminate\Database\Eloquent\Builder<static>
  24931. * @static
  24932. */
  24933. public static function lockForUpdate()
  24934. {
  24935. /** @var \Illuminate\Database\Query\Builder $instance */
  24936. return $instance->lockForUpdate();
  24937. }
  24938. /**
  24939. * Share lock the selected rows in the table.
  24940. *
  24941. * @return \Illuminate\Database\Eloquent\Builder<static>
  24942. * @static
  24943. */
  24944. public static function sharedLock()
  24945. {
  24946. /** @var \Illuminate\Database\Query\Builder $instance */
  24947. return $instance->sharedLock();
  24948. }
  24949. /**
  24950. * Register a closure to be invoked before the query is executed.
  24951. *
  24952. * @return \Illuminate\Database\Eloquent\Builder<static>
  24953. * @static
  24954. */
  24955. public static function beforeQuery($callback)
  24956. {
  24957. /** @var \Illuminate\Database\Query\Builder $instance */
  24958. return $instance->beforeQuery($callback);
  24959. }
  24960. /**
  24961. * Invoke the "before query" modification callbacks.
  24962. *
  24963. * @return void
  24964. * @static
  24965. */
  24966. public static function applyBeforeQueryCallbacks()
  24967. {
  24968. /** @var \Illuminate\Database\Query\Builder $instance */
  24969. $instance->applyBeforeQueryCallbacks();
  24970. }
  24971. /**
  24972. * Get the SQL representation of the query.
  24973. *
  24974. * @return string
  24975. * @static
  24976. */
  24977. public static function toSql()
  24978. {
  24979. /** @var \Illuminate\Database\Query\Builder $instance */
  24980. return $instance->toSql();
  24981. }
  24982. /**
  24983. * Get the raw SQL representation of the query with embedded bindings.
  24984. *
  24985. * @return string
  24986. * @static
  24987. */
  24988. public static function toRawSql()
  24989. {
  24990. /** @var \Illuminate\Database\Query\Builder $instance */
  24991. return $instance->toRawSql();
  24992. }
  24993. /**
  24994. * Get a single expression value from the first result of a query.
  24995. *
  24996. * @return mixed
  24997. * @static
  24998. */
  24999. public static function rawValue($expression, $bindings = [])
  25000. {
  25001. /** @var \Illuminate\Database\Query\Builder $instance */
  25002. return $instance->rawValue($expression, $bindings);
  25003. }
  25004. /**
  25005. * Get the count of the total records for the paginator.
  25006. *
  25007. * @param array<string|\Illuminate\Contracts\Database\Query\Expression> $columns
  25008. * @return int<0, max>
  25009. * @static
  25010. */
  25011. public static function getCountForPagination($columns = [])
  25012. {
  25013. /** @var \Illuminate\Database\Query\Builder $instance */
  25014. return $instance->getCountForPagination($columns);
  25015. }
  25016. /**
  25017. * Concatenate values of a given column as a string.
  25018. *
  25019. * @param string $column
  25020. * @param string $glue
  25021. * @return string
  25022. * @static
  25023. */
  25024. public static function implode($column, $glue = '')
  25025. {
  25026. /** @var \Illuminate\Database\Query\Builder $instance */
  25027. return $instance->implode($column, $glue);
  25028. }
  25029. /**
  25030. * Determine if any rows exist for the current query.
  25031. *
  25032. * @return bool
  25033. * @static
  25034. */
  25035. public static function exists()
  25036. {
  25037. /** @var \Illuminate\Database\Query\Builder $instance */
  25038. return $instance->exists();
  25039. }
  25040. /**
  25041. * Determine if no rows exist for the current query.
  25042. *
  25043. * @return bool
  25044. * @static
  25045. */
  25046. public static function doesntExist()
  25047. {
  25048. /** @var \Illuminate\Database\Query\Builder $instance */
  25049. return $instance->doesntExist();
  25050. }
  25051. /**
  25052. * Execute the given callback if no rows exist for the current query.
  25053. *
  25054. * @return mixed
  25055. * @static
  25056. */
  25057. public static function existsOr($callback)
  25058. {
  25059. /** @var \Illuminate\Database\Query\Builder $instance */
  25060. return $instance->existsOr($callback);
  25061. }
  25062. /**
  25063. * Execute the given callback if rows exist for the current query.
  25064. *
  25065. * @return mixed
  25066. * @static
  25067. */
  25068. public static function doesntExistOr($callback)
  25069. {
  25070. /** @var \Illuminate\Database\Query\Builder $instance */
  25071. return $instance->doesntExistOr($callback);
  25072. }
  25073. /**
  25074. * Retrieve the "count" result of the query.
  25075. *
  25076. * @param \Illuminate\Contracts\Database\Query\Expression|string $columns
  25077. * @return int<0, max>
  25078. * @static
  25079. */
  25080. public static function count($columns = '*')
  25081. {
  25082. /** @var \Illuminate\Database\Query\Builder $instance */
  25083. return $instance->count($columns);
  25084. }
  25085. /**
  25086. * Retrieve the minimum value of a given column.
  25087. *
  25088. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25089. * @return mixed
  25090. * @static
  25091. */
  25092. public static function min($column)
  25093. {
  25094. /** @var \Illuminate\Database\Query\Builder $instance */
  25095. return $instance->min($column);
  25096. }
  25097. /**
  25098. * Retrieve the maximum value of a given column.
  25099. *
  25100. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25101. * @return mixed
  25102. * @static
  25103. */
  25104. public static function max($column)
  25105. {
  25106. /** @var \Illuminate\Database\Query\Builder $instance */
  25107. return $instance->max($column);
  25108. }
  25109. /**
  25110. * Retrieve the sum of the values of a given column.
  25111. *
  25112. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25113. * @return mixed
  25114. * @static
  25115. */
  25116. public static function sum($column)
  25117. {
  25118. /** @var \Illuminate\Database\Query\Builder $instance */
  25119. return $instance->sum($column);
  25120. }
  25121. /**
  25122. * Retrieve the average of the values of a given column.
  25123. *
  25124. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25125. * @return mixed
  25126. * @static
  25127. */
  25128. public static function avg($column)
  25129. {
  25130. /** @var \Illuminate\Database\Query\Builder $instance */
  25131. return $instance->avg($column);
  25132. }
  25133. /**
  25134. * Alias for the "avg" method.
  25135. *
  25136. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25137. * @return mixed
  25138. * @static
  25139. */
  25140. public static function average($column)
  25141. {
  25142. /** @var \Illuminate\Database\Query\Builder $instance */
  25143. return $instance->average($column);
  25144. }
  25145. /**
  25146. * Execute an aggregate function on the database.
  25147. *
  25148. * @param string $function
  25149. * @param array $columns
  25150. * @return mixed
  25151. * @static
  25152. */
  25153. public static function aggregate($function, $columns = [])
  25154. {
  25155. /** @var \Illuminate\Database\Query\Builder $instance */
  25156. return $instance->aggregate($function, $columns);
  25157. }
  25158. /**
  25159. * Execute a numeric aggregate function on the database.
  25160. *
  25161. * @param string $function
  25162. * @param array $columns
  25163. * @return float|int
  25164. * @static
  25165. */
  25166. public static function numericAggregate($function, $columns = [])
  25167. {
  25168. /** @var \Illuminate\Database\Query\Builder $instance */
  25169. return $instance->numericAggregate($function, $columns);
  25170. }
  25171. /**
  25172. * Insert new records into the database.
  25173. *
  25174. * @return bool
  25175. * @static
  25176. */
  25177. public static function insert($values)
  25178. {
  25179. /** @var \Illuminate\Database\Query\Builder $instance */
  25180. return $instance->insert($values);
  25181. }
  25182. /**
  25183. * Insert new records into the database while ignoring errors.
  25184. *
  25185. * @return int<0, max>
  25186. * @static
  25187. */
  25188. public static function insertOrIgnore($values)
  25189. {
  25190. /** @var \Illuminate\Database\Query\Builder $instance */
  25191. return $instance->insertOrIgnore($values);
  25192. }
  25193. /**
  25194. * Insert a new record and get the value of the primary key.
  25195. *
  25196. * @param string|null $sequence
  25197. * @return int
  25198. * @static
  25199. */
  25200. public static function insertGetId($values, $sequence = null)
  25201. {
  25202. /** @var \Illuminate\Database\Query\Builder $instance */
  25203. return $instance->insertGetId($values, $sequence);
  25204. }
  25205. /**
  25206. * Insert new records into the table using a subquery.
  25207. *
  25208. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25209. * @return int
  25210. * @static
  25211. */
  25212. public static function insertUsing($columns, $query)
  25213. {
  25214. /** @var \Illuminate\Database\Query\Builder $instance */
  25215. return $instance->insertUsing($columns, $query);
  25216. }
  25217. /**
  25218. * Insert new records into the table using a subquery while ignoring errors.
  25219. *
  25220. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25221. * @return int
  25222. * @static
  25223. */
  25224. public static function insertOrIgnoreUsing($columns, $query)
  25225. {
  25226. /** @var \Illuminate\Database\Query\Builder $instance */
  25227. return $instance->insertOrIgnoreUsing($columns, $query);
  25228. }
  25229. /**
  25230. * Update records in a PostgreSQL database using the update from syntax.
  25231. *
  25232. * @return int
  25233. * @static
  25234. */
  25235. public static function updateFrom($values)
  25236. {
  25237. /** @var \Illuminate\Database\Query\Builder $instance */
  25238. return $instance->updateFrom($values);
  25239. }
  25240. /**
  25241. * Insert or update a record matching the attributes, and fill it with values.
  25242. *
  25243. * @return bool
  25244. * @static
  25245. */
  25246. public static function updateOrInsert($attributes, $values = [])
  25247. {
  25248. /** @var \Illuminate\Database\Query\Builder $instance */
  25249. return $instance->updateOrInsert($attributes, $values);
  25250. }
  25251. /**
  25252. * Increment the given column's values by the given amounts.
  25253. *
  25254. * @param array<string, float|int|numeric-string> $columns
  25255. * @param array<string, mixed> $extra
  25256. * @return int<0, max>
  25257. * @throws \InvalidArgumentException
  25258. * @static
  25259. */
  25260. public static function incrementEach($columns, $extra = [])
  25261. {
  25262. /** @var \Illuminate\Database\Query\Builder $instance */
  25263. return $instance->incrementEach($columns, $extra);
  25264. }
  25265. /**
  25266. * Decrement the given column's values by the given amounts.
  25267. *
  25268. * @param array<string, float|int|numeric-string> $columns
  25269. * @param array<string, mixed> $extra
  25270. * @return int<0, max>
  25271. * @throws \InvalidArgumentException
  25272. * @static
  25273. */
  25274. public static function decrementEach($columns, $extra = [])
  25275. {
  25276. /** @var \Illuminate\Database\Query\Builder $instance */
  25277. return $instance->decrementEach($columns, $extra);
  25278. }
  25279. /**
  25280. * Run a truncate statement on the table.
  25281. *
  25282. * @return void
  25283. * @static
  25284. */
  25285. public static function truncate()
  25286. {
  25287. /** @var \Illuminate\Database\Query\Builder $instance */
  25288. $instance->truncate();
  25289. }
  25290. /**
  25291. * Get all of the query builder's columns in a text-only array with all expressions evaluated.
  25292. *
  25293. * @return list<string>
  25294. * @static
  25295. */
  25296. public static function getColumns()
  25297. {
  25298. /** @var \Illuminate\Database\Query\Builder $instance */
  25299. return $instance->getColumns();
  25300. }
  25301. /**
  25302. * Create a raw database expression.
  25303. *
  25304. * @param mixed $value
  25305. * @return \Illuminate\Contracts\Database\Query\Expression
  25306. * @static
  25307. */
  25308. public static function raw($value)
  25309. {
  25310. /** @var \Illuminate\Database\Query\Builder $instance */
  25311. return $instance->raw($value);
  25312. }
  25313. /**
  25314. * Get the current query value bindings in a flattened array.
  25315. *
  25316. * @return list<mixed>
  25317. * @static
  25318. */
  25319. public static function getBindings()
  25320. {
  25321. /** @var \Illuminate\Database\Query\Builder $instance */
  25322. return $instance->getBindings();
  25323. }
  25324. /**
  25325. * Get the raw array of bindings.
  25326. *
  25327. * @return \Illuminate\Database\Query\array{ select: list<mixed>,
  25328. * from: list<mixed>,
  25329. * join: list<mixed>,
  25330. * where: list<mixed>,
  25331. * groupBy: list<mixed>,
  25332. * having: list<mixed>,
  25333. * order: list<mixed>,
  25334. * union: list<mixed>,
  25335. * unionOrder: list<mixed>,
  25336. * }
  25337. * @static
  25338. */
  25339. public static function getRawBindings()
  25340. {
  25341. /** @var \Illuminate\Database\Query\Builder $instance */
  25342. return $instance->getRawBindings();
  25343. }
  25344. /**
  25345. * Set the bindings on the query builder.
  25346. *
  25347. * @param list<mixed> $bindings
  25348. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25349. * @return \Illuminate\Database\Eloquent\Builder<static>
  25350. * @throws \InvalidArgumentException
  25351. * @static
  25352. */
  25353. public static function setBindings($bindings, $type = 'where')
  25354. {
  25355. /** @var \Illuminate\Database\Query\Builder $instance */
  25356. return $instance->setBindings($bindings, $type);
  25357. }
  25358. /**
  25359. * Add a binding to the query.
  25360. *
  25361. * @param mixed $value
  25362. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25363. * @return \Illuminate\Database\Eloquent\Builder<static>
  25364. * @throws \InvalidArgumentException
  25365. * @static
  25366. */
  25367. public static function addBinding($value, $type = 'where')
  25368. {
  25369. /** @var \Illuminate\Database\Query\Builder $instance */
  25370. return $instance->addBinding($value, $type);
  25371. }
  25372. /**
  25373. * Cast the given binding value.
  25374. *
  25375. * @param mixed $value
  25376. * @return mixed
  25377. * @static
  25378. */
  25379. public static function castBinding($value)
  25380. {
  25381. /** @var \Illuminate\Database\Query\Builder $instance */
  25382. return $instance->castBinding($value);
  25383. }
  25384. /**
  25385. * Merge an array of bindings into our bindings.
  25386. *
  25387. * @param self $query
  25388. * @return \Illuminate\Database\Eloquent\Builder<static>
  25389. * @static
  25390. */
  25391. public static function mergeBindings($query)
  25392. {
  25393. /** @var \Illuminate\Database\Query\Builder $instance */
  25394. return $instance->mergeBindings($query);
  25395. }
  25396. /**
  25397. * Remove all of the expressions from a list of bindings.
  25398. *
  25399. * @param array<mixed> $bindings
  25400. * @return list<mixed>
  25401. * @static
  25402. */
  25403. public static function cleanBindings($bindings)
  25404. {
  25405. /** @var \Illuminate\Database\Query\Builder $instance */
  25406. return $instance->cleanBindings($bindings);
  25407. }
  25408. /**
  25409. * Get the database query processor instance.
  25410. *
  25411. * @return \Illuminate\Database\Query\Processors\Processor
  25412. * @static
  25413. */
  25414. public static function getProcessor()
  25415. {
  25416. /** @var \Illuminate\Database\Query\Builder $instance */
  25417. return $instance->getProcessor();
  25418. }
  25419. /**
  25420. * Get the query grammar instance.
  25421. *
  25422. * @return \Illuminate\Database\Query\Grammars\Grammar
  25423. * @static
  25424. */
  25425. public static function getGrammar()
  25426. {
  25427. /** @var \Illuminate\Database\Query\Builder $instance */
  25428. return $instance->getGrammar();
  25429. }
  25430. /**
  25431. * Use the "write" PDO connection when executing the query.
  25432. *
  25433. * @return \Illuminate\Database\Eloquent\Builder<static>
  25434. * @static
  25435. */
  25436. public static function useWritePdo()
  25437. {
  25438. /** @var \Illuminate\Database\Query\Builder $instance */
  25439. return $instance->useWritePdo();
  25440. }
  25441. /**
  25442. * Clone the query without the given properties.
  25443. *
  25444. * @return static
  25445. * @static
  25446. */
  25447. public static function cloneWithout($properties)
  25448. {
  25449. /** @var \Illuminate\Database\Query\Builder $instance */
  25450. return $instance->cloneWithout($properties);
  25451. }
  25452. /**
  25453. * Clone the query without the given bindings.
  25454. *
  25455. * @return static
  25456. * @static
  25457. */
  25458. public static function cloneWithoutBindings($except)
  25459. {
  25460. /** @var \Illuminate\Database\Query\Builder $instance */
  25461. return $instance->cloneWithoutBindings($except);
  25462. }
  25463. /**
  25464. * Dump the current SQL and bindings.
  25465. *
  25466. * @param mixed $args
  25467. * @return \Illuminate\Database\Eloquent\Builder<static>
  25468. * @static
  25469. */
  25470. public static function dump(...$args)
  25471. {
  25472. /** @var \Illuminate\Database\Query\Builder $instance */
  25473. return $instance->dump(...$args);
  25474. }
  25475. /**
  25476. * Dump the raw current SQL with embedded bindings.
  25477. *
  25478. * @return \Illuminate\Database\Eloquent\Builder<static>
  25479. * @static
  25480. */
  25481. public static function dumpRawSql()
  25482. {
  25483. /** @var \Illuminate\Database\Query\Builder $instance */
  25484. return $instance->dumpRawSql();
  25485. }
  25486. /**
  25487. * Die and dump the current SQL and bindings.
  25488. *
  25489. * @return never
  25490. * @static
  25491. */
  25492. public static function dd()
  25493. {
  25494. /** @var \Illuminate\Database\Query\Builder $instance */
  25495. return $instance->dd();
  25496. }
  25497. /**
  25498. * Die and dump the current SQL with embedded bindings.
  25499. *
  25500. * @return never
  25501. * @static
  25502. */
  25503. public static function ddRawSql()
  25504. {
  25505. /** @var \Illuminate\Database\Query\Builder $instance */
  25506. return $instance->ddRawSql();
  25507. }
  25508. /**
  25509. * Add a where clause to determine if a "date" column is in the past to the query.
  25510. *
  25511. * @param array|string $columns
  25512. * @return \Illuminate\Database\Eloquent\Builder<static>
  25513. * @static
  25514. */
  25515. public static function wherePast($columns)
  25516. {
  25517. /** @var \Illuminate\Database\Query\Builder $instance */
  25518. return $instance->wherePast($columns);
  25519. }
  25520. /**
  25521. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25522. *
  25523. * @param array|string $columns
  25524. * @return \Illuminate\Database\Eloquent\Builder<static>
  25525. * @static
  25526. */
  25527. public static function whereNowOrPast($columns)
  25528. {
  25529. /** @var \Illuminate\Database\Query\Builder $instance */
  25530. return $instance->whereNowOrPast($columns);
  25531. }
  25532. /**
  25533. * Add an "or where" clause to determine if a "date" column is in the past to the query.
  25534. *
  25535. * @param array|string $columns
  25536. * @return \Illuminate\Database\Eloquent\Builder<static>
  25537. * @static
  25538. */
  25539. public static function orWherePast($columns)
  25540. {
  25541. /** @var \Illuminate\Database\Query\Builder $instance */
  25542. return $instance->orWherePast($columns);
  25543. }
  25544. /**
  25545. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25546. *
  25547. * @param array|string $columns
  25548. * @return \Illuminate\Database\Eloquent\Builder<static>
  25549. * @static
  25550. */
  25551. public static function orWhereNowOrPast($columns)
  25552. {
  25553. /** @var \Illuminate\Database\Query\Builder $instance */
  25554. return $instance->orWhereNowOrPast($columns);
  25555. }
  25556. /**
  25557. * Add a where clause to determine if a "date" column is in the future to the query.
  25558. *
  25559. * @param array|string $columns
  25560. * @return \Illuminate\Database\Eloquent\Builder<static>
  25561. * @static
  25562. */
  25563. public static function whereFuture($columns)
  25564. {
  25565. /** @var \Illuminate\Database\Query\Builder $instance */
  25566. return $instance->whereFuture($columns);
  25567. }
  25568. /**
  25569. * Add a where clause to determine if a "date" column is in the future or now to the query.
  25570. *
  25571. * @param array|string $columns
  25572. * @return \Illuminate\Database\Eloquent\Builder<static>
  25573. * @static
  25574. */
  25575. public static function whereNowOrFuture($columns)
  25576. {
  25577. /** @var \Illuminate\Database\Query\Builder $instance */
  25578. return $instance->whereNowOrFuture($columns);
  25579. }
  25580. /**
  25581. * Add an "or where" clause to determine if a "date" column is in the future to the query.
  25582. *
  25583. * @param array|string $columns
  25584. * @return \Illuminate\Database\Eloquent\Builder<static>
  25585. * @static
  25586. */
  25587. public static function orWhereFuture($columns)
  25588. {
  25589. /** @var \Illuminate\Database\Query\Builder $instance */
  25590. return $instance->orWhereFuture($columns);
  25591. }
  25592. /**
  25593. * Add an "or where" clause to determine if a "date" column is in the future or now to the query.
  25594. *
  25595. * @param array|string $columns
  25596. * @return \Illuminate\Database\Eloquent\Builder<static>
  25597. * @static
  25598. */
  25599. public static function orWhereNowOrFuture($columns)
  25600. {
  25601. /** @var \Illuminate\Database\Query\Builder $instance */
  25602. return $instance->orWhereNowOrFuture($columns);
  25603. }
  25604. /**
  25605. * Add a "where date" clause to determine if a "date" column is today to the query.
  25606. *
  25607. * @param array|string $columns
  25608. * @param string $boolean
  25609. * @return \Illuminate\Database\Eloquent\Builder<static>
  25610. * @static
  25611. */
  25612. public static function whereToday($columns, $boolean = 'and')
  25613. {
  25614. /** @var \Illuminate\Database\Query\Builder $instance */
  25615. return $instance->whereToday($columns, $boolean);
  25616. }
  25617. /**
  25618. * Add a "where date" clause to determine if a "date" column is before today.
  25619. *
  25620. * @param array|string $columns
  25621. * @return \Illuminate\Database\Eloquent\Builder<static>
  25622. * @static
  25623. */
  25624. public static function whereBeforeToday($columns)
  25625. {
  25626. /** @var \Illuminate\Database\Query\Builder $instance */
  25627. return $instance->whereBeforeToday($columns);
  25628. }
  25629. /**
  25630. * Add a "where date" clause to determine if a "date" column is today or before to the query.
  25631. *
  25632. * @param array|string $columns
  25633. * @return \Illuminate\Database\Eloquent\Builder<static>
  25634. * @static
  25635. */
  25636. public static function whereTodayOrBefore($columns)
  25637. {
  25638. /** @var \Illuminate\Database\Query\Builder $instance */
  25639. return $instance->whereTodayOrBefore($columns);
  25640. }
  25641. /**
  25642. * Add a "where date" clause to determine if a "date" column is after today.
  25643. *
  25644. * @param array|string $columns
  25645. * @return \Illuminate\Database\Eloquent\Builder<static>
  25646. * @static
  25647. */
  25648. public static function whereAfterToday($columns)
  25649. {
  25650. /** @var \Illuminate\Database\Query\Builder $instance */
  25651. return $instance->whereAfterToday($columns);
  25652. }
  25653. /**
  25654. * Add a "where date" clause to determine if a "date" column is today or after to the query.
  25655. *
  25656. * @param array|string $columns
  25657. * @return \Illuminate\Database\Eloquent\Builder<static>
  25658. * @static
  25659. */
  25660. public static function whereTodayOrAfter($columns)
  25661. {
  25662. /** @var \Illuminate\Database\Query\Builder $instance */
  25663. return $instance->whereTodayOrAfter($columns);
  25664. }
  25665. /**
  25666. * Add an "or where date" clause to determine if a "date" column is today to the query.
  25667. *
  25668. * @param array|string $columns
  25669. * @return \Illuminate\Database\Eloquent\Builder<static>
  25670. * @static
  25671. */
  25672. public static function orWhereToday($columns)
  25673. {
  25674. /** @var \Illuminate\Database\Query\Builder $instance */
  25675. return $instance->orWhereToday($columns);
  25676. }
  25677. /**
  25678. * Add an "or where date" clause to determine if a "date" column is before today.
  25679. *
  25680. * @param array|string $columns
  25681. * @return \Illuminate\Database\Eloquent\Builder<static>
  25682. * @static
  25683. */
  25684. public static function orWhereBeforeToday($columns)
  25685. {
  25686. /** @var \Illuminate\Database\Query\Builder $instance */
  25687. return $instance->orWhereBeforeToday($columns);
  25688. }
  25689. /**
  25690. * Add an "or where date" clause to determine if a "date" column is today or before to the query.
  25691. *
  25692. * @param array|string $columns
  25693. * @return \Illuminate\Database\Eloquent\Builder<static>
  25694. * @static
  25695. */
  25696. public static function orWhereTodayOrBefore($columns)
  25697. {
  25698. /** @var \Illuminate\Database\Query\Builder $instance */
  25699. return $instance->orWhereTodayOrBefore($columns);
  25700. }
  25701. /**
  25702. * Add an "or where date" clause to determine if a "date" column is after today.
  25703. *
  25704. * @param array|string $columns
  25705. * @return \Illuminate\Database\Eloquent\Builder<static>
  25706. * @static
  25707. */
  25708. public static function orWhereAfterToday($columns)
  25709. {
  25710. /** @var \Illuminate\Database\Query\Builder $instance */
  25711. return $instance->orWhereAfterToday($columns);
  25712. }
  25713. /**
  25714. * Add an "or where date" clause to determine if a "date" column is today or after to the query.
  25715. *
  25716. * @param array|string $columns
  25717. * @return \Illuminate\Database\Eloquent\Builder<static>
  25718. * @static
  25719. */
  25720. public static function orWhereTodayOrAfter($columns)
  25721. {
  25722. /** @var \Illuminate\Database\Query\Builder $instance */
  25723. return $instance->orWhereTodayOrAfter($columns);
  25724. }
  25725. /**
  25726. * Explains the query.
  25727. *
  25728. * @return \Illuminate\Support\Collection
  25729. * @static
  25730. */
  25731. public static function explain()
  25732. {
  25733. /** @var \Illuminate\Database\Query\Builder $instance */
  25734. return $instance->explain();
  25735. }
  25736. /**
  25737. * Register a custom macro.
  25738. *
  25739. * @param string $name
  25740. * @param object|callable $macro
  25741. * @param-closure-this static $macro
  25742. * @return void
  25743. * @static
  25744. */
  25745. public static function macro($name, $macro)
  25746. {
  25747. \Illuminate\Database\Query\Builder::macro($name, $macro);
  25748. }
  25749. /**
  25750. * Mix another object into the class.
  25751. *
  25752. * @param object $mixin
  25753. * @param bool $replace
  25754. * @return void
  25755. * @throws \ReflectionException
  25756. * @static
  25757. */
  25758. public static function mixin($mixin, $replace = true)
  25759. {
  25760. \Illuminate\Database\Query\Builder::mixin($mixin, $replace);
  25761. }
  25762. /**
  25763. * Flush the existing macros.
  25764. *
  25765. * @return void
  25766. * @static
  25767. */
  25768. public static function flushMacros()
  25769. {
  25770. \Illuminate\Database\Query\Builder::flushMacros();
  25771. }
  25772. /**
  25773. * Dynamically handle calls to the class.
  25774. *
  25775. * @param string $method
  25776. * @param array $parameters
  25777. * @return mixed
  25778. * @throws \BadMethodCallException
  25779. * @static
  25780. */
  25781. public static function macroCall($method, $parameters)
  25782. {
  25783. /** @var \Illuminate\Database\Query\Builder $instance */
  25784. return $instance->macroCall($method, $parameters);
  25785. }
  25786. }
  25787. class Event extends \Illuminate\Support\Facades\Event {}
  25788. class File extends \Illuminate\Support\Facades\File {}
  25789. class Gate extends \Illuminate\Support\Facades\Gate {}
  25790. class Hash extends \Illuminate\Support\Facades\Hash {}
  25791. class Http extends \Illuminate\Support\Facades\Http {}
  25792. class Js extends \Illuminate\Support\Js {}
  25793. class Lang extends \Illuminate\Support\Facades\Lang {}
  25794. class Log extends \Illuminate\Support\Facades\Log {}
  25795. class Mail extends \Illuminate\Support\Facades\Mail {}
  25796. class Notification extends \Illuminate\Support\Facades\Notification {}
  25797. class Number extends \Illuminate\Support\Number {}
  25798. class Password extends \Illuminate\Support\Facades\Password {}
  25799. class Process extends \Illuminate\Support\Facades\Process {}
  25800. class Queue extends \Illuminate\Support\Facades\Queue {}
  25801. class RateLimiter extends \Illuminate\Support\Facades\RateLimiter {}
  25802. class Redirect extends \Illuminate\Support\Facades\Redirect {}
  25803. class Request extends \Illuminate\Support\Facades\Request {}
  25804. class Response extends \Illuminate\Support\Facades\Response {}
  25805. class Route extends \Illuminate\Support\Facades\Route {}
  25806. class Schedule extends \Illuminate\Support\Facades\Schedule {}
  25807. class Schema extends \Illuminate\Support\Facades\Schema {}
  25808. class Session extends \Illuminate\Support\Facades\Session {}
  25809. class Storage extends \Illuminate\Support\Facades\Storage {}
  25810. class Str extends \Illuminate\Support\Str {}
  25811. class URL extends \Illuminate\Support\Facades\URL {}
  25812. class Uri extends \Illuminate\Support\Uri {}
  25813. class Validator extends \Illuminate\Support\Facades\Validator {}
  25814. class View extends \Illuminate\Support\Facades\View {}
  25815. class Vite extends \Illuminate\Support\Facades\Vite {}
  25816. }