_ide_helper.php 886 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077
  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\AwsS3V3Adapter
  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\AwsS3V3Adapter
  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\AwsS3V3Adapter
  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\AwsS3V3Adapter
  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\AwsS3V3Adapter
  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\AwsS3V3Adapter
  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\AwsS3V3Adapter
  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. * Get the URL for the file at the given path.
  18322. *
  18323. * @param string $path
  18324. * @return string
  18325. * @throws \RuntimeException
  18326. * @static
  18327. */
  18328. public static function url($path)
  18329. {
  18330. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18331. return $instance->url($path);
  18332. }
  18333. /**
  18334. * Determine if temporary URLs can be generated.
  18335. *
  18336. * @return bool
  18337. * @static
  18338. */
  18339. public static function providesTemporaryUrls()
  18340. {
  18341. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18342. return $instance->providesTemporaryUrls();
  18343. }
  18344. /**
  18345. * Get a temporary URL for the file at the given path.
  18346. *
  18347. * @param string $path
  18348. * @param \DateTimeInterface $expiration
  18349. * @param array $options
  18350. * @return string
  18351. * @static
  18352. */
  18353. public static function temporaryUrl($path, $expiration, $options = [])
  18354. {
  18355. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18356. return $instance->temporaryUrl($path, $expiration, $options);
  18357. }
  18358. /**
  18359. * Get a temporary upload URL for the file at the given path.
  18360. *
  18361. * @param string $path
  18362. * @param \DateTimeInterface $expiration
  18363. * @param array $options
  18364. * @return array
  18365. * @static
  18366. */
  18367. public static function temporaryUploadUrl($path, $expiration, $options = [])
  18368. {
  18369. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18370. return $instance->temporaryUploadUrl($path, $expiration, $options);
  18371. }
  18372. /**
  18373. * Get the underlying S3 client.
  18374. *
  18375. * @return \Aws\S3\S3Client
  18376. * @static
  18377. */
  18378. public static function getClient()
  18379. {
  18380. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18381. return $instance->getClient();
  18382. }
  18383. /**
  18384. * Assert that the given file or directory exists.
  18385. *
  18386. * @param string|array $path
  18387. * @param string|null $content
  18388. * @return \Illuminate\Filesystem\AwsS3V3Adapter
  18389. * @static
  18390. */
  18391. public static function assertExists($path, $content = null)
  18392. {
  18393. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18394. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18395. return $instance->assertExists($path, $content);
  18396. }
  18397. /**
  18398. * Assert that the number of files in path equals the expected count.
  18399. *
  18400. * @param string $path
  18401. * @param int $count
  18402. * @param bool $recursive
  18403. * @return \Illuminate\Filesystem\AwsS3V3Adapter
  18404. * @static
  18405. */
  18406. public static function assertCount($path, $count, $recursive = false)
  18407. {
  18408. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18409. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18410. return $instance->assertCount($path, $count, $recursive);
  18411. }
  18412. /**
  18413. * Assert that the given file or directory does not exist.
  18414. *
  18415. * @param string|array $path
  18416. * @return \Illuminate\Filesystem\AwsS3V3Adapter
  18417. * @static
  18418. */
  18419. public static function assertMissing($path)
  18420. {
  18421. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18422. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18423. return $instance->assertMissing($path);
  18424. }
  18425. /**
  18426. * Assert that the given directory is empty.
  18427. *
  18428. * @param string $path
  18429. * @return \Illuminate\Filesystem\AwsS3V3Adapter
  18430. * @static
  18431. */
  18432. public static function assertDirectoryEmpty($path)
  18433. {
  18434. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18435. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18436. return $instance->assertDirectoryEmpty($path);
  18437. }
  18438. /**
  18439. * Determine if a file or directory exists.
  18440. *
  18441. * @param string $path
  18442. * @return bool
  18443. * @static
  18444. */
  18445. public static function exists($path)
  18446. {
  18447. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18448. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18449. return $instance->exists($path);
  18450. }
  18451. /**
  18452. * Determine if a file or directory is missing.
  18453. *
  18454. * @param string $path
  18455. * @return bool
  18456. * @static
  18457. */
  18458. public static function missing($path)
  18459. {
  18460. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18461. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18462. return $instance->missing($path);
  18463. }
  18464. /**
  18465. * Determine if a file exists.
  18466. *
  18467. * @param string $path
  18468. * @return bool
  18469. * @static
  18470. */
  18471. public static function fileExists($path)
  18472. {
  18473. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18474. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18475. return $instance->fileExists($path);
  18476. }
  18477. /**
  18478. * Determine if a file is missing.
  18479. *
  18480. * @param string $path
  18481. * @return bool
  18482. * @static
  18483. */
  18484. public static function fileMissing($path)
  18485. {
  18486. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18487. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18488. return $instance->fileMissing($path);
  18489. }
  18490. /**
  18491. * Determine if a directory exists.
  18492. *
  18493. * @param string $path
  18494. * @return bool
  18495. * @static
  18496. */
  18497. public static function directoryExists($path)
  18498. {
  18499. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18500. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18501. return $instance->directoryExists($path);
  18502. }
  18503. /**
  18504. * Determine if a directory is missing.
  18505. *
  18506. * @param string $path
  18507. * @return bool
  18508. * @static
  18509. */
  18510. public static function directoryMissing($path)
  18511. {
  18512. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18513. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18514. return $instance->directoryMissing($path);
  18515. }
  18516. /**
  18517. * Get the full path to the file that exists at the given relative path.
  18518. *
  18519. * @param string $path
  18520. * @return string
  18521. * @static
  18522. */
  18523. public static function path($path)
  18524. {
  18525. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18526. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18527. return $instance->path($path);
  18528. }
  18529. /**
  18530. * Get the contents of a file.
  18531. *
  18532. * @param string $path
  18533. * @return string|null
  18534. * @static
  18535. */
  18536. public static function get($path)
  18537. {
  18538. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18539. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18540. return $instance->get($path);
  18541. }
  18542. /**
  18543. * Get the contents of a file as decoded JSON.
  18544. *
  18545. * @param string $path
  18546. * @param int $flags
  18547. * @return array|null
  18548. * @static
  18549. */
  18550. public static function json($path, $flags = 0)
  18551. {
  18552. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18553. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18554. return $instance->json($path, $flags);
  18555. }
  18556. /**
  18557. * Create a streamed response for a given file.
  18558. *
  18559. * @param string $path
  18560. * @param string|null $name
  18561. * @param array $headers
  18562. * @param string|null $disposition
  18563. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18564. * @static
  18565. */
  18566. public static function response($path, $name = null, $headers = [], $disposition = 'inline')
  18567. {
  18568. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18569. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18570. return $instance->response($path, $name, $headers, $disposition);
  18571. }
  18572. /**
  18573. * Create a streamed download response for a given file.
  18574. *
  18575. * @param \Illuminate\Http\Request $request
  18576. * @param string $path
  18577. * @param string|null $name
  18578. * @param array $headers
  18579. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18580. * @static
  18581. */
  18582. public static function serve($request, $path, $name = null, $headers = [])
  18583. {
  18584. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18585. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18586. return $instance->serve($request, $path, $name, $headers);
  18587. }
  18588. /**
  18589. * Create a streamed download response for a given file.
  18590. *
  18591. * @param string $path
  18592. * @param string|null $name
  18593. * @param array $headers
  18594. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  18595. * @static
  18596. */
  18597. public static function download($path, $name = null, $headers = [])
  18598. {
  18599. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18600. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18601. return $instance->download($path, $name, $headers);
  18602. }
  18603. /**
  18604. * Write the contents of a file.
  18605. *
  18606. * @param string $path
  18607. * @param \Psr\Http\Message\StreamInterface|\Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|resource $contents
  18608. * @param mixed $options
  18609. * @return string|bool
  18610. * @static
  18611. */
  18612. public static function put($path, $contents, $options = [])
  18613. {
  18614. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18615. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18616. return $instance->put($path, $contents, $options);
  18617. }
  18618. /**
  18619. * Store the uploaded file on the disk.
  18620. *
  18621. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18622. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18623. * @param mixed $options
  18624. * @return string|false
  18625. * @static
  18626. */
  18627. public static function putFile($path, $file = null, $options = [])
  18628. {
  18629. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18630. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18631. return $instance->putFile($path, $file, $options);
  18632. }
  18633. /**
  18634. * Store the uploaded file on the disk with a given name.
  18635. *
  18636. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $path
  18637. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|array|null $file
  18638. * @param string|array|null $name
  18639. * @param mixed $options
  18640. * @return string|false
  18641. * @static
  18642. */
  18643. public static function putFileAs($path, $file, $name = null, $options = [])
  18644. {
  18645. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18646. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18647. return $instance->putFileAs($path, $file, $name, $options);
  18648. }
  18649. /**
  18650. * Get the visibility for the given path.
  18651. *
  18652. * @param string $path
  18653. * @return string
  18654. * @static
  18655. */
  18656. public static function getVisibility($path)
  18657. {
  18658. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18659. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18660. return $instance->getVisibility($path);
  18661. }
  18662. /**
  18663. * Set the visibility for the given path.
  18664. *
  18665. * @param string $path
  18666. * @param string $visibility
  18667. * @return bool
  18668. * @static
  18669. */
  18670. public static function setVisibility($path, $visibility)
  18671. {
  18672. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18673. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18674. return $instance->setVisibility($path, $visibility);
  18675. }
  18676. /**
  18677. * Prepend to a file.
  18678. *
  18679. * @param string $path
  18680. * @param string $data
  18681. * @param string $separator
  18682. * @return bool
  18683. * @static
  18684. */
  18685. public static function prepend($path, $data, $separator = '
  18686. ')
  18687. {
  18688. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18689. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18690. return $instance->prepend($path, $data, $separator);
  18691. }
  18692. /**
  18693. * Append to a file.
  18694. *
  18695. * @param string $path
  18696. * @param string $data
  18697. * @param string $separator
  18698. * @return bool
  18699. * @static
  18700. */
  18701. public static function append($path, $data, $separator = '
  18702. ')
  18703. {
  18704. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18705. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18706. return $instance->append($path, $data, $separator);
  18707. }
  18708. /**
  18709. * Delete the file at a given path.
  18710. *
  18711. * @param string|array $paths
  18712. * @return bool
  18713. * @static
  18714. */
  18715. public static function delete($paths)
  18716. {
  18717. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18718. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18719. return $instance->delete($paths);
  18720. }
  18721. /**
  18722. * Copy a file to a new location.
  18723. *
  18724. * @param string $from
  18725. * @param string $to
  18726. * @return bool
  18727. * @static
  18728. */
  18729. public static function copy($from, $to)
  18730. {
  18731. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18732. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18733. return $instance->copy($from, $to);
  18734. }
  18735. /**
  18736. * Move a file to a new location.
  18737. *
  18738. * @param string $from
  18739. * @param string $to
  18740. * @return bool
  18741. * @static
  18742. */
  18743. public static function move($from, $to)
  18744. {
  18745. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18746. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18747. return $instance->move($from, $to);
  18748. }
  18749. /**
  18750. * Get the file size of a given file.
  18751. *
  18752. * @param string $path
  18753. * @return int
  18754. * @static
  18755. */
  18756. public static function size($path)
  18757. {
  18758. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18759. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18760. return $instance->size($path);
  18761. }
  18762. /**
  18763. * Get the checksum for a file.
  18764. *
  18765. * @return string|false
  18766. * @throws UnableToProvideChecksum
  18767. * @static
  18768. */
  18769. public static function checksum($path, $options = [])
  18770. {
  18771. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18772. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18773. return $instance->checksum($path, $options);
  18774. }
  18775. /**
  18776. * Get the mime-type of a given file.
  18777. *
  18778. * @param string $path
  18779. * @return string|false
  18780. * @static
  18781. */
  18782. public static function mimeType($path)
  18783. {
  18784. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18785. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18786. return $instance->mimeType($path);
  18787. }
  18788. /**
  18789. * Get the file's last modification time.
  18790. *
  18791. * @param string $path
  18792. * @return int
  18793. * @static
  18794. */
  18795. public static function lastModified($path)
  18796. {
  18797. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18798. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18799. return $instance->lastModified($path);
  18800. }
  18801. /**
  18802. * Get a resource to read the file.
  18803. *
  18804. * @param string $path
  18805. * @return resource|null The path resource or null on failure.
  18806. * @static
  18807. */
  18808. public static function readStream($path)
  18809. {
  18810. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18811. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18812. return $instance->readStream($path);
  18813. }
  18814. /**
  18815. * Write a new file using a stream.
  18816. *
  18817. * @param string $path
  18818. * @param resource $resource
  18819. * @param array $options
  18820. * @return bool
  18821. * @static
  18822. */
  18823. public static function writeStream($path, $resource, $options = [])
  18824. {
  18825. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18826. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18827. return $instance->writeStream($path, $resource, $options);
  18828. }
  18829. /**
  18830. * Get an array of all files in a directory.
  18831. *
  18832. * @param string|null $directory
  18833. * @param bool $recursive
  18834. * @return array
  18835. * @static
  18836. */
  18837. public static function files($directory = null, $recursive = false)
  18838. {
  18839. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18840. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18841. return $instance->files($directory, $recursive);
  18842. }
  18843. /**
  18844. * Get all of the files from the given directory (recursive).
  18845. *
  18846. * @param string|null $directory
  18847. * @return array
  18848. * @static
  18849. */
  18850. public static function allFiles($directory = null)
  18851. {
  18852. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18853. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18854. return $instance->allFiles($directory);
  18855. }
  18856. /**
  18857. * Get all of the directories within a given directory.
  18858. *
  18859. * @param string|null $directory
  18860. * @param bool $recursive
  18861. * @return array
  18862. * @static
  18863. */
  18864. public static function directories($directory = null, $recursive = false)
  18865. {
  18866. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18867. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18868. return $instance->directories($directory, $recursive);
  18869. }
  18870. /**
  18871. * Get all the directories within a given directory (recursive).
  18872. *
  18873. * @param string|null $directory
  18874. * @return array
  18875. * @static
  18876. */
  18877. public static function allDirectories($directory = null)
  18878. {
  18879. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18880. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18881. return $instance->allDirectories($directory);
  18882. }
  18883. /**
  18884. * Create a directory.
  18885. *
  18886. * @param string $path
  18887. * @return bool
  18888. * @static
  18889. */
  18890. public static function makeDirectory($path)
  18891. {
  18892. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18893. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18894. return $instance->makeDirectory($path);
  18895. }
  18896. /**
  18897. * Recursively delete a directory.
  18898. *
  18899. * @param string $directory
  18900. * @return bool
  18901. * @static
  18902. */
  18903. public static function deleteDirectory($directory)
  18904. {
  18905. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18906. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18907. return $instance->deleteDirectory($directory);
  18908. }
  18909. /**
  18910. * Get the Flysystem driver.
  18911. *
  18912. * @return \League\Flysystem\FilesystemOperator
  18913. * @static
  18914. */
  18915. public static function getDriver()
  18916. {
  18917. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18918. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18919. return $instance->getDriver();
  18920. }
  18921. /**
  18922. * Get the Flysystem adapter.
  18923. *
  18924. * @return \League\Flysystem\FilesystemAdapter
  18925. * @static
  18926. */
  18927. public static function getAdapter()
  18928. {
  18929. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18930. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18931. return $instance->getAdapter();
  18932. }
  18933. /**
  18934. * Get the configuration values.
  18935. *
  18936. * @return array
  18937. * @static
  18938. */
  18939. public static function getConfig()
  18940. {
  18941. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18942. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18943. return $instance->getConfig();
  18944. }
  18945. /**
  18946. * Define a custom callback that generates file download responses.
  18947. *
  18948. * @param \Closure $callback
  18949. * @return void
  18950. * @static
  18951. */
  18952. public static function serveUsing($callback)
  18953. {
  18954. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18955. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18956. $instance->serveUsing($callback);
  18957. }
  18958. /**
  18959. * Define a custom temporary URL builder callback.
  18960. *
  18961. * @param \Closure $callback
  18962. * @return void
  18963. * @static
  18964. */
  18965. public static function buildTemporaryUrlsUsing($callback)
  18966. {
  18967. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  18968. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18969. $instance->buildTemporaryUrlsUsing($callback);
  18970. }
  18971. /**
  18972. * Apply the callback if the given "value" is (or resolves to) truthy.
  18973. *
  18974. * @template TWhenParameter
  18975. * @template TWhenReturnType
  18976. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  18977. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  18978. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  18979. * @return $this|TWhenReturnType
  18980. * @static
  18981. */
  18982. public static function when($value = null, $callback = null, $default = null)
  18983. {
  18984. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  18985. return $instance->when($value, $callback, $default);
  18986. }
  18987. /**
  18988. * Apply the callback if the given "value" is (or resolves to) falsy.
  18989. *
  18990. * @template TUnlessParameter
  18991. * @template TUnlessReturnType
  18992. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  18993. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  18994. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  18995. * @return $this|TUnlessReturnType
  18996. * @static
  18997. */
  18998. public static function unless($value = null, $callback = null, $default = null)
  18999. {
  19000. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  19001. return $instance->unless($value, $callback, $default);
  19002. }
  19003. /**
  19004. * Register a custom macro.
  19005. *
  19006. * @param string $name
  19007. * @param object|callable $macro
  19008. * @param-closure-this static $macro
  19009. * @return void
  19010. * @static
  19011. */
  19012. public static function macro($name, $macro)
  19013. {
  19014. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19015. \Illuminate\Filesystem\AwsS3V3Adapter::macro($name, $macro);
  19016. }
  19017. /**
  19018. * Mix another object into the class.
  19019. *
  19020. * @param object $mixin
  19021. * @param bool $replace
  19022. * @return void
  19023. * @throws \ReflectionException
  19024. * @static
  19025. */
  19026. public static function mixin($mixin, $replace = true)
  19027. {
  19028. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19029. \Illuminate\Filesystem\AwsS3V3Adapter::mixin($mixin, $replace);
  19030. }
  19031. /**
  19032. * Checks if macro is registered.
  19033. *
  19034. * @param string $name
  19035. * @return bool
  19036. * @static
  19037. */
  19038. public static function hasMacro($name)
  19039. {
  19040. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19041. return \Illuminate\Filesystem\AwsS3V3Adapter::hasMacro($name);
  19042. }
  19043. /**
  19044. * Flush the existing macros.
  19045. *
  19046. * @return void
  19047. * @static
  19048. */
  19049. public static function flushMacros()
  19050. {
  19051. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19052. \Illuminate\Filesystem\AwsS3V3Adapter::flushMacros();
  19053. }
  19054. /**
  19055. * Dynamically handle calls to the class.
  19056. *
  19057. * @param string $method
  19058. * @param array $parameters
  19059. * @return mixed
  19060. * @throws \BadMethodCallException
  19061. * @static
  19062. */
  19063. public static function macroCall($method, $parameters)
  19064. {
  19065. //Method inherited from \Illuminate\Filesystem\FilesystemAdapter
  19066. /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */
  19067. return $instance->macroCall($method, $parameters);
  19068. }
  19069. }
  19070. /**
  19071. * @see \Illuminate\Routing\UrlGenerator
  19072. */
  19073. class URL {
  19074. /**
  19075. * Get the full URL for the current request.
  19076. *
  19077. * @return string
  19078. * @static
  19079. */
  19080. public static function full()
  19081. {
  19082. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19083. return $instance->full();
  19084. }
  19085. /**
  19086. * Get the current URL for the request.
  19087. *
  19088. * @return string
  19089. * @static
  19090. */
  19091. public static function current()
  19092. {
  19093. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19094. return $instance->current();
  19095. }
  19096. /**
  19097. * Get the URL for the previous request.
  19098. *
  19099. * @param mixed $fallback
  19100. * @return string
  19101. * @static
  19102. */
  19103. public static function previous($fallback = false)
  19104. {
  19105. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19106. return $instance->previous($fallback);
  19107. }
  19108. /**
  19109. * Get the previous path info for the request.
  19110. *
  19111. * @param mixed $fallback
  19112. * @return string
  19113. * @static
  19114. */
  19115. public static function previousPath($fallback = false)
  19116. {
  19117. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19118. return $instance->previousPath($fallback);
  19119. }
  19120. /**
  19121. * Generate an absolute URL to the given path.
  19122. *
  19123. * @param string $path
  19124. * @param mixed $extra
  19125. * @param bool|null $secure
  19126. * @return string
  19127. * @static
  19128. */
  19129. public static function to($path, $extra = [], $secure = null)
  19130. {
  19131. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19132. return $instance->to($path, $extra, $secure);
  19133. }
  19134. /**
  19135. * Generate an absolute URL with the given query parameters.
  19136. *
  19137. * @param string $path
  19138. * @param array $query
  19139. * @param mixed $extra
  19140. * @param bool|null $secure
  19141. * @return string
  19142. * @static
  19143. */
  19144. public static function query($path, $query = [], $extra = [], $secure = null)
  19145. {
  19146. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19147. return $instance->query($path, $query, $extra, $secure);
  19148. }
  19149. /**
  19150. * Generate a secure, absolute URL to the given path.
  19151. *
  19152. * @param string $path
  19153. * @param array $parameters
  19154. * @return string
  19155. * @static
  19156. */
  19157. public static function secure($path, $parameters = [])
  19158. {
  19159. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19160. return $instance->secure($path, $parameters);
  19161. }
  19162. /**
  19163. * Generate the URL to an application asset.
  19164. *
  19165. * @param string $path
  19166. * @param bool|null $secure
  19167. * @return string
  19168. * @static
  19169. */
  19170. public static function asset($path, $secure = null)
  19171. {
  19172. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19173. return $instance->asset($path, $secure);
  19174. }
  19175. /**
  19176. * Generate the URL to a secure asset.
  19177. *
  19178. * @param string $path
  19179. * @return string
  19180. * @static
  19181. */
  19182. public static function secureAsset($path)
  19183. {
  19184. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19185. return $instance->secureAsset($path);
  19186. }
  19187. /**
  19188. * Generate the URL to an asset from a custom root domain such as CDN, etc.
  19189. *
  19190. * @param string $root
  19191. * @param string $path
  19192. * @param bool|null $secure
  19193. * @return string
  19194. * @static
  19195. */
  19196. public static function assetFrom($root, $path, $secure = null)
  19197. {
  19198. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19199. return $instance->assetFrom($root, $path, $secure);
  19200. }
  19201. /**
  19202. * Get the default scheme for a raw URL.
  19203. *
  19204. * @param bool|null $secure
  19205. * @return string
  19206. * @static
  19207. */
  19208. public static function formatScheme($secure = null)
  19209. {
  19210. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19211. return $instance->formatScheme($secure);
  19212. }
  19213. /**
  19214. * Create a signed route URL for a named route.
  19215. *
  19216. * @param \BackedEnum|string $name
  19217. * @param mixed $parameters
  19218. * @param \DateTimeInterface|\DateInterval|int|null $expiration
  19219. * @param bool $absolute
  19220. * @return string
  19221. * @throws \InvalidArgumentException
  19222. * @static
  19223. */
  19224. public static function signedRoute($name, $parameters = [], $expiration = null, $absolute = true)
  19225. {
  19226. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19227. return $instance->signedRoute($name, $parameters, $expiration, $absolute);
  19228. }
  19229. /**
  19230. * Create a temporary signed route URL for a named route.
  19231. *
  19232. * @param \BackedEnum|string $name
  19233. * @param \DateTimeInterface|\DateInterval|int $expiration
  19234. * @param array $parameters
  19235. * @param bool $absolute
  19236. * @return string
  19237. * @static
  19238. */
  19239. public static function temporarySignedRoute($name, $expiration, $parameters = [], $absolute = true)
  19240. {
  19241. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19242. return $instance->temporarySignedRoute($name, $expiration, $parameters, $absolute);
  19243. }
  19244. /**
  19245. * Determine if the given request has a valid signature.
  19246. *
  19247. * @param \Illuminate\Http\Request $request
  19248. * @param bool $absolute
  19249. * @param \Closure|array $ignoreQuery
  19250. * @return bool
  19251. * @static
  19252. */
  19253. public static function hasValidSignature($request, $absolute = true, $ignoreQuery = [])
  19254. {
  19255. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19256. return $instance->hasValidSignature($request, $absolute, $ignoreQuery);
  19257. }
  19258. /**
  19259. * Determine if the given request has a valid signature for a relative URL.
  19260. *
  19261. * @param \Illuminate\Http\Request $request
  19262. * @param \Closure|array $ignoreQuery
  19263. * @return bool
  19264. * @static
  19265. */
  19266. public static function hasValidRelativeSignature($request, $ignoreQuery = [])
  19267. {
  19268. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19269. return $instance->hasValidRelativeSignature($request, $ignoreQuery);
  19270. }
  19271. /**
  19272. * Determine if the signature from the given request matches the URL.
  19273. *
  19274. * @param \Illuminate\Http\Request $request
  19275. * @param bool $absolute
  19276. * @param \Closure|array $ignoreQuery
  19277. * @return bool
  19278. * @static
  19279. */
  19280. public static function hasCorrectSignature($request, $absolute = true, $ignoreQuery = [])
  19281. {
  19282. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19283. return $instance->hasCorrectSignature($request, $absolute, $ignoreQuery);
  19284. }
  19285. /**
  19286. * Determine if the expires timestamp from the given request is not from the past.
  19287. *
  19288. * @param \Illuminate\Http\Request $request
  19289. * @return bool
  19290. * @static
  19291. */
  19292. public static function signatureHasNotExpired($request)
  19293. {
  19294. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19295. return $instance->signatureHasNotExpired($request);
  19296. }
  19297. /**
  19298. * Get the URL to a named route.
  19299. *
  19300. * @param \BackedEnum|string $name
  19301. * @param mixed $parameters
  19302. * @param bool $absolute
  19303. * @return string
  19304. * @throws \Symfony\Component\Routing\Exception\RouteNotFoundException|\InvalidArgumentException
  19305. * @static
  19306. */
  19307. public static function route($name, $parameters = [], $absolute = true)
  19308. {
  19309. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19310. return $instance->route($name, $parameters, $absolute);
  19311. }
  19312. /**
  19313. * Get the URL for a given route instance.
  19314. *
  19315. * @param \Illuminate\Routing\Route $route
  19316. * @param mixed $parameters
  19317. * @param bool $absolute
  19318. * @return string
  19319. * @throws \Illuminate\Routing\Exceptions\UrlGenerationException
  19320. * @static
  19321. */
  19322. public static function toRoute($route, $parameters, $absolute)
  19323. {
  19324. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19325. return $instance->toRoute($route, $parameters, $absolute);
  19326. }
  19327. /**
  19328. * Get the URL to a controller action.
  19329. *
  19330. * @param string|array $action
  19331. * @param mixed $parameters
  19332. * @param bool $absolute
  19333. * @return string
  19334. * @throws \InvalidArgumentException
  19335. * @static
  19336. */
  19337. public static function action($action, $parameters = [], $absolute = true)
  19338. {
  19339. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19340. return $instance->action($action, $parameters, $absolute);
  19341. }
  19342. /**
  19343. * Format the array of URL parameters.
  19344. *
  19345. * @param mixed $parameters
  19346. * @return array
  19347. * @static
  19348. */
  19349. public static function formatParameters($parameters)
  19350. {
  19351. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19352. return $instance->formatParameters($parameters);
  19353. }
  19354. /**
  19355. * Get the base URL for the request.
  19356. *
  19357. * @param string $scheme
  19358. * @param string|null $root
  19359. * @return string
  19360. * @static
  19361. */
  19362. public static function formatRoot($scheme, $root = null)
  19363. {
  19364. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19365. return $instance->formatRoot($scheme, $root);
  19366. }
  19367. /**
  19368. * Format the given URL segments into a single URL.
  19369. *
  19370. * @param string $root
  19371. * @param string $path
  19372. * @param \Illuminate\Routing\Route|null $route
  19373. * @return string
  19374. * @static
  19375. */
  19376. public static function format($root, $path, $route = null)
  19377. {
  19378. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19379. return $instance->format($root, $path, $route);
  19380. }
  19381. /**
  19382. * Determine if the given path is a valid URL.
  19383. *
  19384. * @param string $path
  19385. * @return bool
  19386. * @static
  19387. */
  19388. public static function isValidUrl($path)
  19389. {
  19390. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19391. return $instance->isValidUrl($path);
  19392. }
  19393. /**
  19394. * Set the default named parameters used by the URL generator.
  19395. *
  19396. * @param array $defaults
  19397. * @return void
  19398. * @static
  19399. */
  19400. public static function defaults($defaults)
  19401. {
  19402. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19403. $instance->defaults($defaults);
  19404. }
  19405. /**
  19406. * Get the default named parameters used by the URL generator.
  19407. *
  19408. * @return array
  19409. * @static
  19410. */
  19411. public static function getDefaultParameters()
  19412. {
  19413. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19414. return $instance->getDefaultParameters();
  19415. }
  19416. /**
  19417. * Force the scheme for URLs.
  19418. *
  19419. * @param string|null $scheme
  19420. * @return void
  19421. * @static
  19422. */
  19423. public static function forceScheme($scheme)
  19424. {
  19425. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19426. $instance->forceScheme($scheme);
  19427. }
  19428. /**
  19429. * Force the use of the HTTPS scheme for all generated URLs.
  19430. *
  19431. * @param bool $force
  19432. * @return void
  19433. * @static
  19434. */
  19435. public static function forceHttps($force = true)
  19436. {
  19437. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19438. $instance->forceHttps($force);
  19439. }
  19440. /**
  19441. * Set the URL origin for all generated URLs.
  19442. *
  19443. * @param string|null $root
  19444. * @return void
  19445. * @static
  19446. */
  19447. public static function useOrigin($root)
  19448. {
  19449. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19450. $instance->useOrigin($root);
  19451. }
  19452. /**
  19453. * Set the forced root URL.
  19454. *
  19455. * @param string|null $root
  19456. * @return void
  19457. * @deprecated Use useOrigin
  19458. * @static
  19459. */
  19460. public static function forceRootUrl($root)
  19461. {
  19462. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19463. $instance->forceRootUrl($root);
  19464. }
  19465. /**
  19466. * Set the URL origin for all generated asset URLs.
  19467. *
  19468. * @param string|null $root
  19469. * @return void
  19470. * @static
  19471. */
  19472. public static function useAssetOrigin($root)
  19473. {
  19474. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19475. $instance->useAssetOrigin($root);
  19476. }
  19477. /**
  19478. * Set a callback to be used to format the host of generated URLs.
  19479. *
  19480. * @param \Closure $callback
  19481. * @return \Illuminate\Routing\UrlGenerator
  19482. * @static
  19483. */
  19484. public static function formatHostUsing($callback)
  19485. {
  19486. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19487. return $instance->formatHostUsing($callback);
  19488. }
  19489. /**
  19490. * Set a callback to be used to format the path of generated URLs.
  19491. *
  19492. * @param \Closure $callback
  19493. * @return \Illuminate\Routing\UrlGenerator
  19494. * @static
  19495. */
  19496. public static function formatPathUsing($callback)
  19497. {
  19498. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19499. return $instance->formatPathUsing($callback);
  19500. }
  19501. /**
  19502. * Get the path formatter being used by the URL generator.
  19503. *
  19504. * @return \Closure
  19505. * @static
  19506. */
  19507. public static function pathFormatter()
  19508. {
  19509. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19510. return $instance->pathFormatter();
  19511. }
  19512. /**
  19513. * Get the request instance.
  19514. *
  19515. * @return \Illuminate\Http\Request
  19516. * @static
  19517. */
  19518. public static function getRequest()
  19519. {
  19520. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19521. return $instance->getRequest();
  19522. }
  19523. /**
  19524. * Set the current request instance.
  19525. *
  19526. * @param \Illuminate\Http\Request $request
  19527. * @return void
  19528. * @static
  19529. */
  19530. public static function setRequest($request)
  19531. {
  19532. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19533. $instance->setRequest($request);
  19534. }
  19535. /**
  19536. * Set the route collection.
  19537. *
  19538. * @param \Illuminate\Routing\RouteCollectionInterface $routes
  19539. * @return \Illuminate\Routing\UrlGenerator
  19540. * @static
  19541. */
  19542. public static function setRoutes($routes)
  19543. {
  19544. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19545. return $instance->setRoutes($routes);
  19546. }
  19547. /**
  19548. * Set the session resolver for the generator.
  19549. *
  19550. * @param callable $sessionResolver
  19551. * @return \Illuminate\Routing\UrlGenerator
  19552. * @static
  19553. */
  19554. public static function setSessionResolver($sessionResolver)
  19555. {
  19556. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19557. return $instance->setSessionResolver($sessionResolver);
  19558. }
  19559. /**
  19560. * Set the encryption key resolver.
  19561. *
  19562. * @param callable $keyResolver
  19563. * @return \Illuminate\Routing\UrlGenerator
  19564. * @static
  19565. */
  19566. public static function setKeyResolver($keyResolver)
  19567. {
  19568. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19569. return $instance->setKeyResolver($keyResolver);
  19570. }
  19571. /**
  19572. * Clone a new instance of the URL generator with a different encryption key resolver.
  19573. *
  19574. * @param callable $keyResolver
  19575. * @return \Illuminate\Routing\UrlGenerator
  19576. * @static
  19577. */
  19578. public static function withKeyResolver($keyResolver)
  19579. {
  19580. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19581. return $instance->withKeyResolver($keyResolver);
  19582. }
  19583. /**
  19584. * Set the callback that should be used to attempt to resolve missing named routes.
  19585. *
  19586. * @param callable $missingNamedRouteResolver
  19587. * @return \Illuminate\Routing\UrlGenerator
  19588. * @static
  19589. */
  19590. public static function resolveMissingNamedRoutesUsing($missingNamedRouteResolver)
  19591. {
  19592. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19593. return $instance->resolveMissingNamedRoutesUsing($missingNamedRouteResolver);
  19594. }
  19595. /**
  19596. * Get the root controller namespace.
  19597. *
  19598. * @return string
  19599. * @static
  19600. */
  19601. public static function getRootControllerNamespace()
  19602. {
  19603. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19604. return $instance->getRootControllerNamespace();
  19605. }
  19606. /**
  19607. * Set the root controller namespace.
  19608. *
  19609. * @param string $rootNamespace
  19610. * @return \Illuminate\Routing\UrlGenerator
  19611. * @static
  19612. */
  19613. public static function setRootControllerNamespace($rootNamespace)
  19614. {
  19615. /** @var \Illuminate\Routing\UrlGenerator $instance */
  19616. return $instance->setRootControllerNamespace($rootNamespace);
  19617. }
  19618. /**
  19619. * Register a custom macro.
  19620. *
  19621. * @param string $name
  19622. * @param object|callable $macro
  19623. * @param-closure-this static $macro
  19624. * @return void
  19625. * @static
  19626. */
  19627. public static function macro($name, $macro)
  19628. {
  19629. \Illuminate\Routing\UrlGenerator::macro($name, $macro);
  19630. }
  19631. /**
  19632. * Mix another object into the class.
  19633. *
  19634. * @param object $mixin
  19635. * @param bool $replace
  19636. * @return void
  19637. * @throws \ReflectionException
  19638. * @static
  19639. */
  19640. public static function mixin($mixin, $replace = true)
  19641. {
  19642. \Illuminate\Routing\UrlGenerator::mixin($mixin, $replace);
  19643. }
  19644. /**
  19645. * Checks if macro is registered.
  19646. *
  19647. * @param string $name
  19648. * @return bool
  19649. * @static
  19650. */
  19651. public static function hasMacro($name)
  19652. {
  19653. return \Illuminate\Routing\UrlGenerator::hasMacro($name);
  19654. }
  19655. /**
  19656. * Flush the existing macros.
  19657. *
  19658. * @return void
  19659. * @static
  19660. */
  19661. public static function flushMacros()
  19662. {
  19663. \Illuminate\Routing\UrlGenerator::flushMacros();
  19664. }
  19665. }
  19666. /**
  19667. * @see \Illuminate\Validation\Factory
  19668. */
  19669. class Validator {
  19670. /**
  19671. * Create a new Validator instance.
  19672. *
  19673. * @param array $data
  19674. * @param array $rules
  19675. * @param array $messages
  19676. * @param array $attributes
  19677. * @return \Illuminate\Validation\Validator
  19678. * @static
  19679. */
  19680. public static function make($data, $rules, $messages = [], $attributes = [])
  19681. {
  19682. /** @var \Illuminate\Validation\Factory $instance */
  19683. return $instance->make($data, $rules, $messages, $attributes);
  19684. }
  19685. /**
  19686. * Validate the given data against the provided rules.
  19687. *
  19688. * @param array $data
  19689. * @param array $rules
  19690. * @param array $messages
  19691. * @param array $attributes
  19692. * @return array
  19693. * @throws \Illuminate\Validation\ValidationException
  19694. * @static
  19695. */
  19696. public static function validate($data, $rules, $messages = [], $attributes = [])
  19697. {
  19698. /** @var \Illuminate\Validation\Factory $instance */
  19699. return $instance->validate($data, $rules, $messages, $attributes);
  19700. }
  19701. /**
  19702. * Register a custom validator extension.
  19703. *
  19704. * @param string $rule
  19705. * @param \Closure|string $extension
  19706. * @param string|null $message
  19707. * @return void
  19708. * @static
  19709. */
  19710. public static function extend($rule, $extension, $message = null)
  19711. {
  19712. /** @var \Illuminate\Validation\Factory $instance */
  19713. $instance->extend($rule, $extension, $message);
  19714. }
  19715. /**
  19716. * Register a custom implicit validator extension.
  19717. *
  19718. * @param string $rule
  19719. * @param \Closure|string $extension
  19720. * @param string|null $message
  19721. * @return void
  19722. * @static
  19723. */
  19724. public static function extendImplicit($rule, $extension, $message = null)
  19725. {
  19726. /** @var \Illuminate\Validation\Factory $instance */
  19727. $instance->extendImplicit($rule, $extension, $message);
  19728. }
  19729. /**
  19730. * Register a custom dependent validator extension.
  19731. *
  19732. * @param string $rule
  19733. * @param \Closure|string $extension
  19734. * @param string|null $message
  19735. * @return void
  19736. * @static
  19737. */
  19738. public static function extendDependent($rule, $extension, $message = null)
  19739. {
  19740. /** @var \Illuminate\Validation\Factory $instance */
  19741. $instance->extendDependent($rule, $extension, $message);
  19742. }
  19743. /**
  19744. * Register a custom validator message replacer.
  19745. *
  19746. * @param string $rule
  19747. * @param \Closure|string $replacer
  19748. * @return void
  19749. * @static
  19750. */
  19751. public static function replacer($rule, $replacer)
  19752. {
  19753. /** @var \Illuminate\Validation\Factory $instance */
  19754. $instance->replacer($rule, $replacer);
  19755. }
  19756. /**
  19757. * Indicate that unvalidated array keys should be included in validated data when the parent array is validated.
  19758. *
  19759. * @return void
  19760. * @static
  19761. */
  19762. public static function includeUnvalidatedArrayKeys()
  19763. {
  19764. /** @var \Illuminate\Validation\Factory $instance */
  19765. $instance->includeUnvalidatedArrayKeys();
  19766. }
  19767. /**
  19768. * Indicate that unvalidated array keys should be excluded from the validated data, even if the parent array was validated.
  19769. *
  19770. * @return void
  19771. * @static
  19772. */
  19773. public static function excludeUnvalidatedArrayKeys()
  19774. {
  19775. /** @var \Illuminate\Validation\Factory $instance */
  19776. $instance->excludeUnvalidatedArrayKeys();
  19777. }
  19778. /**
  19779. * Set the Validator instance resolver.
  19780. *
  19781. * @param \Closure $resolver
  19782. * @return void
  19783. * @static
  19784. */
  19785. public static function resolver($resolver)
  19786. {
  19787. /** @var \Illuminate\Validation\Factory $instance */
  19788. $instance->resolver($resolver);
  19789. }
  19790. /**
  19791. * Get the Translator implementation.
  19792. *
  19793. * @return \Illuminate\Contracts\Translation\Translator
  19794. * @static
  19795. */
  19796. public static function getTranslator()
  19797. {
  19798. /** @var \Illuminate\Validation\Factory $instance */
  19799. return $instance->getTranslator();
  19800. }
  19801. /**
  19802. * Get the Presence Verifier implementation.
  19803. *
  19804. * @return \Illuminate\Validation\PresenceVerifierInterface
  19805. * @static
  19806. */
  19807. public static function getPresenceVerifier()
  19808. {
  19809. /** @var \Illuminate\Validation\Factory $instance */
  19810. return $instance->getPresenceVerifier();
  19811. }
  19812. /**
  19813. * Set the Presence Verifier implementation.
  19814. *
  19815. * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier
  19816. * @return void
  19817. * @static
  19818. */
  19819. public static function setPresenceVerifier($presenceVerifier)
  19820. {
  19821. /** @var \Illuminate\Validation\Factory $instance */
  19822. $instance->setPresenceVerifier($presenceVerifier);
  19823. }
  19824. /**
  19825. * Get the container instance used by the validation factory.
  19826. *
  19827. * @return \Illuminate\Contracts\Container\Container|null
  19828. * @static
  19829. */
  19830. public static function getContainer()
  19831. {
  19832. /** @var \Illuminate\Validation\Factory $instance */
  19833. return $instance->getContainer();
  19834. }
  19835. /**
  19836. * Set the container instance used by the validation factory.
  19837. *
  19838. * @param \Illuminate\Contracts\Container\Container $container
  19839. * @return \Illuminate\Validation\Factory
  19840. * @static
  19841. */
  19842. public static function setContainer($container)
  19843. {
  19844. /** @var \Illuminate\Validation\Factory $instance */
  19845. return $instance->setContainer($container);
  19846. }
  19847. }
  19848. /**
  19849. * @see \Illuminate\View\Factory
  19850. */
  19851. class View {
  19852. /**
  19853. * Get the evaluated view contents for the given view.
  19854. *
  19855. * @param string $path
  19856. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19857. * @param array $mergeData
  19858. * @return \Illuminate\Contracts\View\View
  19859. * @static
  19860. */
  19861. public static function file($path, $data = [], $mergeData = [])
  19862. {
  19863. /** @var \Illuminate\View\Factory $instance */
  19864. return $instance->file($path, $data, $mergeData);
  19865. }
  19866. /**
  19867. * Get the evaluated view contents for the given view.
  19868. *
  19869. * @param string $view
  19870. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19871. * @param array $mergeData
  19872. * @return \Illuminate\Contracts\View\View
  19873. * @static
  19874. */
  19875. public static function make($view, $data = [], $mergeData = [])
  19876. {
  19877. /** @var \Illuminate\View\Factory $instance */
  19878. return $instance->make($view, $data, $mergeData);
  19879. }
  19880. /**
  19881. * Get the first view that actually exists from the given list.
  19882. *
  19883. * @param array $views
  19884. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19885. * @param array $mergeData
  19886. * @return \Illuminate\Contracts\View\View
  19887. * @throws \InvalidArgumentException
  19888. * @static
  19889. */
  19890. public static function first($views, $data = [], $mergeData = [])
  19891. {
  19892. /** @var \Illuminate\View\Factory $instance */
  19893. return $instance->first($views, $data, $mergeData);
  19894. }
  19895. /**
  19896. * Get the rendered content of the view based on a given condition.
  19897. *
  19898. * @param bool $condition
  19899. * @param string $view
  19900. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19901. * @param array $mergeData
  19902. * @return string
  19903. * @static
  19904. */
  19905. public static function renderWhen($condition, $view, $data = [], $mergeData = [])
  19906. {
  19907. /** @var \Illuminate\View\Factory $instance */
  19908. return $instance->renderWhen($condition, $view, $data, $mergeData);
  19909. }
  19910. /**
  19911. * Get the rendered content of the view based on the negation of a given condition.
  19912. *
  19913. * @param bool $condition
  19914. * @param string $view
  19915. * @param \Illuminate\Contracts\Support\Arrayable|array $data
  19916. * @param array $mergeData
  19917. * @return string
  19918. * @static
  19919. */
  19920. public static function renderUnless($condition, $view, $data = [], $mergeData = [])
  19921. {
  19922. /** @var \Illuminate\View\Factory $instance */
  19923. return $instance->renderUnless($condition, $view, $data, $mergeData);
  19924. }
  19925. /**
  19926. * Get the rendered contents of a partial from a loop.
  19927. *
  19928. * @param string $view
  19929. * @param array $data
  19930. * @param string $iterator
  19931. * @param string $empty
  19932. * @return string
  19933. * @static
  19934. */
  19935. public static function renderEach($view, $data, $iterator, $empty = 'raw|')
  19936. {
  19937. /** @var \Illuminate\View\Factory $instance */
  19938. return $instance->renderEach($view, $data, $iterator, $empty);
  19939. }
  19940. /**
  19941. * Determine if a given view exists.
  19942. *
  19943. * @param string $view
  19944. * @return bool
  19945. * @static
  19946. */
  19947. public static function exists($view)
  19948. {
  19949. /** @var \Illuminate\View\Factory $instance */
  19950. return $instance->exists($view);
  19951. }
  19952. /**
  19953. * Get the appropriate view engine for the given path.
  19954. *
  19955. * @param string $path
  19956. * @return \Illuminate\Contracts\View\Engine
  19957. * @throws \InvalidArgumentException
  19958. * @static
  19959. */
  19960. public static function getEngineFromPath($path)
  19961. {
  19962. /** @var \Illuminate\View\Factory $instance */
  19963. return $instance->getEngineFromPath($path);
  19964. }
  19965. /**
  19966. * Add a piece of shared data to the environment.
  19967. *
  19968. * @param array|string $key
  19969. * @param mixed|null $value
  19970. * @return mixed
  19971. * @static
  19972. */
  19973. public static function share($key, $value = null)
  19974. {
  19975. /** @var \Illuminate\View\Factory $instance */
  19976. return $instance->share($key, $value);
  19977. }
  19978. /**
  19979. * Increment the rendering counter.
  19980. *
  19981. * @return void
  19982. * @static
  19983. */
  19984. public static function incrementRender()
  19985. {
  19986. /** @var \Illuminate\View\Factory $instance */
  19987. $instance->incrementRender();
  19988. }
  19989. /**
  19990. * Decrement the rendering counter.
  19991. *
  19992. * @return void
  19993. * @static
  19994. */
  19995. public static function decrementRender()
  19996. {
  19997. /** @var \Illuminate\View\Factory $instance */
  19998. $instance->decrementRender();
  19999. }
  20000. /**
  20001. * Check if there are no active render operations.
  20002. *
  20003. * @return bool
  20004. * @static
  20005. */
  20006. public static function doneRendering()
  20007. {
  20008. /** @var \Illuminate\View\Factory $instance */
  20009. return $instance->doneRendering();
  20010. }
  20011. /**
  20012. * Determine if the given once token has been rendered.
  20013. *
  20014. * @param string $id
  20015. * @return bool
  20016. * @static
  20017. */
  20018. public static function hasRenderedOnce($id)
  20019. {
  20020. /** @var \Illuminate\View\Factory $instance */
  20021. return $instance->hasRenderedOnce($id);
  20022. }
  20023. /**
  20024. * Mark the given once token as having been rendered.
  20025. *
  20026. * @param string $id
  20027. * @return void
  20028. * @static
  20029. */
  20030. public static function markAsRenderedOnce($id)
  20031. {
  20032. /** @var \Illuminate\View\Factory $instance */
  20033. $instance->markAsRenderedOnce($id);
  20034. }
  20035. /**
  20036. * Add a location to the array of view locations.
  20037. *
  20038. * @param string $location
  20039. * @return void
  20040. * @static
  20041. */
  20042. public static function addLocation($location)
  20043. {
  20044. /** @var \Illuminate\View\Factory $instance */
  20045. $instance->addLocation($location);
  20046. }
  20047. /**
  20048. * Prepend a location to the array of view locations.
  20049. *
  20050. * @param string $location
  20051. * @return void
  20052. * @static
  20053. */
  20054. public static function prependLocation($location)
  20055. {
  20056. /** @var \Illuminate\View\Factory $instance */
  20057. $instance->prependLocation($location);
  20058. }
  20059. /**
  20060. * Add a new namespace to the loader.
  20061. *
  20062. * @param string $namespace
  20063. * @param string|array $hints
  20064. * @return \Illuminate\View\Factory
  20065. * @static
  20066. */
  20067. public static function addNamespace($namespace, $hints)
  20068. {
  20069. /** @var \Illuminate\View\Factory $instance */
  20070. return $instance->addNamespace($namespace, $hints);
  20071. }
  20072. /**
  20073. * Prepend a new namespace to the loader.
  20074. *
  20075. * @param string $namespace
  20076. * @param string|array $hints
  20077. * @return \Illuminate\View\Factory
  20078. * @static
  20079. */
  20080. public static function prependNamespace($namespace, $hints)
  20081. {
  20082. /** @var \Illuminate\View\Factory $instance */
  20083. return $instance->prependNamespace($namespace, $hints);
  20084. }
  20085. /**
  20086. * Replace the namespace hints for the given namespace.
  20087. *
  20088. * @param string $namespace
  20089. * @param string|array $hints
  20090. * @return \Illuminate\View\Factory
  20091. * @static
  20092. */
  20093. public static function replaceNamespace($namespace, $hints)
  20094. {
  20095. /** @var \Illuminate\View\Factory $instance */
  20096. return $instance->replaceNamespace($namespace, $hints);
  20097. }
  20098. /**
  20099. * Register a valid view extension and its engine.
  20100. *
  20101. * @param string $extension
  20102. * @param string $engine
  20103. * @param \Closure|null $resolver
  20104. * @return void
  20105. * @static
  20106. */
  20107. public static function addExtension($extension, $engine, $resolver = null)
  20108. {
  20109. /** @var \Illuminate\View\Factory $instance */
  20110. $instance->addExtension($extension, $engine, $resolver);
  20111. }
  20112. /**
  20113. * Flush all of the factory state like sections and stacks.
  20114. *
  20115. * @return void
  20116. * @static
  20117. */
  20118. public static function flushState()
  20119. {
  20120. /** @var \Illuminate\View\Factory $instance */
  20121. $instance->flushState();
  20122. }
  20123. /**
  20124. * Flush all of the section contents if done rendering.
  20125. *
  20126. * @return void
  20127. * @static
  20128. */
  20129. public static function flushStateIfDoneRendering()
  20130. {
  20131. /** @var \Illuminate\View\Factory $instance */
  20132. $instance->flushStateIfDoneRendering();
  20133. }
  20134. /**
  20135. * Get the extension to engine bindings.
  20136. *
  20137. * @return array
  20138. * @static
  20139. */
  20140. public static function getExtensions()
  20141. {
  20142. /** @var \Illuminate\View\Factory $instance */
  20143. return $instance->getExtensions();
  20144. }
  20145. /**
  20146. * Get the engine resolver instance.
  20147. *
  20148. * @return \Illuminate\View\Engines\EngineResolver
  20149. * @static
  20150. */
  20151. public static function getEngineResolver()
  20152. {
  20153. /** @var \Illuminate\View\Factory $instance */
  20154. return $instance->getEngineResolver();
  20155. }
  20156. /**
  20157. * Get the view finder instance.
  20158. *
  20159. * @return \Illuminate\View\ViewFinderInterface
  20160. * @static
  20161. */
  20162. public static function getFinder()
  20163. {
  20164. /** @var \Illuminate\View\Factory $instance */
  20165. return $instance->getFinder();
  20166. }
  20167. /**
  20168. * Set the view finder instance.
  20169. *
  20170. * @param \Illuminate\View\ViewFinderInterface $finder
  20171. * @return void
  20172. * @static
  20173. */
  20174. public static function setFinder($finder)
  20175. {
  20176. /** @var \Illuminate\View\Factory $instance */
  20177. $instance->setFinder($finder);
  20178. }
  20179. /**
  20180. * Flush the cache of views located by the finder.
  20181. *
  20182. * @return void
  20183. * @static
  20184. */
  20185. public static function flushFinderCache()
  20186. {
  20187. /** @var \Illuminate\View\Factory $instance */
  20188. $instance->flushFinderCache();
  20189. }
  20190. /**
  20191. * Get the event dispatcher instance.
  20192. *
  20193. * @return \Illuminate\Contracts\Events\Dispatcher
  20194. * @static
  20195. */
  20196. public static function getDispatcher()
  20197. {
  20198. /** @var \Illuminate\View\Factory $instance */
  20199. return $instance->getDispatcher();
  20200. }
  20201. /**
  20202. * Set the event dispatcher instance.
  20203. *
  20204. * @param \Illuminate\Contracts\Events\Dispatcher $events
  20205. * @return void
  20206. * @static
  20207. */
  20208. public static function setDispatcher($events)
  20209. {
  20210. /** @var \Illuminate\View\Factory $instance */
  20211. $instance->setDispatcher($events);
  20212. }
  20213. /**
  20214. * Get the IoC container instance.
  20215. *
  20216. * @return \Illuminate\Contracts\Container\Container
  20217. * @static
  20218. */
  20219. public static function getContainer()
  20220. {
  20221. /** @var \Illuminate\View\Factory $instance */
  20222. return $instance->getContainer();
  20223. }
  20224. /**
  20225. * Set the IoC container instance.
  20226. *
  20227. * @param \Illuminate\Contracts\Container\Container $container
  20228. * @return void
  20229. * @static
  20230. */
  20231. public static function setContainer($container)
  20232. {
  20233. /** @var \Illuminate\View\Factory $instance */
  20234. $instance->setContainer($container);
  20235. }
  20236. /**
  20237. * Get an item from the shared data.
  20238. *
  20239. * @param string $key
  20240. * @param mixed $default
  20241. * @return mixed
  20242. * @static
  20243. */
  20244. public static function shared($key, $default = null)
  20245. {
  20246. /** @var \Illuminate\View\Factory $instance */
  20247. return $instance->shared($key, $default);
  20248. }
  20249. /**
  20250. * Get all of the shared data for the environment.
  20251. *
  20252. * @return array
  20253. * @static
  20254. */
  20255. public static function getShared()
  20256. {
  20257. /** @var \Illuminate\View\Factory $instance */
  20258. return $instance->getShared();
  20259. }
  20260. /**
  20261. * Register a custom macro.
  20262. *
  20263. * @param string $name
  20264. * @param object|callable $macro
  20265. * @param-closure-this static $macro
  20266. * @return void
  20267. * @static
  20268. */
  20269. public static function macro($name, $macro)
  20270. {
  20271. \Illuminate\View\Factory::macro($name, $macro);
  20272. }
  20273. /**
  20274. * Mix another object into the class.
  20275. *
  20276. * @param object $mixin
  20277. * @param bool $replace
  20278. * @return void
  20279. * @throws \ReflectionException
  20280. * @static
  20281. */
  20282. public static function mixin($mixin, $replace = true)
  20283. {
  20284. \Illuminate\View\Factory::mixin($mixin, $replace);
  20285. }
  20286. /**
  20287. * Checks if macro is registered.
  20288. *
  20289. * @param string $name
  20290. * @return bool
  20291. * @static
  20292. */
  20293. public static function hasMacro($name)
  20294. {
  20295. return \Illuminate\View\Factory::hasMacro($name);
  20296. }
  20297. /**
  20298. * Flush the existing macros.
  20299. *
  20300. * @return void
  20301. * @static
  20302. */
  20303. public static function flushMacros()
  20304. {
  20305. \Illuminate\View\Factory::flushMacros();
  20306. }
  20307. /**
  20308. * Start a component rendering process.
  20309. *
  20310. * @param \Illuminate\Contracts\View\View|\Illuminate\Contracts\Support\Htmlable|\Closure|string $view
  20311. * @param array $data
  20312. * @return void
  20313. * @static
  20314. */
  20315. public static function startComponent($view, $data = [])
  20316. {
  20317. /** @var \Illuminate\View\Factory $instance */
  20318. $instance->startComponent($view, $data);
  20319. }
  20320. /**
  20321. * Get the first view that actually exists from the given list, and start a component.
  20322. *
  20323. * @param array $names
  20324. * @param array $data
  20325. * @return void
  20326. * @static
  20327. */
  20328. public static function startComponentFirst($names, $data = [])
  20329. {
  20330. /** @var \Illuminate\View\Factory $instance */
  20331. $instance->startComponentFirst($names, $data);
  20332. }
  20333. /**
  20334. * Render the current component.
  20335. *
  20336. * @return string
  20337. * @static
  20338. */
  20339. public static function renderComponent()
  20340. {
  20341. /** @var \Illuminate\View\Factory $instance */
  20342. return $instance->renderComponent();
  20343. }
  20344. /**
  20345. * Get an item from the component data that exists above the current component.
  20346. *
  20347. * @param string $key
  20348. * @param mixed $default
  20349. * @return mixed|null
  20350. * @static
  20351. */
  20352. public static function getConsumableComponentData($key, $default = null)
  20353. {
  20354. /** @var \Illuminate\View\Factory $instance */
  20355. return $instance->getConsumableComponentData($key, $default);
  20356. }
  20357. /**
  20358. * Start the slot rendering process.
  20359. *
  20360. * @param string $name
  20361. * @param string|null $content
  20362. * @param array $attributes
  20363. * @return void
  20364. * @static
  20365. */
  20366. public static function slot($name, $content = null, $attributes = [])
  20367. {
  20368. /** @var \Illuminate\View\Factory $instance */
  20369. $instance->slot($name, $content, $attributes);
  20370. }
  20371. /**
  20372. * Save the slot content for rendering.
  20373. *
  20374. * @return void
  20375. * @static
  20376. */
  20377. public static function endSlot()
  20378. {
  20379. /** @var \Illuminate\View\Factory $instance */
  20380. $instance->endSlot();
  20381. }
  20382. /**
  20383. * Register a view creator event.
  20384. *
  20385. * @param array|string $views
  20386. * @param \Closure|string $callback
  20387. * @return array
  20388. * @static
  20389. */
  20390. public static function creator($views, $callback)
  20391. {
  20392. /** @var \Illuminate\View\Factory $instance */
  20393. return $instance->creator($views, $callback);
  20394. }
  20395. /**
  20396. * Register multiple view composers via an array.
  20397. *
  20398. * @param array $composers
  20399. * @return array
  20400. * @static
  20401. */
  20402. public static function composers($composers)
  20403. {
  20404. /** @var \Illuminate\View\Factory $instance */
  20405. return $instance->composers($composers);
  20406. }
  20407. /**
  20408. * Register a view composer event.
  20409. *
  20410. * @param array|string $views
  20411. * @param \Closure|string $callback
  20412. * @return array
  20413. * @static
  20414. */
  20415. public static function composer($views, $callback)
  20416. {
  20417. /** @var \Illuminate\View\Factory $instance */
  20418. return $instance->composer($views, $callback);
  20419. }
  20420. /**
  20421. * Call the composer for a given view.
  20422. *
  20423. * @param \Illuminate\Contracts\View\View $view
  20424. * @return void
  20425. * @static
  20426. */
  20427. public static function callComposer($view)
  20428. {
  20429. /** @var \Illuminate\View\Factory $instance */
  20430. $instance->callComposer($view);
  20431. }
  20432. /**
  20433. * Call the creator for a given view.
  20434. *
  20435. * @param \Illuminate\Contracts\View\View $view
  20436. * @return void
  20437. * @static
  20438. */
  20439. public static function callCreator($view)
  20440. {
  20441. /** @var \Illuminate\View\Factory $instance */
  20442. $instance->callCreator($view);
  20443. }
  20444. /**
  20445. * Start injecting content into a fragment.
  20446. *
  20447. * @param string $fragment
  20448. * @return void
  20449. * @static
  20450. */
  20451. public static function startFragment($fragment)
  20452. {
  20453. /** @var \Illuminate\View\Factory $instance */
  20454. $instance->startFragment($fragment);
  20455. }
  20456. /**
  20457. * Stop injecting content into a fragment.
  20458. *
  20459. * @return string
  20460. * @throws \InvalidArgumentException
  20461. * @static
  20462. */
  20463. public static function stopFragment()
  20464. {
  20465. /** @var \Illuminate\View\Factory $instance */
  20466. return $instance->stopFragment();
  20467. }
  20468. /**
  20469. * Get the contents of a fragment.
  20470. *
  20471. * @param string $name
  20472. * @param string|null $default
  20473. * @return mixed
  20474. * @static
  20475. */
  20476. public static function getFragment($name, $default = null)
  20477. {
  20478. /** @var \Illuminate\View\Factory $instance */
  20479. return $instance->getFragment($name, $default);
  20480. }
  20481. /**
  20482. * Get the entire array of rendered fragments.
  20483. *
  20484. * @return array
  20485. * @static
  20486. */
  20487. public static function getFragments()
  20488. {
  20489. /** @var \Illuminate\View\Factory $instance */
  20490. return $instance->getFragments();
  20491. }
  20492. /**
  20493. * Flush all of the fragments.
  20494. *
  20495. * @return void
  20496. * @static
  20497. */
  20498. public static function flushFragments()
  20499. {
  20500. /** @var \Illuminate\View\Factory $instance */
  20501. $instance->flushFragments();
  20502. }
  20503. /**
  20504. * Start injecting content into a section.
  20505. *
  20506. * @param string $section
  20507. * @param string|null $content
  20508. * @return void
  20509. * @static
  20510. */
  20511. public static function startSection($section, $content = null)
  20512. {
  20513. /** @var \Illuminate\View\Factory $instance */
  20514. $instance->startSection($section, $content);
  20515. }
  20516. /**
  20517. * Inject inline content into a section.
  20518. *
  20519. * @param string $section
  20520. * @param string $content
  20521. * @return void
  20522. * @static
  20523. */
  20524. public static function inject($section, $content)
  20525. {
  20526. /** @var \Illuminate\View\Factory $instance */
  20527. $instance->inject($section, $content);
  20528. }
  20529. /**
  20530. * Stop injecting content into a section and return its contents.
  20531. *
  20532. * @return string
  20533. * @static
  20534. */
  20535. public static function yieldSection()
  20536. {
  20537. /** @var \Illuminate\View\Factory $instance */
  20538. return $instance->yieldSection();
  20539. }
  20540. /**
  20541. * Stop injecting content into a section.
  20542. *
  20543. * @param bool $overwrite
  20544. * @return string
  20545. * @throws \InvalidArgumentException
  20546. * @static
  20547. */
  20548. public static function stopSection($overwrite = false)
  20549. {
  20550. /** @var \Illuminate\View\Factory $instance */
  20551. return $instance->stopSection($overwrite);
  20552. }
  20553. /**
  20554. * Stop injecting content into a section and append it.
  20555. *
  20556. * @return string
  20557. * @throws \InvalidArgumentException
  20558. * @static
  20559. */
  20560. public static function appendSection()
  20561. {
  20562. /** @var \Illuminate\View\Factory $instance */
  20563. return $instance->appendSection();
  20564. }
  20565. /**
  20566. * Get the string contents of a section.
  20567. *
  20568. * @param string $section
  20569. * @param string $default
  20570. * @return string
  20571. * @static
  20572. */
  20573. public static function yieldContent($section, $default = '')
  20574. {
  20575. /** @var \Illuminate\View\Factory $instance */
  20576. return $instance->yieldContent($section, $default);
  20577. }
  20578. /**
  20579. * Get the parent placeholder for the current request.
  20580. *
  20581. * @param string $section
  20582. * @return string
  20583. * @static
  20584. */
  20585. public static function parentPlaceholder($section = '')
  20586. {
  20587. return \Illuminate\View\Factory::parentPlaceholder($section);
  20588. }
  20589. /**
  20590. * Check if section exists.
  20591. *
  20592. * @param string $name
  20593. * @return bool
  20594. * @static
  20595. */
  20596. public static function hasSection($name)
  20597. {
  20598. /** @var \Illuminate\View\Factory $instance */
  20599. return $instance->hasSection($name);
  20600. }
  20601. /**
  20602. * Check if section does not exist.
  20603. *
  20604. * @param string $name
  20605. * @return bool
  20606. * @static
  20607. */
  20608. public static function sectionMissing($name)
  20609. {
  20610. /** @var \Illuminate\View\Factory $instance */
  20611. return $instance->sectionMissing($name);
  20612. }
  20613. /**
  20614. * Get the contents of a section.
  20615. *
  20616. * @param string $name
  20617. * @param string|null $default
  20618. * @return mixed
  20619. * @static
  20620. */
  20621. public static function getSection($name, $default = null)
  20622. {
  20623. /** @var \Illuminate\View\Factory $instance */
  20624. return $instance->getSection($name, $default);
  20625. }
  20626. /**
  20627. * Get the entire array of sections.
  20628. *
  20629. * @return array
  20630. * @static
  20631. */
  20632. public static function getSections()
  20633. {
  20634. /** @var \Illuminate\View\Factory $instance */
  20635. return $instance->getSections();
  20636. }
  20637. /**
  20638. * Flush all of the sections.
  20639. *
  20640. * @return void
  20641. * @static
  20642. */
  20643. public static function flushSections()
  20644. {
  20645. /** @var \Illuminate\View\Factory $instance */
  20646. $instance->flushSections();
  20647. }
  20648. /**
  20649. * Add new loop to the stack.
  20650. *
  20651. * @param \Countable|array $data
  20652. * @return void
  20653. * @static
  20654. */
  20655. public static function addLoop($data)
  20656. {
  20657. /** @var \Illuminate\View\Factory $instance */
  20658. $instance->addLoop($data);
  20659. }
  20660. /**
  20661. * Increment the top loop's indices.
  20662. *
  20663. * @return void
  20664. * @static
  20665. */
  20666. public static function incrementLoopIndices()
  20667. {
  20668. /** @var \Illuminate\View\Factory $instance */
  20669. $instance->incrementLoopIndices();
  20670. }
  20671. /**
  20672. * Pop a loop from the top of the loop stack.
  20673. *
  20674. * @return void
  20675. * @static
  20676. */
  20677. public static function popLoop()
  20678. {
  20679. /** @var \Illuminate\View\Factory $instance */
  20680. $instance->popLoop();
  20681. }
  20682. /**
  20683. * Get an instance of the last loop in the stack.
  20684. *
  20685. * @return \stdClass|null
  20686. * @static
  20687. */
  20688. public static function getLastLoop()
  20689. {
  20690. /** @var \Illuminate\View\Factory $instance */
  20691. return $instance->getLastLoop();
  20692. }
  20693. /**
  20694. * Get the entire loop stack.
  20695. *
  20696. * @return array
  20697. * @static
  20698. */
  20699. public static function getLoopStack()
  20700. {
  20701. /** @var \Illuminate\View\Factory $instance */
  20702. return $instance->getLoopStack();
  20703. }
  20704. /**
  20705. * Start injecting content into a push section.
  20706. *
  20707. * @param string $section
  20708. * @param string $content
  20709. * @return void
  20710. * @static
  20711. */
  20712. public static function startPush($section, $content = '')
  20713. {
  20714. /** @var \Illuminate\View\Factory $instance */
  20715. $instance->startPush($section, $content);
  20716. }
  20717. /**
  20718. * Stop injecting content into a push section.
  20719. *
  20720. * @return string
  20721. * @throws \InvalidArgumentException
  20722. * @static
  20723. */
  20724. public static function stopPush()
  20725. {
  20726. /** @var \Illuminate\View\Factory $instance */
  20727. return $instance->stopPush();
  20728. }
  20729. /**
  20730. * Start prepending content into a push section.
  20731. *
  20732. * @param string $section
  20733. * @param string $content
  20734. * @return void
  20735. * @static
  20736. */
  20737. public static function startPrepend($section, $content = '')
  20738. {
  20739. /** @var \Illuminate\View\Factory $instance */
  20740. $instance->startPrepend($section, $content);
  20741. }
  20742. /**
  20743. * Stop prepending content into a push section.
  20744. *
  20745. * @return string
  20746. * @throws \InvalidArgumentException
  20747. * @static
  20748. */
  20749. public static function stopPrepend()
  20750. {
  20751. /** @var \Illuminate\View\Factory $instance */
  20752. return $instance->stopPrepend();
  20753. }
  20754. /**
  20755. * Get the string contents of a push section.
  20756. *
  20757. * @param string $section
  20758. * @param string $default
  20759. * @return string
  20760. * @static
  20761. */
  20762. public static function yieldPushContent($section, $default = '')
  20763. {
  20764. /** @var \Illuminate\View\Factory $instance */
  20765. return $instance->yieldPushContent($section, $default);
  20766. }
  20767. /**
  20768. * Flush all of the stacks.
  20769. *
  20770. * @return void
  20771. * @static
  20772. */
  20773. public static function flushStacks()
  20774. {
  20775. /** @var \Illuminate\View\Factory $instance */
  20776. $instance->flushStacks();
  20777. }
  20778. /**
  20779. * Start a translation block.
  20780. *
  20781. * @param array $replacements
  20782. * @return void
  20783. * @static
  20784. */
  20785. public static function startTranslation($replacements = [])
  20786. {
  20787. /** @var \Illuminate\View\Factory $instance */
  20788. $instance->startTranslation($replacements);
  20789. }
  20790. /**
  20791. * Render the current translation.
  20792. *
  20793. * @return string
  20794. * @static
  20795. */
  20796. public static function renderTranslation()
  20797. {
  20798. /** @var \Illuminate\View\Factory $instance */
  20799. return $instance->renderTranslation();
  20800. }
  20801. }
  20802. /**
  20803. * @see \Illuminate\Foundation\Vite
  20804. */
  20805. class Vite {
  20806. /**
  20807. * Get the preloaded assets.
  20808. *
  20809. * @return array
  20810. * @static
  20811. */
  20812. public static function preloadedAssets()
  20813. {
  20814. /** @var \Illuminate\Foundation\Vite $instance */
  20815. return $instance->preloadedAssets();
  20816. }
  20817. /**
  20818. * Get the Content Security Policy nonce applied to all generated tags.
  20819. *
  20820. * @return string|null
  20821. * @static
  20822. */
  20823. public static function cspNonce()
  20824. {
  20825. /** @var \Illuminate\Foundation\Vite $instance */
  20826. return $instance->cspNonce();
  20827. }
  20828. /**
  20829. * Generate or set a Content Security Policy nonce to apply to all generated tags.
  20830. *
  20831. * @param string|null $nonce
  20832. * @return string
  20833. * @static
  20834. */
  20835. public static function useCspNonce($nonce = null)
  20836. {
  20837. /** @var \Illuminate\Foundation\Vite $instance */
  20838. return $instance->useCspNonce($nonce);
  20839. }
  20840. /**
  20841. * Use the given key to detect integrity hashes in the manifest.
  20842. *
  20843. * @param string|false $key
  20844. * @return \Illuminate\Foundation\Vite
  20845. * @static
  20846. */
  20847. public static function useIntegrityKey($key)
  20848. {
  20849. /** @var \Illuminate\Foundation\Vite $instance */
  20850. return $instance->useIntegrityKey($key);
  20851. }
  20852. /**
  20853. * Set the Vite entry points.
  20854. *
  20855. * @param array $entryPoints
  20856. * @return \Illuminate\Foundation\Vite
  20857. * @static
  20858. */
  20859. public static function withEntryPoints($entryPoints)
  20860. {
  20861. /** @var \Illuminate\Foundation\Vite $instance */
  20862. return $instance->withEntryPoints($entryPoints);
  20863. }
  20864. /**
  20865. * Merge additional Vite entry points with the current set.
  20866. *
  20867. * @param array $entryPoints
  20868. * @return \Illuminate\Foundation\Vite
  20869. * @static
  20870. */
  20871. public static function mergeEntryPoints($entryPoints)
  20872. {
  20873. /** @var \Illuminate\Foundation\Vite $instance */
  20874. return $instance->mergeEntryPoints($entryPoints);
  20875. }
  20876. /**
  20877. * Set the filename for the manifest file.
  20878. *
  20879. * @param string $filename
  20880. * @return \Illuminate\Foundation\Vite
  20881. * @static
  20882. */
  20883. public static function useManifestFilename($filename)
  20884. {
  20885. /** @var \Illuminate\Foundation\Vite $instance */
  20886. return $instance->useManifestFilename($filename);
  20887. }
  20888. /**
  20889. * Resolve asset paths using the provided resolver.
  20890. *
  20891. * @param callable|null $resolver
  20892. * @return \Illuminate\Foundation\Vite
  20893. * @static
  20894. */
  20895. public static function createAssetPathsUsing($resolver)
  20896. {
  20897. /** @var \Illuminate\Foundation\Vite $instance */
  20898. return $instance->createAssetPathsUsing($resolver);
  20899. }
  20900. /**
  20901. * Get the Vite "hot" file path.
  20902. *
  20903. * @return string
  20904. * @static
  20905. */
  20906. public static function hotFile()
  20907. {
  20908. /** @var \Illuminate\Foundation\Vite $instance */
  20909. return $instance->hotFile();
  20910. }
  20911. /**
  20912. * Set the Vite "hot" file path.
  20913. *
  20914. * @param string $path
  20915. * @return \Illuminate\Foundation\Vite
  20916. * @static
  20917. */
  20918. public static function useHotFile($path)
  20919. {
  20920. /** @var \Illuminate\Foundation\Vite $instance */
  20921. return $instance->useHotFile($path);
  20922. }
  20923. /**
  20924. * Set the Vite build directory.
  20925. *
  20926. * @param string $path
  20927. * @return \Illuminate\Foundation\Vite
  20928. * @static
  20929. */
  20930. public static function useBuildDirectory($path)
  20931. {
  20932. /** @var \Illuminate\Foundation\Vite $instance */
  20933. return $instance->useBuildDirectory($path);
  20934. }
  20935. /**
  20936. * Use the given callback to resolve attributes for script tags.
  20937. *
  20938. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20939. * @return \Illuminate\Foundation\Vite
  20940. * @static
  20941. */
  20942. public static function useScriptTagAttributes($attributes)
  20943. {
  20944. /** @var \Illuminate\Foundation\Vite $instance */
  20945. return $instance->useScriptTagAttributes($attributes);
  20946. }
  20947. /**
  20948. * Use the given callback to resolve attributes for style tags.
  20949. *
  20950. * @param (callable(string, string, ?array, ?array): array)|array $attributes
  20951. * @return \Illuminate\Foundation\Vite
  20952. * @static
  20953. */
  20954. public static function useStyleTagAttributes($attributes)
  20955. {
  20956. /** @var \Illuminate\Foundation\Vite $instance */
  20957. return $instance->useStyleTagAttributes($attributes);
  20958. }
  20959. /**
  20960. * Use the given callback to resolve attributes for preload tags.
  20961. *
  20962. * @param (callable(string, string, ?array, ?array): (array|false))|array|false $attributes
  20963. * @return \Illuminate\Foundation\Vite
  20964. * @static
  20965. */
  20966. public static function usePreloadTagAttributes($attributes)
  20967. {
  20968. /** @var \Illuminate\Foundation\Vite $instance */
  20969. return $instance->usePreloadTagAttributes($attributes);
  20970. }
  20971. /**
  20972. * Eagerly prefetch assets.
  20973. *
  20974. * @param int|null $concurrency
  20975. * @param string $event
  20976. * @return \Illuminate\Foundation\Vite
  20977. * @static
  20978. */
  20979. public static function prefetch($concurrency = null, $event = 'load')
  20980. {
  20981. /** @var \Illuminate\Foundation\Vite $instance */
  20982. return $instance->prefetch($concurrency, $event);
  20983. }
  20984. /**
  20985. * Use the "waterfall" prefetching strategy.
  20986. *
  20987. * @return \Illuminate\Foundation\Vite
  20988. * @static
  20989. */
  20990. public static function useWaterfallPrefetching($concurrency = null)
  20991. {
  20992. /** @var \Illuminate\Foundation\Vite $instance */
  20993. return $instance->useWaterfallPrefetching($concurrency);
  20994. }
  20995. /**
  20996. * Use the "aggressive" prefetching strategy.
  20997. *
  20998. * @return \Illuminate\Foundation\Vite
  20999. * @static
  21000. */
  21001. public static function useAggressivePrefetching()
  21002. {
  21003. /** @var \Illuminate\Foundation\Vite $instance */
  21004. return $instance->useAggressivePrefetching();
  21005. }
  21006. /**
  21007. * Set the prefetching strategy.
  21008. *
  21009. * @param 'waterfall'|'aggressive'|null $strategy
  21010. * @param array $config
  21011. * @return \Illuminate\Foundation\Vite
  21012. * @static
  21013. */
  21014. public static function usePrefetchStrategy($strategy, $config = [])
  21015. {
  21016. /** @var \Illuminate\Foundation\Vite $instance */
  21017. return $instance->usePrefetchStrategy($strategy, $config);
  21018. }
  21019. /**
  21020. * Generate React refresh runtime script.
  21021. *
  21022. * @return \Illuminate\Support\HtmlString|void
  21023. * @static
  21024. */
  21025. public static function reactRefresh()
  21026. {
  21027. /** @var \Illuminate\Foundation\Vite $instance */
  21028. return $instance->reactRefresh();
  21029. }
  21030. /**
  21031. * Get the URL for an asset.
  21032. *
  21033. * @param string $asset
  21034. * @param string|null $buildDirectory
  21035. * @return string
  21036. * @static
  21037. */
  21038. public static function asset($asset, $buildDirectory = null)
  21039. {
  21040. /** @var \Illuminate\Foundation\Vite $instance */
  21041. return $instance->asset($asset, $buildDirectory);
  21042. }
  21043. /**
  21044. * Get the content of a given asset.
  21045. *
  21046. * @param string $asset
  21047. * @param string|null $buildDirectory
  21048. * @return string
  21049. * @throws \Illuminate\Foundation\ViteException
  21050. * @static
  21051. */
  21052. public static function content($asset, $buildDirectory = null)
  21053. {
  21054. /** @var \Illuminate\Foundation\Vite $instance */
  21055. return $instance->content($asset, $buildDirectory);
  21056. }
  21057. /**
  21058. * Get a unique hash representing the current manifest, or null if there is no manifest.
  21059. *
  21060. * @param string|null $buildDirectory
  21061. * @return string|null
  21062. * @static
  21063. */
  21064. public static function manifestHash($buildDirectory = null)
  21065. {
  21066. /** @var \Illuminate\Foundation\Vite $instance */
  21067. return $instance->manifestHash($buildDirectory);
  21068. }
  21069. /**
  21070. * Determine if the HMR server is running.
  21071. *
  21072. * @return bool
  21073. * @static
  21074. */
  21075. public static function isRunningHot()
  21076. {
  21077. /** @var \Illuminate\Foundation\Vite $instance */
  21078. return $instance->isRunningHot();
  21079. }
  21080. /**
  21081. * Get the Vite tag content as a string of HTML.
  21082. *
  21083. * @return string
  21084. * @static
  21085. */
  21086. public static function toHtml()
  21087. {
  21088. /** @var \Illuminate\Foundation\Vite $instance */
  21089. return $instance->toHtml();
  21090. }
  21091. /**
  21092. * Flush state.
  21093. *
  21094. * @return void
  21095. * @static
  21096. */
  21097. public static function flush()
  21098. {
  21099. /** @var \Illuminate\Foundation\Vite $instance */
  21100. $instance->flush();
  21101. }
  21102. /**
  21103. * Register a custom macro.
  21104. *
  21105. * @param string $name
  21106. * @param object|callable $macro
  21107. * @param-closure-this static $macro
  21108. * @return void
  21109. * @static
  21110. */
  21111. public static function macro($name, $macro)
  21112. {
  21113. \Illuminate\Foundation\Vite::macro($name, $macro);
  21114. }
  21115. /**
  21116. * Mix another object into the class.
  21117. *
  21118. * @param object $mixin
  21119. * @param bool $replace
  21120. * @return void
  21121. * @throws \ReflectionException
  21122. * @static
  21123. */
  21124. public static function mixin($mixin, $replace = true)
  21125. {
  21126. \Illuminate\Foundation\Vite::mixin($mixin, $replace);
  21127. }
  21128. /**
  21129. * Checks if macro is registered.
  21130. *
  21131. * @param string $name
  21132. * @return bool
  21133. * @static
  21134. */
  21135. public static function hasMacro($name)
  21136. {
  21137. return \Illuminate\Foundation\Vite::hasMacro($name);
  21138. }
  21139. /**
  21140. * Flush the existing macros.
  21141. *
  21142. * @return void
  21143. * @static
  21144. */
  21145. public static function flushMacros()
  21146. {
  21147. \Illuminate\Foundation\Vite::flushMacros();
  21148. }
  21149. }
  21150. }
  21151. namespace Barryvdh\DomPDF\Facade {
  21152. /**
  21153. * @method static BasePDF setBaseHost(string $baseHost)
  21154. * @method static BasePDF setBasePath(string $basePath)
  21155. * @method static BasePDF setCanvas(\Dompdf\Canvas $canvas)
  21156. * @method static BasePDF setCallbacks(array<string, mixed> $callbacks)
  21157. * @method static BasePDF setCss(\Dompdf\Css\Stylesheet $css)
  21158. * @method static BasePDF setDefaultView(string $defaultView, array<string, mixed> $options)
  21159. * @method static BasePDF setDom(\DOMDocument $dom)
  21160. * @method static BasePDF setFontMetrics(\Dompdf\FontMetrics $fontMetrics)
  21161. * @method static BasePDF setHttpContext(resource|array<string, mixed> $httpContext)
  21162. * @method static BasePDF setPaper(string|float[] $paper, string $orientation = 'portrait')
  21163. * @method static BasePDF setProtocol(string $protocol)
  21164. * @method static BasePDF setTree(\Dompdf\Frame\FrameTree $tree)
  21165. */
  21166. class Pdf {
  21167. /**
  21168. * Get the DomPDF instance
  21169. *
  21170. * @static
  21171. */
  21172. public static function getDomPDF()
  21173. {
  21174. /** @var \Barryvdh\DomPDF\PDF $instance */
  21175. return $instance->getDomPDF();
  21176. }
  21177. /**
  21178. * Show or hide warnings
  21179. *
  21180. * @static
  21181. */
  21182. public static function setWarnings($warnings)
  21183. {
  21184. /** @var \Barryvdh\DomPDF\PDF $instance */
  21185. return $instance->setWarnings($warnings);
  21186. }
  21187. /**
  21188. * Load a HTML string
  21189. *
  21190. * @param string|null $encoding Not used yet
  21191. * @static
  21192. */
  21193. public static function loadHTML($string, $encoding = null)
  21194. {
  21195. /** @var \Barryvdh\DomPDF\PDF $instance */
  21196. return $instance->loadHTML($string, $encoding);
  21197. }
  21198. /**
  21199. * Load a HTML file
  21200. *
  21201. * @static
  21202. */
  21203. public static function loadFile($file)
  21204. {
  21205. /** @var \Barryvdh\DomPDF\PDF $instance */
  21206. return $instance->loadFile($file);
  21207. }
  21208. /**
  21209. * Add metadata info
  21210. *
  21211. * @param array<string, string> $info
  21212. * @static
  21213. */
  21214. public static function addInfo($info)
  21215. {
  21216. /** @var \Barryvdh\DomPDF\PDF $instance */
  21217. return $instance->addInfo($info);
  21218. }
  21219. /**
  21220. * Load a View and convert to HTML
  21221. *
  21222. * @param array<string, mixed> $data
  21223. * @param array<string, mixed> $mergeData
  21224. * @param string|null $encoding Not used yet
  21225. * @static
  21226. */
  21227. public static function loadView($view, $data = [], $mergeData = [], $encoding = null)
  21228. {
  21229. /** @var \Barryvdh\DomPDF\PDF $instance */
  21230. return $instance->loadView($view, $data, $mergeData, $encoding);
  21231. }
  21232. /**
  21233. * Set/Change an option (or array of options) in Dompdf
  21234. *
  21235. * @param array<string, mixed>|string $attribute
  21236. * @param null|mixed $value
  21237. * @static
  21238. */
  21239. public static function setOption($attribute, $value = null)
  21240. {
  21241. /** @var \Barryvdh\DomPDF\PDF $instance */
  21242. return $instance->setOption($attribute, $value);
  21243. }
  21244. /**
  21245. * Replace all the Options from DomPDF
  21246. *
  21247. * @param array<string, mixed> $options
  21248. * @static
  21249. */
  21250. public static function setOptions($options, $mergeWithDefaults = false)
  21251. {
  21252. /** @var \Barryvdh\DomPDF\PDF $instance */
  21253. return $instance->setOptions($options, $mergeWithDefaults);
  21254. }
  21255. /**
  21256. * Output the PDF as a string.
  21257. *
  21258. * The options parameter controls the output. Accepted options are:
  21259. *
  21260. * 'compress' = > 1 or 0 - apply content stream compression, this is
  21261. * on (1) by default
  21262. *
  21263. * @param array<string, int> $options
  21264. * @return string The rendered PDF as string
  21265. * @static
  21266. */
  21267. public static function output($options = [])
  21268. {
  21269. /** @var \Barryvdh\DomPDF\PDF $instance */
  21270. return $instance->output($options);
  21271. }
  21272. /**
  21273. * Save the PDF to a file
  21274. *
  21275. * @static
  21276. */
  21277. public static function save($filename, $disk = null)
  21278. {
  21279. /** @var \Barryvdh\DomPDF\PDF $instance */
  21280. return $instance->save($filename, $disk);
  21281. }
  21282. /**
  21283. * Make the PDF downloadable by the user
  21284. *
  21285. * @static
  21286. */
  21287. public static function download($filename = 'document.pdf')
  21288. {
  21289. /** @var \Barryvdh\DomPDF\PDF $instance */
  21290. return $instance->download($filename);
  21291. }
  21292. /**
  21293. * Return a response with the PDF to show in the browser
  21294. *
  21295. * @static
  21296. */
  21297. public static function stream($filename = 'document.pdf')
  21298. {
  21299. /** @var \Barryvdh\DomPDF\PDF $instance */
  21300. return $instance->stream($filename);
  21301. }
  21302. /**
  21303. * Render the PDF
  21304. *
  21305. * @static
  21306. */
  21307. public static function render()
  21308. {
  21309. /** @var \Barryvdh\DomPDF\PDF $instance */
  21310. return $instance->render();
  21311. }
  21312. /**
  21313. * @param array<string> $pc
  21314. * @static
  21315. */
  21316. public static function setEncryption($password, $ownerpassword = '', $pc = [])
  21317. {
  21318. /** @var \Barryvdh\DomPDF\PDF $instance */
  21319. return $instance->setEncryption($password, $ownerpassword, $pc);
  21320. }
  21321. }
  21322. /**
  21323. * @method static BasePDF setBaseHost(string $baseHost)
  21324. * @method static BasePDF setBasePath(string $basePath)
  21325. * @method static BasePDF setCanvas(\Dompdf\Canvas $canvas)
  21326. * @method static BasePDF setCallbacks(array<string, mixed> $callbacks)
  21327. * @method static BasePDF setCss(\Dompdf\Css\Stylesheet $css)
  21328. * @method static BasePDF setDefaultView(string $defaultView, array<string, mixed> $options)
  21329. * @method static BasePDF setDom(\DOMDocument $dom)
  21330. * @method static BasePDF setFontMetrics(\Dompdf\FontMetrics $fontMetrics)
  21331. * @method static BasePDF setHttpContext(resource|array<string, mixed> $httpContext)
  21332. * @method static BasePDF setPaper(string|float[] $paper, string $orientation = 'portrait')
  21333. * @method static BasePDF setProtocol(string $protocol)
  21334. * @method static BasePDF setTree(\Dompdf\Frame\FrameTree $tree)
  21335. */
  21336. class Pdf {
  21337. /**
  21338. * Get the DomPDF instance
  21339. *
  21340. * @static
  21341. */
  21342. public static function getDomPDF()
  21343. {
  21344. /** @var \Barryvdh\DomPDF\PDF $instance */
  21345. return $instance->getDomPDF();
  21346. }
  21347. /**
  21348. * Show or hide warnings
  21349. *
  21350. * @static
  21351. */
  21352. public static function setWarnings($warnings)
  21353. {
  21354. /** @var \Barryvdh\DomPDF\PDF $instance */
  21355. return $instance->setWarnings($warnings);
  21356. }
  21357. /**
  21358. * Load a HTML string
  21359. *
  21360. * @param string|null $encoding Not used yet
  21361. * @static
  21362. */
  21363. public static function loadHTML($string, $encoding = null)
  21364. {
  21365. /** @var \Barryvdh\DomPDF\PDF $instance */
  21366. return $instance->loadHTML($string, $encoding);
  21367. }
  21368. /**
  21369. * Load a HTML file
  21370. *
  21371. * @static
  21372. */
  21373. public static function loadFile($file)
  21374. {
  21375. /** @var \Barryvdh\DomPDF\PDF $instance */
  21376. return $instance->loadFile($file);
  21377. }
  21378. /**
  21379. * Add metadata info
  21380. *
  21381. * @param array<string, string> $info
  21382. * @static
  21383. */
  21384. public static function addInfo($info)
  21385. {
  21386. /** @var \Barryvdh\DomPDF\PDF $instance */
  21387. return $instance->addInfo($info);
  21388. }
  21389. /**
  21390. * Load a View and convert to HTML
  21391. *
  21392. * @param array<string, mixed> $data
  21393. * @param array<string, mixed> $mergeData
  21394. * @param string|null $encoding Not used yet
  21395. * @static
  21396. */
  21397. public static function loadView($view, $data = [], $mergeData = [], $encoding = null)
  21398. {
  21399. /** @var \Barryvdh\DomPDF\PDF $instance */
  21400. return $instance->loadView($view, $data, $mergeData, $encoding);
  21401. }
  21402. /**
  21403. * Set/Change an option (or array of options) in Dompdf
  21404. *
  21405. * @param array<string, mixed>|string $attribute
  21406. * @param null|mixed $value
  21407. * @static
  21408. */
  21409. public static function setOption($attribute, $value = null)
  21410. {
  21411. /** @var \Barryvdh\DomPDF\PDF $instance */
  21412. return $instance->setOption($attribute, $value);
  21413. }
  21414. /**
  21415. * Replace all the Options from DomPDF
  21416. *
  21417. * @param array<string, mixed> $options
  21418. * @static
  21419. */
  21420. public static function setOptions($options, $mergeWithDefaults = false)
  21421. {
  21422. /** @var \Barryvdh\DomPDF\PDF $instance */
  21423. return $instance->setOptions($options, $mergeWithDefaults);
  21424. }
  21425. /**
  21426. * Output the PDF as a string.
  21427. *
  21428. * The options parameter controls the output. Accepted options are:
  21429. *
  21430. * 'compress' = > 1 or 0 - apply content stream compression, this is
  21431. * on (1) by default
  21432. *
  21433. * @param array<string, int> $options
  21434. * @return string The rendered PDF as string
  21435. * @static
  21436. */
  21437. public static function output($options = [])
  21438. {
  21439. /** @var \Barryvdh\DomPDF\PDF $instance */
  21440. return $instance->output($options);
  21441. }
  21442. /**
  21443. * Save the PDF to a file
  21444. *
  21445. * @static
  21446. */
  21447. public static function save($filename, $disk = null)
  21448. {
  21449. /** @var \Barryvdh\DomPDF\PDF $instance */
  21450. return $instance->save($filename, $disk);
  21451. }
  21452. /**
  21453. * Make the PDF downloadable by the user
  21454. *
  21455. * @static
  21456. */
  21457. public static function download($filename = 'document.pdf')
  21458. {
  21459. /** @var \Barryvdh\DomPDF\PDF $instance */
  21460. return $instance->download($filename);
  21461. }
  21462. /**
  21463. * Return a response with the PDF to show in the browser
  21464. *
  21465. * @static
  21466. */
  21467. public static function stream($filename = 'document.pdf')
  21468. {
  21469. /** @var \Barryvdh\DomPDF\PDF $instance */
  21470. return $instance->stream($filename);
  21471. }
  21472. /**
  21473. * Render the PDF
  21474. *
  21475. * @static
  21476. */
  21477. public static function render()
  21478. {
  21479. /** @var \Barryvdh\DomPDF\PDF $instance */
  21480. return $instance->render();
  21481. }
  21482. /**
  21483. * @param array<string> $pc
  21484. * @static
  21485. */
  21486. public static function setEncryption($password, $ownerpassword = '', $pc = [])
  21487. {
  21488. /** @var \Barryvdh\DomPDF\PDF $instance */
  21489. return $instance->setEncryption($password, $ownerpassword, $pc);
  21490. }
  21491. }
  21492. }
  21493. namespace Illuminate\Http {
  21494. /**
  21495. */
  21496. class Request extends \Symfony\Component\HttpFoundation\Request {
  21497. /**
  21498. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21499. * @param array $rules
  21500. * @param mixed $params
  21501. * @static
  21502. */
  21503. public static function validate($rules, ...$params)
  21504. {
  21505. return \Illuminate\Http\Request::validate($rules, ...$params);
  21506. }
  21507. /**
  21508. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation()
  21509. * @param string $errorBag
  21510. * @param array $rules
  21511. * @param mixed $params
  21512. * @static
  21513. */
  21514. public static function validateWithBag($errorBag, $rules, ...$params)
  21515. {
  21516. return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params);
  21517. }
  21518. /**
  21519. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21520. * @param mixed $absolute
  21521. * @static
  21522. */
  21523. public static function hasValidSignature($absolute = true)
  21524. {
  21525. return \Illuminate\Http\Request::hasValidSignature($absolute);
  21526. }
  21527. /**
  21528. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21529. * @static
  21530. */
  21531. public static function hasValidRelativeSignature()
  21532. {
  21533. return \Illuminate\Http\Request::hasValidRelativeSignature();
  21534. }
  21535. /**
  21536. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21537. * @param mixed $ignoreQuery
  21538. * @param mixed $absolute
  21539. * @static
  21540. */
  21541. public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)
  21542. {
  21543. return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute);
  21544. }
  21545. /**
  21546. * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation()
  21547. * @param mixed $ignoreQuery
  21548. * @static
  21549. */
  21550. public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])
  21551. {
  21552. return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery);
  21553. }
  21554. }
  21555. }
  21556. namespace Illuminate\Database\Schema {
  21557. /**
  21558. */
  21559. class Blueprint {
  21560. /**
  21561. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21562. * @static
  21563. */
  21564. public static function nestedSet()
  21565. {
  21566. return \Illuminate\Database\Schema\Blueprint::nestedSet();
  21567. }
  21568. /**
  21569. * @see \Kalnoy\Nestedset\NestedSetServiceProvider::register()
  21570. * @static
  21571. */
  21572. public static function dropNestedSet()
  21573. {
  21574. return \Illuminate\Database\Schema\Blueprint::dropNestedSet();
  21575. }
  21576. }
  21577. }
  21578. namespace {
  21579. class App extends \Illuminate\Support\Facades\App {}
  21580. class Arr extends \Illuminate\Support\Arr {}
  21581. class Artisan extends \Illuminate\Support\Facades\Artisan {}
  21582. class Auth extends \Illuminate\Support\Facades\Auth {}
  21583. class Blade extends \Illuminate\Support\Facades\Blade {}
  21584. class Broadcast extends \Illuminate\Support\Facades\Broadcast {}
  21585. class Bus extends \Illuminate\Support\Facades\Bus {}
  21586. class Cache extends \Illuminate\Support\Facades\Cache {}
  21587. class Concurrency extends \Illuminate\Support\Facades\Concurrency {}
  21588. class Config extends \Illuminate\Support\Facades\Config {}
  21589. class Context extends \Illuminate\Support\Facades\Context {}
  21590. class Cookie extends \Illuminate\Support\Facades\Cookie {}
  21591. class Crypt extends \Illuminate\Support\Facades\Crypt {}
  21592. class Date extends \Illuminate\Support\Facades\Date {}
  21593. class DB extends \Illuminate\Support\Facades\DB {}
  21594. /**
  21595. * @template TCollection of static
  21596. * @template TModel of static
  21597. * @template TValue of static
  21598. * @template TValue of static
  21599. */
  21600. class Eloquent extends \Illuminate\Database\Eloquent\Model { /**
  21601. * Create and return an un-saved model instance.
  21602. *
  21603. * @param array $attributes
  21604. * @return TModel
  21605. * @static
  21606. */
  21607. public static function make($attributes = [])
  21608. {
  21609. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21610. return $instance->make($attributes);
  21611. }
  21612. /**
  21613. * Register a new global scope.
  21614. *
  21615. * @param string $identifier
  21616. * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope
  21617. * @return \Illuminate\Database\Eloquent\Builder<static>
  21618. * @static
  21619. */
  21620. public static function withGlobalScope($identifier, $scope)
  21621. {
  21622. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21623. return $instance->withGlobalScope($identifier, $scope);
  21624. }
  21625. /**
  21626. * Remove a registered global scope.
  21627. *
  21628. * @param \Illuminate\Database\Eloquent\Scope|string $scope
  21629. * @return \Illuminate\Database\Eloquent\Builder<static>
  21630. * @static
  21631. */
  21632. public static function withoutGlobalScope($scope)
  21633. {
  21634. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21635. return $instance->withoutGlobalScope($scope);
  21636. }
  21637. /**
  21638. * Remove all or passed registered global scopes.
  21639. *
  21640. * @param array|null $scopes
  21641. * @return \Illuminate\Database\Eloquent\Builder<static>
  21642. * @static
  21643. */
  21644. public static function withoutGlobalScopes($scopes = null)
  21645. {
  21646. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21647. return $instance->withoutGlobalScopes($scopes);
  21648. }
  21649. /**
  21650. * Get an array of global scopes that were removed from the query.
  21651. *
  21652. * @return array
  21653. * @static
  21654. */
  21655. public static function removedScopes()
  21656. {
  21657. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21658. return $instance->removedScopes();
  21659. }
  21660. /**
  21661. * Add a where clause on the primary key to the query.
  21662. *
  21663. * @param mixed $id
  21664. * @return \Illuminate\Database\Eloquent\Builder<static>
  21665. * @static
  21666. */
  21667. public static function whereKey($id)
  21668. {
  21669. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21670. return $instance->whereKey($id);
  21671. }
  21672. /**
  21673. * Add a where clause on the primary key to the query.
  21674. *
  21675. * @param mixed $id
  21676. * @return \Illuminate\Database\Eloquent\Builder<static>
  21677. * @static
  21678. */
  21679. public static function whereKeyNot($id)
  21680. {
  21681. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21682. return $instance->whereKeyNot($id);
  21683. }
  21684. /**
  21685. * Add a basic where clause to the query.
  21686. *
  21687. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21688. * @param mixed $operator
  21689. * @param mixed $value
  21690. * @param string $boolean
  21691. * @return \Illuminate\Database\Eloquent\Builder<static>
  21692. * @static
  21693. */
  21694. public static function where($column, $operator = null, $value = null, $boolean = 'and')
  21695. {
  21696. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21697. return $instance->where($column, $operator, $value, $boolean);
  21698. }
  21699. /**
  21700. * Add a basic where clause to the query, and return the first result.
  21701. *
  21702. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21703. * @param mixed $operator
  21704. * @param mixed $value
  21705. * @param string $boolean
  21706. * @return TModel|null
  21707. * @static
  21708. */
  21709. public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
  21710. {
  21711. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21712. return $instance->firstWhere($column, $operator, $value, $boolean);
  21713. }
  21714. /**
  21715. * Add an "or where" clause to the query.
  21716. *
  21717. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21718. * @param mixed $operator
  21719. * @param mixed $value
  21720. * @return \Illuminate\Database\Eloquent\Builder<static>
  21721. * @static
  21722. */
  21723. public static function orWhere($column, $operator = null, $value = null)
  21724. {
  21725. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21726. return $instance->orWhere($column, $operator, $value);
  21727. }
  21728. /**
  21729. * Add a basic "where not" clause to the query.
  21730. *
  21731. * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  21732. * @param mixed $operator
  21733. * @param mixed $value
  21734. * @param string $boolean
  21735. * @return \Illuminate\Database\Eloquent\Builder<static>
  21736. * @static
  21737. */
  21738. public static function whereNot($column, $operator = null, $value = null, $boolean = 'and')
  21739. {
  21740. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21741. return $instance->whereNot($column, $operator, $value, $boolean);
  21742. }
  21743. /**
  21744. * Add an "or where not" clause to the query.
  21745. *
  21746. * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column
  21747. * @param mixed $operator
  21748. * @param mixed $value
  21749. * @return \Illuminate\Database\Eloquent\Builder<static>
  21750. * @static
  21751. */
  21752. public static function orWhereNot($column, $operator = null, $value = null)
  21753. {
  21754. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21755. return $instance->orWhereNot($column, $operator, $value);
  21756. }
  21757. /**
  21758. * Add an "order by" clause for a timestamp to the query.
  21759. *
  21760. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21761. * @return \Illuminate\Database\Eloquent\Builder<static>
  21762. * @static
  21763. */
  21764. public static function latest($column = null)
  21765. {
  21766. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21767. return $instance->latest($column);
  21768. }
  21769. /**
  21770. * Add an "order by" clause for a timestamp to the query.
  21771. *
  21772. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  21773. * @return \Illuminate\Database\Eloquent\Builder<static>
  21774. * @static
  21775. */
  21776. public static function oldest($column = null)
  21777. {
  21778. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21779. return $instance->oldest($column);
  21780. }
  21781. /**
  21782. * Create a collection of models from plain arrays.
  21783. *
  21784. * @param array $items
  21785. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21786. * @static
  21787. */
  21788. public static function hydrate($items)
  21789. {
  21790. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21791. return $instance->hydrate($items);
  21792. }
  21793. /**
  21794. * Insert into the database after merging the model's default attributes, setting timestamps, and casting values.
  21795. *
  21796. * @param array<int, array<string, mixed>> $values
  21797. * @return bool
  21798. * @static
  21799. */
  21800. public static function fillAndInsert($values)
  21801. {
  21802. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21803. return $instance->fillAndInsert($values);
  21804. }
  21805. /**
  21806. * Insert (ignoring errors) into the database after merging the model's default attributes, setting timestamps, and casting values.
  21807. *
  21808. * @param array<int, array<string, mixed>> $values
  21809. * @return int
  21810. * @static
  21811. */
  21812. public static function fillAndInsertOrIgnore($values)
  21813. {
  21814. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21815. return $instance->fillAndInsertOrIgnore($values);
  21816. }
  21817. /**
  21818. * Insert a record into the database and get its ID after merging the model's default attributes, setting timestamps, and casting values.
  21819. *
  21820. * @param array<string, mixed> $values
  21821. * @return int
  21822. * @static
  21823. */
  21824. public static function fillAndInsertGetId($values)
  21825. {
  21826. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21827. return $instance->fillAndInsertGetId($values);
  21828. }
  21829. /**
  21830. * Enrich the given values by merging in the model's default attributes, adding timestamps, and casting values.
  21831. *
  21832. * @param array<int, array<string, mixed>> $values
  21833. * @return array<int, array<string, mixed>>
  21834. * @static
  21835. */
  21836. public static function fillForInsert($values)
  21837. {
  21838. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21839. return $instance->fillForInsert($values);
  21840. }
  21841. /**
  21842. * Create a collection of models from a raw query.
  21843. *
  21844. * @param string $query
  21845. * @param array $bindings
  21846. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21847. * @static
  21848. */
  21849. public static function fromQuery($query, $bindings = [])
  21850. {
  21851. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21852. return $instance->fromQuery($query, $bindings);
  21853. }
  21854. /**
  21855. * Find a model by its primary key.
  21856. *
  21857. * @param mixed $id
  21858. * @param array|string $columns
  21859. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel|null)
  21860. * @static
  21861. */
  21862. public static function find($id, $columns = [])
  21863. {
  21864. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21865. return $instance->find($id, $columns);
  21866. }
  21867. /**
  21868. * Find a sole model by its primary key.
  21869. *
  21870. * @param mixed $id
  21871. * @param array|string $columns
  21872. * @return TModel
  21873. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21874. * @throws \Illuminate\Database\MultipleRecordsFoundException
  21875. * @static
  21876. */
  21877. public static function findSole($id, $columns = [])
  21878. {
  21879. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21880. return $instance->findSole($id, $columns);
  21881. }
  21882. /**
  21883. * Find multiple models by their primary keys.
  21884. *
  21885. * @param \Illuminate\Contracts\Support\Arrayable|array $ids
  21886. * @param array|string $columns
  21887. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  21888. * @static
  21889. */
  21890. public static function findMany($ids, $columns = [])
  21891. {
  21892. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21893. return $instance->findMany($ids, $columns);
  21894. }
  21895. /**
  21896. * Find a model by its primary key or throw an exception.
  21897. *
  21898. * @param mixed $id
  21899. * @param array|string $columns
  21900. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21901. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  21902. * @static
  21903. */
  21904. public static function findOrFail($id, $columns = [])
  21905. {
  21906. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21907. return $instance->findOrFail($id, $columns);
  21908. }
  21909. /**
  21910. * Find a model by its primary key or return fresh model instance.
  21911. *
  21912. * @param mixed $id
  21913. * @param array|string $columns
  21914. * @return ($id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel)
  21915. * @static
  21916. */
  21917. public static function findOrNew($id, $columns = [])
  21918. {
  21919. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21920. return $instance->findOrNew($id, $columns);
  21921. }
  21922. /**
  21923. * Find a model by its primary key or call a callback.
  21924. *
  21925. * @template TValue
  21926. * @param mixed $id
  21927. * @param (\Closure(): TValue)|list<string>|string $columns
  21928. * @param (\Closure(): TValue)|null $callback
  21929. * @return ( $id is (\Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<mixed>)
  21930. * ? \Illuminate\Database\Eloquent\Collection<int, TModel>
  21931. * : TModel|TValue
  21932. * )
  21933. * @static
  21934. */
  21935. public static function findOr($id, $columns = [], $callback = null)
  21936. {
  21937. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21938. return $instance->findOr($id, $columns, $callback);
  21939. }
  21940. /**
  21941. * Get the first record matching the attributes or instantiate it.
  21942. *
  21943. * @param array $attributes
  21944. * @param array $values
  21945. * @return TModel
  21946. * @static
  21947. */
  21948. public static function firstOrNew($attributes = [], $values = [])
  21949. {
  21950. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21951. return $instance->firstOrNew($attributes, $values);
  21952. }
  21953. /**
  21954. * Get the first record matching the attributes. If the record is not found, create it.
  21955. *
  21956. * @param array $attributes
  21957. * @param array $values
  21958. * @return TModel
  21959. * @static
  21960. */
  21961. public static function firstOrCreate($attributes = [], $values = [])
  21962. {
  21963. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21964. return $instance->firstOrCreate($attributes, $values);
  21965. }
  21966. /**
  21967. * Attempt to create the record. If a unique constraint violation occurs, attempt to find the matching record.
  21968. *
  21969. * @param array $attributes
  21970. * @param array $values
  21971. * @return TModel
  21972. * @static
  21973. */
  21974. public static function createOrFirst($attributes = [], $values = [])
  21975. {
  21976. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21977. return $instance->createOrFirst($attributes, $values);
  21978. }
  21979. /**
  21980. * Create or update a record matching the attributes, and fill it with values.
  21981. *
  21982. * @param array $attributes
  21983. * @param array $values
  21984. * @return TModel
  21985. * @static
  21986. */
  21987. public static function updateOrCreate($attributes, $values = [])
  21988. {
  21989. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  21990. return $instance->updateOrCreate($attributes, $values);
  21991. }
  21992. /**
  21993. * Create a record matching the attributes, or increment the existing record.
  21994. *
  21995. * @param array $attributes
  21996. * @param string $column
  21997. * @param int|float $default
  21998. * @param int|float $step
  21999. * @param array $extra
  22000. * @return TModel
  22001. * @static
  22002. */
  22003. public static function incrementOrCreate($attributes, $column = 'count', $default = 1, $step = 1, $extra = [])
  22004. {
  22005. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22006. return $instance->incrementOrCreate($attributes, $column, $default, $step, $extra);
  22007. }
  22008. /**
  22009. * Execute the query and get the first result or throw an exception.
  22010. *
  22011. * @param array|string $columns
  22012. * @return TModel
  22013. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  22014. * @static
  22015. */
  22016. public static function firstOrFail($columns = [])
  22017. {
  22018. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22019. return $instance->firstOrFail($columns);
  22020. }
  22021. /**
  22022. * Execute the query and get the first result or call a callback.
  22023. *
  22024. * @template TValue
  22025. * @param (\Closure(): TValue)|list<string> $columns
  22026. * @param (\Closure(): TValue)|null $callback
  22027. * @return TModel|TValue
  22028. * @static
  22029. */
  22030. public static function firstOr($columns = [], $callback = null)
  22031. {
  22032. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22033. return $instance->firstOr($columns, $callback);
  22034. }
  22035. /**
  22036. * Execute the query and get the first result if it's the sole matching record.
  22037. *
  22038. * @param array|string $columns
  22039. * @return TModel
  22040. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  22041. * @throws \Illuminate\Database\MultipleRecordsFoundException
  22042. * @static
  22043. */
  22044. public static function sole($columns = [])
  22045. {
  22046. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22047. return $instance->sole($columns);
  22048. }
  22049. /**
  22050. * Get a single column's value from the first result of a query.
  22051. *
  22052. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  22053. * @return mixed
  22054. * @static
  22055. */
  22056. public static function value($column)
  22057. {
  22058. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22059. return $instance->value($column);
  22060. }
  22061. /**
  22062. * Get a single column's value from the first result of a query if it's the sole matching record.
  22063. *
  22064. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  22065. * @return mixed
  22066. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  22067. * @throws \Illuminate\Database\MultipleRecordsFoundException
  22068. * @static
  22069. */
  22070. public static function soleValue($column)
  22071. {
  22072. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22073. return $instance->soleValue($column);
  22074. }
  22075. /**
  22076. * Get a single column's value from the first result of the query or throw an exception.
  22077. *
  22078. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  22079. * @return mixed
  22080. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<TModel>
  22081. * @static
  22082. */
  22083. public static function valueOrFail($column)
  22084. {
  22085. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22086. return $instance->valueOrFail($column);
  22087. }
  22088. /**
  22089. * Execute the query as a "select" statement.
  22090. *
  22091. * @param array|string $columns
  22092. * @return \Illuminate\Database\Eloquent\Collection<int, TModel>
  22093. * @static
  22094. */
  22095. public static function get($columns = [])
  22096. {
  22097. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22098. return $instance->get($columns);
  22099. }
  22100. /**
  22101. * Get the hydrated models without eager loading.
  22102. *
  22103. * @param array|string $columns
  22104. * @return array<int, TModel>
  22105. * @static
  22106. */
  22107. public static function getModels($columns = [])
  22108. {
  22109. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22110. return $instance->getModels($columns);
  22111. }
  22112. /**
  22113. * Eager load the relationships for the models.
  22114. *
  22115. * @param array<int, TModel> $models
  22116. * @return array<int, TModel>
  22117. * @static
  22118. */
  22119. public static function eagerLoadRelations($models)
  22120. {
  22121. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22122. return $instance->eagerLoadRelations($models);
  22123. }
  22124. /**
  22125. * Register a closure to be invoked after the query is executed.
  22126. *
  22127. * @param \Closure $callback
  22128. * @return \Illuminate\Database\Eloquent\Builder<static>
  22129. * @static
  22130. */
  22131. public static function afterQuery($callback)
  22132. {
  22133. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22134. return $instance->afterQuery($callback);
  22135. }
  22136. /**
  22137. * Invoke the "after query" modification callbacks.
  22138. *
  22139. * @param mixed $result
  22140. * @return mixed
  22141. * @static
  22142. */
  22143. public static function applyAfterQueryCallbacks($result)
  22144. {
  22145. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22146. return $instance->applyAfterQueryCallbacks($result);
  22147. }
  22148. /**
  22149. * Get a lazy collection for the given query.
  22150. *
  22151. * @return \Illuminate\Support\LazyCollection<int, TModel>
  22152. * @static
  22153. */
  22154. public static function cursor()
  22155. {
  22156. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22157. return $instance->cursor();
  22158. }
  22159. /**
  22160. * Get a collection with the values of a given column.
  22161. *
  22162. * @param string|\Illuminate\Contracts\Database\Query\Expression $column
  22163. * @param string|null $key
  22164. * @return \Illuminate\Support\Collection<array-key, mixed>
  22165. * @static
  22166. */
  22167. public static function pluck($column, $key = null)
  22168. {
  22169. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22170. return $instance->pluck($column, $key);
  22171. }
  22172. /**
  22173. * Paginate the given query.
  22174. *
  22175. * @param int|null|\Closure $perPage
  22176. * @param array|string $columns
  22177. * @param string $pageName
  22178. * @param int|null $page
  22179. * @param \Closure|int|null $total
  22180. * @return \Illuminate\Pagination\LengthAwarePaginator
  22181. * @throws \InvalidArgumentException
  22182. * @static
  22183. */
  22184. public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null, $total = null)
  22185. {
  22186. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22187. return $instance->paginate($perPage, $columns, $pageName, $page, $total);
  22188. }
  22189. /**
  22190. * Paginate the given query into a simple paginator.
  22191. *
  22192. * @param int|null $perPage
  22193. * @param array|string $columns
  22194. * @param string $pageName
  22195. * @param int|null $page
  22196. * @return \Illuminate\Contracts\Pagination\Paginator
  22197. * @static
  22198. */
  22199. public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null)
  22200. {
  22201. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22202. return $instance->simplePaginate($perPage, $columns, $pageName, $page);
  22203. }
  22204. /**
  22205. * Paginate the given query into a cursor paginator.
  22206. *
  22207. * @param int|null $perPage
  22208. * @param array|string $columns
  22209. * @param string $cursorName
  22210. * @param \Illuminate\Pagination\Cursor|string|null $cursor
  22211. * @return \Illuminate\Contracts\Pagination\CursorPaginator
  22212. * @static
  22213. */
  22214. public static function cursorPaginate($perPage = null, $columns = [], $cursorName = 'cursor', $cursor = null)
  22215. {
  22216. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22217. return $instance->cursorPaginate($perPage, $columns, $cursorName, $cursor);
  22218. }
  22219. /**
  22220. * Save a new model and return the instance.
  22221. *
  22222. * @param array $attributes
  22223. * @return TModel
  22224. * @static
  22225. */
  22226. public static function create($attributes = [])
  22227. {
  22228. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22229. return $instance->create($attributes);
  22230. }
  22231. /**
  22232. * Save a new model and return the instance without raising model events.
  22233. *
  22234. * @param array $attributes
  22235. * @return TModel
  22236. * @static
  22237. */
  22238. public static function createQuietly($attributes = [])
  22239. {
  22240. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22241. return $instance->createQuietly($attributes);
  22242. }
  22243. /**
  22244. * Save a new model and return the instance. Allow mass-assignment.
  22245. *
  22246. * @param array $attributes
  22247. * @return TModel
  22248. * @static
  22249. */
  22250. public static function forceCreate($attributes)
  22251. {
  22252. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22253. return $instance->forceCreate($attributes);
  22254. }
  22255. /**
  22256. * Save a new model instance with mass assignment without raising model events.
  22257. *
  22258. * @param array $attributes
  22259. * @return TModel
  22260. * @static
  22261. */
  22262. public static function forceCreateQuietly($attributes = [])
  22263. {
  22264. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22265. return $instance->forceCreateQuietly($attributes);
  22266. }
  22267. /**
  22268. * Insert new records or update the existing ones.
  22269. *
  22270. * @param array $values
  22271. * @param array|string $uniqueBy
  22272. * @param array|null $update
  22273. * @return int
  22274. * @static
  22275. */
  22276. public static function upsert($values, $uniqueBy, $update = null)
  22277. {
  22278. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22279. return $instance->upsert($values, $uniqueBy, $update);
  22280. }
  22281. /**
  22282. * Register a replacement for the default delete function.
  22283. *
  22284. * @param \Closure $callback
  22285. * @return void
  22286. * @static
  22287. */
  22288. public static function onDelete($callback)
  22289. {
  22290. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22291. $instance->onDelete($callback);
  22292. }
  22293. /**
  22294. * Call the given local model scopes.
  22295. *
  22296. * @param array|string $scopes
  22297. * @return static|mixed
  22298. * @static
  22299. */
  22300. public static function scopes($scopes)
  22301. {
  22302. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22303. return $instance->scopes($scopes);
  22304. }
  22305. /**
  22306. * Apply the scopes to the Eloquent builder instance and return it.
  22307. *
  22308. * @return static
  22309. * @static
  22310. */
  22311. public static function applyScopes()
  22312. {
  22313. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22314. return $instance->applyScopes();
  22315. }
  22316. /**
  22317. * Prevent the specified relations from being eager loaded.
  22318. *
  22319. * @param mixed $relations
  22320. * @return \Illuminate\Database\Eloquent\Builder<static>
  22321. * @static
  22322. */
  22323. public static function without($relations)
  22324. {
  22325. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22326. return $instance->without($relations);
  22327. }
  22328. /**
  22329. * Set the relationships that should be eager loaded while removing any previously added eager loading specifications.
  22330. *
  22331. * @param array<array-key, array|(\Closure(\Illuminate\Database\Eloquent\Relations\Relation<*,*,*>): mixed)|string>|string $relations
  22332. * @return \Illuminate\Database\Eloquent\Builder<static>
  22333. * @static
  22334. */
  22335. public static function withOnly($relations)
  22336. {
  22337. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22338. return $instance->withOnly($relations);
  22339. }
  22340. /**
  22341. * Create a new instance of the model being queried.
  22342. *
  22343. * @param array $attributes
  22344. * @return TModel
  22345. * @static
  22346. */
  22347. public static function newModelInstance($attributes = [])
  22348. {
  22349. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22350. return $instance->newModelInstance($attributes);
  22351. }
  22352. /**
  22353. * Specify attributes that should be added to any new models created by this builder.
  22354. *
  22355. * The given key / value pairs will also be added as where conditions to the query.
  22356. *
  22357. * @param \Illuminate\Contracts\Database\Query\Expression|array|string $attributes
  22358. * @param mixed $value
  22359. * @param bool $asConditions
  22360. * @return \Illuminate\Database\Eloquent\Builder<static>
  22361. * @static
  22362. */
  22363. public static function withAttributes($attributes, $value = null, $asConditions = true)
  22364. {
  22365. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22366. return $instance->withAttributes($attributes, $value, $asConditions);
  22367. }
  22368. /**
  22369. * Apply query-time casts to the model instance.
  22370. *
  22371. * @param array $casts
  22372. * @return \Illuminate\Database\Eloquent\Builder<static>
  22373. * @static
  22374. */
  22375. public static function withCasts($casts)
  22376. {
  22377. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22378. return $instance->withCasts($casts);
  22379. }
  22380. /**
  22381. * Execute the given Closure within a transaction savepoint if needed.
  22382. *
  22383. * @template TModelValue
  22384. * @param \Closure(): TModelValue $scope
  22385. * @return TModelValue
  22386. * @static
  22387. */
  22388. public static function withSavepointIfNeeded($scope)
  22389. {
  22390. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22391. return $instance->withSavepointIfNeeded($scope);
  22392. }
  22393. /**
  22394. * Get the underlying query builder instance.
  22395. *
  22396. * @return \Illuminate\Database\Query\Builder
  22397. * @static
  22398. */
  22399. public static function getQuery()
  22400. {
  22401. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22402. return $instance->getQuery();
  22403. }
  22404. /**
  22405. * Set the underlying query builder instance.
  22406. *
  22407. * @param \Illuminate\Database\Query\Builder $query
  22408. * @return \Illuminate\Database\Eloquent\Builder<static>
  22409. * @static
  22410. */
  22411. public static function setQuery($query)
  22412. {
  22413. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22414. return $instance->setQuery($query);
  22415. }
  22416. /**
  22417. * Get a base query builder instance.
  22418. *
  22419. * @return \Illuminate\Database\Query\Builder
  22420. * @static
  22421. */
  22422. public static function toBase()
  22423. {
  22424. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22425. return $instance->toBase();
  22426. }
  22427. /**
  22428. * Get the relationships being eagerly loaded.
  22429. *
  22430. * @return array
  22431. * @static
  22432. */
  22433. public static function getEagerLoads()
  22434. {
  22435. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22436. return $instance->getEagerLoads();
  22437. }
  22438. /**
  22439. * Set the relationships being eagerly loaded.
  22440. *
  22441. * @param array $eagerLoad
  22442. * @return \Illuminate\Database\Eloquent\Builder<static>
  22443. * @static
  22444. */
  22445. public static function setEagerLoads($eagerLoad)
  22446. {
  22447. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22448. return $instance->setEagerLoads($eagerLoad);
  22449. }
  22450. /**
  22451. * Indicate that the given relationships should not be eagerly loaded.
  22452. *
  22453. * @param array $relations
  22454. * @return \Illuminate\Database\Eloquent\Builder<static>
  22455. * @static
  22456. */
  22457. public static function withoutEagerLoad($relations)
  22458. {
  22459. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22460. return $instance->withoutEagerLoad($relations);
  22461. }
  22462. /**
  22463. * Flush the relationships being eagerly loaded.
  22464. *
  22465. * @return \Illuminate\Database\Eloquent\Builder<static>
  22466. * @static
  22467. */
  22468. public static function withoutEagerLoads()
  22469. {
  22470. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22471. return $instance->withoutEagerLoads();
  22472. }
  22473. /**
  22474. * Get the "limit" value from the query or null if it's not set.
  22475. *
  22476. * @return mixed
  22477. * @static
  22478. */
  22479. public static function getLimit()
  22480. {
  22481. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22482. return $instance->getLimit();
  22483. }
  22484. /**
  22485. * Get the "offset" value from the query or null if it's not set.
  22486. *
  22487. * @return mixed
  22488. * @static
  22489. */
  22490. public static function getOffset()
  22491. {
  22492. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22493. return $instance->getOffset();
  22494. }
  22495. /**
  22496. * Get the model instance being queried.
  22497. *
  22498. * @return TModel
  22499. * @static
  22500. */
  22501. public static function getModel()
  22502. {
  22503. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22504. return $instance->getModel();
  22505. }
  22506. /**
  22507. * Set a model instance for the model being queried.
  22508. *
  22509. * @template TModelNew of \Illuminate\Database\Eloquent\Model
  22510. * @param TModelNew $model
  22511. * @return static<TModelNew>
  22512. * @static
  22513. */
  22514. public static function setModel($model)
  22515. {
  22516. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22517. return $instance->setModel($model);
  22518. }
  22519. /**
  22520. * Get the given macro by name.
  22521. *
  22522. * @param string $name
  22523. * @return \Closure
  22524. * @static
  22525. */
  22526. public static function getMacro($name)
  22527. {
  22528. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22529. return $instance->getMacro($name);
  22530. }
  22531. /**
  22532. * Checks if a macro is registered.
  22533. *
  22534. * @param string $name
  22535. * @return bool
  22536. * @static
  22537. */
  22538. public static function hasMacro($name)
  22539. {
  22540. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22541. return $instance->hasMacro($name);
  22542. }
  22543. /**
  22544. * Get the given global macro by name.
  22545. *
  22546. * @param string $name
  22547. * @return \Closure
  22548. * @static
  22549. */
  22550. public static function getGlobalMacro($name)
  22551. {
  22552. return \Illuminate\Database\Eloquent\Builder::getGlobalMacro($name);
  22553. }
  22554. /**
  22555. * Checks if a global macro is registered.
  22556. *
  22557. * @param string $name
  22558. * @return bool
  22559. * @static
  22560. */
  22561. public static function hasGlobalMacro($name)
  22562. {
  22563. return \Illuminate\Database\Eloquent\Builder::hasGlobalMacro($name);
  22564. }
  22565. /**
  22566. * Clone the Eloquent query builder.
  22567. *
  22568. * @return static
  22569. * @static
  22570. */
  22571. public static function clone()
  22572. {
  22573. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22574. return $instance->clone();
  22575. }
  22576. /**
  22577. * Register a closure to be invoked on a clone.
  22578. *
  22579. * @param \Closure $callback
  22580. * @return \Illuminate\Database\Eloquent\Builder<static>
  22581. * @static
  22582. */
  22583. public static function onClone($callback)
  22584. {
  22585. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22586. return $instance->onClone($callback);
  22587. }
  22588. /**
  22589. * Chunk the results of the query.
  22590. *
  22591. * @param int $count
  22592. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22593. * @return bool
  22594. * @static
  22595. */
  22596. public static function chunk($count, $callback)
  22597. {
  22598. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22599. return $instance->chunk($count, $callback);
  22600. }
  22601. /**
  22602. * Run a map over each item while chunking.
  22603. *
  22604. * @template TReturn
  22605. * @param callable(TValue): TReturn $callback
  22606. * @param int $count
  22607. * @return \Illuminate\Support\Collection<int, TReturn>
  22608. * @static
  22609. */
  22610. public static function chunkMap($callback, $count = 1000)
  22611. {
  22612. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22613. return $instance->chunkMap($callback, $count);
  22614. }
  22615. /**
  22616. * Execute a callback over each item while chunking.
  22617. *
  22618. * @param callable(TValue, int): mixed $callback
  22619. * @param int $count
  22620. * @return bool
  22621. * @throws \RuntimeException
  22622. * @static
  22623. */
  22624. public static function each($callback, $count = 1000)
  22625. {
  22626. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22627. return $instance->each($callback, $count);
  22628. }
  22629. /**
  22630. * Chunk the results of a query by comparing IDs.
  22631. *
  22632. * @param int $count
  22633. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22634. * @param string|null $column
  22635. * @param string|null $alias
  22636. * @return bool
  22637. * @static
  22638. */
  22639. public static function chunkById($count, $callback, $column = null, $alias = null)
  22640. {
  22641. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22642. return $instance->chunkById($count, $callback, $column, $alias);
  22643. }
  22644. /**
  22645. * Chunk the results of a query by comparing IDs in descending order.
  22646. *
  22647. * @param int $count
  22648. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22649. * @param string|null $column
  22650. * @param string|null $alias
  22651. * @return bool
  22652. * @static
  22653. */
  22654. public static function chunkByIdDesc($count, $callback, $column = null, $alias = null)
  22655. {
  22656. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22657. return $instance->chunkByIdDesc($count, $callback, $column, $alias);
  22658. }
  22659. /**
  22660. * Chunk the results of a query by comparing IDs in a given order.
  22661. *
  22662. * @param int $count
  22663. * @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
  22664. * @param string|null $column
  22665. * @param string|null $alias
  22666. * @param bool $descending
  22667. * @return bool
  22668. * @throws \RuntimeException
  22669. * @static
  22670. */
  22671. public static function orderedChunkById($count, $callback, $column = null, $alias = null, $descending = false)
  22672. {
  22673. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22674. return $instance->orderedChunkById($count, $callback, $column, $alias, $descending);
  22675. }
  22676. /**
  22677. * Execute a callback over each item while chunking by ID.
  22678. *
  22679. * @param callable(TValue, int): mixed $callback
  22680. * @param int $count
  22681. * @param string|null $column
  22682. * @param string|null $alias
  22683. * @return bool
  22684. * @static
  22685. */
  22686. public static function eachById($callback, $count = 1000, $column = null, $alias = null)
  22687. {
  22688. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22689. return $instance->eachById($callback, $count, $column, $alias);
  22690. }
  22691. /**
  22692. * Query lazily, by chunks of the given size.
  22693. *
  22694. * @param int $chunkSize
  22695. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22696. * @throws \InvalidArgumentException
  22697. * @static
  22698. */
  22699. public static function lazy($chunkSize = 1000)
  22700. {
  22701. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22702. return $instance->lazy($chunkSize);
  22703. }
  22704. /**
  22705. * Query lazily, by chunking the results of a query by comparing IDs.
  22706. *
  22707. * @param int $chunkSize
  22708. * @param string|null $column
  22709. * @param string|null $alias
  22710. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22711. * @throws \InvalidArgumentException
  22712. * @static
  22713. */
  22714. public static function lazyById($chunkSize = 1000, $column = null, $alias = null)
  22715. {
  22716. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22717. return $instance->lazyById($chunkSize, $column, $alias);
  22718. }
  22719. /**
  22720. * Query lazily, by chunking the results of a query by comparing IDs in descending order.
  22721. *
  22722. * @param int $chunkSize
  22723. * @param string|null $column
  22724. * @param string|null $alias
  22725. * @return \Illuminate\Support\LazyCollection<int, TValue>
  22726. * @throws \InvalidArgumentException
  22727. * @static
  22728. */
  22729. public static function lazyByIdDesc($chunkSize = 1000, $column = null, $alias = null)
  22730. {
  22731. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22732. return $instance->lazyByIdDesc($chunkSize, $column, $alias);
  22733. }
  22734. /**
  22735. * Execute the query and get the first result.
  22736. *
  22737. * @param array|string $columns
  22738. * @return TValue|null
  22739. * @static
  22740. */
  22741. public static function first($columns = [])
  22742. {
  22743. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22744. return $instance->first($columns);
  22745. }
  22746. /**
  22747. * Execute the query and get the first result if it's the sole matching record.
  22748. *
  22749. * @param array|string $columns
  22750. * @return TValue
  22751. * @throws \Illuminate\Database\RecordsNotFoundException
  22752. * @throws \Illuminate\Database\MultipleRecordsFoundException
  22753. * @static
  22754. */
  22755. public static function baseSole($columns = [])
  22756. {
  22757. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22758. return $instance->baseSole($columns);
  22759. }
  22760. /**
  22761. * Pass the query to a given callback and then return it.
  22762. *
  22763. * @param callable($this): mixed $callback
  22764. * @return \Illuminate\Database\Eloquent\Builder<static>
  22765. * @static
  22766. */
  22767. public static function tap($callback)
  22768. {
  22769. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22770. return $instance->tap($callback);
  22771. }
  22772. /**
  22773. * Pass the query to a given callback and return the result.
  22774. *
  22775. * @template TReturn
  22776. * @param (callable($this): TReturn) $callback
  22777. * @return (TReturn is null|void ? $this : TReturn)
  22778. * @static
  22779. */
  22780. public static function pipe($callback)
  22781. {
  22782. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22783. return $instance->pipe($callback);
  22784. }
  22785. /**
  22786. * Apply the callback if the given "value" is (or resolves to) truthy.
  22787. *
  22788. * @template TWhenParameter
  22789. * @template TWhenReturnType
  22790. * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
  22791. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
  22792. * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
  22793. * @return $this|TWhenReturnType
  22794. * @static
  22795. */
  22796. public static function when($value = null, $callback = null, $default = null)
  22797. {
  22798. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22799. return $instance->when($value, $callback, $default);
  22800. }
  22801. /**
  22802. * Apply the callback if the given "value" is (or resolves to) falsy.
  22803. *
  22804. * @template TUnlessParameter
  22805. * @template TUnlessReturnType
  22806. * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
  22807. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
  22808. * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
  22809. * @return $this|TUnlessReturnType
  22810. * @static
  22811. */
  22812. public static function unless($value = null, $callback = null, $default = null)
  22813. {
  22814. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22815. return $instance->unless($value, $callback, $default);
  22816. }
  22817. /**
  22818. * Add a relationship count / exists condition to the query.
  22819. *
  22820. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22821. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22822. * @param string $operator
  22823. * @param int $count
  22824. * @param string $boolean
  22825. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22826. * @return \Illuminate\Database\Eloquent\Builder<static>
  22827. * @throws \RuntimeException
  22828. * @static
  22829. */
  22830. public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22831. {
  22832. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22833. return $instance->has($relation, $operator, $count, $boolean, $callback);
  22834. }
  22835. /**
  22836. * Add a relationship count / exists condition to the query with an "or".
  22837. *
  22838. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22839. * @param string $operator
  22840. * @param int $count
  22841. * @return \Illuminate\Database\Eloquent\Builder<static>
  22842. * @static
  22843. */
  22844. public static function orHas($relation, $operator = '>=', $count = 1)
  22845. {
  22846. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22847. return $instance->orHas($relation, $operator, $count);
  22848. }
  22849. /**
  22850. * Add a relationship count / exists condition to the query.
  22851. *
  22852. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22853. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22854. * @param string $boolean
  22855. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22856. * @return \Illuminate\Database\Eloquent\Builder<static>
  22857. * @static
  22858. */
  22859. public static function doesntHave($relation, $boolean = 'and', $callback = null)
  22860. {
  22861. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22862. return $instance->doesntHave($relation, $boolean, $callback);
  22863. }
  22864. /**
  22865. * Add a relationship count / exists condition to the query with an "or".
  22866. *
  22867. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  22868. * @return \Illuminate\Database\Eloquent\Builder<static>
  22869. * @static
  22870. */
  22871. public static function orDoesntHave($relation)
  22872. {
  22873. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22874. return $instance->orDoesntHave($relation);
  22875. }
  22876. /**
  22877. * Add a relationship count / exists condition to the query with where clauses.
  22878. *
  22879. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22880. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22881. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22882. * @param string $operator
  22883. * @param int $count
  22884. * @return \Illuminate\Database\Eloquent\Builder<static>
  22885. * @static
  22886. */
  22887. public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22888. {
  22889. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22890. return $instance->whereHas($relation, $callback, $operator, $count);
  22891. }
  22892. /**
  22893. * Add a relationship count / exists condition to the query with where clauses.
  22894. *
  22895. * Also load the relationship with the same condition.
  22896. *
  22897. * @param string $relation
  22898. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Database\Eloquent\Relations\Relation<*, *, *>): mixed)|null $callback
  22899. * @param string $operator
  22900. * @param int $count
  22901. * @return \Illuminate\Database\Eloquent\Builder<static>
  22902. * @static
  22903. */
  22904. public static function withWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22905. {
  22906. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22907. return $instance->withWhereHas($relation, $callback, $operator, $count);
  22908. }
  22909. /**
  22910. * Add a relationship count / exists condition to the query with where clauses and an "or".
  22911. *
  22912. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22913. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22914. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22915. * @param string $operator
  22916. * @param int $count
  22917. * @return \Illuminate\Database\Eloquent\Builder<static>
  22918. * @static
  22919. */
  22920. public static function orWhereHas($relation, $callback = null, $operator = '>=', $count = 1)
  22921. {
  22922. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22923. return $instance->orWhereHas($relation, $callback, $operator, $count);
  22924. }
  22925. /**
  22926. * Add a relationship count / exists condition to the query with where clauses.
  22927. *
  22928. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22929. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22930. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22931. * @return \Illuminate\Database\Eloquent\Builder<static>
  22932. * @static
  22933. */
  22934. public static function whereDoesntHave($relation, $callback = null)
  22935. {
  22936. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22937. return $instance->whereDoesntHave($relation, $callback);
  22938. }
  22939. /**
  22940. * Add a relationship count / exists condition to the query with where clauses and an "or".
  22941. *
  22942. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22943. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  22944. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|null $callback
  22945. * @return \Illuminate\Database\Eloquent\Builder<static>
  22946. * @static
  22947. */
  22948. public static function orWhereDoesntHave($relation, $callback = null)
  22949. {
  22950. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22951. return $instance->orWhereDoesntHave($relation, $callback);
  22952. }
  22953. /**
  22954. * Add a polymorphic relationship count / exists condition to the query.
  22955. *
  22956. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22957. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22958. * @param string|array<int, string> $types
  22959. * @param string $operator
  22960. * @param int $count
  22961. * @param string $boolean
  22962. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22963. * @return \Illuminate\Database\Eloquent\Builder<static>
  22964. * @static
  22965. */
  22966. public static function hasMorph($relation, $types, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
  22967. {
  22968. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22969. return $instance->hasMorph($relation, $types, $operator, $count, $boolean, $callback);
  22970. }
  22971. /**
  22972. * Add a polymorphic relationship count / exists condition to the query with an "or".
  22973. *
  22974. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  22975. * @param string|array<int, string> $types
  22976. * @param string $operator
  22977. * @param int $count
  22978. * @return \Illuminate\Database\Eloquent\Builder<static>
  22979. * @static
  22980. */
  22981. public static function orHasMorph($relation, $types, $operator = '>=', $count = 1)
  22982. {
  22983. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  22984. return $instance->orHasMorph($relation, $types, $operator, $count);
  22985. }
  22986. /**
  22987. * Add a polymorphic relationship count / exists condition to the query.
  22988. *
  22989. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  22990. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  22991. * @param string|array<int, string> $types
  22992. * @param string $boolean
  22993. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  22994. * @return \Illuminate\Database\Eloquent\Builder<static>
  22995. * @static
  22996. */
  22997. public static function doesntHaveMorph($relation, $types, $boolean = 'and', $callback = null)
  22998. {
  22999. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23000. return $instance->doesntHaveMorph($relation, $types, $boolean, $callback);
  23001. }
  23002. /**
  23003. * Add a polymorphic relationship count / exists condition to the query with an "or".
  23004. *
  23005. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  23006. * @param string|array<int, string> $types
  23007. * @return \Illuminate\Database\Eloquent\Builder<static>
  23008. * @static
  23009. */
  23010. public static function orDoesntHaveMorph($relation, $types)
  23011. {
  23012. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23013. return $instance->orDoesntHaveMorph($relation, $types);
  23014. }
  23015. /**
  23016. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  23017. *
  23018. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23019. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  23020. * @param string|array<int, string> $types
  23021. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  23022. * @param string $operator
  23023. * @param int $count
  23024. * @return \Illuminate\Database\Eloquent\Builder<static>
  23025. * @static
  23026. */
  23027. public static function whereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  23028. {
  23029. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23030. return $instance->whereHasMorph($relation, $types, $callback, $operator, $count);
  23031. }
  23032. /**
  23033. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  23034. *
  23035. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23036. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  23037. * @param string|array<int, string> $types
  23038. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  23039. * @param string $operator
  23040. * @param int $count
  23041. * @return \Illuminate\Database\Eloquent\Builder<static>
  23042. * @static
  23043. */
  23044. public static function orWhereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1)
  23045. {
  23046. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23047. return $instance->orWhereHasMorph($relation, $types, $callback, $operator, $count);
  23048. }
  23049. /**
  23050. * Add a polymorphic relationship count / exists condition to the query with where clauses.
  23051. *
  23052. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23053. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  23054. * @param string|array<int, string> $types
  23055. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  23056. * @return \Illuminate\Database\Eloquent\Builder<static>
  23057. * @static
  23058. */
  23059. public static function whereDoesntHaveMorph($relation, $types, $callback = null)
  23060. {
  23061. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23062. return $instance->whereDoesntHaveMorph($relation, $types, $callback);
  23063. }
  23064. /**
  23065. * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or".
  23066. *
  23067. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23068. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  23069. * @param string|array<int, string> $types
  23070. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>, string): mixed)|null $callback
  23071. * @return \Illuminate\Database\Eloquent\Builder<static>
  23072. * @static
  23073. */
  23074. public static function orWhereDoesntHaveMorph($relation, $types, $callback = null)
  23075. {
  23076. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23077. return $instance->orWhereDoesntHaveMorph($relation, $types, $callback);
  23078. }
  23079. /**
  23080. * Add a basic where clause to a relationship query.
  23081. *
  23082. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23083. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  23084. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23085. * @param mixed $operator
  23086. * @param mixed $value
  23087. * @return \Illuminate\Database\Eloquent\Builder<static>
  23088. * @static
  23089. */
  23090. public static function whereRelation($relation, $column, $operator = null, $value = null)
  23091. {
  23092. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23093. return $instance->whereRelation($relation, $column, $operator, $value);
  23094. }
  23095. /**
  23096. * Add a basic where clause to a relationship query and eager-load the relationship with the same conditions.
  23097. *
  23098. * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation
  23099. * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23100. * @param mixed $operator
  23101. * @param mixed $value
  23102. * @return \Illuminate\Database\Eloquent\Builder<static>
  23103. * @static
  23104. */
  23105. public static function withWhereRelation($relation, $column, $operator = null, $value = null)
  23106. {
  23107. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23108. return $instance->withWhereRelation($relation, $column, $operator, $value);
  23109. }
  23110. /**
  23111. * Add an "or where" clause to a relationship query.
  23112. *
  23113. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23114. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  23115. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23116. * @param mixed $operator
  23117. * @param mixed $value
  23118. * @return \Illuminate\Database\Eloquent\Builder<static>
  23119. * @static
  23120. */
  23121. public static function orWhereRelation($relation, $column, $operator = null, $value = null)
  23122. {
  23123. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23124. return $instance->orWhereRelation($relation, $column, $operator, $value);
  23125. }
  23126. /**
  23127. * Add a basic count / exists condition to a relationship query.
  23128. *
  23129. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23130. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  23131. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23132. * @param mixed $operator
  23133. * @param mixed $value
  23134. * @return \Illuminate\Database\Eloquent\Builder<static>
  23135. * @static
  23136. */
  23137. public static function whereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  23138. {
  23139. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23140. return $instance->whereDoesntHaveRelation($relation, $column, $operator, $value);
  23141. }
  23142. /**
  23143. * Add an "or where" clause to a relationship query.
  23144. *
  23145. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23146. * @param \Illuminate\Database\Eloquent\Relations\Relation<TRelatedModel, *, *>|string $relation
  23147. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23148. * @param mixed $operator
  23149. * @param mixed $value
  23150. * @return \Illuminate\Database\Eloquent\Builder<static>
  23151. * @static
  23152. */
  23153. public static function orWhereDoesntHaveRelation($relation, $column, $operator = null, $value = null)
  23154. {
  23155. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23156. return $instance->orWhereDoesntHaveRelation($relation, $column, $operator, $value);
  23157. }
  23158. /**
  23159. * Add a polymorphic relationship condition to the query with a where clause.
  23160. *
  23161. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23162. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  23163. * @param string|array<int, string> $types
  23164. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23165. * @param mixed $operator
  23166. * @param mixed $value
  23167. * @return \Illuminate\Database\Eloquent\Builder<static>
  23168. * @static
  23169. */
  23170. public static function whereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  23171. {
  23172. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23173. return $instance->whereMorphRelation($relation, $types, $column, $operator, $value);
  23174. }
  23175. /**
  23176. * Add a polymorphic relationship condition to the query with an "or where" clause.
  23177. *
  23178. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23179. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  23180. * @param string|array<int, string> $types
  23181. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23182. * @param mixed $operator
  23183. * @param mixed $value
  23184. * @return \Illuminate\Database\Eloquent\Builder<static>
  23185. * @static
  23186. */
  23187. public static function orWhereMorphRelation($relation, $types, $column, $operator = null, $value = null)
  23188. {
  23189. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23190. return $instance->orWhereMorphRelation($relation, $types, $column, $operator, $value);
  23191. }
  23192. /**
  23193. * Add a polymorphic relationship condition to the query with a doesn't have clause.
  23194. *
  23195. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23196. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  23197. * @param string|array<int, string> $types
  23198. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23199. * @param mixed $operator
  23200. * @param mixed $value
  23201. * @return \Illuminate\Database\Eloquent\Builder<static>
  23202. * @static
  23203. */
  23204. public static function whereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  23205. {
  23206. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23207. return $instance->whereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  23208. }
  23209. /**
  23210. * Add a polymorphic relationship condition to the query with an "or doesn't have" clause.
  23211. *
  23212. * @template TRelatedModel of \Illuminate\Database\Eloquent\Model
  23213. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<TRelatedModel, *>|string $relation
  23214. * @param string|array<int, string> $types
  23215. * @param (\Closure(\Illuminate\Database\Eloquent\Builder<TRelatedModel>): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column
  23216. * @param mixed $operator
  23217. * @param mixed $value
  23218. * @return \Illuminate\Database\Eloquent\Builder<static>
  23219. * @static
  23220. */
  23221. public static function orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null)
  23222. {
  23223. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23224. return $instance->orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value);
  23225. }
  23226. /**
  23227. * Add a morph-to relationship condition to the query.
  23228. *
  23229. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  23230. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  23231. * @return \Illuminate\Database\Eloquent\Builder<static>
  23232. * @static
  23233. */
  23234. public static function whereMorphedTo($relation, $model, $boolean = 'and')
  23235. {
  23236. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23237. return $instance->whereMorphedTo($relation, $model, $boolean);
  23238. }
  23239. /**
  23240. * Add a not morph-to relationship condition to the query.
  23241. *
  23242. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  23243. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  23244. * @return \Illuminate\Database\Eloquent\Builder<static>
  23245. * @static
  23246. */
  23247. public static function whereNotMorphedTo($relation, $model, $boolean = 'and')
  23248. {
  23249. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23250. return $instance->whereNotMorphedTo($relation, $model, $boolean);
  23251. }
  23252. /**
  23253. * Add a morph-to relationship condition to the query with an "or where" clause.
  23254. *
  23255. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  23256. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
  23257. * @return \Illuminate\Database\Eloquent\Builder<static>
  23258. * @static
  23259. */
  23260. public static function orWhereMorphedTo($relation, $model)
  23261. {
  23262. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23263. return $instance->orWhereMorphedTo($relation, $model);
  23264. }
  23265. /**
  23266. * Add a not morph-to relationship condition to the query with an "or where" clause.
  23267. *
  23268. * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
  23269. * @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
  23270. * @return \Illuminate\Database\Eloquent\Builder<static>
  23271. * @static
  23272. */
  23273. public static function orWhereNotMorphedTo($relation, $model)
  23274. {
  23275. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23276. return $instance->orWhereNotMorphedTo($relation, $model);
  23277. }
  23278. /**
  23279. * Add a "belongs to" relationship where clause to the query.
  23280. *
  23281. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  23282. * @param string|null $relationshipName
  23283. * @param string $boolean
  23284. * @return \Illuminate\Database\Eloquent\Builder<static>
  23285. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  23286. * @static
  23287. */
  23288. public static function whereBelongsTo($related, $relationshipName = null, $boolean = 'and')
  23289. {
  23290. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23291. return $instance->whereBelongsTo($related, $relationshipName, $boolean);
  23292. }
  23293. /**
  23294. * Add a "BelongsTo" relationship with an "or where" clause to the query.
  23295. *
  23296. * @param \Illuminate\Database\Eloquent\Model $related
  23297. * @param string|null $relationshipName
  23298. * @return \Illuminate\Database\Eloquent\Builder<static>
  23299. * @throws \RuntimeException
  23300. * @static
  23301. */
  23302. public static function orWhereBelongsTo($related, $relationshipName = null)
  23303. {
  23304. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23305. return $instance->orWhereBelongsTo($related, $relationshipName);
  23306. }
  23307. /**
  23308. * Add a "belongs to many" relationship where clause to the query.
  23309. *
  23310. * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model> $related
  23311. * @param string|null $relationshipName
  23312. * @param string $boolean
  23313. * @return \Illuminate\Database\Eloquent\Builder<static>
  23314. * @throws \Illuminate\Database\Eloquent\RelationNotFoundException
  23315. * @static
  23316. */
  23317. public static function whereAttachedTo($related, $relationshipName = null, $boolean = 'and')
  23318. {
  23319. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23320. return $instance->whereAttachedTo($related, $relationshipName, $boolean);
  23321. }
  23322. /**
  23323. * Add a "belongs to many" relationship with an "or where" clause to the query.
  23324. *
  23325. * @param \Illuminate\Database\Eloquent\Model $related
  23326. * @param string|null $relationshipName
  23327. * @return \Illuminate\Database\Eloquent\Builder<static>
  23328. * @throws \RuntimeException
  23329. * @static
  23330. */
  23331. public static function orWhereAttachedTo($related, $relationshipName = null)
  23332. {
  23333. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23334. return $instance->orWhereAttachedTo($related, $relationshipName);
  23335. }
  23336. /**
  23337. * Add subselect queries to include an aggregate value for a relationship.
  23338. *
  23339. * @param mixed $relations
  23340. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23341. * @param string $function
  23342. * @return \Illuminate\Database\Eloquent\Builder<static>
  23343. * @static
  23344. */
  23345. public static function withAggregate($relations, $column, $function = null)
  23346. {
  23347. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23348. return $instance->withAggregate($relations, $column, $function);
  23349. }
  23350. /**
  23351. * Add subselect queries to count the relations.
  23352. *
  23353. * @param mixed $relations
  23354. * @return \Illuminate\Database\Eloquent\Builder<static>
  23355. * @static
  23356. */
  23357. public static function withCount($relations)
  23358. {
  23359. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23360. return $instance->withCount($relations);
  23361. }
  23362. /**
  23363. * Add subselect queries to include the max of the relation's column.
  23364. *
  23365. * @param string|array $relation
  23366. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23367. * @return \Illuminate\Database\Eloquent\Builder<static>
  23368. * @static
  23369. */
  23370. public static function withMax($relation, $column)
  23371. {
  23372. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23373. return $instance->withMax($relation, $column);
  23374. }
  23375. /**
  23376. * Add subselect queries to include the min of the relation's column.
  23377. *
  23378. * @param string|array $relation
  23379. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23380. * @return \Illuminate\Database\Eloquent\Builder<static>
  23381. * @static
  23382. */
  23383. public static function withMin($relation, $column)
  23384. {
  23385. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23386. return $instance->withMin($relation, $column);
  23387. }
  23388. /**
  23389. * Add subselect queries to include the sum of the relation's column.
  23390. *
  23391. * @param string|array $relation
  23392. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23393. * @return \Illuminate\Database\Eloquent\Builder<static>
  23394. * @static
  23395. */
  23396. public static function withSum($relation, $column)
  23397. {
  23398. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23399. return $instance->withSum($relation, $column);
  23400. }
  23401. /**
  23402. * Add subselect queries to include the average of the relation's column.
  23403. *
  23404. * @param string|array $relation
  23405. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23406. * @return \Illuminate\Database\Eloquent\Builder<static>
  23407. * @static
  23408. */
  23409. public static function withAvg($relation, $column)
  23410. {
  23411. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23412. return $instance->withAvg($relation, $column);
  23413. }
  23414. /**
  23415. * Add subselect queries to include the existence of related models.
  23416. *
  23417. * @param string|array $relation
  23418. * @return \Illuminate\Database\Eloquent\Builder<static>
  23419. * @static
  23420. */
  23421. public static function withExists($relation)
  23422. {
  23423. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23424. return $instance->withExists($relation);
  23425. }
  23426. /**
  23427. * Merge the where constraints from another query to the current query.
  23428. *
  23429. * @param \Illuminate\Database\Eloquent\Builder<*> $from
  23430. * @return \Illuminate\Database\Eloquent\Builder<static>
  23431. * @static
  23432. */
  23433. public static function mergeConstraintsFrom($from)
  23434. {
  23435. /** @var \Illuminate\Database\Eloquent\Builder $instance */
  23436. return $instance->mergeConstraintsFrom($from);
  23437. }
  23438. /**
  23439. * Set the columns to be selected.
  23440. *
  23441. * @param mixed $columns
  23442. * @return \Illuminate\Database\Eloquent\Builder<static>
  23443. * @static
  23444. */
  23445. public static function select($columns = [])
  23446. {
  23447. /** @var \Illuminate\Database\Query\Builder $instance */
  23448. return $instance->select($columns);
  23449. }
  23450. /**
  23451. * Add a subselect expression to the query.
  23452. *
  23453. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23454. * @param string $as
  23455. * @return \Illuminate\Database\Eloquent\Builder<static>
  23456. * @throws \InvalidArgumentException
  23457. * @static
  23458. */
  23459. public static function selectSub($query, $as)
  23460. {
  23461. /** @var \Illuminate\Database\Query\Builder $instance */
  23462. return $instance->selectSub($query, $as);
  23463. }
  23464. /**
  23465. * Add a new "raw" select expression to the query.
  23466. *
  23467. * @param string $expression
  23468. * @return \Illuminate\Database\Eloquent\Builder<static>
  23469. * @static
  23470. */
  23471. public static function selectRaw($expression, $bindings = [])
  23472. {
  23473. /** @var \Illuminate\Database\Query\Builder $instance */
  23474. return $instance->selectRaw($expression, $bindings);
  23475. }
  23476. /**
  23477. * Makes "from" fetch from a subquery.
  23478. *
  23479. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23480. * @param string $as
  23481. * @return \Illuminate\Database\Eloquent\Builder<static>
  23482. * @throws \InvalidArgumentException
  23483. * @static
  23484. */
  23485. public static function fromSub($query, $as)
  23486. {
  23487. /** @var \Illuminate\Database\Query\Builder $instance */
  23488. return $instance->fromSub($query, $as);
  23489. }
  23490. /**
  23491. * Add a raw from clause to the query.
  23492. *
  23493. * @param string $expression
  23494. * @param mixed $bindings
  23495. * @return \Illuminate\Database\Eloquent\Builder<static>
  23496. * @static
  23497. */
  23498. public static function fromRaw($expression, $bindings = [])
  23499. {
  23500. /** @var \Illuminate\Database\Query\Builder $instance */
  23501. return $instance->fromRaw($expression, $bindings);
  23502. }
  23503. /**
  23504. * Add a new select column to the query.
  23505. *
  23506. * @param mixed $column
  23507. * @return \Illuminate\Database\Eloquent\Builder<static>
  23508. * @static
  23509. */
  23510. public static function addSelect($column)
  23511. {
  23512. /** @var \Illuminate\Database\Query\Builder $instance */
  23513. return $instance->addSelect($column);
  23514. }
  23515. /**
  23516. * Force the query to only return distinct results.
  23517. *
  23518. * @return \Illuminate\Database\Eloquent\Builder<static>
  23519. * @static
  23520. */
  23521. public static function distinct()
  23522. {
  23523. /** @var \Illuminate\Database\Query\Builder $instance */
  23524. return $instance->distinct();
  23525. }
  23526. /**
  23527. * Set the table which the query is targeting.
  23528. *
  23529. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $table
  23530. * @param string|null $as
  23531. * @return \Illuminate\Database\Eloquent\Builder<static>
  23532. * @static
  23533. */
  23534. public static function from($table, $as = null)
  23535. {
  23536. /** @var \Illuminate\Database\Query\Builder $instance */
  23537. return $instance->from($table, $as);
  23538. }
  23539. /**
  23540. * Add an index hint to suggest a query index.
  23541. *
  23542. * @param string $index
  23543. * @return \Illuminate\Database\Eloquent\Builder<static>
  23544. * @static
  23545. */
  23546. public static function useIndex($index)
  23547. {
  23548. /** @var \Illuminate\Database\Query\Builder $instance */
  23549. return $instance->useIndex($index);
  23550. }
  23551. /**
  23552. * Add an index hint to force a query index.
  23553. *
  23554. * @param string $index
  23555. * @return \Illuminate\Database\Eloquent\Builder<static>
  23556. * @static
  23557. */
  23558. public static function forceIndex($index)
  23559. {
  23560. /** @var \Illuminate\Database\Query\Builder $instance */
  23561. return $instance->forceIndex($index);
  23562. }
  23563. /**
  23564. * Add an index hint to ignore a query index.
  23565. *
  23566. * @param string $index
  23567. * @return \Illuminate\Database\Eloquent\Builder<static>
  23568. * @static
  23569. */
  23570. public static function ignoreIndex($index)
  23571. {
  23572. /** @var \Illuminate\Database\Query\Builder $instance */
  23573. return $instance->ignoreIndex($index);
  23574. }
  23575. /**
  23576. * Add a join clause to the query.
  23577. *
  23578. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23579. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23580. * @param string|null $operator
  23581. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23582. * @param string $type
  23583. * @param bool $where
  23584. * @return \Illuminate\Database\Eloquent\Builder<static>
  23585. * @static
  23586. */
  23587. public static function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23588. {
  23589. /** @var \Illuminate\Database\Query\Builder $instance */
  23590. return $instance->join($table, $first, $operator, $second, $type, $where);
  23591. }
  23592. /**
  23593. * Add a "join where" clause to the query.
  23594. *
  23595. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23596. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23597. * @param string $operator
  23598. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23599. * @param string $type
  23600. * @return \Illuminate\Database\Eloquent\Builder<static>
  23601. * @static
  23602. */
  23603. public static function joinWhere($table, $first, $operator, $second, $type = 'inner')
  23604. {
  23605. /** @var \Illuminate\Database\Query\Builder $instance */
  23606. return $instance->joinWhere($table, $first, $operator, $second, $type);
  23607. }
  23608. /**
  23609. * Add a subquery join clause to the query.
  23610. *
  23611. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23612. * @param string $as
  23613. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23614. * @param string|null $operator
  23615. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23616. * @param string $type
  23617. * @param bool $where
  23618. * @return \Illuminate\Database\Eloquent\Builder<static>
  23619. * @throws \InvalidArgumentException
  23620. * @static
  23621. */
  23622. public static function joinSub($query, $as, $first, $operator = null, $second = null, $type = 'inner', $where = false)
  23623. {
  23624. /** @var \Illuminate\Database\Query\Builder $instance */
  23625. return $instance->joinSub($query, $as, $first, $operator, $second, $type, $where);
  23626. }
  23627. /**
  23628. * Add a lateral join clause to the query.
  23629. *
  23630. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23631. * @return \Illuminate\Database\Eloquent\Builder<static>
  23632. * @static
  23633. */
  23634. public static function joinLateral($query, $as, $type = 'inner')
  23635. {
  23636. /** @var \Illuminate\Database\Query\Builder $instance */
  23637. return $instance->joinLateral($query, $as, $type);
  23638. }
  23639. /**
  23640. * Add a lateral left join to the query.
  23641. *
  23642. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23643. * @return \Illuminate\Database\Eloquent\Builder<static>
  23644. * @static
  23645. */
  23646. public static function leftJoinLateral($query, $as)
  23647. {
  23648. /** @var \Illuminate\Database\Query\Builder $instance */
  23649. return $instance->leftJoinLateral($query, $as);
  23650. }
  23651. /**
  23652. * Add a left join to the query.
  23653. *
  23654. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23655. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23656. * @param string|null $operator
  23657. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23658. * @return \Illuminate\Database\Eloquent\Builder<static>
  23659. * @static
  23660. */
  23661. public static function leftJoin($table, $first, $operator = null, $second = null)
  23662. {
  23663. /** @var \Illuminate\Database\Query\Builder $instance */
  23664. return $instance->leftJoin($table, $first, $operator, $second);
  23665. }
  23666. /**
  23667. * Add a "join where" clause to the query.
  23668. *
  23669. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23670. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23671. * @param string $operator
  23672. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23673. * @return \Illuminate\Database\Eloquent\Builder<static>
  23674. * @static
  23675. */
  23676. public static function leftJoinWhere($table, $first, $operator, $second)
  23677. {
  23678. /** @var \Illuminate\Database\Query\Builder $instance */
  23679. return $instance->leftJoinWhere($table, $first, $operator, $second);
  23680. }
  23681. /**
  23682. * Add a subquery left join to the query.
  23683. *
  23684. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23685. * @param string $as
  23686. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23687. * @param string|null $operator
  23688. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23689. * @return \Illuminate\Database\Eloquent\Builder<static>
  23690. * @static
  23691. */
  23692. public static function leftJoinSub($query, $as, $first, $operator = null, $second = null)
  23693. {
  23694. /** @var \Illuminate\Database\Query\Builder $instance */
  23695. return $instance->leftJoinSub($query, $as, $first, $operator, $second);
  23696. }
  23697. /**
  23698. * Add a right join to the query.
  23699. *
  23700. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23701. * @param \Closure|string $first
  23702. * @param string|null $operator
  23703. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23704. * @return \Illuminate\Database\Eloquent\Builder<static>
  23705. * @static
  23706. */
  23707. public static function rightJoin($table, $first, $operator = null, $second = null)
  23708. {
  23709. /** @var \Illuminate\Database\Query\Builder $instance */
  23710. return $instance->rightJoin($table, $first, $operator, $second);
  23711. }
  23712. /**
  23713. * Add a "right join where" clause to the query.
  23714. *
  23715. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23716. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23717. * @param string $operator
  23718. * @param \Illuminate\Contracts\Database\Query\Expression|string $second
  23719. * @return \Illuminate\Database\Eloquent\Builder<static>
  23720. * @static
  23721. */
  23722. public static function rightJoinWhere($table, $first, $operator, $second)
  23723. {
  23724. /** @var \Illuminate\Database\Query\Builder $instance */
  23725. return $instance->rightJoinWhere($table, $first, $operator, $second);
  23726. }
  23727. /**
  23728. * Add a subquery right join to the query.
  23729. *
  23730. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23731. * @param string $as
  23732. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
  23733. * @param string|null $operator
  23734. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23735. * @return \Illuminate\Database\Eloquent\Builder<static>
  23736. * @static
  23737. */
  23738. public static function rightJoinSub($query, $as, $first, $operator = null, $second = null)
  23739. {
  23740. /** @var \Illuminate\Database\Query\Builder $instance */
  23741. return $instance->rightJoinSub($query, $as, $first, $operator, $second);
  23742. }
  23743. /**
  23744. * Add a "cross join" clause to the query.
  23745. *
  23746. * @param \Illuminate\Contracts\Database\Query\Expression|string $table
  23747. * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string|null $first
  23748. * @param string|null $operator
  23749. * @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
  23750. * @return \Illuminate\Database\Eloquent\Builder<static>
  23751. * @static
  23752. */
  23753. public static function crossJoin($table, $first = null, $operator = null, $second = null)
  23754. {
  23755. /** @var \Illuminate\Database\Query\Builder $instance */
  23756. return $instance->crossJoin($table, $first, $operator, $second);
  23757. }
  23758. /**
  23759. * Add a subquery cross join to the query.
  23760. *
  23761. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  23762. * @param string $as
  23763. * @return \Illuminate\Database\Eloquent\Builder<static>
  23764. * @static
  23765. */
  23766. public static function crossJoinSub($query, $as)
  23767. {
  23768. /** @var \Illuminate\Database\Query\Builder $instance */
  23769. return $instance->crossJoinSub($query, $as);
  23770. }
  23771. /**
  23772. * Merge an array of where clauses and bindings.
  23773. *
  23774. * @param array $wheres
  23775. * @param array $bindings
  23776. * @return \Illuminate\Database\Eloquent\Builder<static>
  23777. * @static
  23778. */
  23779. public static function mergeWheres($wheres, $bindings)
  23780. {
  23781. /** @var \Illuminate\Database\Query\Builder $instance */
  23782. return $instance->mergeWheres($wheres, $bindings);
  23783. }
  23784. /**
  23785. * Prepare the value and operator for a where clause.
  23786. *
  23787. * @param string $value
  23788. * @param string $operator
  23789. * @param bool $useDefault
  23790. * @return array
  23791. * @throws \InvalidArgumentException
  23792. * @static
  23793. */
  23794. public static function prepareValueAndOperator($value, $operator, $useDefault = false)
  23795. {
  23796. /** @var \Illuminate\Database\Query\Builder $instance */
  23797. return $instance->prepareValueAndOperator($value, $operator, $useDefault);
  23798. }
  23799. /**
  23800. * Add a "where" clause comparing two columns to the query.
  23801. *
  23802. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23803. * @param string|null $operator
  23804. * @param string|null $second
  23805. * @param string|null $boolean
  23806. * @return \Illuminate\Database\Eloquent\Builder<static>
  23807. * @static
  23808. */
  23809. public static function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
  23810. {
  23811. /** @var \Illuminate\Database\Query\Builder $instance */
  23812. return $instance->whereColumn($first, $operator, $second, $boolean);
  23813. }
  23814. /**
  23815. * Add an "or where" clause comparing two columns to the query.
  23816. *
  23817. * @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
  23818. * @param string|null $operator
  23819. * @param string|null $second
  23820. * @return \Illuminate\Database\Eloquent\Builder<static>
  23821. * @static
  23822. */
  23823. public static function orWhereColumn($first, $operator = null, $second = null)
  23824. {
  23825. /** @var \Illuminate\Database\Query\Builder $instance */
  23826. return $instance->orWhereColumn($first, $operator, $second);
  23827. }
  23828. /**
  23829. * Add a raw where clause to the query.
  23830. *
  23831. * @param \Illuminate\Contracts\Database\Query\Expression|string $sql
  23832. * @param mixed $bindings
  23833. * @param string $boolean
  23834. * @return \Illuminate\Database\Eloquent\Builder<static>
  23835. * @static
  23836. */
  23837. public static function whereRaw($sql, $bindings = [], $boolean = 'and')
  23838. {
  23839. /** @var \Illuminate\Database\Query\Builder $instance */
  23840. return $instance->whereRaw($sql, $bindings, $boolean);
  23841. }
  23842. /**
  23843. * Add a raw or where clause to the query.
  23844. *
  23845. * @param string $sql
  23846. * @param mixed $bindings
  23847. * @return \Illuminate\Database\Eloquent\Builder<static>
  23848. * @static
  23849. */
  23850. public static function orWhereRaw($sql, $bindings = [])
  23851. {
  23852. /** @var \Illuminate\Database\Query\Builder $instance */
  23853. return $instance->orWhereRaw($sql, $bindings);
  23854. }
  23855. /**
  23856. * Add a "where like" clause to the query.
  23857. *
  23858. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23859. * @param string $value
  23860. * @param bool $caseSensitive
  23861. * @param string $boolean
  23862. * @param bool $not
  23863. * @return \Illuminate\Database\Eloquent\Builder<static>
  23864. * @static
  23865. */
  23866. public static function whereLike($column, $value, $caseSensitive = false, $boolean = 'and', $not = false)
  23867. {
  23868. /** @var \Illuminate\Database\Query\Builder $instance */
  23869. return $instance->whereLike($column, $value, $caseSensitive, $boolean, $not);
  23870. }
  23871. /**
  23872. * Add an "or where like" clause to the query.
  23873. *
  23874. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23875. * @param string $value
  23876. * @param bool $caseSensitive
  23877. * @return \Illuminate\Database\Eloquent\Builder<static>
  23878. * @static
  23879. */
  23880. public static function orWhereLike($column, $value, $caseSensitive = false)
  23881. {
  23882. /** @var \Illuminate\Database\Query\Builder $instance */
  23883. return $instance->orWhereLike($column, $value, $caseSensitive);
  23884. }
  23885. /**
  23886. * Add a "where not like" clause to the query.
  23887. *
  23888. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23889. * @param string $value
  23890. * @param bool $caseSensitive
  23891. * @param string $boolean
  23892. * @return \Illuminate\Database\Eloquent\Builder<static>
  23893. * @static
  23894. */
  23895. public static function whereNotLike($column, $value, $caseSensitive = false, $boolean = 'and')
  23896. {
  23897. /** @var \Illuminate\Database\Query\Builder $instance */
  23898. return $instance->whereNotLike($column, $value, $caseSensitive, $boolean);
  23899. }
  23900. /**
  23901. * Add an "or where not like" clause to the query.
  23902. *
  23903. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23904. * @param string $value
  23905. * @param bool $caseSensitive
  23906. * @return \Illuminate\Database\Eloquent\Builder<static>
  23907. * @static
  23908. */
  23909. public static function orWhereNotLike($column, $value, $caseSensitive = false)
  23910. {
  23911. /** @var \Illuminate\Database\Query\Builder $instance */
  23912. return $instance->orWhereNotLike($column, $value, $caseSensitive);
  23913. }
  23914. /**
  23915. * Add a "where in" clause to the query.
  23916. *
  23917. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23918. * @param mixed $values
  23919. * @param string $boolean
  23920. * @param bool $not
  23921. * @return \Illuminate\Database\Eloquent\Builder<static>
  23922. * @static
  23923. */
  23924. public static function whereIn($column, $values, $boolean = 'and', $not = false)
  23925. {
  23926. /** @var \Illuminate\Database\Query\Builder $instance */
  23927. return $instance->whereIn($column, $values, $boolean, $not);
  23928. }
  23929. /**
  23930. * Add an "or where in" clause to the query.
  23931. *
  23932. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23933. * @param mixed $values
  23934. * @return \Illuminate\Database\Eloquent\Builder<static>
  23935. * @static
  23936. */
  23937. public static function orWhereIn($column, $values)
  23938. {
  23939. /** @var \Illuminate\Database\Query\Builder $instance */
  23940. return $instance->orWhereIn($column, $values);
  23941. }
  23942. /**
  23943. * Add a "where not in" clause to the query.
  23944. *
  23945. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23946. * @param mixed $values
  23947. * @param string $boolean
  23948. * @return \Illuminate\Database\Eloquent\Builder<static>
  23949. * @static
  23950. */
  23951. public static function whereNotIn($column, $values, $boolean = 'and')
  23952. {
  23953. /** @var \Illuminate\Database\Query\Builder $instance */
  23954. return $instance->whereNotIn($column, $values, $boolean);
  23955. }
  23956. /**
  23957. * Add an "or where not in" clause to the query.
  23958. *
  23959. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  23960. * @param mixed $values
  23961. * @return \Illuminate\Database\Eloquent\Builder<static>
  23962. * @static
  23963. */
  23964. public static function orWhereNotIn($column, $values)
  23965. {
  23966. /** @var \Illuminate\Database\Query\Builder $instance */
  23967. return $instance->orWhereNotIn($column, $values);
  23968. }
  23969. /**
  23970. * Add a "where in raw" clause for integer values to the query.
  23971. *
  23972. * @param string $column
  23973. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23974. * @param string $boolean
  23975. * @param bool $not
  23976. * @return \Illuminate\Database\Eloquent\Builder<static>
  23977. * @static
  23978. */
  23979. public static function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false)
  23980. {
  23981. /** @var \Illuminate\Database\Query\Builder $instance */
  23982. return $instance->whereIntegerInRaw($column, $values, $boolean, $not);
  23983. }
  23984. /**
  23985. * Add an "or where in raw" clause for integer values to the query.
  23986. *
  23987. * @param string $column
  23988. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  23989. * @return \Illuminate\Database\Eloquent\Builder<static>
  23990. * @static
  23991. */
  23992. public static function orWhereIntegerInRaw($column, $values)
  23993. {
  23994. /** @var \Illuminate\Database\Query\Builder $instance */
  23995. return $instance->orWhereIntegerInRaw($column, $values);
  23996. }
  23997. /**
  23998. * Add a "where not in raw" clause for integer values to the query.
  23999. *
  24000. * @param string $column
  24001. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  24002. * @param string $boolean
  24003. * @return \Illuminate\Database\Eloquent\Builder<static>
  24004. * @static
  24005. */
  24006. public static function whereIntegerNotInRaw($column, $values, $boolean = 'and')
  24007. {
  24008. /** @var \Illuminate\Database\Query\Builder $instance */
  24009. return $instance->whereIntegerNotInRaw($column, $values, $boolean);
  24010. }
  24011. /**
  24012. * Add an "or where not in raw" clause for integer values to the query.
  24013. *
  24014. * @param string $column
  24015. * @param \Illuminate\Contracts\Support\Arrayable|array $values
  24016. * @return \Illuminate\Database\Eloquent\Builder<static>
  24017. * @static
  24018. */
  24019. public static function orWhereIntegerNotInRaw($column, $values)
  24020. {
  24021. /** @var \Illuminate\Database\Query\Builder $instance */
  24022. return $instance->orWhereIntegerNotInRaw($column, $values);
  24023. }
  24024. /**
  24025. * Add a "where null" clause to the query.
  24026. *
  24027. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  24028. * @param string $boolean
  24029. * @param bool $not
  24030. * @return \Illuminate\Database\Eloquent\Builder<static>
  24031. * @static
  24032. */
  24033. public static function whereNull($columns, $boolean = 'and', $not = false)
  24034. {
  24035. /** @var \Illuminate\Database\Query\Builder $instance */
  24036. return $instance->whereNull($columns, $boolean, $not);
  24037. }
  24038. /**
  24039. * Add an "or where null" clause to the query.
  24040. *
  24041. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $column
  24042. * @return \Illuminate\Database\Eloquent\Builder<static>
  24043. * @static
  24044. */
  24045. public static function orWhereNull($column)
  24046. {
  24047. /** @var \Illuminate\Database\Query\Builder $instance */
  24048. return $instance->orWhereNull($column);
  24049. }
  24050. /**
  24051. * Add a "where not null" clause to the query.
  24052. *
  24053. * @param string|array|\Illuminate\Contracts\Database\Query\Expression $columns
  24054. * @param string $boolean
  24055. * @return \Illuminate\Database\Eloquent\Builder<static>
  24056. * @static
  24057. */
  24058. public static function whereNotNull($columns, $boolean = 'and')
  24059. {
  24060. /** @var \Illuminate\Database\Query\Builder $instance */
  24061. return $instance->whereNotNull($columns, $boolean);
  24062. }
  24063. /**
  24064. * Add a where between statement to the query.
  24065. *
  24066. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24067. * @param string $boolean
  24068. * @param bool $not
  24069. * @return \Illuminate\Database\Eloquent\Builder<static>
  24070. * @static
  24071. */
  24072. public static function whereBetween($column, $values, $boolean = 'and', $not = false)
  24073. {
  24074. /** @var \Illuminate\Database\Query\Builder $instance */
  24075. return $instance->whereBetween($column, $values, $boolean, $not);
  24076. }
  24077. /**
  24078. * Add a where between statement using columns to the query.
  24079. *
  24080. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24081. * @param string $boolean
  24082. * @param bool $not
  24083. * @return \Illuminate\Database\Eloquent\Builder<static>
  24084. * @static
  24085. */
  24086. public static function whereBetweenColumns($column, $values, $boolean = 'and', $not = false)
  24087. {
  24088. /** @var \Illuminate\Database\Query\Builder $instance */
  24089. return $instance->whereBetweenColumns($column, $values, $boolean, $not);
  24090. }
  24091. /**
  24092. * Add an or where between statement to the query.
  24093. *
  24094. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24095. * @return \Illuminate\Database\Eloquent\Builder<static>
  24096. * @static
  24097. */
  24098. public static function orWhereBetween($column, $values)
  24099. {
  24100. /** @var \Illuminate\Database\Query\Builder $instance */
  24101. return $instance->orWhereBetween($column, $values);
  24102. }
  24103. /**
  24104. * Add an or where between statement using columns to the query.
  24105. *
  24106. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24107. * @return \Illuminate\Database\Eloquent\Builder<static>
  24108. * @static
  24109. */
  24110. public static function orWhereBetweenColumns($column, $values)
  24111. {
  24112. /** @var \Illuminate\Database\Query\Builder $instance */
  24113. return $instance->orWhereBetweenColumns($column, $values);
  24114. }
  24115. /**
  24116. * Add a where not between statement to the query.
  24117. *
  24118. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24119. * @param string $boolean
  24120. * @return \Illuminate\Database\Eloquent\Builder<static>
  24121. * @static
  24122. */
  24123. public static function whereNotBetween($column, $values, $boolean = 'and')
  24124. {
  24125. /** @var \Illuminate\Database\Query\Builder $instance */
  24126. return $instance->whereNotBetween($column, $values, $boolean);
  24127. }
  24128. /**
  24129. * Add a where not between statement using columns to the query.
  24130. *
  24131. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24132. * @param string $boolean
  24133. * @return \Illuminate\Database\Eloquent\Builder<static>
  24134. * @static
  24135. */
  24136. public static function whereNotBetweenColumns($column, $values, $boolean = 'and')
  24137. {
  24138. /** @var \Illuminate\Database\Query\Builder $instance */
  24139. return $instance->whereNotBetweenColumns($column, $values, $boolean);
  24140. }
  24141. /**
  24142. * Add an or where not between statement to the query.
  24143. *
  24144. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24145. * @return \Illuminate\Database\Eloquent\Builder<static>
  24146. * @static
  24147. */
  24148. public static function orWhereNotBetween($column, $values)
  24149. {
  24150. /** @var \Illuminate\Database\Query\Builder $instance */
  24151. return $instance->orWhereNotBetween($column, $values);
  24152. }
  24153. /**
  24154. * Add an or where not between statement using columns to the query.
  24155. *
  24156. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24157. * @return \Illuminate\Database\Eloquent\Builder<static>
  24158. * @static
  24159. */
  24160. public static function orWhereNotBetweenColumns($column, $values)
  24161. {
  24162. /** @var \Illuminate\Database\Query\Builder $instance */
  24163. return $instance->orWhereNotBetweenColumns($column, $values);
  24164. }
  24165. /**
  24166. * Add an "or where not null" clause to the query.
  24167. *
  24168. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24169. * @return \Illuminate\Database\Eloquent\Builder<static>
  24170. * @static
  24171. */
  24172. public static function orWhereNotNull($column)
  24173. {
  24174. /** @var \Illuminate\Database\Query\Builder $instance */
  24175. return $instance->orWhereNotNull($column);
  24176. }
  24177. /**
  24178. * Add a "where date" statement to the query.
  24179. *
  24180. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24181. * @param \DateTimeInterface|string|null $operator
  24182. * @param \DateTimeInterface|string|null $value
  24183. * @param string $boolean
  24184. * @return \Illuminate\Database\Eloquent\Builder<static>
  24185. * @static
  24186. */
  24187. public static function whereDate($column, $operator, $value = null, $boolean = 'and')
  24188. {
  24189. /** @var \Illuminate\Database\Query\Builder $instance */
  24190. return $instance->whereDate($column, $operator, $value, $boolean);
  24191. }
  24192. /**
  24193. * Add an "or where date" statement to the query.
  24194. *
  24195. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24196. * @param \DateTimeInterface|string|null $operator
  24197. * @param \DateTimeInterface|string|null $value
  24198. * @return \Illuminate\Database\Eloquent\Builder<static>
  24199. * @static
  24200. */
  24201. public static function orWhereDate($column, $operator, $value = null)
  24202. {
  24203. /** @var \Illuminate\Database\Query\Builder $instance */
  24204. return $instance->orWhereDate($column, $operator, $value);
  24205. }
  24206. /**
  24207. * Add a "where time" statement to the query.
  24208. *
  24209. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24210. * @param \DateTimeInterface|string|null $operator
  24211. * @param \DateTimeInterface|string|null $value
  24212. * @param string $boolean
  24213. * @return \Illuminate\Database\Eloquent\Builder<static>
  24214. * @static
  24215. */
  24216. public static function whereTime($column, $operator, $value = null, $boolean = 'and')
  24217. {
  24218. /** @var \Illuminate\Database\Query\Builder $instance */
  24219. return $instance->whereTime($column, $operator, $value, $boolean);
  24220. }
  24221. /**
  24222. * Add an "or where time" statement to the query.
  24223. *
  24224. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24225. * @param \DateTimeInterface|string|null $operator
  24226. * @param \DateTimeInterface|string|null $value
  24227. * @return \Illuminate\Database\Eloquent\Builder<static>
  24228. * @static
  24229. */
  24230. public static function orWhereTime($column, $operator, $value = null)
  24231. {
  24232. /** @var \Illuminate\Database\Query\Builder $instance */
  24233. return $instance->orWhereTime($column, $operator, $value);
  24234. }
  24235. /**
  24236. * Add a "where day" statement to the query.
  24237. *
  24238. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24239. * @param \DateTimeInterface|string|int|null $operator
  24240. * @param \DateTimeInterface|string|int|null $value
  24241. * @param string $boolean
  24242. * @return \Illuminate\Database\Eloquent\Builder<static>
  24243. * @static
  24244. */
  24245. public static function whereDay($column, $operator, $value = null, $boolean = 'and')
  24246. {
  24247. /** @var \Illuminate\Database\Query\Builder $instance */
  24248. return $instance->whereDay($column, $operator, $value, $boolean);
  24249. }
  24250. /**
  24251. * Add an "or where day" statement to the query.
  24252. *
  24253. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24254. * @param \DateTimeInterface|string|int|null $operator
  24255. * @param \DateTimeInterface|string|int|null $value
  24256. * @return \Illuminate\Database\Eloquent\Builder<static>
  24257. * @static
  24258. */
  24259. public static function orWhereDay($column, $operator, $value = null)
  24260. {
  24261. /** @var \Illuminate\Database\Query\Builder $instance */
  24262. return $instance->orWhereDay($column, $operator, $value);
  24263. }
  24264. /**
  24265. * Add a "where month" statement to the query.
  24266. *
  24267. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24268. * @param \DateTimeInterface|string|int|null $operator
  24269. * @param \DateTimeInterface|string|int|null $value
  24270. * @param string $boolean
  24271. * @return \Illuminate\Database\Eloquent\Builder<static>
  24272. * @static
  24273. */
  24274. public static function whereMonth($column, $operator, $value = null, $boolean = 'and')
  24275. {
  24276. /** @var \Illuminate\Database\Query\Builder $instance */
  24277. return $instance->whereMonth($column, $operator, $value, $boolean);
  24278. }
  24279. /**
  24280. * Add an "or where month" statement to the query.
  24281. *
  24282. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24283. * @param \DateTimeInterface|string|int|null $operator
  24284. * @param \DateTimeInterface|string|int|null $value
  24285. * @return \Illuminate\Database\Eloquent\Builder<static>
  24286. * @static
  24287. */
  24288. public static function orWhereMonth($column, $operator, $value = null)
  24289. {
  24290. /** @var \Illuminate\Database\Query\Builder $instance */
  24291. return $instance->orWhereMonth($column, $operator, $value);
  24292. }
  24293. /**
  24294. * Add a "where year" statement to the query.
  24295. *
  24296. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24297. * @param \DateTimeInterface|string|int|null $operator
  24298. * @param \DateTimeInterface|string|int|null $value
  24299. * @param string $boolean
  24300. * @return \Illuminate\Database\Eloquent\Builder<static>
  24301. * @static
  24302. */
  24303. public static function whereYear($column, $operator, $value = null, $boolean = 'and')
  24304. {
  24305. /** @var \Illuminate\Database\Query\Builder $instance */
  24306. return $instance->whereYear($column, $operator, $value, $boolean);
  24307. }
  24308. /**
  24309. * Add an "or where year" statement to the query.
  24310. *
  24311. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  24312. * @param \DateTimeInterface|string|int|null $operator
  24313. * @param \DateTimeInterface|string|int|null $value
  24314. * @return \Illuminate\Database\Eloquent\Builder<static>
  24315. * @static
  24316. */
  24317. public static function orWhereYear($column, $operator, $value = null)
  24318. {
  24319. /** @var \Illuminate\Database\Query\Builder $instance */
  24320. return $instance->orWhereYear($column, $operator, $value);
  24321. }
  24322. /**
  24323. * Add a nested where statement to the query.
  24324. *
  24325. * @param string $boolean
  24326. * @return \Illuminate\Database\Eloquent\Builder<static>
  24327. * @static
  24328. */
  24329. public static function whereNested($callback, $boolean = 'and')
  24330. {
  24331. /** @var \Illuminate\Database\Query\Builder $instance */
  24332. return $instance->whereNested($callback, $boolean);
  24333. }
  24334. /**
  24335. * Create a new query instance for nested where condition.
  24336. *
  24337. * @return \Illuminate\Database\Query\Builder
  24338. * @static
  24339. */
  24340. public static function forNestedWhere()
  24341. {
  24342. /** @var \Illuminate\Database\Query\Builder $instance */
  24343. return $instance->forNestedWhere();
  24344. }
  24345. /**
  24346. * Add another query builder as a nested where to the query builder.
  24347. *
  24348. * @param \Illuminate\Database\Query\Builder $query
  24349. * @param string $boolean
  24350. * @return \Illuminate\Database\Eloquent\Builder<static>
  24351. * @static
  24352. */
  24353. public static function addNestedWhereQuery($query, $boolean = 'and')
  24354. {
  24355. /** @var \Illuminate\Database\Query\Builder $instance */
  24356. return $instance->addNestedWhereQuery($query, $boolean);
  24357. }
  24358. /**
  24359. * Add an exists clause to the query.
  24360. *
  24361. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24362. * @param string $boolean
  24363. * @param bool $not
  24364. * @return \Illuminate\Database\Eloquent\Builder<static>
  24365. * @static
  24366. */
  24367. public static function whereExists($callback, $boolean = 'and', $not = false)
  24368. {
  24369. /** @var \Illuminate\Database\Query\Builder $instance */
  24370. return $instance->whereExists($callback, $boolean, $not);
  24371. }
  24372. /**
  24373. * Add an or exists clause to the query.
  24374. *
  24375. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24376. * @param bool $not
  24377. * @return \Illuminate\Database\Eloquent\Builder<static>
  24378. * @static
  24379. */
  24380. public static function orWhereExists($callback, $not = false)
  24381. {
  24382. /** @var \Illuminate\Database\Query\Builder $instance */
  24383. return $instance->orWhereExists($callback, $not);
  24384. }
  24385. /**
  24386. * Add a where not exists clause to the query.
  24387. *
  24388. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24389. * @param string $boolean
  24390. * @return \Illuminate\Database\Eloquent\Builder<static>
  24391. * @static
  24392. */
  24393. public static function whereNotExists($callback, $boolean = 'and')
  24394. {
  24395. /** @var \Illuminate\Database\Query\Builder $instance */
  24396. return $instance->whereNotExists($callback, $boolean);
  24397. }
  24398. /**
  24399. * Add a where not exists clause to the query.
  24400. *
  24401. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback
  24402. * @return \Illuminate\Database\Eloquent\Builder<static>
  24403. * @static
  24404. */
  24405. public static function orWhereNotExists($callback)
  24406. {
  24407. /** @var \Illuminate\Database\Query\Builder $instance */
  24408. return $instance->orWhereNotExists($callback);
  24409. }
  24410. /**
  24411. * Add an exists clause to the query.
  24412. *
  24413. * @param string $boolean
  24414. * @param bool $not
  24415. * @return \Illuminate\Database\Eloquent\Builder<static>
  24416. * @static
  24417. */
  24418. public static function addWhereExistsQuery($query, $boolean = 'and', $not = false)
  24419. {
  24420. /** @var \Illuminate\Database\Query\Builder $instance */
  24421. return $instance->addWhereExistsQuery($query, $boolean, $not);
  24422. }
  24423. /**
  24424. * Adds a where condition using row values.
  24425. *
  24426. * @param array $columns
  24427. * @param string $operator
  24428. * @param array $values
  24429. * @param string $boolean
  24430. * @return \Illuminate\Database\Eloquent\Builder<static>
  24431. * @throws \InvalidArgumentException
  24432. * @static
  24433. */
  24434. public static function whereRowValues($columns, $operator, $values, $boolean = 'and')
  24435. {
  24436. /** @var \Illuminate\Database\Query\Builder $instance */
  24437. return $instance->whereRowValues($columns, $operator, $values, $boolean);
  24438. }
  24439. /**
  24440. * Adds an or where condition using row values.
  24441. *
  24442. * @param array $columns
  24443. * @param string $operator
  24444. * @param array $values
  24445. * @return \Illuminate\Database\Eloquent\Builder<static>
  24446. * @static
  24447. */
  24448. public static function orWhereRowValues($columns, $operator, $values)
  24449. {
  24450. /** @var \Illuminate\Database\Query\Builder $instance */
  24451. return $instance->orWhereRowValues($columns, $operator, $values);
  24452. }
  24453. /**
  24454. * Add a "where JSON contains" clause to the query.
  24455. *
  24456. * @param string $column
  24457. * @param mixed $value
  24458. * @param string $boolean
  24459. * @param bool $not
  24460. * @return \Illuminate\Database\Eloquent\Builder<static>
  24461. * @static
  24462. */
  24463. public static function whereJsonContains($column, $value, $boolean = 'and', $not = false)
  24464. {
  24465. /** @var \Illuminate\Database\Query\Builder $instance */
  24466. return $instance->whereJsonContains($column, $value, $boolean, $not);
  24467. }
  24468. /**
  24469. * Add an "or where JSON contains" clause to the query.
  24470. *
  24471. * @param string $column
  24472. * @param mixed $value
  24473. * @return \Illuminate\Database\Eloquent\Builder<static>
  24474. * @static
  24475. */
  24476. public static function orWhereJsonContains($column, $value)
  24477. {
  24478. /** @var \Illuminate\Database\Query\Builder $instance */
  24479. return $instance->orWhereJsonContains($column, $value);
  24480. }
  24481. /**
  24482. * Add a "where JSON not contains" clause to the query.
  24483. *
  24484. * @param string $column
  24485. * @param mixed $value
  24486. * @param string $boolean
  24487. * @return \Illuminate\Database\Eloquent\Builder<static>
  24488. * @static
  24489. */
  24490. public static function whereJsonDoesntContain($column, $value, $boolean = 'and')
  24491. {
  24492. /** @var \Illuminate\Database\Query\Builder $instance */
  24493. return $instance->whereJsonDoesntContain($column, $value, $boolean);
  24494. }
  24495. /**
  24496. * Add an "or where JSON not contains" clause to the query.
  24497. *
  24498. * @param string $column
  24499. * @param mixed $value
  24500. * @return \Illuminate\Database\Eloquent\Builder<static>
  24501. * @static
  24502. */
  24503. public static function orWhereJsonDoesntContain($column, $value)
  24504. {
  24505. /** @var \Illuminate\Database\Query\Builder $instance */
  24506. return $instance->orWhereJsonDoesntContain($column, $value);
  24507. }
  24508. /**
  24509. * Add a "where JSON overlaps" clause to the query.
  24510. *
  24511. * @param string $column
  24512. * @param mixed $value
  24513. * @param string $boolean
  24514. * @param bool $not
  24515. * @return \Illuminate\Database\Eloquent\Builder<static>
  24516. * @static
  24517. */
  24518. public static function whereJsonOverlaps($column, $value, $boolean = 'and', $not = false)
  24519. {
  24520. /** @var \Illuminate\Database\Query\Builder $instance */
  24521. return $instance->whereJsonOverlaps($column, $value, $boolean, $not);
  24522. }
  24523. /**
  24524. * Add an "or where JSON overlaps" clause to the query.
  24525. *
  24526. * @param string $column
  24527. * @param mixed $value
  24528. * @return \Illuminate\Database\Eloquent\Builder<static>
  24529. * @static
  24530. */
  24531. public static function orWhereJsonOverlaps($column, $value)
  24532. {
  24533. /** @var \Illuminate\Database\Query\Builder $instance */
  24534. return $instance->orWhereJsonOverlaps($column, $value);
  24535. }
  24536. /**
  24537. * Add a "where JSON not overlap" clause to the query.
  24538. *
  24539. * @param string $column
  24540. * @param mixed $value
  24541. * @param string $boolean
  24542. * @return \Illuminate\Database\Eloquent\Builder<static>
  24543. * @static
  24544. */
  24545. public static function whereJsonDoesntOverlap($column, $value, $boolean = 'and')
  24546. {
  24547. /** @var \Illuminate\Database\Query\Builder $instance */
  24548. return $instance->whereJsonDoesntOverlap($column, $value, $boolean);
  24549. }
  24550. /**
  24551. * Add an "or where JSON not overlap" clause to the query.
  24552. *
  24553. * @param string $column
  24554. * @param mixed $value
  24555. * @return \Illuminate\Database\Eloquent\Builder<static>
  24556. * @static
  24557. */
  24558. public static function orWhereJsonDoesntOverlap($column, $value)
  24559. {
  24560. /** @var \Illuminate\Database\Query\Builder $instance */
  24561. return $instance->orWhereJsonDoesntOverlap($column, $value);
  24562. }
  24563. /**
  24564. * Add a clause that determines if a JSON path exists to the query.
  24565. *
  24566. * @param string $column
  24567. * @param string $boolean
  24568. * @param bool $not
  24569. * @return \Illuminate\Database\Eloquent\Builder<static>
  24570. * @static
  24571. */
  24572. public static function whereJsonContainsKey($column, $boolean = 'and', $not = false)
  24573. {
  24574. /** @var \Illuminate\Database\Query\Builder $instance */
  24575. return $instance->whereJsonContainsKey($column, $boolean, $not);
  24576. }
  24577. /**
  24578. * Add an "or" clause that determines if a JSON path exists to the query.
  24579. *
  24580. * @param string $column
  24581. * @return \Illuminate\Database\Eloquent\Builder<static>
  24582. * @static
  24583. */
  24584. public static function orWhereJsonContainsKey($column)
  24585. {
  24586. /** @var \Illuminate\Database\Query\Builder $instance */
  24587. return $instance->orWhereJsonContainsKey($column);
  24588. }
  24589. /**
  24590. * Add a clause that determines if a JSON path does not exist to the query.
  24591. *
  24592. * @param string $column
  24593. * @param string $boolean
  24594. * @return \Illuminate\Database\Eloquent\Builder<static>
  24595. * @static
  24596. */
  24597. public static function whereJsonDoesntContainKey($column, $boolean = 'and')
  24598. {
  24599. /** @var \Illuminate\Database\Query\Builder $instance */
  24600. return $instance->whereJsonDoesntContainKey($column, $boolean);
  24601. }
  24602. /**
  24603. * Add an "or" clause that determines if a JSON path does not exist to the query.
  24604. *
  24605. * @param string $column
  24606. * @return \Illuminate\Database\Eloquent\Builder<static>
  24607. * @static
  24608. */
  24609. public static function orWhereJsonDoesntContainKey($column)
  24610. {
  24611. /** @var \Illuminate\Database\Query\Builder $instance */
  24612. return $instance->orWhereJsonDoesntContainKey($column);
  24613. }
  24614. /**
  24615. * Add a "where JSON length" clause to the query.
  24616. *
  24617. * @param string $column
  24618. * @param mixed $operator
  24619. * @param mixed $value
  24620. * @param string $boolean
  24621. * @return \Illuminate\Database\Eloquent\Builder<static>
  24622. * @static
  24623. */
  24624. public static function whereJsonLength($column, $operator, $value = null, $boolean = 'and')
  24625. {
  24626. /** @var \Illuminate\Database\Query\Builder $instance */
  24627. return $instance->whereJsonLength($column, $operator, $value, $boolean);
  24628. }
  24629. /**
  24630. * Add an "or where JSON length" clause to the query.
  24631. *
  24632. * @param string $column
  24633. * @param mixed $operator
  24634. * @param mixed $value
  24635. * @return \Illuminate\Database\Eloquent\Builder<static>
  24636. * @static
  24637. */
  24638. public static function orWhereJsonLength($column, $operator, $value = null)
  24639. {
  24640. /** @var \Illuminate\Database\Query\Builder $instance */
  24641. return $instance->orWhereJsonLength($column, $operator, $value);
  24642. }
  24643. /**
  24644. * Handles dynamic "where" clauses to the query.
  24645. *
  24646. * @param string $method
  24647. * @param array $parameters
  24648. * @return \Illuminate\Database\Eloquent\Builder<static>
  24649. * @static
  24650. */
  24651. public static function dynamicWhere($method, $parameters)
  24652. {
  24653. /** @var \Illuminate\Database\Query\Builder $instance */
  24654. return $instance->dynamicWhere($method, $parameters);
  24655. }
  24656. /**
  24657. * Add a "where fulltext" clause to the query.
  24658. *
  24659. * @param string|string[] $columns
  24660. * @param string $value
  24661. * @param string $boolean
  24662. * @return \Illuminate\Database\Eloquent\Builder<static>
  24663. * @static
  24664. */
  24665. public static function whereFullText($columns, $value, $options = [], $boolean = 'and')
  24666. {
  24667. /** @var \Illuminate\Database\Query\Builder $instance */
  24668. return $instance->whereFullText($columns, $value, $options, $boolean);
  24669. }
  24670. /**
  24671. * Add a "or where fulltext" clause to the query.
  24672. *
  24673. * @param string|string[] $columns
  24674. * @param string $value
  24675. * @return \Illuminate\Database\Eloquent\Builder<static>
  24676. * @static
  24677. */
  24678. public static function orWhereFullText($columns, $value, $options = [])
  24679. {
  24680. /** @var \Illuminate\Database\Query\Builder $instance */
  24681. return $instance->orWhereFullText($columns, $value, $options);
  24682. }
  24683. /**
  24684. * Add a "where" clause to the query for multiple columns with "and" conditions between them.
  24685. *
  24686. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24687. * @param mixed $operator
  24688. * @param mixed $value
  24689. * @param string $boolean
  24690. * @return \Illuminate\Database\Eloquent\Builder<static>
  24691. * @static
  24692. */
  24693. public static function whereAll($columns, $operator = null, $value = null, $boolean = 'and')
  24694. {
  24695. /** @var \Illuminate\Database\Query\Builder $instance */
  24696. return $instance->whereAll($columns, $operator, $value, $boolean);
  24697. }
  24698. /**
  24699. * Add an "or where" clause to the query for multiple columns with "and" conditions between them.
  24700. *
  24701. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24702. * @param mixed $operator
  24703. * @param mixed $value
  24704. * @return \Illuminate\Database\Eloquent\Builder<static>
  24705. * @static
  24706. */
  24707. public static function orWhereAll($columns, $operator = null, $value = null)
  24708. {
  24709. /** @var \Illuminate\Database\Query\Builder $instance */
  24710. return $instance->orWhereAll($columns, $operator, $value);
  24711. }
  24712. /**
  24713. * Add a "where" clause to the query for multiple columns with "or" conditions between them.
  24714. *
  24715. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24716. * @param mixed $operator
  24717. * @param mixed $value
  24718. * @param string $boolean
  24719. * @return \Illuminate\Database\Eloquent\Builder<static>
  24720. * @static
  24721. */
  24722. public static function whereAny($columns, $operator = null, $value = null, $boolean = 'and')
  24723. {
  24724. /** @var \Illuminate\Database\Query\Builder $instance */
  24725. return $instance->whereAny($columns, $operator, $value, $boolean);
  24726. }
  24727. /**
  24728. * Add an "or where" clause to the query for multiple columns with "or" conditions between them.
  24729. *
  24730. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24731. * @param mixed $operator
  24732. * @param mixed $value
  24733. * @return \Illuminate\Database\Eloquent\Builder<static>
  24734. * @static
  24735. */
  24736. public static function orWhereAny($columns, $operator = null, $value = null)
  24737. {
  24738. /** @var \Illuminate\Database\Query\Builder $instance */
  24739. return $instance->orWhereAny($columns, $operator, $value);
  24740. }
  24741. /**
  24742. * Add a "where not" clause to the query for multiple columns where none of the conditions should be true.
  24743. *
  24744. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24745. * @param mixed $operator
  24746. * @param mixed $value
  24747. * @param string $boolean
  24748. * @return \Illuminate\Database\Eloquent\Builder<static>
  24749. * @static
  24750. */
  24751. public static function whereNone($columns, $operator = null, $value = null, $boolean = 'and')
  24752. {
  24753. /** @var \Illuminate\Database\Query\Builder $instance */
  24754. return $instance->whereNone($columns, $operator, $value, $boolean);
  24755. }
  24756. /**
  24757. * Add an "or where not" clause to the query for multiple columns where none of the conditions should be true.
  24758. *
  24759. * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns
  24760. * @param mixed $operator
  24761. * @param mixed $value
  24762. * @return \Illuminate\Database\Eloquent\Builder<static>
  24763. * @static
  24764. */
  24765. public static function orWhereNone($columns, $operator = null, $value = null)
  24766. {
  24767. /** @var \Illuminate\Database\Query\Builder $instance */
  24768. return $instance->orWhereNone($columns, $operator, $value);
  24769. }
  24770. /**
  24771. * Add a "group by" clause to the query.
  24772. *
  24773. * @param array|\Illuminate\Contracts\Database\Query\Expression|string $groups
  24774. * @return \Illuminate\Database\Eloquent\Builder<static>
  24775. * @static
  24776. */
  24777. public static function groupBy(...$groups)
  24778. {
  24779. /** @var \Illuminate\Database\Query\Builder $instance */
  24780. return $instance->groupBy(...$groups);
  24781. }
  24782. /**
  24783. * Add a raw groupBy clause to the query.
  24784. *
  24785. * @param string $sql
  24786. * @return \Illuminate\Database\Eloquent\Builder<static>
  24787. * @static
  24788. */
  24789. public static function groupByRaw($sql, $bindings = [])
  24790. {
  24791. /** @var \Illuminate\Database\Query\Builder $instance */
  24792. return $instance->groupByRaw($sql, $bindings);
  24793. }
  24794. /**
  24795. * Add a "having" clause to the query.
  24796. *
  24797. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24798. * @param \DateTimeInterface|string|int|float|null $operator
  24799. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24800. * @param string $boolean
  24801. * @return \Illuminate\Database\Eloquent\Builder<static>
  24802. * @static
  24803. */
  24804. public static function having($column, $operator = null, $value = null, $boolean = 'and')
  24805. {
  24806. /** @var \Illuminate\Database\Query\Builder $instance */
  24807. return $instance->having($column, $operator, $value, $boolean);
  24808. }
  24809. /**
  24810. * Add an "or having" clause to the query.
  24811. *
  24812. * @param \Illuminate\Contracts\Database\Query\Expression|\Closure|string $column
  24813. * @param \DateTimeInterface|string|int|float|null $operator
  24814. * @param \Illuminate\Contracts\Database\Query\Expression|\DateTimeInterface|string|int|float|null $value
  24815. * @return \Illuminate\Database\Eloquent\Builder<static>
  24816. * @static
  24817. */
  24818. public static function orHaving($column, $operator = null, $value = null)
  24819. {
  24820. /** @var \Illuminate\Database\Query\Builder $instance */
  24821. return $instance->orHaving($column, $operator, $value);
  24822. }
  24823. /**
  24824. * Add a nested having statement to the query.
  24825. *
  24826. * @param string $boolean
  24827. * @return \Illuminate\Database\Eloquent\Builder<static>
  24828. * @static
  24829. */
  24830. public static function havingNested($callback, $boolean = 'and')
  24831. {
  24832. /** @var \Illuminate\Database\Query\Builder $instance */
  24833. return $instance->havingNested($callback, $boolean);
  24834. }
  24835. /**
  24836. * Add another query builder as a nested having to the query builder.
  24837. *
  24838. * @param \Illuminate\Database\Query\Builder $query
  24839. * @param string $boolean
  24840. * @return \Illuminate\Database\Eloquent\Builder<static>
  24841. * @static
  24842. */
  24843. public static function addNestedHavingQuery($query, $boolean = 'and')
  24844. {
  24845. /** @var \Illuminate\Database\Query\Builder $instance */
  24846. return $instance->addNestedHavingQuery($query, $boolean);
  24847. }
  24848. /**
  24849. * Add a "having null" clause to the query.
  24850. *
  24851. * @param array|string $columns
  24852. * @param string $boolean
  24853. * @param bool $not
  24854. * @return \Illuminate\Database\Eloquent\Builder<static>
  24855. * @static
  24856. */
  24857. public static function havingNull($columns, $boolean = 'and', $not = false)
  24858. {
  24859. /** @var \Illuminate\Database\Query\Builder $instance */
  24860. return $instance->havingNull($columns, $boolean, $not);
  24861. }
  24862. /**
  24863. * Add an "or having null" clause to the query.
  24864. *
  24865. * @param string $column
  24866. * @return \Illuminate\Database\Eloquent\Builder<static>
  24867. * @static
  24868. */
  24869. public static function orHavingNull($column)
  24870. {
  24871. /** @var \Illuminate\Database\Query\Builder $instance */
  24872. return $instance->orHavingNull($column);
  24873. }
  24874. /**
  24875. * Add a "having not null" clause to the query.
  24876. *
  24877. * @param array|string $columns
  24878. * @param string $boolean
  24879. * @return \Illuminate\Database\Eloquent\Builder<static>
  24880. * @static
  24881. */
  24882. public static function havingNotNull($columns, $boolean = 'and')
  24883. {
  24884. /** @var \Illuminate\Database\Query\Builder $instance */
  24885. return $instance->havingNotNull($columns, $boolean);
  24886. }
  24887. /**
  24888. * Add an "or having not null" clause to the query.
  24889. *
  24890. * @param string $column
  24891. * @return \Illuminate\Database\Eloquent\Builder<static>
  24892. * @static
  24893. */
  24894. public static function orHavingNotNull($column)
  24895. {
  24896. /** @var \Illuminate\Database\Query\Builder $instance */
  24897. return $instance->orHavingNotNull($column);
  24898. }
  24899. /**
  24900. * Add a "having between " clause to the query.
  24901. *
  24902. * @param string $column
  24903. * @param string $boolean
  24904. * @param bool $not
  24905. * @return \Illuminate\Database\Eloquent\Builder<static>
  24906. * @static
  24907. */
  24908. public static function havingBetween($column, $values, $boolean = 'and', $not = false)
  24909. {
  24910. /** @var \Illuminate\Database\Query\Builder $instance */
  24911. return $instance->havingBetween($column, $values, $boolean, $not);
  24912. }
  24913. /**
  24914. * Add a raw having clause to the query.
  24915. *
  24916. * @param string $sql
  24917. * @param string $boolean
  24918. * @return \Illuminate\Database\Eloquent\Builder<static>
  24919. * @static
  24920. */
  24921. public static function havingRaw($sql, $bindings = [], $boolean = 'and')
  24922. {
  24923. /** @var \Illuminate\Database\Query\Builder $instance */
  24924. return $instance->havingRaw($sql, $bindings, $boolean);
  24925. }
  24926. /**
  24927. * Add a raw or having clause to the query.
  24928. *
  24929. * @param string $sql
  24930. * @return \Illuminate\Database\Eloquent\Builder<static>
  24931. * @static
  24932. */
  24933. public static function orHavingRaw($sql, $bindings = [])
  24934. {
  24935. /** @var \Illuminate\Database\Query\Builder $instance */
  24936. return $instance->orHavingRaw($sql, $bindings);
  24937. }
  24938. /**
  24939. * Add an "order by" clause to the query.
  24940. *
  24941. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24942. * @param string $direction
  24943. * @return \Illuminate\Database\Eloquent\Builder<static>
  24944. * @throws \InvalidArgumentException
  24945. * @static
  24946. */
  24947. public static function orderBy($column, $direction = 'asc')
  24948. {
  24949. /** @var \Illuminate\Database\Query\Builder $instance */
  24950. return $instance->orderBy($column, $direction);
  24951. }
  24952. /**
  24953. * Add a descending "order by" clause to the query.
  24954. *
  24955. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column
  24956. * @return \Illuminate\Database\Eloquent\Builder<static>
  24957. * @static
  24958. */
  24959. public static function orderByDesc($column)
  24960. {
  24961. /** @var \Illuminate\Database\Query\Builder $instance */
  24962. return $instance->orderByDesc($column);
  24963. }
  24964. /**
  24965. * Put the query's results in random order.
  24966. *
  24967. * @param string|int $seed
  24968. * @return \Illuminate\Database\Eloquent\Builder<static>
  24969. * @static
  24970. */
  24971. public static function inRandomOrder($seed = '')
  24972. {
  24973. /** @var \Illuminate\Database\Query\Builder $instance */
  24974. return $instance->inRandomOrder($seed);
  24975. }
  24976. /**
  24977. * Add a raw "order by" clause to the query.
  24978. *
  24979. * @param string $sql
  24980. * @param array $bindings
  24981. * @return \Illuminate\Database\Eloquent\Builder<static>
  24982. * @static
  24983. */
  24984. public static function orderByRaw($sql, $bindings = [])
  24985. {
  24986. /** @var \Illuminate\Database\Query\Builder $instance */
  24987. return $instance->orderByRaw($sql, $bindings);
  24988. }
  24989. /**
  24990. * Alias to set the "offset" value of the query.
  24991. *
  24992. * @param int $value
  24993. * @return \Illuminate\Database\Eloquent\Builder<static>
  24994. * @static
  24995. */
  24996. public static function skip($value)
  24997. {
  24998. /** @var \Illuminate\Database\Query\Builder $instance */
  24999. return $instance->skip($value);
  25000. }
  25001. /**
  25002. * Set the "offset" value of the query.
  25003. *
  25004. * @param int $value
  25005. * @return \Illuminate\Database\Eloquent\Builder<static>
  25006. * @static
  25007. */
  25008. public static function offset($value)
  25009. {
  25010. /** @var \Illuminate\Database\Query\Builder $instance */
  25011. return $instance->offset($value);
  25012. }
  25013. /**
  25014. * Alias to set the "limit" value of the query.
  25015. *
  25016. * @param int $value
  25017. * @return \Illuminate\Database\Eloquent\Builder<static>
  25018. * @static
  25019. */
  25020. public static function take($value)
  25021. {
  25022. /** @var \Illuminate\Database\Query\Builder $instance */
  25023. return $instance->take($value);
  25024. }
  25025. /**
  25026. * Set the "limit" value of the query.
  25027. *
  25028. * @param int $value
  25029. * @return \Illuminate\Database\Eloquent\Builder<static>
  25030. * @static
  25031. */
  25032. public static function limit($value)
  25033. {
  25034. /** @var \Illuminate\Database\Query\Builder $instance */
  25035. return $instance->limit($value);
  25036. }
  25037. /**
  25038. * Add a "group limit" clause to the query.
  25039. *
  25040. * @param int $value
  25041. * @param string $column
  25042. * @return \Illuminate\Database\Eloquent\Builder<static>
  25043. * @static
  25044. */
  25045. public static function groupLimit($value, $column)
  25046. {
  25047. /** @var \Illuminate\Database\Query\Builder $instance */
  25048. return $instance->groupLimit($value, $column);
  25049. }
  25050. /**
  25051. * Set the limit and offset for a given page.
  25052. *
  25053. * @param int $page
  25054. * @param int $perPage
  25055. * @return \Illuminate\Database\Eloquent\Builder<static>
  25056. * @static
  25057. */
  25058. public static function forPage($page, $perPage = 15)
  25059. {
  25060. /** @var \Illuminate\Database\Query\Builder $instance */
  25061. return $instance->forPage($page, $perPage);
  25062. }
  25063. /**
  25064. * Constrain the query to the previous "page" of results before a given ID.
  25065. *
  25066. * @param int $perPage
  25067. * @param int|null $lastId
  25068. * @param string $column
  25069. * @return \Illuminate\Database\Eloquent\Builder<static>
  25070. * @static
  25071. */
  25072. public static function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id')
  25073. {
  25074. /** @var \Illuminate\Database\Query\Builder $instance */
  25075. return $instance->forPageBeforeId($perPage, $lastId, $column);
  25076. }
  25077. /**
  25078. * Constrain the query to the next "page" of results after a given ID.
  25079. *
  25080. * @param int $perPage
  25081. * @param int|null $lastId
  25082. * @param string $column
  25083. * @return \Illuminate\Database\Eloquent\Builder<static>
  25084. * @static
  25085. */
  25086. public static function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
  25087. {
  25088. /** @var \Illuminate\Database\Query\Builder $instance */
  25089. return $instance->forPageAfterId($perPage, $lastId, $column);
  25090. }
  25091. /**
  25092. * Remove all existing orders and optionally add a new order.
  25093. *
  25094. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  25095. * @param string $direction
  25096. * @return \Illuminate\Database\Eloquent\Builder<static>
  25097. * @static
  25098. */
  25099. public static function reorder($column = null, $direction = 'asc')
  25100. {
  25101. /** @var \Illuminate\Database\Query\Builder $instance */
  25102. return $instance->reorder($column, $direction);
  25103. }
  25104. /**
  25105. * Add descending "reorder" clause to the query.
  25106. *
  25107. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Contracts\Database\Query\Expression|string|null $column
  25108. * @return \Illuminate\Database\Eloquent\Builder<static>
  25109. * @static
  25110. */
  25111. public static function reorderDesc($column)
  25112. {
  25113. /** @var \Illuminate\Database\Query\Builder $instance */
  25114. return $instance->reorderDesc($column);
  25115. }
  25116. /**
  25117. * Add a union statement to the query.
  25118. *
  25119. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  25120. * @param bool $all
  25121. * @return \Illuminate\Database\Eloquent\Builder<static>
  25122. * @static
  25123. */
  25124. public static function union($query, $all = false)
  25125. {
  25126. /** @var \Illuminate\Database\Query\Builder $instance */
  25127. return $instance->union($query, $all);
  25128. }
  25129. /**
  25130. * Add a union all statement to the query.
  25131. *
  25132. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query
  25133. * @return \Illuminate\Database\Eloquent\Builder<static>
  25134. * @static
  25135. */
  25136. public static function unionAll($query)
  25137. {
  25138. /** @var \Illuminate\Database\Query\Builder $instance */
  25139. return $instance->unionAll($query);
  25140. }
  25141. /**
  25142. * Lock the selected rows in the table.
  25143. *
  25144. * @param string|bool $value
  25145. * @return \Illuminate\Database\Eloquent\Builder<static>
  25146. * @static
  25147. */
  25148. public static function lock($value = true)
  25149. {
  25150. /** @var \Illuminate\Database\Query\Builder $instance */
  25151. return $instance->lock($value);
  25152. }
  25153. /**
  25154. * Lock the selected rows in the table for updating.
  25155. *
  25156. * @return \Illuminate\Database\Eloquent\Builder<static>
  25157. * @static
  25158. */
  25159. public static function lockForUpdate()
  25160. {
  25161. /** @var \Illuminate\Database\Query\Builder $instance */
  25162. return $instance->lockForUpdate();
  25163. }
  25164. /**
  25165. * Share lock the selected rows in the table.
  25166. *
  25167. * @return \Illuminate\Database\Eloquent\Builder<static>
  25168. * @static
  25169. */
  25170. public static function sharedLock()
  25171. {
  25172. /** @var \Illuminate\Database\Query\Builder $instance */
  25173. return $instance->sharedLock();
  25174. }
  25175. /**
  25176. * Register a closure to be invoked before the query is executed.
  25177. *
  25178. * @return \Illuminate\Database\Eloquent\Builder<static>
  25179. * @static
  25180. */
  25181. public static function beforeQuery($callback)
  25182. {
  25183. /** @var \Illuminate\Database\Query\Builder $instance */
  25184. return $instance->beforeQuery($callback);
  25185. }
  25186. /**
  25187. * Invoke the "before query" modification callbacks.
  25188. *
  25189. * @return void
  25190. * @static
  25191. */
  25192. public static function applyBeforeQueryCallbacks()
  25193. {
  25194. /** @var \Illuminate\Database\Query\Builder $instance */
  25195. $instance->applyBeforeQueryCallbacks();
  25196. }
  25197. /**
  25198. * Get the SQL representation of the query.
  25199. *
  25200. * @return string
  25201. * @static
  25202. */
  25203. public static function toSql()
  25204. {
  25205. /** @var \Illuminate\Database\Query\Builder $instance */
  25206. return $instance->toSql();
  25207. }
  25208. /**
  25209. * Get the raw SQL representation of the query with embedded bindings.
  25210. *
  25211. * @return string
  25212. * @static
  25213. */
  25214. public static function toRawSql()
  25215. {
  25216. /** @var \Illuminate\Database\Query\Builder $instance */
  25217. return $instance->toRawSql();
  25218. }
  25219. /**
  25220. * Get a single expression value from the first result of a query.
  25221. *
  25222. * @return mixed
  25223. * @static
  25224. */
  25225. public static function rawValue($expression, $bindings = [])
  25226. {
  25227. /** @var \Illuminate\Database\Query\Builder $instance */
  25228. return $instance->rawValue($expression, $bindings);
  25229. }
  25230. /**
  25231. * Get the count of the total records for the paginator.
  25232. *
  25233. * @param array<string|\Illuminate\Contracts\Database\Query\Expression> $columns
  25234. * @return int<0, max>
  25235. * @static
  25236. */
  25237. public static function getCountForPagination($columns = [])
  25238. {
  25239. /** @var \Illuminate\Database\Query\Builder $instance */
  25240. return $instance->getCountForPagination($columns);
  25241. }
  25242. /**
  25243. * Concatenate values of a given column as a string.
  25244. *
  25245. * @param string $column
  25246. * @param string $glue
  25247. * @return string
  25248. * @static
  25249. */
  25250. public static function implode($column, $glue = '')
  25251. {
  25252. /** @var \Illuminate\Database\Query\Builder $instance */
  25253. return $instance->implode($column, $glue);
  25254. }
  25255. /**
  25256. * Determine if any rows exist for the current query.
  25257. *
  25258. * @return bool
  25259. * @static
  25260. */
  25261. public static function exists()
  25262. {
  25263. /** @var \Illuminate\Database\Query\Builder $instance */
  25264. return $instance->exists();
  25265. }
  25266. /**
  25267. * Determine if no rows exist for the current query.
  25268. *
  25269. * @return bool
  25270. * @static
  25271. */
  25272. public static function doesntExist()
  25273. {
  25274. /** @var \Illuminate\Database\Query\Builder $instance */
  25275. return $instance->doesntExist();
  25276. }
  25277. /**
  25278. * Execute the given callback if no rows exist for the current query.
  25279. *
  25280. * @return mixed
  25281. * @static
  25282. */
  25283. public static function existsOr($callback)
  25284. {
  25285. /** @var \Illuminate\Database\Query\Builder $instance */
  25286. return $instance->existsOr($callback);
  25287. }
  25288. /**
  25289. * Execute the given callback if rows exist for the current query.
  25290. *
  25291. * @return mixed
  25292. * @static
  25293. */
  25294. public static function doesntExistOr($callback)
  25295. {
  25296. /** @var \Illuminate\Database\Query\Builder $instance */
  25297. return $instance->doesntExistOr($callback);
  25298. }
  25299. /**
  25300. * Retrieve the "count" result of the query.
  25301. *
  25302. * @param \Illuminate\Contracts\Database\Query\Expression|string $columns
  25303. * @return int<0, max>
  25304. * @static
  25305. */
  25306. public static function count($columns = '*')
  25307. {
  25308. /** @var \Illuminate\Database\Query\Builder $instance */
  25309. return $instance->count($columns);
  25310. }
  25311. /**
  25312. * Retrieve the minimum value of a given column.
  25313. *
  25314. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25315. * @return mixed
  25316. * @static
  25317. */
  25318. public static function min($column)
  25319. {
  25320. /** @var \Illuminate\Database\Query\Builder $instance */
  25321. return $instance->min($column);
  25322. }
  25323. /**
  25324. * Retrieve the maximum value of a given column.
  25325. *
  25326. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25327. * @return mixed
  25328. * @static
  25329. */
  25330. public static function max($column)
  25331. {
  25332. /** @var \Illuminate\Database\Query\Builder $instance */
  25333. return $instance->max($column);
  25334. }
  25335. /**
  25336. * Retrieve the sum of the values of a given column.
  25337. *
  25338. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25339. * @return mixed
  25340. * @static
  25341. */
  25342. public static function sum($column)
  25343. {
  25344. /** @var \Illuminate\Database\Query\Builder $instance */
  25345. return $instance->sum($column);
  25346. }
  25347. /**
  25348. * Retrieve the average of the values of a given column.
  25349. *
  25350. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25351. * @return mixed
  25352. * @static
  25353. */
  25354. public static function avg($column)
  25355. {
  25356. /** @var \Illuminate\Database\Query\Builder $instance */
  25357. return $instance->avg($column);
  25358. }
  25359. /**
  25360. * Alias for the "avg" method.
  25361. *
  25362. * @param \Illuminate\Contracts\Database\Query\Expression|string $column
  25363. * @return mixed
  25364. * @static
  25365. */
  25366. public static function average($column)
  25367. {
  25368. /** @var \Illuminate\Database\Query\Builder $instance */
  25369. return $instance->average($column);
  25370. }
  25371. /**
  25372. * Execute an aggregate function on the database.
  25373. *
  25374. * @param string $function
  25375. * @param array $columns
  25376. * @return mixed
  25377. * @static
  25378. */
  25379. public static function aggregate($function, $columns = [])
  25380. {
  25381. /** @var \Illuminate\Database\Query\Builder $instance */
  25382. return $instance->aggregate($function, $columns);
  25383. }
  25384. /**
  25385. * Execute a numeric aggregate function on the database.
  25386. *
  25387. * @param string $function
  25388. * @param array $columns
  25389. * @return float|int
  25390. * @static
  25391. */
  25392. public static function numericAggregate($function, $columns = [])
  25393. {
  25394. /** @var \Illuminate\Database\Query\Builder $instance */
  25395. return $instance->numericAggregate($function, $columns);
  25396. }
  25397. /**
  25398. * Insert new records into the database.
  25399. *
  25400. * @return bool
  25401. * @static
  25402. */
  25403. public static function insert($values)
  25404. {
  25405. /** @var \Illuminate\Database\Query\Builder $instance */
  25406. return $instance->insert($values);
  25407. }
  25408. /**
  25409. * Insert new records into the database while ignoring errors.
  25410. *
  25411. * @return int<0, max>
  25412. * @static
  25413. */
  25414. public static function insertOrIgnore($values)
  25415. {
  25416. /** @var \Illuminate\Database\Query\Builder $instance */
  25417. return $instance->insertOrIgnore($values);
  25418. }
  25419. /**
  25420. * Insert a new record and get the value of the primary key.
  25421. *
  25422. * @param string|null $sequence
  25423. * @return int
  25424. * @static
  25425. */
  25426. public static function insertGetId($values, $sequence = null)
  25427. {
  25428. /** @var \Illuminate\Database\Query\Builder $instance */
  25429. return $instance->insertGetId($values, $sequence);
  25430. }
  25431. /**
  25432. * Insert new records into the table using a subquery.
  25433. *
  25434. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25435. * @return int
  25436. * @static
  25437. */
  25438. public static function insertUsing($columns, $query)
  25439. {
  25440. /** @var \Illuminate\Database\Query\Builder $instance */
  25441. return $instance->insertUsing($columns, $query);
  25442. }
  25443. /**
  25444. * Insert new records into the table using a subquery while ignoring errors.
  25445. *
  25446. * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query
  25447. * @return int
  25448. * @static
  25449. */
  25450. public static function insertOrIgnoreUsing($columns, $query)
  25451. {
  25452. /** @var \Illuminate\Database\Query\Builder $instance */
  25453. return $instance->insertOrIgnoreUsing($columns, $query);
  25454. }
  25455. /**
  25456. * Update records in a PostgreSQL database using the update from syntax.
  25457. *
  25458. * @return int
  25459. * @static
  25460. */
  25461. public static function updateFrom($values)
  25462. {
  25463. /** @var \Illuminate\Database\Query\Builder $instance */
  25464. return $instance->updateFrom($values);
  25465. }
  25466. /**
  25467. * Insert or update a record matching the attributes, and fill it with values.
  25468. *
  25469. * @return bool
  25470. * @static
  25471. */
  25472. public static function updateOrInsert($attributes, $values = [])
  25473. {
  25474. /** @var \Illuminate\Database\Query\Builder $instance */
  25475. return $instance->updateOrInsert($attributes, $values);
  25476. }
  25477. /**
  25478. * Increment the given column's values by the given amounts.
  25479. *
  25480. * @param array<string, float|int|numeric-string> $columns
  25481. * @param array<string, mixed> $extra
  25482. * @return int<0, max>
  25483. * @throws \InvalidArgumentException
  25484. * @static
  25485. */
  25486. public static function incrementEach($columns, $extra = [])
  25487. {
  25488. /** @var \Illuminate\Database\Query\Builder $instance */
  25489. return $instance->incrementEach($columns, $extra);
  25490. }
  25491. /**
  25492. * Decrement the given column's values by the given amounts.
  25493. *
  25494. * @param array<string, float|int|numeric-string> $columns
  25495. * @param array<string, mixed> $extra
  25496. * @return int<0, max>
  25497. * @throws \InvalidArgumentException
  25498. * @static
  25499. */
  25500. public static function decrementEach($columns, $extra = [])
  25501. {
  25502. /** @var \Illuminate\Database\Query\Builder $instance */
  25503. return $instance->decrementEach($columns, $extra);
  25504. }
  25505. /**
  25506. * Run a truncate statement on the table.
  25507. *
  25508. * @return void
  25509. * @static
  25510. */
  25511. public static function truncate()
  25512. {
  25513. /** @var \Illuminate\Database\Query\Builder $instance */
  25514. $instance->truncate();
  25515. }
  25516. /**
  25517. * Get all of the query builder's columns in a text-only array with all expressions evaluated.
  25518. *
  25519. * @return list<string>
  25520. * @static
  25521. */
  25522. public static function getColumns()
  25523. {
  25524. /** @var \Illuminate\Database\Query\Builder $instance */
  25525. return $instance->getColumns();
  25526. }
  25527. /**
  25528. * Create a raw database expression.
  25529. *
  25530. * @param mixed $value
  25531. * @return \Illuminate\Contracts\Database\Query\Expression
  25532. * @static
  25533. */
  25534. public static function raw($value)
  25535. {
  25536. /** @var \Illuminate\Database\Query\Builder $instance */
  25537. return $instance->raw($value);
  25538. }
  25539. /**
  25540. * Get the current query value bindings in a flattened array.
  25541. *
  25542. * @return list<mixed>
  25543. * @static
  25544. */
  25545. public static function getBindings()
  25546. {
  25547. /** @var \Illuminate\Database\Query\Builder $instance */
  25548. return $instance->getBindings();
  25549. }
  25550. /**
  25551. * Get the raw array of bindings.
  25552. *
  25553. * @return \Illuminate\Database\Query\array{ select: list<mixed>,
  25554. * from: list<mixed>,
  25555. * join: list<mixed>,
  25556. * where: list<mixed>,
  25557. * groupBy: list<mixed>,
  25558. * having: list<mixed>,
  25559. * order: list<mixed>,
  25560. * union: list<mixed>,
  25561. * unionOrder: list<mixed>,
  25562. * }
  25563. * @static
  25564. */
  25565. public static function getRawBindings()
  25566. {
  25567. /** @var \Illuminate\Database\Query\Builder $instance */
  25568. return $instance->getRawBindings();
  25569. }
  25570. /**
  25571. * Set the bindings on the query builder.
  25572. *
  25573. * @param list<mixed> $bindings
  25574. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25575. * @return \Illuminate\Database\Eloquent\Builder<static>
  25576. * @throws \InvalidArgumentException
  25577. * @static
  25578. */
  25579. public static function setBindings($bindings, $type = 'where')
  25580. {
  25581. /** @var \Illuminate\Database\Query\Builder $instance */
  25582. return $instance->setBindings($bindings, $type);
  25583. }
  25584. /**
  25585. * Add a binding to the query.
  25586. *
  25587. * @param mixed $value
  25588. * @param "select"|"from"|"join"|"where"|"groupBy"|"having"|"order"|"union"|"unionOrder" $type
  25589. * @return \Illuminate\Database\Eloquent\Builder<static>
  25590. * @throws \InvalidArgumentException
  25591. * @static
  25592. */
  25593. public static function addBinding($value, $type = 'where')
  25594. {
  25595. /** @var \Illuminate\Database\Query\Builder $instance */
  25596. return $instance->addBinding($value, $type);
  25597. }
  25598. /**
  25599. * Cast the given binding value.
  25600. *
  25601. * @param mixed $value
  25602. * @return mixed
  25603. * @static
  25604. */
  25605. public static function castBinding($value)
  25606. {
  25607. /** @var \Illuminate\Database\Query\Builder $instance */
  25608. return $instance->castBinding($value);
  25609. }
  25610. /**
  25611. * Merge an array of bindings into our bindings.
  25612. *
  25613. * @param self $query
  25614. * @return \Illuminate\Database\Eloquent\Builder<static>
  25615. * @static
  25616. */
  25617. public static function mergeBindings($query)
  25618. {
  25619. /** @var \Illuminate\Database\Query\Builder $instance */
  25620. return $instance->mergeBindings($query);
  25621. }
  25622. /**
  25623. * Remove all of the expressions from a list of bindings.
  25624. *
  25625. * @param array<mixed> $bindings
  25626. * @return list<mixed>
  25627. * @static
  25628. */
  25629. public static function cleanBindings($bindings)
  25630. {
  25631. /** @var \Illuminate\Database\Query\Builder $instance */
  25632. return $instance->cleanBindings($bindings);
  25633. }
  25634. /**
  25635. * Get the database query processor instance.
  25636. *
  25637. * @return \Illuminate\Database\Query\Processors\Processor
  25638. * @static
  25639. */
  25640. public static function getProcessor()
  25641. {
  25642. /** @var \Illuminate\Database\Query\Builder $instance */
  25643. return $instance->getProcessor();
  25644. }
  25645. /**
  25646. * Get the query grammar instance.
  25647. *
  25648. * @return \Illuminate\Database\Query\Grammars\Grammar
  25649. * @static
  25650. */
  25651. public static function getGrammar()
  25652. {
  25653. /** @var \Illuminate\Database\Query\Builder $instance */
  25654. return $instance->getGrammar();
  25655. }
  25656. /**
  25657. * Use the "write" PDO connection when executing the query.
  25658. *
  25659. * @return \Illuminate\Database\Eloquent\Builder<static>
  25660. * @static
  25661. */
  25662. public static function useWritePdo()
  25663. {
  25664. /** @var \Illuminate\Database\Query\Builder $instance */
  25665. return $instance->useWritePdo();
  25666. }
  25667. /**
  25668. * Clone the query without the given properties.
  25669. *
  25670. * @return static
  25671. * @static
  25672. */
  25673. public static function cloneWithout($properties)
  25674. {
  25675. /** @var \Illuminate\Database\Query\Builder $instance */
  25676. return $instance->cloneWithout($properties);
  25677. }
  25678. /**
  25679. * Clone the query without the given bindings.
  25680. *
  25681. * @return static
  25682. * @static
  25683. */
  25684. public static function cloneWithoutBindings($except)
  25685. {
  25686. /** @var \Illuminate\Database\Query\Builder $instance */
  25687. return $instance->cloneWithoutBindings($except);
  25688. }
  25689. /**
  25690. * Dump the current SQL and bindings.
  25691. *
  25692. * @param mixed $args
  25693. * @return \Illuminate\Database\Eloquent\Builder<static>
  25694. * @static
  25695. */
  25696. public static function dump(...$args)
  25697. {
  25698. /** @var \Illuminate\Database\Query\Builder $instance */
  25699. return $instance->dump(...$args);
  25700. }
  25701. /**
  25702. * Dump the raw current SQL with embedded bindings.
  25703. *
  25704. * @return \Illuminate\Database\Eloquent\Builder<static>
  25705. * @static
  25706. */
  25707. public static function dumpRawSql()
  25708. {
  25709. /** @var \Illuminate\Database\Query\Builder $instance */
  25710. return $instance->dumpRawSql();
  25711. }
  25712. /**
  25713. * Die and dump the current SQL and bindings.
  25714. *
  25715. * @return never
  25716. * @static
  25717. */
  25718. public static function dd()
  25719. {
  25720. /** @var \Illuminate\Database\Query\Builder $instance */
  25721. return $instance->dd();
  25722. }
  25723. /**
  25724. * Die and dump the current SQL with embedded bindings.
  25725. *
  25726. * @return never
  25727. * @static
  25728. */
  25729. public static function ddRawSql()
  25730. {
  25731. /** @var \Illuminate\Database\Query\Builder $instance */
  25732. return $instance->ddRawSql();
  25733. }
  25734. /**
  25735. * Add a where clause to determine if a "date" column is in the past to the query.
  25736. *
  25737. * @param array|string $columns
  25738. * @return \Illuminate\Database\Eloquent\Builder<static>
  25739. * @static
  25740. */
  25741. public static function wherePast($columns)
  25742. {
  25743. /** @var \Illuminate\Database\Query\Builder $instance */
  25744. return $instance->wherePast($columns);
  25745. }
  25746. /**
  25747. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25748. *
  25749. * @param array|string $columns
  25750. * @return \Illuminate\Database\Eloquent\Builder<static>
  25751. * @static
  25752. */
  25753. public static function whereNowOrPast($columns)
  25754. {
  25755. /** @var \Illuminate\Database\Query\Builder $instance */
  25756. return $instance->whereNowOrPast($columns);
  25757. }
  25758. /**
  25759. * Add an "or where" clause to determine if a "date" column is in the past to the query.
  25760. *
  25761. * @param array|string $columns
  25762. * @return \Illuminate\Database\Eloquent\Builder<static>
  25763. * @static
  25764. */
  25765. public static function orWherePast($columns)
  25766. {
  25767. /** @var \Illuminate\Database\Query\Builder $instance */
  25768. return $instance->orWherePast($columns);
  25769. }
  25770. /**
  25771. * Add a where clause to determine if a "date" column is in the past or now to the query.
  25772. *
  25773. * @param array|string $columns
  25774. * @return \Illuminate\Database\Eloquent\Builder<static>
  25775. * @static
  25776. */
  25777. public static function orWhereNowOrPast($columns)
  25778. {
  25779. /** @var \Illuminate\Database\Query\Builder $instance */
  25780. return $instance->orWhereNowOrPast($columns);
  25781. }
  25782. /**
  25783. * Add a where clause to determine if a "date" column is in the future to the query.
  25784. *
  25785. * @param array|string $columns
  25786. * @return \Illuminate\Database\Eloquent\Builder<static>
  25787. * @static
  25788. */
  25789. public static function whereFuture($columns)
  25790. {
  25791. /** @var \Illuminate\Database\Query\Builder $instance */
  25792. return $instance->whereFuture($columns);
  25793. }
  25794. /**
  25795. * Add a where clause to determine if a "date" column is in the future or now to the query.
  25796. *
  25797. * @param array|string $columns
  25798. * @return \Illuminate\Database\Eloquent\Builder<static>
  25799. * @static
  25800. */
  25801. public static function whereNowOrFuture($columns)
  25802. {
  25803. /** @var \Illuminate\Database\Query\Builder $instance */
  25804. return $instance->whereNowOrFuture($columns);
  25805. }
  25806. /**
  25807. * Add an "or where" clause to determine if a "date" column is in the future to the query.
  25808. *
  25809. * @param array|string $columns
  25810. * @return \Illuminate\Database\Eloquent\Builder<static>
  25811. * @static
  25812. */
  25813. public static function orWhereFuture($columns)
  25814. {
  25815. /** @var \Illuminate\Database\Query\Builder $instance */
  25816. return $instance->orWhereFuture($columns);
  25817. }
  25818. /**
  25819. * Add an "or where" clause to determine if a "date" column is in the future or now to the query.
  25820. *
  25821. * @param array|string $columns
  25822. * @return \Illuminate\Database\Eloquent\Builder<static>
  25823. * @static
  25824. */
  25825. public static function orWhereNowOrFuture($columns)
  25826. {
  25827. /** @var \Illuminate\Database\Query\Builder $instance */
  25828. return $instance->orWhereNowOrFuture($columns);
  25829. }
  25830. /**
  25831. * Add a "where date" clause to determine if a "date" column is today to the query.
  25832. *
  25833. * @param array|string $columns
  25834. * @param string $boolean
  25835. * @return \Illuminate\Database\Eloquent\Builder<static>
  25836. * @static
  25837. */
  25838. public static function whereToday($columns, $boolean = 'and')
  25839. {
  25840. /** @var \Illuminate\Database\Query\Builder $instance */
  25841. return $instance->whereToday($columns, $boolean);
  25842. }
  25843. /**
  25844. * Add a "where date" clause to determine if a "date" column is before today.
  25845. *
  25846. * @param array|string $columns
  25847. * @return \Illuminate\Database\Eloquent\Builder<static>
  25848. * @static
  25849. */
  25850. public static function whereBeforeToday($columns)
  25851. {
  25852. /** @var \Illuminate\Database\Query\Builder $instance */
  25853. return $instance->whereBeforeToday($columns);
  25854. }
  25855. /**
  25856. * Add a "where date" clause to determine if a "date" column is today or before to the query.
  25857. *
  25858. * @param array|string $columns
  25859. * @return \Illuminate\Database\Eloquent\Builder<static>
  25860. * @static
  25861. */
  25862. public static function whereTodayOrBefore($columns)
  25863. {
  25864. /** @var \Illuminate\Database\Query\Builder $instance */
  25865. return $instance->whereTodayOrBefore($columns);
  25866. }
  25867. /**
  25868. * Add a "where date" clause to determine if a "date" column is after today.
  25869. *
  25870. * @param array|string $columns
  25871. * @return \Illuminate\Database\Eloquent\Builder<static>
  25872. * @static
  25873. */
  25874. public static function whereAfterToday($columns)
  25875. {
  25876. /** @var \Illuminate\Database\Query\Builder $instance */
  25877. return $instance->whereAfterToday($columns);
  25878. }
  25879. /**
  25880. * Add a "where date" clause to determine if a "date" column is today or after to the query.
  25881. *
  25882. * @param array|string $columns
  25883. * @return \Illuminate\Database\Eloquent\Builder<static>
  25884. * @static
  25885. */
  25886. public static function whereTodayOrAfter($columns)
  25887. {
  25888. /** @var \Illuminate\Database\Query\Builder $instance */
  25889. return $instance->whereTodayOrAfter($columns);
  25890. }
  25891. /**
  25892. * Add an "or where date" clause to determine if a "date" column is today to the query.
  25893. *
  25894. * @param array|string $columns
  25895. * @return \Illuminate\Database\Eloquent\Builder<static>
  25896. * @static
  25897. */
  25898. public static function orWhereToday($columns)
  25899. {
  25900. /** @var \Illuminate\Database\Query\Builder $instance */
  25901. return $instance->orWhereToday($columns);
  25902. }
  25903. /**
  25904. * Add an "or where date" clause to determine if a "date" column is before today.
  25905. *
  25906. * @param array|string $columns
  25907. * @return \Illuminate\Database\Eloquent\Builder<static>
  25908. * @static
  25909. */
  25910. public static function orWhereBeforeToday($columns)
  25911. {
  25912. /** @var \Illuminate\Database\Query\Builder $instance */
  25913. return $instance->orWhereBeforeToday($columns);
  25914. }
  25915. /**
  25916. * Add an "or where date" clause to determine if a "date" column is today or before to the query.
  25917. *
  25918. * @param array|string $columns
  25919. * @return \Illuminate\Database\Eloquent\Builder<static>
  25920. * @static
  25921. */
  25922. public static function orWhereTodayOrBefore($columns)
  25923. {
  25924. /** @var \Illuminate\Database\Query\Builder $instance */
  25925. return $instance->orWhereTodayOrBefore($columns);
  25926. }
  25927. /**
  25928. * Add an "or where date" clause to determine if a "date" column is after today.
  25929. *
  25930. * @param array|string $columns
  25931. * @return \Illuminate\Database\Eloquent\Builder<static>
  25932. * @static
  25933. */
  25934. public static function orWhereAfterToday($columns)
  25935. {
  25936. /** @var \Illuminate\Database\Query\Builder $instance */
  25937. return $instance->orWhereAfterToday($columns);
  25938. }
  25939. /**
  25940. * Add an "or where date" clause to determine if a "date" column is today or after to the query.
  25941. *
  25942. * @param array|string $columns
  25943. * @return \Illuminate\Database\Eloquent\Builder<static>
  25944. * @static
  25945. */
  25946. public static function orWhereTodayOrAfter($columns)
  25947. {
  25948. /** @var \Illuminate\Database\Query\Builder $instance */
  25949. return $instance->orWhereTodayOrAfter($columns);
  25950. }
  25951. /**
  25952. * Explains the query.
  25953. *
  25954. * @return \Illuminate\Support\Collection
  25955. * @static
  25956. */
  25957. public static function explain()
  25958. {
  25959. /** @var \Illuminate\Database\Query\Builder $instance */
  25960. return $instance->explain();
  25961. }
  25962. /**
  25963. * Register a custom macro.
  25964. *
  25965. * @param string $name
  25966. * @param object|callable $macro
  25967. * @param-closure-this static $macro
  25968. * @return void
  25969. * @static
  25970. */
  25971. public static function macro($name, $macro)
  25972. {
  25973. \Illuminate\Database\Query\Builder::macro($name, $macro);
  25974. }
  25975. /**
  25976. * Mix another object into the class.
  25977. *
  25978. * @param object $mixin
  25979. * @param bool $replace
  25980. * @return void
  25981. * @throws \ReflectionException
  25982. * @static
  25983. */
  25984. public static function mixin($mixin, $replace = true)
  25985. {
  25986. \Illuminate\Database\Query\Builder::mixin($mixin, $replace);
  25987. }
  25988. /**
  25989. * Flush the existing macros.
  25990. *
  25991. * @return void
  25992. * @static
  25993. */
  25994. public static function flushMacros()
  25995. {
  25996. \Illuminate\Database\Query\Builder::flushMacros();
  25997. }
  25998. /**
  25999. * Dynamically handle calls to the class.
  26000. *
  26001. * @param string $method
  26002. * @param array $parameters
  26003. * @return mixed
  26004. * @throws \BadMethodCallException
  26005. * @static
  26006. */
  26007. public static function macroCall($method, $parameters)
  26008. {
  26009. /** @var \Illuminate\Database\Query\Builder $instance */
  26010. return $instance->macroCall($method, $parameters);
  26011. }
  26012. }
  26013. class Event extends \Illuminate\Support\Facades\Event {}
  26014. class File extends \Illuminate\Support\Facades\File {}
  26015. class Gate extends \Illuminate\Support\Facades\Gate {}
  26016. class Hash extends \Illuminate\Support\Facades\Hash {}
  26017. class Http extends \Illuminate\Support\Facades\Http {}
  26018. class Js extends \Illuminate\Support\Js {}
  26019. class Lang extends \Illuminate\Support\Facades\Lang {}
  26020. class Log extends \Illuminate\Support\Facades\Log {}
  26021. class Mail extends \Illuminate\Support\Facades\Mail {}
  26022. class Notification extends \Illuminate\Support\Facades\Notification {}
  26023. class Number extends \Illuminate\Support\Number {}
  26024. class Password extends \Illuminate\Support\Facades\Password {}
  26025. class Process extends \Illuminate\Support\Facades\Process {}
  26026. class Queue extends \Illuminate\Support\Facades\Queue {}
  26027. class RateLimiter extends \Illuminate\Support\Facades\RateLimiter {}
  26028. class Redirect extends \Illuminate\Support\Facades\Redirect {}
  26029. class Request extends \Illuminate\Support\Facades\Request {}
  26030. class Response extends \Illuminate\Support\Facades\Response {}
  26031. class Route extends \Illuminate\Support\Facades\Route {}
  26032. class Schedule extends \Illuminate\Support\Facades\Schedule {}
  26033. class Schema extends \Illuminate\Support\Facades\Schema {}
  26034. class Session extends \Illuminate\Support\Facades\Session {}
  26035. class Storage extends \Illuminate\Support\Facades\Storage {}
  26036. class Str extends \Illuminate\Support\Str {}
  26037. class URL extends \Illuminate\Support\Facades\URL {}
  26038. class Uri extends \Illuminate\Support\Uri {}
  26039. class Validator extends \Illuminate\Support\Facades\Validator {}
  26040. class View extends \Illuminate\Support\Facades\View {}
  26041. class Vite extends \Illuminate\Support\Facades\Vite {}
  26042. class PDF extends \Barryvdh\DomPDF\Facade\Pdf {}
  26043. class Pdf extends \Barryvdh\DomPDF\Facade\Pdf {}
  26044. }